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.
Summary: | Incorrect set of actions returned by J2MEKit | ||
---|---|---|---|
Product: | javame | Reporter: | hotxrock <hotxrock> |
Component: | -- Other -- | Assignee: | Petr Suchomel <psuchomel> |
Status: | VERIFIED FIXED | ||
Severity: | blocker | CC: | ca-nb, mmirilovic, sustaining |
Priority: | P2 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Bug Depends on: | 158832 | ||
Bug Blocks: | 155805 | ||
Attachments: | Returns inheritance of J2MEKit from JavaKit |
Description
hotxrock
2008-12-28 12:51:28 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. This is definitely Patch 2 candidate 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 Gentlemen, please fix/verify this till 14-Jan-2009, so it can be part of NB 6.5 patch 2. Created attachment 75667 [details]
Returns inheritance of J2MEKit from JavaKit
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? 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. 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 The issue hasn't passed the nomination process for 65patch2 by cut-off date. It has been moved to 65patch3. I can't verify the fix until issue 158832 is fixed. *** Issue 158963 has been marked as a duplicate of this issue. *** Verified with NetBeans IDE Dev (Build 200903221401). 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 |