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 69792 - *.rules file editor nonfunctional
Summary: *.rules file editor nonfunctional
Status: RESOLVED FIXED
Alias: None
Product: contrib
Classification: Unclassified
Component: Jackpot (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: _ tball
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-02 20:40 UTC by Jesse Glick
Modified: 2005-12-23 22:08 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2005-12-02 20:40:10 UTC
Seems that when opening a *.rules file from the Jackpot Command Manager,

1. Arrow keys do not move the caret.

2. Editing changes are not permitted, even if the file should not be r/o.

3. Open rule files disappear after IDE restart.

Are you using something fancier than a vanilla DataEditorSupport.create? If so,
probably you do not need to.
Comment 1 _ tball 2005-12-22 01:47:38 UTC
It's a little more fancy, as it supports syntax coloring:  I have to subclass
DataEditorSupport to override createEditorKit(), and have to provide my own
SaveCookie and Environment support because someone got too tricky putting the
default implementation into a package private class (SimpleES) which is only
accessible via a static factory method (and hence, no subclassing).  I copied
the way Coyote did it, where one cuts & pastes all of SimpleES into my own
subclass and added the single overridden method.

I'll post a question on nbdev as to why this method is failing, but doubt I'll
get a response because the editor team rarely does -- if no response, I'll
bother Mila directly.
Comment 2 Jesse Glick 2005-12-22 18:42:30 UTC
You ought to be able to use DataEditorSupport.create without copying SimpleES.
There is no need to override createEditorKit. The *.rules file should have a
well-defined MIME type; if you have registered a kit for that MIME type with the
editor module, it will be used automatically.

http://platform.netbeans.org/tutorials/nbm-mfsyntax.html
Comment 3 _ tball 2005-12-23 00:40:49 UTC
There was a need to override createEditorKit if one wanted to extend the Java
editor's syntax rather than writing yet another one.  However, the last editor
changes to support the tutorial you reference broke syntax coloring in my
module, so I am back to square one.  I'll re-implement as the tutorial describes
and hope for the best.
Comment 4 _ tball 2005-12-23 22:08:50 UTC
All fixed -- eliminated need for SimpleES inclusion by using the Manifest syntax
tutorial.