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 69309 - 'Debug identifier' produces budous code
Summary: 'Debug identifier' produces budous code
Status: VERIFIED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@editor
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-25 08:19 UTC by Max Sauer
Modified: 2007-11-05 13:44 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
screenshot (3.52 KB, image/png)
2005-11-25 08:21 UTC, Max Sauer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Max Sauer 2005-11-25 08:19:35 UTC
Invoking 'Debug identifier' inside editor produces bugous code -- extra chars
are added to the end of the line.

Steps to reproduce:
-------------------
1) Open a j2se project
2) Open a java file
3) Copy some identifier to the clipboard
4) Invoke Ctrl-J D (default shortcut for Debug Identifier)
--> Extra '")' is prined to the end of the line, behind the semicolon. See
attached screenshot.

[200511241900, JDK 1.6.0 beta 64b, solaris 10/sparc]
Comment 1 Max Sauer 2005-11-25 08:21:38 UTC
Created attachment 27267 [details]
screenshot
Comment 2 Martin Roskanin 2005-12-07 15:02:50 UTC
I can reproduce the behaviour, where the serr is added before the identifier like:

        System.err.println("sss = " + sss );
        String sss = "sdfsdf";

I am not sure there will be enough time to fix it to NB 5.0
Comment 3 Max Sauer 2005-12-09 09:06:51 UTC
The issue I mentioned in (200511241900) has been somehow fixed -- I is not
present in either 200512061900 or 200512082240. As for

        System.err.println("sss = " + sss );
        String sss = "sdfsdf";

that's something different, and I don't think this needs to be fixed -- everyone
knows that variable cannot be used before its declaration. I'll mark this as fixed.
Comment 4 Max Sauer 2005-12-09 10:38:13 UTC
Oops, got it. New steps to reproduce:

1) Declare a variable, ie. 'String str = "dcnsj";'
2) While having carret placed on the declaration line, press Ctrl-J D (debug
intentifier)
--> The debug println is inserted above the decration, which produces bugous code.

[200512082240] 
Comment 5 Martin Roskanin 2005-12-09 11:34:49 UTC
fixed in [maintrunk]

/cvs/java/editor/lib/src/org/netbeans/editor/ext/java/JavaSettingsDefaults.java,v
 <--  JavaSettingsDefaults.java
new revision: 1.13; previous revision: 1.12
done
Checking in src/org/netbeans/modules/java/editor/resources/DefaultMacros.xml;
/cvs/java/editor/src/org/netbeans/modules/java/editor/resources/DefaultMacros.xml,v
 <--  DefaultMacros.xml
new revision: 1.3; previous revision: 1.2
Comment 6 Max Sauer 2005-12-12 10:26:47 UTC
verified in 200512111900.