Skip to content

Commit 0f3b73a

Browse files
committed
not use idea name
1 parent 2a4bc1a commit 0f3b73a

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

.consulo/runConfigurations/All_Tests.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
<option name="TRANSPORT" value="0" />
1717
<option name="LOCAL" value="true" />
1818
</RunnerSettings>
19+
<ConfigurationWrapper RunnerId="ConsuloDebuggerRunner" />
1920
<ConfigurationWrapper RunnerId="Debug" />
2021
<method>
2122
<option name="BuildArtifacts" enabled="true">

java-impl/src/com/intellij/codeInspection/magicConstant/MagicConstantInspection.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
import org.jetbrains.annotations.NonNls;
3030
import org.jetbrains.annotations.NotNull;
3131
import org.jetbrains.annotations.Nullable;
32+
import org.mustbe.consulo.RequiredDispatchThread;
3233
import com.intellij.analysis.AnalysisScope;
3334
import com.intellij.codeInsight.AnnotationUtil;
3435
import com.intellij.codeInsight.ExternalAnnotationsManager;
@@ -46,9 +47,9 @@
4647
import com.intellij.openapi.projectRoots.Sdk;
4748
import com.intellij.openapi.projectRoots.SdkModificator;
4849
import com.intellij.openapi.projectRoots.impl.JavaSdkImpl;
50+
import com.intellij.openapi.roots.ModuleExtensionWithSdkOrderEntry;
4951
import com.intellij.openapi.roots.OrderEntry;
5052
import com.intellij.openapi.roots.ProjectRootManager;
51-
import com.intellij.openapi.roots.SdkOrderEntry;
5253
import com.intellij.openapi.util.Comparing;
5354
import com.intellij.openapi.util.Key;
5455
import com.intellij.openapi.util.io.FileUtil;
@@ -259,9 +260,9 @@ private static void checkAnnotationsJarAttached(@NotNull PsiFile file, @NotNull
259260
Sdk jdk = null;
260261
for(OrderEntry orderEntry : entries)
261262
{
262-
if(orderEntry instanceof SdkOrderEntry)
263+
if(orderEntry instanceof ModuleExtensionWithSdkOrderEntry)
263264
{
264-
Sdk temp = ((SdkOrderEntry) orderEntry).getSdk();
265+
Sdk temp = ((ModuleExtensionWithSdkOrderEntry) orderEntry).getSdk();
265266
if(temp != null && temp.getSdkType() == JavaSdk.getInstance())
266267
{
267268
jdk = temp;
@@ -282,7 +283,7 @@ private static void checkAnnotationsJarAttached(@NotNull PsiFile file, @NotNull
282283
final Sdk finalJdk = jdk;
283284

284285
String path = finalJdk.getHomePath();
285-
String text = "No IDEA annotations attached to the JDK " + finalJdk.getName() + (path == null ? "" : " (" + FileUtil.toSystemDependentName(path) + ")") + ", some issues will not be found";
286+
String text = "No external annotations attached to the JDK " + finalJdk.getName() + (path == null ? "" : " (" + FileUtil.toSystemDependentName(path) + ")") + ", some issues will not be found";
286287
holder.registerProblem(file, text, ProblemHighlightType.GENERIC_ERROR_OR_WARNING, new LocalQuickFix()
287288
{
288289
@NotNull
@@ -300,6 +301,7 @@ public String getFamilyName()
300301
}
301302

302303
@Override
304+
@RequiredDispatchThread
303305
public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor)
304306
{
305307
ApplicationManager.getApplication().runWriteAction(new Runnable()

0 commit comments

Comments
 (0)