From ddb631cf15b0fc3d206f843299765f8550a8ea97 Mon Sep 17 00:00:00 2001 From: Roman Shevchenko Date: Fri, 4 Mar 2016 19:05:06 +0100 Subject: [PATCH] Cleanup (typo) --- .../daemon/impl/JavaLineMarkerProvider.java | 12 ++++++------ .../daemon/impl/RecursiveCallLineMarkerProvider.java | 4 ++-- .../codeInsight/daemon/DaemonAnalyzerTestCase.java | 6 +++--- .../src/com/intellij/codeHighlighting/Pass.java | 10 +++++++--- .../TextEditorHighlightingPassRegistrar.java | 4 ++-- .../daemon/impl/SlowLineMarkersPassFactory.java | 8 ++++---- .../groovy/codeInsight/GroovyLineMarkerProvider.java | 4 ++-- .../JavaFxRelatedItemLineMarkerProvider.java | 4 ++-- .../python/edu/PyExecuteFileLineMarkerProvider.java | 2 +- .../python/codeInsight/PyLineMarkerProvider.java | 6 +++--- .../PyUserSkeletonsLineMarkerProvider.java | 4 ++-- .../python/pyi/PyiRelatedItemLineMarkerProvider.java | 4 ++-- .../navigation/NavigationGutterIconBuilder.java | 4 ++-- .../plugins/relaxNG/HighlightingTestBase.java | 2 +- 14 files changed, 39 insertions(+), 35 deletions(-) diff --git a/java/java-impl/src/com/intellij/codeInsight/daemon/impl/JavaLineMarkerProvider.java b/java/java-impl/src/com/intellij/codeInsight/daemon/impl/JavaLineMarkerProvider.java index bb9aab62c8b4..34399542e131 100644 --- a/java/java-impl/src/com/intellij/codeInsight/daemon/impl/JavaLineMarkerProvider.java +++ b/java/java-impl/src/com/intellij/codeInsight/daemon/impl/JavaLineMarkerProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -205,7 +205,7 @@ public class JavaLineMarkerProvider extends LineMarkerProviderDescriptor { } PsiElement range = getMethodRange(method); ArrowUpLineMarkerInfo upInfo = new ArrowUpLineMarkerInfo(range, AllIcons.Gutter.ImplementingMethod, MarkerType.SIBLING_OVERRIDING_METHOD, - Pass.UPDATE_OVERRIDEN_MARKERS); + Pass.UPDATE_OVERRIDDEN_MARKERS); LineMarkerInfo info = NavigateAction.setNavigateAction(upInfo, "Go to super method", IdeActions.ACTION_GOTO_SUPER); result.add(info); } @@ -254,7 +254,7 @@ public class JavaLineMarkerProvider extends LineMarkerProviderDescriptor { } MarkerType type = MarkerType.SUBCLASSED_CLASS; LineMarkerInfo info = new LineMarkerInfo(range, range.getTextRange(), - icon, Pass.UPDATE_OVERRIDEN_MARKERS, type.getTooltip(), + icon, Pass.UPDATE_OVERRIDDEN_MARKERS, type.getTooltip(), type.getNavigationHandler(), GutterIconRenderer.Alignment.RIGHT); NavigateAction.setNavigateAction(info, aClass.isInterface() ? "Go to implementation(s)" : "Go to subclass(es)", IdeActions.ACTION_GOTO_IMPLEMENTATION); @@ -313,9 +313,9 @@ public class JavaLineMarkerProvider extends LineMarkerProviderDescriptor { final MarkerType type = MarkerType.OVERRIDDEN_METHOD; final Icon icon = overrides ? AllIcons.Gutter.OverridenMethod : AllIcons.Gutter.ImplementedMethod; LineMarkerInfo info = new LineMarkerInfo(range, range.getTextRange(), - icon, Pass.UPDATE_OVERRIDEN_MARKERS, type.getTooltip(), - type.getNavigationHandler(), - GutterIconRenderer.Alignment.RIGHT); + icon, Pass.UPDATE_OVERRIDDEN_MARKERS, type.getTooltip(), + type.getNavigationHandler(), + GutterIconRenderer.Alignment.RIGHT); NavigateAction.setNavigateAction(info, overrides ? "Go to overriding methods" : "Go to implementation(s)", IdeActions.ACTION_GOTO_IMPLEMENTATION); result.add(info); } diff --git a/java/java-impl/src/com/intellij/codeInsight/daemon/impl/RecursiveCallLineMarkerProvider.java b/java/java-impl/src/com/intellij/codeInsight/daemon/impl/RecursiveCallLineMarkerProvider.java index 003761e3a728..e1a5b37ecf5a 100644 --- a/java/java-impl/src/com/intellij/codeInsight/daemon/impl/RecursiveCallLineMarkerProvider.java +++ b/java/java-impl/src/com/intellij/codeInsight/daemon/impl/RecursiveCallLineMarkerProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -94,7 +94,7 @@ public class RecursiveCallLineMarkerProvider extends LineMarkerProviderDescripto super(methodCall, methodCall.getTextRange(), AllIcons.Gutter.RecursiveMethod, - Pass.UPDATE_OVERRIDEN_MARKERS, + Pass.UPDATE_OVERRIDDEN_MARKERS, FunctionUtil.constant("Recursive call"), null, GutterIconRenderer.Alignment.RIGHT diff --git a/java/testFramework/src/com/intellij/codeInsight/daemon/DaemonAnalyzerTestCase.java b/java/testFramework/src/com/intellij/codeInsight/daemon/DaemonAnalyzerTestCase.java index 96874087f166..bcb68177295f 100644 --- a/java/testFramework/src/com/intellij/codeInsight/daemon/DaemonAnalyzerTestCase.java +++ b/java/testFramework/src/com/intellij/codeInsight/daemon/DaemonAnalyzerTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -333,7 +333,7 @@ public abstract class DaemonAnalyzerTestCase extends CodeInsightTestCase { TIntArrayList toIgnore = new TIntArrayList(); if (!doTestLineMarkers()) { - toIgnore.add(Pass.UPDATE_OVERRIDEN_MARKERS); + toIgnore.add(Pass.UPDATE_OVERRIDDEN_MARKERS); toIgnore.add(Pass.VISIBLE_LINE_MARKERS); toIgnore.add(Pass.LINE_MARKERS); } @@ -347,7 +347,7 @@ public abstract class DaemonAnalyzerTestCase extends CodeInsightTestCase { toIgnore.add(Pass.WHOLE_FILE_LOCAL_INSPECTIONS); toIgnore.add(Pass.POPUP_HINTS); toIgnore.add(Pass.UPDATE_ALL); - toIgnore.add(Pass.UPDATE_OVERRIDEN_MARKERS); + toIgnore.add(Pass.UPDATE_OVERRIDDEN_MARKERS); toIgnore.add(Pass.VISIBLE_LINE_MARKERS); } diff --git a/platform/analysis-impl/src/com/intellij/codeHighlighting/Pass.java b/platform/analysis-impl/src/com/intellij/codeHighlighting/Pass.java index bfd5437e3216..df9f5c2e2a40 100644 --- a/platform/analysis-impl/src/com/intellij/codeHighlighting/Pass.java +++ b/platform/analysis-impl/src/com/intellij/codeHighlighting/Pass.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,7 +20,7 @@ public interface Pass { int UPDATE_FOLDING = 1; int POPUP_HINTS = 3; int UPDATE_ALL = 4; - int UPDATE_OVERRIDEN_MARKERS = 6; + int UPDATE_OVERRIDDEN_MARKERS = 6; int LOCAL_INSPECTIONS = 7; int EXTERNAL_TOOLS = 8; int WOLF = 9; @@ -29,4 +29,8 @@ public interface Pass { int WHOLE_FILE_LOCAL_INSPECTIONS = 12; int LAST_PASS = WHOLE_FILE_LOCAL_INSPECTIONS; -} + + /** @deprecated use {@link #UPDATE_OVERRIDDEN_MARKERS} (to be removed in IDEA 17) */ + @SuppressWarnings({"unused", "SpellCheckingInspection"}) + int UPDATE_OVERRIDEN_MARKERS = UPDATE_OVERRIDDEN_MARKERS; +} \ No newline at end of file diff --git a/platform/analysis-impl/src/com/intellij/codeHighlighting/TextEditorHighlightingPassRegistrar.java b/platform/analysis-impl/src/com/intellij/codeHighlighting/TextEditorHighlightingPassRegistrar.java index 167e3a48b215..4f157a78d8f0 100644 --- a/platform/analysis-impl/src/com/intellij/codeHighlighting/TextEditorHighlightingPassRegistrar.java +++ b/platform/analysis-impl/src/com/intellij/codeHighlighting/TextEditorHighlightingPassRegistrar.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -88,7 +88,7 @@ public abstract class TextEditorHighlightingPassRegistrar { case LAST: //todo ids = new int[]{Pass.UPDATE_ALL, - Pass.UPDATE_FOLDING, Pass.UPDATE_OVERRIDEN_MARKERS, + Pass.UPDATE_FOLDING, Pass.UPDATE_OVERRIDDEN_MARKERS, Pass.EXTERNAL_TOOLS, Pass.LOCAL_INSPECTIONS, Pass.POPUP_HINTS}; break; diff --git a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/SlowLineMarkersPassFactory.java b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/SlowLineMarkersPassFactory.java index 8e189416c16e..622472b09eab 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/SlowLineMarkersPassFactory.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/SlowLineMarkersPassFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -35,7 +35,7 @@ import org.jetbrains.annotations.Nullable; public class SlowLineMarkersPassFactory extends AbstractProjectComponent implements DirtyScopeTrackingHighlightingPassFactory { public SlowLineMarkersPassFactory(Project project, TextEditorHighlightingPassRegistrar highlightingPassRegistrar) { super(project); - highlightingPassRegistrar.registerTextEditorHighlightingPass(this, null, new int[]{Pass.UPDATE_ALL}, false, Pass.UPDATE_OVERRIDEN_MARKERS); + highlightingPassRegistrar.registerTextEditorHighlightingPass(this, null, new int[]{Pass.UPDATE_ALL}, false, Pass.UPDATE_OVERRIDDEN_MARKERS); } @Override @@ -54,11 +54,11 @@ public class SlowLineMarkersPassFactory extends AbstractProjectComponent impleme } private static TextRange calculateRangeToProcess(Editor editor) { - return FileStatusMap.getDirtyTextRange(editor, Pass.UPDATE_OVERRIDEN_MARKERS); + return FileStatusMap.getDirtyTextRange(editor, Pass.UPDATE_OVERRIDDEN_MARKERS); } @Override public int getPassId() { - return Pass.UPDATE_OVERRIDEN_MARKERS; + return Pass.UPDATE_OVERRIDDEN_MARKERS; } } diff --git a/plugins/groovy/src/org/jetbrains/plugins/groovy/codeInsight/GroovyLineMarkerProvider.java b/plugins/groovy/src/org/jetbrains/plugins/groovy/codeInsight/GroovyLineMarkerProvider.java index 67be1dca51be..0d5453e61ac6 100644 --- a/plugins/groovy/src/org/jetbrains/plugins/groovy/codeInsight/GroovyLineMarkerProvider.java +++ b/plugins/groovy/src/org/jetbrains/plugins/groovy/codeInsight/GroovyLineMarkerProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -253,7 +253,7 @@ public class GroovyLineMarkerProvider extends JavaLineMarkerProvider { final MarkerType type = element instanceof GrField ? GroovyMarkerTypes.OVERRIDEN_PROPERTY_TYPE : GroovyMarkerTypes.GR_OVERRIDEN_METHOD; - LineMarkerInfo info = new LineMarkerInfo(range, range.getTextRange(), icon, Pass.UPDATE_OVERRIDEN_MARKERS, type.getTooltip(), + LineMarkerInfo info = new LineMarkerInfo(range, range.getTextRange(), icon, Pass.UPDATE_OVERRIDDEN_MARKERS, type.getTooltip(), type.getNavigationHandler(), GutterIconRenderer.Alignment.RIGHT); result.add(info); } diff --git a/plugins/javaFX/src/org/jetbrains/plugins/javaFX/fxml/codeInsight/JavaFxRelatedItemLineMarkerProvider.java b/plugins/javaFX/src/org/jetbrains/plugins/javaFX/fxml/codeInsight/JavaFxRelatedItemLineMarkerProvider.java index 67333e9e5c0d..eb9bee7bc955 100644 --- a/plugins/javaFX/src/org/jetbrains/plugins/javaFX/fxml/codeInsight/JavaFxRelatedItemLineMarkerProvider.java +++ b/plugins/javaFX/src/org/jetbrains/plugins/javaFX/fxml/codeInsight/JavaFxRelatedItemLineMarkerProvider.java @@ -77,8 +77,8 @@ public class JavaFxRelatedItemLineMarkerProvider extends RelatedItemLineMarkerPr if (targets.isEmpty()) return; result.add(new RelatedItemLineMarkerInfo(field, field.getNameIdentifier().getTextRange(), - AllIcons.FileTypes.Xml, Pass.UPDATE_OVERRIDEN_MARKERS, null, - new JavaFXIdIconNavigationHandler(), GutterIconRenderer.Alignment.LEFT, + AllIcons.FileTypes.Xml, Pass.UPDATE_OVERRIDDEN_MARKERS, null, + new JavaFXIdIconNavigationHandler(), GutterIconRenderer.Alignment.LEFT, targets)); } } diff --git a/python/educational-python/src/com/jetbrains/python/edu/PyExecuteFileLineMarkerProvider.java b/python/educational-python/src/com/jetbrains/python/edu/PyExecuteFileLineMarkerProvider.java index 3bdc9f22bc3f..9e2853a7b0ac 100644 --- a/python/educational-python/src/com/jetbrains/python/edu/PyExecuteFileLineMarkerProvider.java +++ b/python/educational-python/src/com/jetbrains/python/edu/PyExecuteFileLineMarkerProvider.java @@ -61,7 +61,7 @@ public class PyExecuteFileLineMarkerProvider implements LineMarkerProvider { Icon icon = PlatformUtils.isPyCharmEducational() ? AllIcons.Actions.Execute : actions.get(0).getTemplatePresentation().getIcon(); final LineMarkerInfo markerInfo = new LineMarkerInfo( - file, file.getTextRange(), icon, Pass.UPDATE_OVERRIDEN_MARKERS, + file, file.getTextRange(), icon, Pass.UPDATE_OVERRIDDEN_MARKERS, new Function() { @Override public String fun(PsiElement e) { diff --git a/python/src/com/jetbrains/python/codeInsight/PyLineMarkerProvider.java b/python/src/com/jetbrains/python/codeInsight/PyLineMarkerProvider.java index 9693c7f4b681..ea831fdd95d6 100644 --- a/python/src/com/jetbrains/python/codeInsight/PyLineMarkerProvider.java +++ b/python/src/com/jetbrains/python/codeInsight/PyLineMarkerProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -232,7 +232,7 @@ public class PyLineMarkerProvider implements LineMarkerProvider, PyLineSeparator private static void collectInheritingClasses(final PyClass element, final Collection result) { if (PyClassInheritorsSearch.search(element, false).findFirst() != null) { result - .add(new LineMarkerInfo(element, element.getTextOffset(), AllIcons.Gutter.OverridenMethod, Pass.UPDATE_OVERRIDEN_MARKERS, + .add(new LineMarkerInfo(element, element.getTextOffset(), AllIcons.Gutter.OverridenMethod, Pass.UPDATE_OVERRIDDEN_MARKERS, ourSubclassTooltipProvider, ourSubclassNavigator)); } } @@ -264,7 +264,7 @@ public class PyLineMarkerProvider implements LineMarkerProvider, PyLineSeparator if (candidates.isEmpty()) break; } for (PyFunction func : overridden) { - result.add(new LineMarkerInfo(func, func.getTextOffset(), AllIcons.Gutter.OverridenMethod, Pass.UPDATE_OVERRIDEN_MARKERS, + result.add(new LineMarkerInfo(func, func.getTextOffset(), AllIcons.Gutter.OverridenMethod, Pass.UPDATE_OVERRIDDEN_MARKERS, ourOverridingMethodTooltipProvider, ourOverridingMethodNavigator)); } diff --git a/python/src/com/jetbrains/python/codeInsight/userSkeletons/PyUserSkeletonsLineMarkerProvider.java b/python/src/com/jetbrains/python/codeInsight/userSkeletons/PyUserSkeletonsLineMarkerProvider.java index 50d846a66ed0..6c7c211671b6 100644 --- a/python/src/com/jetbrains/python/codeInsight/userSkeletons/PyUserSkeletonsLineMarkerProvider.java +++ b/python/src/com/jetbrains/python/codeInsight/userSkeletons/PyUserSkeletonsLineMarkerProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -54,7 +54,7 @@ public class PyUserSkeletonsLineMarkerProvider implements LineMarkerProvider { final PyElement skeleton = getUserSkeleton(element); if (skeleton != null) { result.add(new LineMarkerInfo( - element, element.getTextRange(), ICON, Pass.UPDATE_OVERRIDEN_MARKERS, + element, element.getTextRange(), ICON, Pass.UPDATE_OVERRIDDEN_MARKERS, new Function() { @Override public String fun(PsiElement e) { diff --git a/python/src/com/jetbrains/python/pyi/PyiRelatedItemLineMarkerProvider.java b/python/src/com/jetbrains/python/pyi/PyiRelatedItemLineMarkerProvider.java index 22c74fc7db50..d2d3d1d216c9 100644 --- a/python/src/com/jetbrains/python/pyi/PyiRelatedItemLineMarkerProvider.java +++ b/python/src/com/jetbrains/python/pyi/PyiRelatedItemLineMarkerProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -50,7 +50,7 @@ public class PyiRelatedItemLineMarkerProvider extends RelatedItemLineMarkerProvi if (pythonStub != null) { final List relatedItems = GotoRelatedItem.createItems(Collections.singletonList(pythonStub)); result.add(new RelatedItemLineMarkerInfo( - element, element.getTextRange(), ICON, Pass.UPDATE_OVERRIDEN_MARKERS, + element, element.getTextRange(), ICON, Pass.UPDATE_OVERRIDDEN_MARKERS, new Function() { @Override public String fun(PsiElement element) { diff --git a/xml/dom-impl/src/com/intellij/codeInsight/navigation/NavigationGutterIconBuilder.java b/xml/dom-impl/src/com/intellij/codeInsight/navigation/NavigationGutterIconBuilder.java index 1e45968f5158..b1d309251ed9 100644 --- a/xml/dom-impl/src/com/intellij/codeInsight/navigation/NavigationGutterIconBuilder.java +++ b/xml/dom-impl/src/com/intellij/codeInsight/navigation/NavigationGutterIconBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -210,7 +210,7 @@ public class NavigationGutterIconBuilder { final String tooltip = renderer.getTooltipText(); NotNullLazyValue> gotoTargets = createGotoTargetsThunk(myLazy, myGotoRelatedItemProvider, evaluateAndForget(myTargets)); - return new RelatedItemLineMarkerInfo(element, element.getTextRange(), renderer.getIcon(), Pass.UPDATE_OVERRIDEN_MARKERS, + return new RelatedItemLineMarkerInfo(element, element.getTextRange(), renderer.getIcon(), Pass.UPDATE_OVERRIDDEN_MARKERS, tooltip == null ? null : new ConstantFunction(tooltip), renderer.isNavigateAction() ? renderer : null, renderer.getAlignment(), gotoTargets); diff --git a/xml/relaxng/test/org/intellij/plugins/relaxNG/HighlightingTestBase.java b/xml/relaxng/test/org/intellij/plugins/relaxNG/HighlightingTestBase.java index e0c2d2849cf7..dc8c9fe4606d 100644 --- a/xml/relaxng/test/org/intellij/plugins/relaxNG/HighlightingTestBase.java +++ b/xml/relaxng/test/org/intellij/plugins/relaxNG/HighlightingTestBase.java @@ -181,7 +181,7 @@ public abstract class HighlightingTestBase extends UsefulTestCase implements Ide Pass.POPUP_HINTS, Pass.UPDATE_ALL, Pass.UPDATE_FOLDING, - Pass.UPDATE_OVERRIDEN_MARKERS, + Pass.UPDATE_OVERRIDDEN_MARKERS, Pass.VISIBLE_LINE_MARKERS, } : new int[]{Pass.EXTERNAL_TOOLS}; return CodeInsightTestFixtureImpl.instantiateAndRun(myTestFixture.getFile(), editor, ignore, false);