Removed unnecessary final on local variables.
This commit is contained in:
@@ -95,7 +95,7 @@ class ClsWrapperStubPsiFactory extends StubPsiFactory {
|
||||
|
||||
@Override
|
||||
public PsiMethod createMethod(PsiMethodStub stub) {
|
||||
final PsiElement origin = ((StubBase) stub).getUserData(ORIGIN_ELEMENT);
|
||||
PsiElement origin = ((StubBase) stub).getUserData(ORIGIN_ELEMENT);
|
||||
if (origin == null) {
|
||||
return delegate.createMethod(stub);
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ public class JavaElementFinder extends PsiElementFinder implements JavaPsiFacade
|
||||
|
||||
@Override
|
||||
public PsiClass findClass(@NotNull String qualifiedName, @NotNull GlobalSearchScope scope) {
|
||||
final PsiClass[] allClasses = findClasses(qualifiedName, scope);
|
||||
PsiClass[] allClasses = findClasses(qualifiedName, scope);
|
||||
return allClasses.length > 0 ? allClasses[0] : null;
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -31,12 +31,12 @@ public class JetCodeBlockModificationListener implements PsiTreeChangePreprocess
|
||||
|
||||
private final PsiModificationTrackerImpl myModificationTracker;
|
||||
|
||||
public JetCodeBlockModificationListener(final PsiModificationTracker modificationTracker) {
|
||||
public JetCodeBlockModificationListener(PsiModificationTracker modificationTracker) {
|
||||
myModificationTracker = (PsiModificationTrackerImpl) modificationTracker;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void treeChanged(final PsiTreeChangeEventImpl event) {
|
||||
public void treeChanged(PsiTreeChangeEventImpl event) {
|
||||
if (!(event.getFile() instanceof JetFile)) return;
|
||||
switch (event.getCode()) {
|
||||
case BEFORE_CHILDREN_CHANGE:
|
||||
@@ -71,7 +71,7 @@ public class JetCodeBlockModificationListener implements PsiTreeChangePreprocess
|
||||
}
|
||||
}
|
||||
|
||||
private void processChange(final PsiElement parent, final PsiElement child1, final PsiElement child2) {
|
||||
private void processChange(PsiElement parent, PsiElement child1, PsiElement child2) {
|
||||
try {
|
||||
if (!isInsideCodeBlock(parent)) {
|
||||
if (parent != null && parent.getContainingFile() instanceof JetFile) {
|
||||
@@ -91,7 +91,7 @@ public class JetCodeBlockModificationListener implements PsiTreeChangePreprocess
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean containsClassesInside(final PsiElement element) {
|
||||
private static boolean containsClassesInside(PsiElement element) {
|
||||
if (element == null) return false;
|
||||
if (element instanceof PsiClass) return true;
|
||||
|
||||
|
||||
+1
-1
@@ -216,7 +216,7 @@ public class KotlinLightClassForExplicitDeclaration extends AbstractLightClass i
|
||||
}
|
||||
|
||||
@Override
|
||||
public Icon getElementIcon(final int flags) {
|
||||
public Icon getElementIcon(int flags) {
|
||||
throw new UnsupportedOperationException("This should be done byt JetIconProvider");
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -125,7 +125,7 @@ public class KotlinLightClassForPackage extends KotlinLightClassForPackageBase i
|
||||
}
|
||||
|
||||
@Override
|
||||
public Icon getElementIcon(final int flags) {
|
||||
public Icon getElementIcon(int flags) {
|
||||
throw new UnsupportedOperationException("This should be done byt JetIconProvider");
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ public class KotlinLightTypeParameter extends AbstractLightClass implements PsiT
|
||||
}
|
||||
|
||||
@Override
|
||||
public void accept(@NotNull final PsiElementVisitor visitor) {
|
||||
public void accept(@NotNull PsiElementVisitor visitor) {
|
||||
if (visitor instanceof JavaElementVisitor) {
|
||||
((JavaElementVisitor) visitor).visitTypeParameter(this);
|
||||
}
|
||||
@@ -89,13 +89,13 @@ public class KotlinLightTypeParameter extends AbstractLightClass implements PsiT
|
||||
}
|
||||
|
||||
@Override
|
||||
public PsiAnnotation findAnnotation(@NotNull final String qualifiedName) {
|
||||
public PsiAnnotation findAnnotation(@NotNull String qualifiedName) {
|
||||
return getDelegate().findAnnotation(qualifiedName);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public PsiAnnotation addAnnotation(@NotNull final String qualifiedName) {
|
||||
public PsiAnnotation addAnnotation(@NotNull String qualifiedName) {
|
||||
return getDelegate().addAnnotation(qualifiedName);
|
||||
}
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@ public class StubClassBuilder extends ClassBuilder {
|
||||
|
||||
@Override
|
||||
public MethodVisitor newMethod(@Nullable PsiElement origin, int access, String name, String desc, @Nullable String signature, @Nullable String[] exceptions) {
|
||||
final MethodVisitor internalVisitor = super.newMethod(origin, access, name, desc, signature, exceptions);
|
||||
MethodVisitor internalVisitor = super.newMethod(origin, access, name, desc, signature, exceptions);
|
||||
|
||||
if (internalVisitor != null) {
|
||||
// If stub for method generated
|
||||
@@ -101,7 +101,7 @@ public class StubClassBuilder extends ClassBuilder {
|
||||
|
||||
@Override
|
||||
public FieldVisitor newField(@Nullable PsiElement origin, int access, String name, String desc, @Nullable String signature, @Nullable Object value) {
|
||||
final FieldVisitor internalVisitor = super.newField(origin, access, name, desc, signature, value);
|
||||
FieldVisitor internalVisitor = super.newField(origin, access, name, desc, signature, value);
|
||||
|
||||
if (internalVisitor != null) {
|
||||
// If stub for field generated
|
||||
@@ -112,7 +112,7 @@ public class StubClassBuilder extends ClassBuilder {
|
||||
}
|
||||
|
||||
private void markLastChild(@Nullable PsiElement origin) {
|
||||
final List children = v.getResult().getChildrenStubs();
|
||||
List children = v.getResult().getChildrenStubs();
|
||||
StubBase last = (StubBase) children.get(children.size() - 1);
|
||||
|
||||
PsiElement oldOrigin = last.getUserData(ClsWrapperStubPsiFactory.ORIGIN_ELEMENT);
|
||||
@@ -126,7 +126,7 @@ public class StubClassBuilder extends ClassBuilder {
|
||||
@Override
|
||||
public void done() {
|
||||
if (!isNamespace) {
|
||||
final StubElement pop = parentStack.pop();
|
||||
StubElement pop = parentStack.pop();
|
||||
assert pop == v.getResult();
|
||||
}
|
||||
super.done();
|
||||
|
||||
Reference in New Issue
Block a user