This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 50090 - Method not recognized to override another method
Summary: Method not recognized to override another method
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 4.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: Jan Becicka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-07 12:51 UTC by Jaroslav Tulach
Modified: 2007-09-26 09:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Tulach 2004-10-07 12:51:45 UTC
I noticed a problem in Children.java which I
interpret as protected method not knowing that it
overrides another package private one. As a result
the search for usages does not show search from
base method and also just to super implementation
does not work.

The code is like this:

class Children {
  void destroyNodes (Node[] arr) {}
}

class Children.Keys extends Children {
  protected void destroyNodes (Node[] arr) {
  }
}

and some class in the package calling
Children.destroyNodes, then search for usages of
Keys.destroyNodes results in 0 and also Ctrl+B
from Keys.destroyNodes jumps nowhere.
Comment 1 Jan Becicka 2004-10-14 13:23:54 UTC
Find usages dialog shows, that this method overrides method from
Children. At least it works for me. Anyway I can reproduce the bug,
that Ctrl-B does not work. I tried to debug it and I found out, that
JMIUtils.selectElementInPane probably does not work correctly. This
method is called, but it does something with FocusAdapter - I don't
understand this stuff, but pane.setCaretPosition is not called in this
case. Editor guys, please look at it. Thanks.
Comment 2 Dusan Balek 2004-10-14 14:37:51 UTC
Editor cannot move the caret because
JMManager.getElementPosition(Element element) returns null for the
Method element representing Children.destroyNodes. Reassigning back to
javacore.
Comment 3 Jan Becicka 2004-10-19 14:59:22 UTC
Problem was, that some methods was wrapped twice.

Checking in ParameterizedTypeImpl.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/jmiimpl/javamodel/ParameterizedTypeImpl.java,v
 <--  ParameterizedTypeImpl.java
new revision: 1.16; previous revision: 1.15
done
Comment 4 Quality Engineering 2007-09-20 10:13:45 UTC
Reorganization of java component