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 94936 - Navigate to Source does not work on methods which have generic parameters
Summary: Navigate to Source does not work on methods which have generic parameters
Status: VERIFIED FIXED
Alias: None
Product: uml
Classification: Unclassified
Component: Code Generation (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Craig Conover
URL:
Keywords:
Depends on: 101255 101257
Blocks:
  Show dependency tree
 
Reported: 2007-02-08 11:31 UTC by Alexandr Scherbatiy
Modified: 2007-05-19 01:23 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 Alexandr Scherbatiy 2007-02-08 11:31:20 UTC
Steps to reproduce:

- Reverse Engineer 'A' java class
-----------------------------------------------
package pack;

import java.util.List;

public class A {
    public void show(List<A> list){
    }
}
-----------------------------------------------
- Create a Class diagram
- Put the 'A' element on the diagram
- Select 'public void  show( List<A> list )' operation
  on the element and invoke 'Navigate To Source'
  Nothing happens.
Comment 1 Andrew Korostelev 2007-03-19 17:52:12 UTC
*** Issue 98238 has been marked as a duplicate of this issue. ***
Comment 2 Andrew Korostelev 2007-03-19 17:52:54 UTC
see also related and fixed issue 78393
Comment 3 Peter Lam 2007-03-20 23:35:18 UTC
low use case not currently impacting our installed user base.
Comment 4 Craig Conover 2007-04-09 22:54:12 UTC
The navigate to source code is not using the array/collection override check for
parameters. For this to work properly, the attribute/parameter level property
for collection override feature needs to be implemented and RE has to populate
this property with the collection and generic type. 

But I think I can at least put in a second level check to search for the
collection type instead of the the array type, but it will be the collection
type specified in the global collection override preference and this will not
work for many use cases.
Comment 5 Craig Conover 2007-04-09 22:59:14 UTC
Without the 78473 enhancement, this will not be able to be fixed. Added as a
dependency.
Comment 6 Craig Conover 2007-04-09 23:04:29 UTC
The method "public static ElementAndFile getMethod(MethodInfo method, final
boolean isConstructor)" of class "NBUtils" in ideintegration module is the code
that needs to be adjusted to look for the collection override version of the
method in the source code. 

MethodParameterInfo's getCodeGenType() method should be used to find this
collection version of the method in the source code.
Comment 7 Craig Conover 2007-04-17 01:56:53 UTC
All changes made, but need resolution on issue 101257 for complete solution.
Comment 8 Craig Conover 2007-04-17 01:59:06 UTC
Also need resolution on issue 101255.
Comment 9 Craig Conover 2007-04-19 09:53:48 UTC
Changed Subcomponent to "code generation" from "reverse engineering" because all
RE's just fine, but the code gen and navigate to source were not equipped to
handle Collection override. The Collection Type override for multiplicity ranges
feature had to be backported from UML-NB6 branch in order for this to work. All
that has been and then some for navigate to source with Collection Type override
feature.
Comment 10 Andrew Korostelev 2007-04-25 16:02:55 UTC
The latest build this was verified is all-nbms-griffin_fixes-070419_3-ml.
Example in bug description still doesn't work.

please use exactly the same example, 
because it works correctly for method like 

    public void test(List<String> list){
    }    
Comment 11 Peter Lam 2007-04-26 01:24:37 UTC
removed HOL since this case is no longer used in HOLs.
Comment 12 Alexandr Scherbatiy 2007-04-28 11:42:56 UTC
verified
Comment 13 Karthikeyan Rajeswaran 2007-04-29 02:12:36 UTC
Andrew: griffin_fixes: For HOL case works correctly (duplicate issue 98238). Now
It's enough for HOL. BUT Original scenario still doesn't work and therefore
release55_fixes_fixed status whiteboard should be removed.
Comment 14 Peter Lam 2007-05-19 01:10:41 UTC
I verified that the original test case still doesn't work. The problem is that
the class inside a PACKAGE with methods which have generic parameters does not
work. If methods which have generic parameters that is not inside a package
works fine as in issue 98238. So, I'm separating out issue 98238 as not a
duplicate of this issue. And reopen this issue.
Comment 15 Peter Lam 2007-05-19 01:22:23 UTC
for doc purpose: verified in NB6 build 070515 and the original issue is now
working so moving state to fixed.
Comment 16 Peter Lam 2007-05-19 01:23:00 UTC
verified in NB6 build 070515