diff --git a/plugins/hg4idea/src/org/zmlx/hg4idea/HgVcs.java b/plugins/hg4idea/src/org/zmlx/hg4idea/HgVcs.java index 5f2a8ccc89e2..738a0ff8aa95 100644 --- a/plugins/hg4idea/src/org/zmlx/hg4idea/HgVcs.java +++ b/plugins/hg4idea/src/org/zmlx/hg4idea/HgVcs.java @@ -242,7 +242,6 @@ public class HgVcs extends AbstractVcs { return in; } - @Override public RootsConvertor getCustomConvertor() { return HgRootsHandler.getInstance(myProject); @@ -437,7 +436,6 @@ public class HgVcs extends AbstractVcs { public void checkVersion() { final String executable = getGlobalSettings().getHgExecutable(); HgCommandResultNotifier errorNotification = new HgCommandResultNotifier(myProject); - String message; final String SETTINGS_LINK = "settings"; final String UPDATE_LINK = "update"; NotificationListener linkAdapter = new NotificationListener.Adapter() { @@ -458,15 +456,15 @@ public class HgVcs extends AbstractVcs { //if version is not supported, but have valid hg executable if (!myVersion.isSupported()) { LOG.info("Unsupported Hg version: " + myVersion); - message = String.format("The configured version of Hg is not supported: %s.
" + - "The minimal supported version is %s. Please update.", - myVersion, HgVersion.MIN); + String message = String.format("The configured version of Hg is not supported: %s.
" + + "The minimal supported version is %s. Please update.", + myVersion, HgVersion.MIN); errorNotification.notifyError(null, "Unsupported Hg version", message, linkAdapter); } - if (!unsupportedExtension.isEmpty()) { + else if (!unsupportedExtension.isEmpty()) { LOG.warn("Unsupported Hg extensions: " + unsupportedExtension.toString()); - message = String.format("Some hg extensions %s are not found or not supported by your hg version and will be ignored.\n" + - "Please, update your hgrc or Mercurial.ini file", unsupportedExtension.toString()); + String message = String.format("Some hg extensions %s are not found or not supported by your hg version and will be ignored.\n" + + "Please, update your hgrc or Mercurial.ini file", unsupportedExtension.toString()); errorNotification.notifyWarning("Unsupported Hg version", message); } } @@ -475,10 +473,13 @@ public class HgVcs extends AbstractVcs { //sometimes not hg application has version command, but we couldn't parse an answer as valid hg, // so parse(output) throw ParseException, but hg and git executable seems to be valid in this case final String reason = (e.getCause() != null ? e.getCause() : e).getMessage(); - message = HgVcsMessages.message("hg4idea.unable.to.run.hg", executable); + String message = HgVcsMessages.message("hg4idea.unable.to.run.hg", executable); errorNotification.notifyError(null, message, String.format( - reason + "
Please check your hg executable path in settings "), + reason + + "
Please check your hg executable path in settings "), linkAdapter); } } diff --git a/plugins/hg4idea/src/org/zmlx/hg4idea/ui/HgConfigurationProjectPanel.java b/plugins/hg4idea/src/org/zmlx/hg4idea/ui/HgConfigurationProjectPanel.java index 3398aa9e414a..0fad4a3ab3e4 100644 --- a/plugins/hg4idea/src/org/zmlx/hg4idea/ui/HgConfigurationProjectPanel.java +++ b/plugins/hg4idea/src/org/zmlx/hg4idea/ui/HgConfigurationProjectPanel.java @@ -16,7 +16,6 @@ import com.intellij.openapi.options.ConfigurationException; import com.intellij.openapi.project.Project; import com.intellij.openapi.ui.TextFieldWithBrowseButton; import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; import org.zmlx.hg4idea.HgProjectSettings; import org.zmlx.hg4idea.HgVcs; import org.zmlx.hg4idea.HgVcsMessages; @@ -33,7 +32,7 @@ public class HgConfigurationProjectPanel { private TextFieldWithBrowseButton myPathSelector; private final HgVcs myVcs; - public HgConfigurationProjectPanel(@NotNull HgProjectSettings projectSettings, @Nullable Project project) { + public HgConfigurationProjectPanel(@NotNull HgProjectSettings projectSettings, @NotNull Project project) { myProjectSettings = projectSettings; myVcs = HgVcs.getInstance(project); loadSettings();