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 66263 - Generated code damaged when 'Add New Line Before Brace' is enabled
Summary: Generated code damaged when 'Add New Line Before Brace' is enabled
Status: CLOSED FIXED
Alias: None
Product: javame
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: David Kaspar
URL:
Keywords:
Depends on: 66453
Blocks:
  Show dependency tree
 
Reported: 2005-10-07 15:42 UTC by herkules
Modified: 2008-09-10 15:54 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
damaged code + settings dialog (127.24 KB, image/jpeg)
2005-10-07 15:43 UTC, herkules
Details

Note You need to log in before you can comment on or make changes to this bug.
Description herkules 2005-10-07 15:42:13 UTC
When the indention options of the java editor has 'Add New Line Before Brace'
enabled, the code generated by the 'new midlet' wizard is damaged. It contains
too many opening braces: 


  /**
    * This method should return an instance of the display.
    */
    public javax.microedition.lcdui.Display getDisplay () {
   {
      return javax.microedition.lcdui.Display.getDisplay(this);
    }
   
   /**
    * This method should exit the midlet.
    */
    public void exitMIDlet () {
   {
      getDisplay().setCurrent(null);
      destroyApp(true);
      notifyDestroyed();
    }
Comment 1 herkules 2005-10-07 15:43:27 UTC
Created attachment 25685 [details]
damaged code + settings dialog
Comment 2 Lukas Hasik 2005-10-07 15:51:21 UTC
it seems like serious problem -> uncompilable code -> P2
reassigning to David.

David - this problem happens only for exitMidlet and getDisplay methods of newly
created midlet.
Comment 3 David Kaspar 2005-10-11 09:54:38 UTC
This issue is caused by issue #66453.

This issue (#66263) has been fixed using a workaround for #66453:
Designer does not regenerate headers and bottoms of getDisplay and exitMIDlet
methods.

This affects compatibility with first few q-builds of the NetBeans Mobility Pack
5.0.

When the root issue (#66453) will be fixed, the workaround could be removed.
Comment 4 Lukas Hasik 2005-10-12 09:32:16 UTC
it seems to be fixed in latest mobility build - getDisplay, exitMidlet ignores
I'll let the reporter to check and verify by himself (thank you, herkules).
Comment 5 herkules 2005-10-12 10:26:35 UTC
You are welcome :)

Where can I get hold of the latest build?
Comment 6 Lukas Hasik 2005-10-12 10:42:00 UTC
the daily builds for mobility are available for download
http://www.netbeans.info/downloads/download.php?a=n&p=1

The build 20051012 of MP includes this fix. You'll probably have to reinstall
NetBeans too.
If you think it's too risky for you to switch to development build you can wait
till next q-build will be promoted (it will be tested today but I don't know
when it'll be published).

There is no hurry to verify it ;) thank you
Comment 7 herkules 2005-10-12 13:20:15 UTC
ok, I confirm it is fixed.
Comment 8 Lukas Hasik 2005-10-12 13:24:27 UTC
wow, quick verification, one more thanks
I'm marking as verified - (you can do it by yourself next time)
Comment 9 Ivan Sidorkin 2008-09-10 15:54:51 UTC
close old issues