Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion plugin/src/main/java/git4idea/reset/GitResetOperation.java
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ else if (!successes.isEmpty()) {
private static LocalizeValue formErrorReport(@Nonnull Map<GitRepository, GitCommandResult> errorResults) {
MultiMap<LocalizeValue, GitRepository> grouped = groupByResult(errorResults);
if (grouped.size() == 1) {
return grouped.keySet().iterator().next().map((localizeManager, string) -> "<code>" + string + "</code>");
return grouped.keySet().iterator().next().map(s -> "<code>" + s + "</code>");
}
return LocalizeValue.localizeTODO(StringUtil.join(
grouped.entrySet(),
Expand Down
2 changes: 1 addition & 1 deletion plugin/src/main/java/git4idea/util/GitUIUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public static void notifyMessages(
boolean important,
@Nullable Collection<String> messages
) {
LocalizeValue desc = description.map((localizeManager, string) -> string.replace("\n", "<br/>"));
LocalizeValue desc = description.map(s -> s.replace("\n", "<br/>"));
if (messages != null && !messages.isEmpty()) {
desc = LocalizeValue.join(desc, LocalizeValue.of(StringUtil.join(messages, "<hr/><br/>")));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public static void notifyUntrackedFilesOverwrittenBy(
LegacyDialog legacyDialog = componentFactory.createSelectFilesDialogOnlyOk(
project,
new ArrayList<>(untrackedFiles),
dialogDesc.map((localizeManager, string) -> StringUtil.stripHtml(string, true)).get(),
dialogDesc.map(s -> StringUtil.stripHtml(s, true)).get(),
null,
false,
false,
Expand Down Expand Up @@ -155,7 +155,7 @@ public static boolean showUntrackedFilesDialogWithRollback(
}
LocalizeValue title = LocalizeValue.localizeTODO("Could not " + operationName.capitalize());
LocalizeValue description = createUntrackedFilesOverwrittenDescription(operationName, false)
.map((localizeManager, string) -> StringUtil.stripHtml(string, true));
.map(string -> StringUtil.stripHtml(string, true));
DialogWrapper dialog = new UntrackedFilesRollBackDialog(project, filesBrowser, description, rollbackProposal);
dialog.setTitle(title);
DialogManager.show(dialog);
Expand Down Expand Up @@ -194,9 +194,7 @@ public UntrackedFilesRollBackDialog(
protected JComponent createSouthPanel() {
JComponent buttons = super.createSouthPanel();
JPanel panel = new JPanel(new VerticalFlowLayout());
panel.add(
new JBLabel(myRollbackProposal.map((localizeManager, string) -> XmlStringUtil.wrapInHtml(string)).get())
);
panel.add(new JBLabel(myRollbackProposal.map(XmlStringUtil::wrapInHtml).get()));
if (buttons != null) {
panel.add(buttons);
}
Expand Down
4 changes: 2 additions & 2 deletions plugin/src/main/java/git4idea/util/GitVcsConsoleWriter.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
import consulo.util.lang.StringUtil;
import consulo.versionControlSystem.ProjectLevelVcsManager;
import consulo.versionControlSystem.VcsConsoleLine;
import jakarta.annotation.Nonnull;
import jakarta.inject.Inject;
import jakarta.inject.Singleton;

import jakarta.annotation.Nonnull;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
Expand Down Expand Up @@ -78,7 +78,7 @@ public void showCommandLine(@Nonnull String cmdLine) {
*/
public void showMessage(@Nonnull LocalizeValue message, @Nonnull ConsoleViewContentType contentType) {
LocalizeValue shortMessage =
message.map(((localizeManager, value) -> StringUtil.shortenPathWithEllipsis(value, MAX_CONSOLE_OUTPUT_SIZE)));
message.map(value -> StringUtil.shortenPathWithEllipsis(value, MAX_CONSOLE_OUTPUT_SIZE));
ProjectLevelVcsManager.getInstance(myProject).addMessageToConsoleWindow(shortMessage.get(), contentType);
}

Expand Down
Loading