diff --git a/src/main/java/org/jetbrains/plugins/spotbugs/common/ExtendedProblemDescriptor.java b/src/main/java/org/jetbrains/plugins/spotbugs/common/ExtendedProblemDescriptor.java index fceab5ae..a6762909 100644 --- a/src/main/java/org/jetbrains/plugins/spotbugs/common/ExtendedProblemDescriptor.java +++ b/src/main/java/org/jetbrains/plugins/spotbugs/common/ExtendedProblemDescriptor.java @@ -82,7 +82,7 @@ public void setProblemGroup(@Nullable final ProblemGroup problemgroup) { @Override public String getProblemName() { - return "FindBugs-IDEA"; + return "SpotBugs"; } @Override diff --git a/src/main/java/org/jetbrains/plugins/spotbugs/core/FindBugsStarter.java b/src/main/java/org/jetbrains/plugins/spotbugs/core/FindBugsStarter.java index 3e4b5d82..1a9e1290 100644 --- a/src/main/java/org/jetbrains/plugins/spotbugs/core/FindBugsStarter.java +++ b/src/main/java/org/jetbrains/plugins/spotbugs/core/FindBugsStarter.java @@ -148,7 +148,7 @@ private void startImpl(final boolean justCompiled) { final ToolWindow toolWindow = ToolWindowPanel.getWindow(project); if (toolWindow == null) { - throw new IllegalStateException("No FindBugs ToolWindow"); + throw new IllegalStateException("No SpotBugs ToolWindow"); } /* * Important: Make sure the tool window is initialized. diff --git a/src/main/java/org/jetbrains/plugins/spotbugs/core/PluginVersionChecker.java b/src/main/java/org/jetbrains/plugins/spotbugs/core/PluginVersionChecker.java index 5725ebbc..4949eb10 100644 --- a/src/main/java/org/jetbrains/plugins/spotbugs/core/PluginVersionChecker.java +++ b/src/main/java/org/jetbrains/plugins/spotbugs/core/PluginVersionChecker.java @@ -40,19 +40,16 @@ private PluginVersionChecker() { static String getLatestVersion(@NotNull final ProgressIndicator indicator) throws IOException { final String url = getLatestReleaseUrl(); indicator.setText(ResourcesLoader.getString("error.submitReport.retrieve", url)); - final RequestBuilder request = HttpRequests + final RequestBuilder builder = HttpRequests .request(url) .accept("application/vnd.github.v2+json"); - return request.connect(new HttpRequests.RequestProcessor() { - @Override - public String process(@NotNull final HttpRequests.Request request) throws IOException { - final Reader reader = request.getReader(); - try { - LatestRelease latestRelease = new GsonBuilder().create().fromJson(reader, LatestRelease.class); - return latestRelease.name; - } finally { - IoUtil.safeClose(reader); - } + return builder.connect(request -> { + final Reader reader = request.getReader(); + try { + LatestRelease latestRelease = new GsonBuilder().create().fromJson(reader, LatestRelease.class); + return latestRelease.name; + } finally { + IoUtil.safeClose(reader); } }); } @@ -60,7 +57,7 @@ public String process(@NotNull final HttpRequests.Request request) throws IOExce @NotNull private static String getLatestReleaseUrl() { // https support only - return "https://api.github.com/repos/andrepdo/findbugs-idea/releases/latest"; + return "https://api.github.com/repos/JetBrains/spotbugs-intellij-plugin/releases/latest"; } private static class LatestRelease { diff --git a/src/main/java/org/jetbrains/plugins/spotbugs/gui/settings/AdvancedSettingsAction.java b/src/main/java/org/jetbrains/plugins/spotbugs/gui/settings/AdvancedSettingsAction.java index 6d7ca73f..98c6ae6a 100644 --- a/src/main/java/org/jetbrains/plugins/spotbugs/gui/settings/AdvancedSettingsAction.java +++ b/src/main/java/org/jetbrains/plugins/spotbugs/gui/settings/AdvancedSettingsAction.java @@ -160,7 +160,7 @@ public void actionPerformed(@NotNull final AnActionEvent e) { ResourcesLoader.getString("settings.export.title"), ResourcesLoader.getString("settings.export.description"), XmlFileType.DEFAULT_EXTENSION - ), settingsPane).save(null, "FindBugs-IDEA"); + ), settingsPane).save(null, "SpotBugs"); if (wrapper == null) { return; } diff --git a/src/main/java/org/jetbrains/plugins/spotbugs/plugins/Plugins.java b/src/main/java/org/jetbrains/plugins/spotbugs/plugins/Plugins.java index b7a0149c..1649b731 100644 --- a/src/main/java/org/jetbrains/plugins/spotbugs/plugins/Plugins.java +++ b/src/main/java/org/jetbrains/plugins/spotbugs/plugins/Plugins.java @@ -85,14 +85,14 @@ private static File findAccessibleFindBugsIdeaPluginPath(@NotNull final IdeaPlug // PathManager.getSystemPath() may return relative path final File pluginsPath = new File(PathManager.getPluginsPath()).getAbsoluteFile(); if (!pluginsPath.isDirectory() || !pluginsPath.canWrite()) { - throw new IllegalStateException("No accessible FindBugs-IDEA plugin directory found. Tested candidates:\n" + + throw new IllegalStateException("No accessible SpotBugs plugin directory found. Tested candidates:\n" + "'" + ret.getAbsolutePath() + "': isDirectory=" + ret.isDirectory() + ", canWrite=" + ret.canWrite() + "\n" + "'" + pluginsPath.getAbsolutePath() + "': isDirectory=" + pluginsPath.isDirectory() + ", canWrite=" + pluginsPath.canWrite()); } - ret = new File(pluginsPath, "FindBugs-IDEA"); + ret = new File(pluginsPath, "spotbugs-idea"); if (!ret.isDirectory()) { if (!ret.mkdirs()) { - throw new IllegalStateException("Could not create alternative FindBugs-IDEA plugin directory: " + ret.getAbsolutePath()); + throw new IllegalStateException("Could not create alternative SpotBugs plugin directory: " + ret.getAbsolutePath()); } } } @@ -105,7 +105,7 @@ public static File getDirectory(@NotNull final IdeaPluginDescriptor pluginDescri final File dir = new File(homeDir, "customPlugins"); if (!dir.isDirectory()) { if (!dir.mkdirs()) { - throw new IllegalStateException("Could not create FindBugs-IDEA custom plugins directory: " + dir.getAbsolutePath()); + throw new IllegalStateException("Could not create SpotBugs custom plugins directory: " + dir.getAbsolutePath()); } } return dir; diff --git a/src/main/resources/META-INF/plugin.xml b/src/main/resources/META-INF/plugin.xml index 9c1296a9..0ddc2a5f 100644 --- a/src/main/resources/META-INF/plugin.xml +++ b/src/main/resources/META-INF/plugin.xml @@ -116,14 +116,14 @@ - + + displayName="SpotBugs"/> diff --git a/src/main/resources/org/jetbrains/plugins/spotbugs/resources/i18n/Messages.properties b/src/main/resources/org/jetbrains/plugins/spotbugs/resources/i18n/Messages.properties index f44e9733..02a75636 100644 --- a/src/main/resources/org/jetbrains/plugins/spotbugs/resources/i18n/Messages.properties +++ b/src/main/resources/org/jetbrains/plugins/spotbugs/resources/i18n/Messages.properties @@ -41,16 +41,16 @@ settings.action.import.description=Import Settings from file settings.action.export.title=Export settings.action.export.description=Export Settings to file settings.export.title=Target File -settings.export.description=Export FindBugs-IDEA settings to +settings.export.description=Export SpotBugs plugin settings to settings.export.success.title=Export complete settings.export.success.text=Your settings have been successfully exported. -settings.module.overrideProjectSettings=Override FindBugs-IDEA project settings +settings.module.overrideProjectSettings=Override SpotBugs project settings settings.module.reset.text=Do you want to reset the settings to the default? settings.module.loadProject.title=Project settings settings.module.loadProject.text=Do you want to load the project settings? settings.choose.title=Setting File Location -settings.choose.description=Choose FindBugs-IDEA or Sonar setting file +settings.choose.description=Choose SpotBugs plugin or Sonar setting file general.compileBeforeAnalyze.title=Compile affected files before analyze general.analyzeAfterCompile.title=Analyze affected files after compile @@ -111,13 +111,13 @@ annotate.textRange.text=Enable editor TextRange markup & Suppress bug pattern fe share.description=This setting file will be imported before the analyze is started. \ The current settings will be overwritten. \ - Sonar and FindBugs-IDEA setting file format is supported. \ + Sonar and SpotBugs plugin setting file format is supported. \ This might primarily be a good solution to share Sonar setting file. \ - In case of FindBugs-IDEA setting file it could be better to share the 'findbugs-idea.xml' (within .idea project directory) \ + In case of SpotBugs plugin setting file it could be better to share the 'findbugs-idea.xml' (within .idea project directory) \ with the official solution: -share.file.title=FindBugs-IDEA or Sonar setting file -share.url=https://www.jetbrains.com/help/idea/2016.1/synchronizing-and-sharing-settings.html +share.file.title=SpotBugs plugin or Sonar setting file +share.url=https://www.jetbrains.com/help/idea/2020.1/sharing-your-ide-settings.html export.title=Export bug collection export.directory.label=Export bug collection to directory @@ -141,10 +141,10 @@ analysis.noOutputPaths=No compiler output path(s) found. Maybe the module(s) mus analysis.includeTests.title=Test sources analysis.includeTests.text=Do you want to include test sources for the analysis? analysis.error.importSettings.title=Import FindBugs Settings -analysis.error.importSettings.notExists=Specified \"FindBugs-IDEA or Sonar setting file\" ({0}) not exists -analysis.error.importSettings.noFile=Specified \"FindBugs-IDEA or Sonar setting file\" ({0}) is not a file -analysis.error.importSettings.notReadable=Specified \"FindBugs-IDEA or Sonar setting file\" ({0}) is not readable -analysis.error.importSettings.fatal=Fatal error while import the specified \"FindBugs-IDEA or Sonar setting file\" ({0}): {1} \ +analysis.error.importSettings.notExists=Specified \"SpotBugs plugin or Sonar setting file\" ({0}) not exists +analysis.error.importSettings.noFile=Specified \"SpotBugs plugin or Sonar setting file\" ({0}) is not a file +analysis.error.importSettings.notReadable=Specified \"SpotBugs plugin or Sonar setting file\" ({0}) is not readable +analysis.error.importSettings.fatal=Fatal error while import the specified \"SpotBugs plugin or Sonar setting file\" ({0}): {1} \
See logs for more details/stack edit.settings=Edit settings @@ -167,10 +167,10 @@ error.file.type=Path \"{0}\" is not a file. error.directory.type=Path \"{0}\" is not a directory. error.customPlugins.title=Error while loading custom FindBugs plugins error.submitReport.title=Copy error to clipboard and open page -error.submitReport.checkVersion=Check FindBugs-IDEA plugin version +error.submitReport.checkVersion=Check SpotBugs plugin version error.submitReport.retrieve=Retrieve infos from {0} -error.submitReport.old.title=Old FindBugs-IDEA version -error.submitReport.old.text=FindBugs-IDEA plugin is out of date. Please consider to update the plugin.
\ +error.submitReport.old.title=Old SpotBugs plugin version +error.submitReport.old.text=SpotBugs plugin is out of date. Please consider to update the plugin.
\ Your version: {0}
\ Latest available version: {1}

\ Do you want to continue reporting this issue?