mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-89324 File structure: cannot find super class method definition when anonymous classes are shown
This commit is contained in:
@@ -13,7 +13,9 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
public class A<caret> {
|
||||
import java.lang.Object;
|
||||
|
||||
public class A<caret> extends Object {
|
||||
void foo() {
|
||||
Object myObject = new Object(){};
|
||||
}
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
-A.java
|
||||
-AnonymousHashCode.java
|
||||
-A
|
||||
-[hashCode(): void]
|
||||
-foo(): void
|
||||
-$1
|
||||
hashCode(): int
|
||||
[hashCode(): int]
|
||||
+1
-1
@@ -33,5 +33,5 @@ public class JavaFileStructureHierarchyTest extends JavaFileStructureTestCase {
|
||||
|
||||
public void testSimple() throws Exception {checkTree();}
|
||||
public void testAnonymousAsConstantInInterface() throws Exception {checkTree("getA");}
|
||||
//public void testAnonymousHashCode() throws Exception {checkTree("hash");}
|
||||
public void testAnonymousHashCode() throws Exception {checkTree("hash");}
|
||||
}
|
||||
|
||||
+4
-2
@@ -67,15 +67,17 @@ public class FilteringTreeStructure extends AbstractTreeStructure {
|
||||
} else {
|
||||
ArrayList<FilteringNode> nodes = new ArrayList<FilteringNode>(delegates.length);
|
||||
for (Object d : delegates) {
|
||||
FilteringNode n = new FilteringNode(node, d);
|
||||
boolean isDuplicate = myDescriptors2Nodes.containsKey(d);
|
||||
if (!isDuplicate) {
|
||||
FilteringNode n = new FilteringNode(node, d);
|
||||
myDescriptors2Nodes.put(d, n);
|
||||
nodes.add(n);
|
||||
addToCache(n, isDuplicate);
|
||||
}
|
||||
}
|
||||
myNodesCache.put(node, nodes);
|
||||
for (FilteringNode n : nodes) {
|
||||
addToCache(n, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user