Bug 156111 - Incorrect set of actions returned by J2MEKit
Incorrect set of actions returned by J2MEKit
Status: VERIFIED FIXED
Product: javame
Classification: Unclassified
Component: -- Other --
6.x
All All
: P2 (vote)
: 6.x
Assigned To: Petr Suchomel
issues@mobility
:
: 158963 (view as bug list)
Depends on: 158832
Blocks: 155805
  Show dependency treegraph
 
Reported: 2008-12-28 12:51 UTC by hotxrock
Modified: 2009-04-08 13:59 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
Returns inheritance of J2MEKit from JavaKit (2.76 KB, patch)
2009-01-11 12:04 UTC, hotxrock
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description hotxrock 2008-12-28 12:51:28 UTC
After I installed NetBeans 6.5 and imported settings from 6.1, I found out that closing brackets aren't inserted 
automatically regardless of the corresponding option. It turned out that if I hadnt't imported the settings from the 
previous version (namely 6.1), everything would work fine. Though I've set priority to P3, I think that this is a 
serious malfunction because it affects one of the core features, it even stopped me from using NetBeans 6.5 until I 
discovered that problem doesn't appear if I don't import the settings. Yet I'm not sure which component is faulty, so 
when and if I find out some more, I will add some information on the subject.

By the way, there is a related issue 154466.
Comment 1 hotxrock 2009-01-02 14:20:34 UTC
Now I've found out teh cause and I post full information on the bug:

Bug: standart Java actions (toggle comment, insert closing brackets automatically, fix imports, etc) become unavailable 
for any Java document if the first document shown at startup belongs to mobility project.

Cause: class org.netbeans.editor.BaseKit registers actions for mime types during warm-up and during initialization of 
org.openide.text.CloneableEditor. If the first document shown at startup does not belong to mobility project (for 
example, it is a start page), java editor warms up, registers JavaKit actions for mime "text/x-java" and everything 
works fine. If not (the first shown document's kit is org.netbeans.modules.mobility.editor.J2MEKit), then 
CloneableEditor initializes before warm-up, registers J2MEKit actions for mime "text/x-java" and as soon as J2MEKit 
returns actions of NbEditorKit and not of the JavaKit, all actions specific for Java are not registered for "text/x-
java" mime and thus become unavailable for any Java document.

Workaround: restart NetBeans in such a way that the first shown page is not mobility project source.

Possible fix: the most appropirate solution in my opinon is to return back to inheriting J2MEKit from JavaKit and not 
from NbEditorKit. Yes, I'm aware that there is issue 91730 and there was a fix, but now set of actions returned by 
J2MEKit doesn't include Java actions, and this causes loss of functionality if J2MEKit is used to register actions for 
its mime. If we choose not to extend JavaKit, then we have to ensure somehow that the set of actions returned by 
J2MEKit is exactly the same as for the JavaKit, otherwise the set of actions for "text/x-java" mime will vary rather 
randomly.

I mark this bug as P2 because this bug causes significant loss is basic functionality of the editor and the workaround 
is not obvious, and I hope that this issue will be reviewed soon and included in the 2nd patch for NetBeans 6.5, as 
such bug definitely could alienate anyone who happens to work with NetBeans 6.5 Mobility.
Comment 2 Petr Suchomel 2009-01-06 09:44:27 UTC
This is definitely Patch 2 candidate
Comment 3 Lukas Hasik 2009-01-06 09:51:56 UTC
just FYI
1,QE is responsible for identifying candidates for a patch
2, SW is used for candidates (KEYWORD is used by sustaining when the fix is released in a patch)
3, bug has to be fixed AND verified to be included in a patch
Comment 4 jinb 2009-01-08 18:56:43 UTC
Gentlemen, please fix/verify this till 14-Jan-2009, so it can be part of NB 6.5 patch 2.
Comment 5 hotxrock 2009-01-11 12:04:28 UTC
Created attachment 75667 [details]
Returns inheritance of J2MEKit from JavaKit
Comment 6 hotxrock 2009-01-11 12:08:02 UTC
I've uploaded the patch that does the trick. Now J2MEKit is inherited from JavaKit, actions are assigned as they should 
be. Obviously, this returns dependency on java.editor module.

P.S. What do QE and SW stand for?
Comment 7 Petr Suchomel 2009-01-12 09:30:12 UTC
Yes, this does the trick. I am trying to get a better solution, but seems they are some road blockers now. I agree,
patch is fine for now.
Comment 8 Jan Lahoda 2009-01-13 12:33:07 UTC
As part of issue #155805, I have changed the registration of the actions, so that the "J2ME" kit should be able to use
them. So, considering the actions, this fix should not be necessary. The changeset that changes the registration is:
http://hg.netbeans.org/main/rev/9f98ff22d8ab
Comment 9 pgebauer 2009-01-14 09:52:27 UTC
The issue hasn't passed the nomination process for 65patch2 by cut-off date. It has been moved to 65patch3.
Comment 10 Andrei Chistiakov 2009-02-24 12:46:32 UTC
I can't verify the fix until issue 158832 is fixed.
Comment 11 Andrei Chistiakov 2009-03-05 11:06:21 UTC
*** Issue 158963 has been marked as a duplicate of this issue. ***
Comment 12 Andrei Chistiakov 2009-03-23 13:59:46 UTC
Verified with NetBeans IDE Dev (Build 200903221401).
Comment 13 pgebauer 2009-04-08 13:59:56 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 http://www.sun.com/contact/support.jsp 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
page http://www.netbeans.org/kb/support.html


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