diff --git a/java/java-impl/src/com/intellij/spi/psi/SPIFile.java b/java/java-impl/src/com/intellij/spi/psi/SPIFile.java index d341f3d6153a..fbd5009ba11f 100644 --- a/java/java-impl/src/com/intellij/spi/psi/SPIFile.java +++ b/java/java-impl/src/com/intellij/spi/psi/SPIFile.java @@ -43,18 +43,19 @@ public class SPIFile extends PsiFileBase { while ((d = fileName.indexOf(".", idx)) > -1) { final PsiPackage aPackage = JavaPsiFacade.getInstance(getProject()).findPackage(fileName.substring(0, d)); if (aPackage != null) { - refs.add(new SPIFileName2PackageReference(SPIFile.this, aPackage)); + refs.add(new SPIFileName2PackageReference(this, aPackage)); } idx = d + 1; } final PsiReference reference = getReference(); PsiElement resolve = reference.resolve(); while (resolve instanceof PsiClass) { - resolve = ((PsiClass)resolve).getContainingClass(); + PsiClass psiClass = (PsiClass)resolve; + resolve = psiClass.getContainingClass(); if (resolve != null) { - final String jvmClassName = ClassUtil.getJVMClassName((PsiClass)resolve); + final String jvmClassName = ClassUtil.getJVMClassName(psiClass); if (jvmClassName != null) { - refs.add(new SPIFileName2PackageReference(SPIFile.this, resolve)); + refs.add(new SPIFileName2PackageReference(this, resolve)); } } } diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/cache/TypeAnnotationContainer.java b/java/java-psi-impl/src/com/intellij/psi/impl/cache/TypeAnnotationContainer.java index b3d5a624a21e..96f8711e6594 100644 --- a/java/java-psi-impl/src/com/intellij/psi/impl/cache/TypeAnnotationContainer.java +++ b/java/java-psi-impl/src/com/intellij/psi/impl/cache/TypeAnnotationContainer.java @@ -273,14 +273,14 @@ public class TypeAnnotationContainer { myReferenceElement = NotNullLazyValue.atomicLazy(() -> { int index = myText.indexOf('('); String refText = index > 0 ? myText.substring(1, index) : myText.substring(1); - return new ClsJavaCodeReferenceElementImpl(ClsTypeAnnotationImpl.this, refText); + return new ClsJavaCodeReferenceElementImpl(this, refText); }); myParameterList = NotNullLazyValue.atomicLazy(() -> { PsiNameValuePair[] attrs = myText.indexOf('(') > 0 ? JavaPsiFacade.getElementFactory(getProject()).createAnnotationFromText(myText, myParent) .getParameterList().getAttributes() : PsiNameValuePair.EMPTY_ARRAY; - return new ClsAnnotationParameterListImpl(ClsTypeAnnotationImpl.this, attrs); + return new ClsAnnotationParameterListImpl(this, attrs); }); } diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/compiled/ClsMemberImpl.java b/java/java-psi-impl/src/com/intellij/psi/impl/compiled/ClsMemberImpl.java index d7d815b0419c..c2951aba141e 100644 --- a/java/java-psi-impl/src/com/intellij/psi/impl/compiled/ClsMemberImpl.java +++ b/java/java-psi-impl/src/com/intellij/psi/impl/compiled/ClsMemberImpl.java @@ -19,10 +19,10 @@ public abstract class ClsMemberImpl extends ClsReposito protected ClsMemberImpl(T stub) { super(stub); myDocComment = !stub.isDeprecated() ? null : NotNullLazyValue.atomicLazy(() -> { - return new ClsDocCommentImpl(ClsMemberImpl.this); + return new ClsDocCommentImpl(this); }); myNameIdentifier = NotNullLazyValue.atomicLazy(() -> { - return new ClsIdentifierImpl(ClsMemberImpl.this, getName()); + return new ClsIdentifierImpl(this, getName()); }); } diff --git a/platform/lang-impl/src/com/intellij/ide/actions/searcheverywhere/SearchEverywhereUI.java b/platform/lang-impl/src/com/intellij/ide/actions/searcheverywhere/SearchEverywhereUI.java index 5c57a8c29b95..275873510e7a 100644 --- a/platform/lang-impl/src/com/intellij/ide/actions/searcheverywhere/SearchEverywhereUI.java +++ b/platform/lang-impl/src/com/intellij/ide/actions/searcheverywhere/SearchEverywhereUI.java @@ -1043,7 +1043,7 @@ public final class SearchEverywhereUI extends BigPopupUI implements DataProvider return; } Component oppositeComponent = e.getOppositeComponent(); - if (!isHintComponent(oppositeComponent) && !UIUtil.haveCommonOwner(SearchEverywhereUI.this, oppositeComponent)) { + if (!isHintComponent(oppositeComponent) && !UIUtil.haveCommonOwner(this, oppositeComponent)) { sendStatisticsAndClose(); } } diff --git a/platform/platform-api/src/com/intellij/ui/dualView/TreeTableView.java b/platform/platform-api/src/com/intellij/ui/dualView/TreeTableView.java index 9ef8070bcb8a..ffcae2481f93 100644 --- a/platform/platform-api/src/com/intellij/ui/dualView/TreeTableView.java +++ b/platform/platform-api/src/com/intellij/ui/dualView/TreeTableView.java @@ -83,7 +83,7 @@ public class TreeTableView extends TreeTable implements SelectionProvider { @Override public TreeTableCellRenderer createTableRenderer(TreeTableModel treeTableModel) { - return new TreeTableCellRenderer(TreeTableView.this, getTree()) { + return new TreeTableCellRenderer(this, getTree()) { @Override public Component getTableCellRendererComponent(JTable table, Object value, diff --git a/platform/platform-api/src/com/intellij/ui/treeStructure/Tree.java b/platform/platform-api/src/com/intellij/ui/treeStructure/Tree.java index f60e0b1423b1..7502fc98be8a 100644 --- a/platform/platform-api/src/com/intellij/ui/treeStructure/Tree.java +++ b/platform/platform-api/src/com/intellij/ui/treeStructure/Tree.java @@ -580,7 +580,7 @@ public class Tree extends JTree implements ComponentWithEmptyText, ComponentWith @ApiStatus.Internal public void fireAccessibleTreeExpanded(@NotNull TreePath path) { if (accessibleContext != null) { - ((AccessibleJTree)accessibleContext).treeExpanded(new TreeExpansionEvent(Tree.this, path)); + ((AccessibleJTree)accessibleContext).treeExpanded(new TreeExpansionEvent(this, path)); } } @@ -597,7 +597,7 @@ public class Tree extends JTree implements ComponentWithEmptyText, ComponentWith @ApiStatus.Internal public void fireAccessibleTreeCollapsed(@NotNull TreePath path) { if (accessibleContext != null) { - ((AccessibleJTree)accessibleContext).treeCollapsed(new TreeExpansionEvent(Tree.this, path)); + ((AccessibleJTree)accessibleContext).treeCollapsed(new TreeExpansionEvent(this, path)); } } diff --git a/platform/platform-impl/src/com/intellij/util/ui/ListModelEditor.java b/platform/platform-impl/src/com/intellij/util/ui/ListModelEditor.java index 60653a8ce298..96ad22d3b679 100644 --- a/platform/platform-impl/src/com/intellij/util/ui/ListModelEditor.java +++ b/platform/platform-impl/src/com/intellij/util/ui/ListModelEditor.java @@ -28,7 +28,7 @@ public final class ListModelEditor extends ListModelEditorBase { .setAddAction(button -> { if (!model.isEmpty()) { T lastItem = model.getElementAt(model.getSize() - 1); - if (ListModelEditor.this.itemEditor.isEmpty(lastItem)) { + if (this.itemEditor.isEmpty(lastItem)) { ScrollingUtil.selectItem(list, ContainerUtil.indexOfIdentity(model.getItems(), lastItem)); return; } diff --git a/platform/util/src/com/intellij/execution/process/ProcessHandler.java b/platform/util/src/com/intellij/execution/process/ProcessHandler.java index 44d1ab159f9f..d3ba449e826c 100644 --- a/platform/util/src/com/intellij/execution/process/ProcessHandler.java +++ b/platform/util/src/com/intellij/execution/process/ProcessHandler.java @@ -204,7 +204,7 @@ public abstract class ProcessHandler extends UserDataHolderBase { if (myState.compareAndSet(State.TERMINATING, State.TERMINATED)) { try { myExitCode = exitCode; - myEventMulticaster.processTerminated(new ProcessEvent(ProcessHandler.this, exitCode)); + myEventMulticaster.processTerminated(new ProcessEvent(this, exitCode)); } catch (Throwable e) { if (!isCanceledException(e)) { diff --git a/platform/vcs-tests/testSrc/com/intellij/openapi/vcs/changes/committed/ExternalChangesDetectionVcsTest.java b/platform/vcs-tests/testSrc/com/intellij/openapi/vcs/changes/committed/ExternalChangesDetectionVcsTest.java index a16acf3a8e52..a461d7d22e02 100644 --- a/platform/vcs-tests/testSrc/com/intellij/openapi/vcs/changes/committed/ExternalChangesDetectionVcsTest.java +++ b/platform/vcs-tests/testSrc/com/intellij/openapi/vcs/changes/committed/ExternalChangesDetectionVcsTest.java @@ -47,7 +47,7 @@ public class ExternalChangesDetectionVcsTest extends AbstractJunitVcsTestCase { myClientRoot = new File(myTempDirTestFixture.getTempDirPath(), "clientroot"); myClientRoot.mkdir(); - initProject(myClientRoot, ExternalChangesDetectionVcsTest.this.getTestName()); + initProject(myClientRoot, this.getTestName()); myVcs = new MockAbstractVcs(myProject); myVcs.setChangeProvider(new MyMockChangeProvider()); diff --git a/plugins/testng/src/com/theoryinpractice/testng/configuration/TestNGConfigurationEditor.java b/plugins/testng/src/com/theoryinpractice/testng/configuration/TestNGConfigurationEditor.java index 42bc7697ca1b..cda277eba151 100644 --- a/plugins/testng/src/com/theoryinpractice/testng/configuration/TestNGConfigurationEditor.java +++ b/plugins/testng/src/com/theoryinpractice/testng/configuration/TestNGConfigurationEditor.java @@ -379,7 +379,7 @@ public class TestNGConfigurationEditor extends Se } try { if (declaration instanceof PsiClass && - new TestClassBrowser(project, TestNGConfigurationEditor.this).getFilter().isAccepted((PsiClass)declaration)) { + new TestClassBrowser(project, this).getFilter().isAccepted((PsiClass)declaration)) { return JavaCodeFragment.VisibilityChecker.Visibility.VISIBLE; } } diff --git a/plugins/testng/testSources/com/theoryinpractice/testng/inspection/TestNGDependsOnInspectionTest.java b/plugins/testng/testSources/com/theoryinpractice/testng/inspection/TestNGDependsOnInspectionTest.java index 83ebbdfbd502..171e6398fcf5 100644 --- a/plugins/testng/testSources/com/theoryinpractice/testng/inspection/TestNGDependsOnInspectionTest.java +++ b/plugins/testng/testSources/com/theoryinpractice/testng/inspection/TestNGDependsOnInspectionTest.java @@ -38,7 +38,7 @@ public class TestNGDependsOnInspectionTest extends LightJavaCodeInsightFixtureTe protected void setUp() { UIUtil.invokeAndWaitIfNeeded(() -> { try { - TestNGDependsOnInspectionTest.super.setUp(); + super.setUp(); myFixture.enableInspections(new DependsOnMethodInspection()); } @@ -53,7 +53,7 @@ public class TestNGDependsOnInspectionTest extends LightJavaCodeInsightFixtureTe protected void tearDown() { UIUtil.invokeAndWaitIfNeeded(() -> { try { - TestNGDependsOnInspectionTest.super.tearDown(); + super.tearDown(); } catch (Exception e) { throw new RuntimeException(e); diff --git a/plugins/testng/testSources/com/theoryinpractice/testng/inspection/UndeclaredTestsInspectionTest.java b/plugins/testng/testSources/com/theoryinpractice/testng/inspection/UndeclaredTestsInspectionTest.java index 225f7ce5f675..686be3e76712 100644 --- a/plugins/testng/testSources/com/theoryinpractice/testng/inspection/UndeclaredTestsInspectionTest.java +++ b/plugins/testng/testSources/com/theoryinpractice/testng/inspection/UndeclaredTestsInspectionTest.java @@ -24,7 +24,7 @@ public class UndeclaredTestsInspectionTest extends JavaInspectionTestCase { protected void setUp() { UIUtil.invokeAndWaitIfNeeded(() -> { try { - UndeclaredTestsInspectionTest.super.setUp(); + super.setUp(); } catch (Exception e) { throw new RuntimeException(e); @@ -37,7 +37,7 @@ public class UndeclaredTestsInspectionTest extends JavaInspectionTestCase { protected void tearDown() { UIUtil.invokeAndWaitIfNeeded(() -> { try { - UndeclaredTestsInspectionTest.super.tearDown(); + super.tearDown(); } catch (Exception e) { throw new RuntimeException(e); diff --git a/plugins/testng/testSources/com/theoryinpractice/testng/referenceContributor/TestNGDataProviderTest.java b/plugins/testng/testSources/com/theoryinpractice/testng/referenceContributor/TestNGDataProviderTest.java index 51ff7f75298f..71bdc65d57db 100644 --- a/plugins/testng/testSources/com/theoryinpractice/testng/referenceContributor/TestNGDataProviderTest.java +++ b/plugins/testng/testSources/com/theoryinpractice/testng/referenceContributor/TestNGDataProviderTest.java @@ -17,7 +17,7 @@ public class TestNGDataProviderTest extends LightJavaCodeInsightFixtureTestCase protected void setUp() { UIUtil.invokeAndWaitIfNeeded(() -> { try { - TestNGDataProviderTest.super.setUp(); + super.setUp(); } catch (Exception e) { throw new RuntimeException(e); @@ -30,7 +30,7 @@ public class TestNGDataProviderTest extends LightJavaCodeInsightFixtureTestCase protected void tearDown() { UIUtil.invokeAndWaitIfNeeded(() -> { try { - TestNGDataProviderTest.super.tearDown(); + super.tearDown(); } catch (Exception e) { throw new RuntimeException(e); diff --git a/plugins/testng/testSources/com/theoryinpractice/testng/referenceContributor/TestNGSuiteTest.java b/plugins/testng/testSources/com/theoryinpractice/testng/referenceContributor/TestNGSuiteTest.java index 0ad0e928a707..7cc9bbc5513f 100644 --- a/plugins/testng/testSources/com/theoryinpractice/testng/referenceContributor/TestNGSuiteTest.java +++ b/plugins/testng/testSources/com/theoryinpractice/testng/referenceContributor/TestNGSuiteTest.java @@ -17,7 +17,7 @@ public class TestNGSuiteTest extends LightJavaCodeInsightFixtureTestCase { protected void setUp() { UIUtil.invokeAndWaitIfNeeded(() -> { try { - TestNGSuiteTest.super.setUp(); + super.setUp(); } catch (Exception e) { throw new RuntimeException(e); @@ -30,7 +30,7 @@ public class TestNGSuiteTest extends LightJavaCodeInsightFixtureTestCase { protected void tearDown() { UIUtil.invokeAndWaitIfNeeded(() -> { try { - TestNGSuiteTest.super.tearDown(); + super.tearDown(); } catch (Exception e) { throw new RuntimeException(e); diff --git a/xml/xml-psi-impl/src/com/intellij/psi/impl/source/xml/XmlDoctypeImpl.java b/xml/xml-psi-impl/src/com/intellij/psi/impl/source/xml/XmlDoctypeImpl.java index 98fa299c29e9..9fcfc7179d30 100644 --- a/xml/xml-psi-impl/src/com/intellij/psi/impl/source/xml/XmlDoctypeImpl.java +++ b/xml/xml-psi-impl/src/com/intellij/psi/impl/source/xml/XmlDoctypeImpl.java @@ -203,7 +203,7 @@ public class XmlDoctypeImpl extends XmlElementImpl implements XmlDoctype { } protected PsiReference createUrlReference(final PsiElement dtdUrlElement) { - return new URLReference(XmlDoctypeImpl.this) { + return new URLReference(this) { @Override public @NotNull String getCanonicalText() { return extractValue(dtdUrlElement);