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 86568 - Field created between constructor and its javadoc coment
Summary: Field created between constructor and its javadoc coment
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 6.x
Hardware: Sun Solaris
: P3 blocker (vote)
Assignee: Pavel Flaska
URL:
Keywords:
: 86489 (view as bug list)
Depends on: 88081
Blocks: 87136
  Show dependency tree
 
Reported: 2006-10-05 12:53 UTC by Max Sauer
Modified: 2007-04-25 09:29 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
screenshot (24.94 KB, image/png)
2006-10-05 12:53 UTC, Max Sauer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Max Sauer 2006-10-05 12:53:01 UTC
"Create field" hint creates desired field in between of class constructor and
its javadoc comment. See attached screenshot.

Steps to reproduce:
-------------------
1) Create a new j2se project
2) Open Main.java
3) Between Constructor and main() method, add:

public void foo() {
        sb = new StringBuffer();
}

4) Invoke appeared hint
=> Field created in an inappropriate place

---
NetBeans IDE Dev (Build 061005)
1.6.0-rc; Java HotSpot(TM) Client VM 1.6.0-rc-b99
SunOS version 5.10 running on sparc
en (nb); ISO646-US
Comment 1 Max Sauer 2006-10-05 12:53:41 UTC
Created attachment 34916 [details]
screenshot
Comment 2 Pavel Flaska 2006-10-05 13:08:32 UTC
The feature position is correct (meant that is the first member in class), but
is between constructor javadoc and definition. It is generator issue.

Comment 3 Pavel Flaska 2006-10-06 06:57:50 UTC
*** Issue 86489 has been marked as a duplicate of this issue. ***
Comment 4 Pavel Flaska 2006-10-20 22:05:43 UTC
Basic case fixed. More commits to come.

Checking in src/org/netbeans/modules/java/save/PositionEstimator.java;
/cvs/java/source/src/org/netbeans/modules/java/save/Attic/PositionEstimator.java,v
 <--  PositionEstimator.java
new revision: 1.1.2.9; previous revision: 1.1.2.8
done
Checking in src/org/netbeans/modules/java/save/TreeDiff.java;
/cvs/java/source/src/org/netbeans/modules/java/save/Attic/TreeDiff.java,v  <-- 
TreeDiff.java
new revision: 1.1.2.17; previous revision: 1.1.2.16
done
Checking in test/cfg-unit.xml;
/cvs/java/source/test/Attic/cfg-unit.xml,v  <--  cfg-unit.xml
new revision: 1.1.2.6; previous revision: 1.1.2.5
done
RCS file:
/cvs/java/source/test/unit/src/org/netbeans/api/java/source/gen/Attic/FeatureAddingTest.java,v
done
Checking in test/unit/src/org/netbeans/api/java/source/gen/FeatureAddingTest.java;
/cvs/java/source/test/unit/src/org/netbeans/api/java/source/gen/Attic/FeatureAddingTest.java,v
 <--  FeatureAddingTest.java
new revision: 1.1.2.1; previous revision: 1.1
done
Comment 5 Pavel Flaska 2007-04-13 17:58:57 UTC
This is no longer reproducible because of many changes... Currently, it is
testable only with test (or patched hint), it is not possible to use hint.
(Current hint adds the created field at the end of the class.) Hints has to be
fixed.
Comment 6 Max Sauer 2007-04-25 09:29:38 UTC
Marking as VERIFIED, since the original case is no longer reproducible.
---
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