Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 155805 - Fix imports and Toggle comments are disabled when exiting the IDE with open editor windows
Fix imports and Toggle comments are disabled when exiting the IDE with open e...
Product: javame
Classification: Unclassified
Component: -- Other --
All Windows XP
: P3 (vote)
: 6.x
Assigned To: Petr Suchomel
: 153365 162921 163395 165997 (view as bug list)
Depends on: 156111
  Show dependency treegraph
Reported: 2008-12-19 02:58 UTC by atleta
Modified: 2009-08-18 17:30 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT


Note You need to log in before you can comment on or make changes to this bug.
Description atleta 2008-12-19 02:58:48 UTC
If I exit the IDE with leaving some _java_ editor tabs open, then after the next startup both the Toggle comments and
the Fix imports actions will be disabled in the _java_ editors. Both menu items (under the Source menu) and the keyboard
shortcuts fail. The bug does not seem to affect other source file types: I also have the python IDE module installed and
both functions work even if I leave a python editor tab open when I exit. Leaving a non-java (say python) editor tab
open also does not cause any problems, i.e. in this case the java editors will work after the restart.

I'm not sure if it's really linux specific, since the bug has been reported in this forum topic to exist on windows XP as well. However, I have both a
linux (Debian lenny/testing) and a windows XP box and it only affects my linux installation.
Comment 1 Jan Lahoda 2009-01-07 13:03:58 UTC
Seems to work fine for me on Linux - sorry. Could you please provide some more info on how specifically reproduce the
problem? Jirka, could you please also try? Thanks.
Comment 2 Jiri Prox 2009-01-08 15:00:58 UTC
unfortunately I cannot reproduce it as well. Does it start working when you switch editor windows
Comment 3 atleta 2009-01-08 16:40:38 UTC
I already described how to reproduce the problem: "exit the IDE with leaving some _java_ editor tabs open", then start
the IDE. That's it. If I close the java tabs before exiting and then restart then everything's OK. And it happens
everytime, consistently. It maybe an interaction with other extensions/plugins. I also have the python IDE and mobility
pack installed.
Comment 4 atleta 2009-01-08 16:50:05 UTC
... Having said that, I made a few more tests, and it seems that it's a bit more complicated. It's probably related to
the mobility pack. To reproduce the error you actually have to have a mobility pack managed java tab open. But if you
have a non-mobility (JSE) tab open as well, then the mobility tab also has to be the current one. I.e. if you exit with:
- at least one mobility java tab open, but no other (JSE) java tab open then the problem surfaces (you can have other
non-java tabs like a .py one open either being the current one or not)
- if you have only non-mobility java tabs open, then the problem does not occur
- if you have _both_ mobility and non-mobility java tabs then the problem _only_ occurs if the mobility one is the
active one when you exit. That's true even if you have other non-java tabs open.
Comment 5 willi3 2009-01-08 17:13:45 UTC
I have exactly the same behaviour like described from atleta.
System Linux 32bit OpenJDK build 1.6.0_0-b11 
(and if its important the mobility plugin installed)
But the error occur also with if non-mobility java tabs open.

Comment 6 Quality Engineering 2009-01-11 06:35:11 UTC
Integrated into 'main-golden', will be available in build *200901110304* on (upload may still be in progress)
User: Jan Lahoda <>
Log: #155805: registering Java actions in the layer. Removing JavaDocument.
Comment 7 Jan Lahoda 2009-01-11 17:32:17 UTC
Thanks for the J2ME information, the problem is much clearer now. The problem is that there are (at least) two editor
kits for text/x-java mimetype, one in java.editor and one in mobility (mobility.editor). Normally, the kit from
java.editor is used to handle the Java files, including the actions specified in the kit. But, when the IDE is started
with a file from a mobility project opened, the kit from the mobility is used. This kit does not specify the same
actions as the kit from java.editor, and so the actions do not work.

In the above commit, I have changed the registration of the actions, so that they are used even by the mobility's kit.
This should solve the immediate problems with the actions. The remaining problem is that there are still four
(non-trivial) methods in the java.editor's kit, which won't be used when the mobility's kit is used. On the first sight,
it seems that it might be eventually possible to delete these methods, but that needs to be carefully tested.
Comment 8 Vitezslav Stejskal 2009-01-13 11:31:48 UTC
> The problem is that there are (at least) two editor kits for text/x-java mimetype [...]

Yes, this is fundamentally wrong, there cannot be two different kits registered for the same mimetype. I discussed this
with psuchomel and we agreed that there doesn't seem to be any reason for having J2MEKit and J2MEEditorDocument. The
same functionality that these classes provide can be achieved by registering a listener to a standard java documents
created by JavaKit. AFAIK Petr was trying to do the suggested changes and I believe this issue is under j2me folks' control.
Comment 9 Petr Suchomel 2009-01-13 12:17:17 UTC
See 156111
Comment 10 Petr Suchomel 2009-03-16 18:05:57 UTC
It is on the way. Waiting for editor fix
Comment 11 Quality Engineering 2009-03-19 20:38:17 UTC
Integrated into 'main-golden', will be available in build *200903191401* on (upload may still be in progress)
Log: Fix for #155805, Mobility editor kit overrides Java editor kit
Comment 12 pgebauer 2009-04-08 14:12:26 UTC
The status whiteboard "65fixes4-candidate" has been removed.
At this time our proactive patches for the NetBeans 6.5.x IDE have concluded.

If you own a Sun service plan contract for NetBeans, you may wish to contact
Sun Service to request a fix via the
product defect escalation process.

For more information on purchasing a Sun service plan contract for NetBeans,
refer to the service plan item "Sun Software Service Plans (S3P) for Developers"
in the Sun Service table found on our NetBeans Support Resources
Comment 13 Petr Suchomel 2009-04-15 13:38:00 UTC
Fixed in M3.
Comment 14 Jiri Prox 2009-04-17 15:00:46 UTC
*** Issue 162921 has been marked as a duplicate of this issue. ***
Comment 15 aste 2009-04-17 15:58:31 UTC
I right understand that in 6.5.X this not will be fixed, and will be fixed only in 6.7 which is the only beta now?
Comment 16 aste 2009-04-17 17:06:30 UTC
I try update 6.5.1 for latest version.. Defect present now... It't don't fixed in current release version now...
6.7 M3 is not release candidate, is not release, it can't be used in regular work process.. 
Defect must be fixed in current work version..
Comment 17 Jiri Prox 2009-04-17 17:42:52 UTC
The status of issue reflect the state in which is the code in current daily builds, not in last released version.

Unfortunately no patches are planed to be backported from 6.7 to 6.5.1 now
Comment 18 Jiri Prox 2009-04-17 18:37:02 UTC
*** Issue 162921 has been marked as a duplicate of this issue. ***
Comment 19 aste 2009-04-17 19:20:34 UTC
If currently downloaded code not patched, issue can't be market as fixed..  It's can be markes as will be fixed in next
version, but now IT NOT FIXED.. SINCE DECEMBER 2008!
Comment 20 Jiri Prox 2009-04-17 21:30:02 UTC
no, according the issue life cycle this issue is fixed, the fix will be available in next release
Comment 21 aste 2009-04-18 08:56:30 UTC
Becouse problem exist in current version and fix vill be available only in june or later (see 6.7 version roadmap) there
is need to have some hotfix for current version too..

If there is a impossible apply this patches to the current version, you can, for example, make hotfix like additiona
plugin for editor, with key combination which will turn on this actions manually, if need.. There is not comfortably -
each time to reload IDE, if it was previously closed with opened J2ME source files.. Or, you can take other way for
turning-on this actions without restarting IDE..
Comment 22 pgebauer 2009-04-19 12:22:07 UTC
Hi aste,

as I mentioned in my previous comment, we do not plan any bugfixing for NetBeans IDE 6.5 nor 6.5.1 except of customers with purchased one of Sun 
Software Service Plans for Developers. If you have any, you should use the product defect escalation process for the delivery of this bugfix.  If you want to 
purchase a Sun Software Service Plan, please see or

Comment 23 Jiri Prox 2009-04-22 16:48:42 UTC
*** Issue 163395 has been marked as a duplicate of this issue. ***
Comment 24 aste 2009-04-25 19:24:20 UTC
For me bug is not fixed until i can't download patch..

# LATER: The problem described is an issue which will not be fixed in this version of the product.

This bug must be marked as LATER but not as FIXED.. becouse it not will be fixed in current version!
Comment 25 Jiri Prox 2009-04-27 10:43:37 UTC
*** Issue 163395 has been marked as a duplicate of this issue. ***
Comment 26 Jiri Prox 2009-04-27 10:51:15 UTC
The issue IS fixed - as was stated before the status reflect actual state of the bug - and the fix is there in current
version - see the daily builds. LATER means that the fix will be implemented in next version.

We don't backport all bug fixes into already released version. Only selected fixes are released as a patch. But now,
when we are close to next release, we don't plan to create any new patches - as pgebauer wrote. Sorry.
Comment 27 Jan Lahoda 2009-06-01 15:27:26 UTC
*** Issue 165997 has been marked as a duplicate of this issue. ***
Comment 28 Jiri Prox 2009-08-18 17:30:25 UTC
*** Issue 153365 has been marked as a duplicate of this issue. ***

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo