[java] navigation to synthetic methods, corrected

This commit is contained in:
Roman Shevchenko
2016-01-22 13:10:54 +03:00
parent 70858061d3
commit 32a437d608
@@ -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.
@@ -232,13 +232,9 @@ public class ClassInnerStuffCache {
private PsiMethod getSyntheticMethod(String text) {
PsiElementFactory factory = JavaPsiFacade.getInstance(myClass.getProject()).getElementFactory();
PsiMethod method = factory.createMethodFromText(text, myClass);
return new LightMethod(myClass.getManager(), method, myClass) {
@Override
public int getTextOffset() {
return myClass.getTextOffset();
}
};
LightMethod method = new LightMethod(myClass.getManager(), factory.createMethodFromText(text, myClass), myClass);
method.setNavigationElement(myClass);
return method;
}
public void dropCaches() {