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 85329 - Ctrl-P does not show parameter names
Summary: Ctrl-P does not show parameter names
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker with 3 votes (vote)
Assignee: Dusan Balek
URL:
Keywords: REGRESSION
: 84918 88360 90382 91948 94306 96652 124152 140385 141810 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-09-20 12:30 UTC by Max Sauer
Modified: 2008-08-07 09:44 UTC (History)
7 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
screenshot (7.22 KB, text/plain)
2006-09-20 12:33 UTC, Max Sauer
Details
Screenshot showing wrong CC for parameter names in JUnit test (8.76 KB, image/png)
2007-05-14 23:17 UTC, tkellerer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Max Sauer 2006-09-20 12:30:27 UTC
Currently, usage of Alt-P inside editor does show method parameters, but its
names are replaced with "arg0, arg1, .. , argN", thus not giving user info about
parameter purpose. This used to work inside "old" NetBeans editor.

See attached screenshot.

---
NetBeans IDE Dev (Build 060920)
1.5.0_05; Java HotSpot(TM) Server VM 1.5.0_05-b05
Linux version 2.6.12-1.1390_FC4smp running on i386
en_US (nb); UTF-8
NetBeans-dev-060920
Comment 1 Max Sauer 2006-09-20 12:33:45 UTC
Created attachment 34230 [details]
screenshot
Comment 2 Jan Lahoda 2006-09-26 16:31:00 UTC
Passing to Tomas per our agreement.
Comment 3 Jan Lahoda 2006-09-26 16:33:55 UTC
*** Issue 84918 has been marked as a duplicate of this issue. ***
Comment 4 Dusan Balek 2006-11-01 14:19:00 UTC
*** Issue 88360 has been marked as a duplicate of this issue. ***
Comment 5 Dusan Balek 2006-11-30 22:53:09 UTC
*** Issue 90382 has been marked as a duplicate of this issue. ***
Comment 6 tkellerer 2006-12-21 20:07:28 UTC
For me, this is only the case for JDK classes. 
For project classes it is working properly. 

The JDK used for the Project is not the same as the default JDK.
The src.zip and Javadocs are setup correctly.
Comment 7 Jiri Prox 2007-01-08 07:55:33 UTC
*** Issue 91948 has been marked as a duplicate of this issue. ***
Comment 8 Jiri Prox 2007-02-05 09:19:11 UTC
*** Issue 94306 has been marked as a duplicate of this issue. ***
Comment 9 Jiri Prox 2007-02-05 09:19:51 UTC
Increasing priority due to duplicate
Comment 10 Tomas Zezula 2007-02-15 09:26:31 UTC
Should be fixed in next milestone.
Comment 11 Jiri Prox 2007-02-27 09:34:07 UTC
*** Issue 96652 has been marked as a duplicate of this issue. ***
Comment 12 Tomas Zezula 2007-03-28 16:35:43 UTC
Support in JavaFileManagers

Checking in src/org/netbeans/modules/java/source/classpath/CacheClassPath.java;
/cvs/java/source/src/org/netbeans/modules/java/source/classpath/CacheClassPath.java,v
 <--  CacheClassPath.java
new revision: 1.7; previous revision: 1.6
done
Checking in src/org/netbeans/modules/java/source/usages/Index.java;
/cvs/java/source/src/org/netbeans/modules/java/source/usages/Index.java,v  <-- 
Index.java
new revision: 1.9; previous revision: 1.8
done
Comment 13 Dusan Balek 2007-03-29 13:22:21 UTC
Checking in modules/java/source/ParamNameResolver.java;
/cvs/java/source/src/org/netbeans/modules/java/source/ParamNameResolver.java,v 
<--  ParamNameResolver.java
initial revision: 1.1
done
Checking in api/java/source/JavaSource.java;
/cvs/java/source/src/org/netbeans/api/java/source/JavaSource.java,v  <-- 
JavaSource.java
new revision: 1.33; previous revision: 1.32
done
Comment 14 Tomas Zezula 2007-03-30 07:24:11 UTC
Checking in src/org/netbeans/modules/java/source/usages/BinaryAnalyser.java;
/cvs/java/source/src/org/netbeans/modules/java/source/usages/BinaryAnalyser.java,v
 <--  BinaryAnalyser.java
new revision: 1.9; previous revision: 1.8
done
Comment 15 Tomas Zezula 2007-03-30 07:27:01 UTC
The param name should work until the archive is modified. When it happens the
param names cache should be cleared - started.
Comment 16 Tomas Zezula 2007-04-03 13:26:25 UTC
Checking in src/org/netbeans/modules/java/source/parsing/FileObjects.java;
/cvs/java/source/src/org/netbeans/modules/java/source/parsing/FileObjects.java,v
 <--  FileObjects.java
new revision: 1.7; previous revision: 1.6
done
Checking in src/org/netbeans/modules/java/source/usages/RepositoryUpdater.java;
/cvs/java/source/src/org/netbeans/modules/java/source/usages/RepositoryUpdater.java,v
 <--  RepositoryUpdater.java
new revision: 1.39; previous revision: 1.38
done
Comment 17 Max Sauer 2007-04-25 09:26:26 UTC
Verified.
---
NetBeans IDE Dev (Build 070425)
1.6.0_01; Java HotSpot(TM) Server VM 1.6.0_01-b04
Linux version 2.6.12-1.1390_FC4smp running on i386
en_US (nb); UTF-8
Comment 18 tkellerer 2007-05-14 23:16:05 UTC
Using 200705131800, JDK 1.6u1, Windows XP SP2

I still get the "arg0, arg1,..." display for JUnit methods. e.g. when editing a
JUnit test, then typing assertEquals() and hitting Ctrl-P does not show the
parameter names

See attachment

Comment 19 tkellerer 2007-05-14 23:17:06 UTC
Created attachment 42395 [details]
Screenshot showing wrong CC for parameter names in JUnit test
Comment 20 Tomas Zezula 2007-05-15 07:16:44 UTC
Do you have sources attached to the junit library?
Comment 21 tkellerer 2007-05-15 07:36:16 UTC
No I don't have any JUnit sources attached. This is the "default" JUnit setup as
it comes out of the box. This was working before the refactoring of the Java
support and it is working with 5.5 without problems.
Comment 22 Marian Petras 2007-05-15 09:11:11 UTC
The JUnit sources are not bundled with NetBeans now so I assume it's the reason
why parameter names are not available.
Comment 23 tkellerer 2007-05-15 22:07:16 UTC
But with NB 5.5 it was not necessary to bundle the source code to be able to
view parameter names in JUnit tests. So this is a regression (I am aware that
the Java infrastructure has been redesigned, but still as an "end-user" I do not
expect to lose functionality because of that)
Comment 24 Tomas Zezula 2007-05-16 07:49:49 UTC
This is a reason why we didn't close the issue. The current build does not
support  arg names from javadoc but it will be fixed in 6.0.
Comment 25 Jan Lahoda 2007-12-17 18:21:32 UTC
*** Issue 124152 has been marked as a duplicate of this issue. ***
Comment 26 Dusan Balek 2008-01-29 14:46:50 UTC
*** Issue 124148 has been marked as a duplicate of this issue. ***
Comment 27 Jiri Prox 2008-04-11 00:53:37 UTC
moving opened issues from TM <= 6.1 to TM=Dev
Comment 28 _ gtzabari 2008-06-25 14:23:05 UTC
Please pick up parameter names from Javadoc both for CTRL-P (parameter completion) as well as CTRL-SPACE (Javadoc browser)

Currently when I use CTRL-SPACE to view the Javadoc of a method I see:

"
void someMethod(String arg0, int arg1)

parameters:

name - ...
count - ...
"

It's confusing for Netbeans to display the right names under Parameters yet use arg0 right above. Also, please consider
the highly visible nature of this bug and avoid slipping it past 6.5.
Comment 29 Dusan Balek 2008-07-25 14:54:43 UTC
*** Issue 140385 has been marked as a duplicate of this issue. ***
Comment 30 Dusan Balek 2008-07-28 09:13:12 UTC
*** Issue 141810 has been marked as a duplicate of this issue. ***
Comment 31 Dusan Balek 2008-08-06 10:33:36 UTC
Fixed. Support for parsing parameter names from Javadoc added back.

changeset 60fad55cc446 in main/nb-javac
details: http://hg.netbeans.org/main/nb-javac?cmd=changeset;node=60fad55cc446
changeset 9c3c8a505d57 in main
details: http://hg.netbeans.org/main?cmd=changeset;node=9c3c8a505d57
Comment 32 Quality Engineering 2008-08-06 16:02:49 UTC
Integrated into 'main-golden', available in build *200808061401* on http://bits.netbeans.org/dev/nightly/
Changeset: http://hg.netbeans.org/main/rev/9c3c8a505d57
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #85329: Ctrl-P does not show parameter names - fixed. Parsing parameter names from Javadoc added.
Comment 33 gyszalai 2008-08-07 09:44:35 UTC
We have lots of projects with libs that don't have sources and javadoc. Isn't it possible to parse parameter names from
binary class files? As far as I remember, it worked well in NB 5.x.