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 27138 - Split editor module into multiple modules
Summary: Split editor module into multiple modules
Status: RESOLVED DUPLICATE of bug 51486
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: All All
: P1 blocker with 1 vote (vote)
Assignee: issues@editor
URL:
Keywords:
: 44305 45965 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-09-09 17:45 UTC by Miloslav Metelka
Modified: 2007-11-05 13:44 UTC (History)
2 users (show)

See Also:
Issue Type: TASK
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Miloslav Metelka 2002-09-09 17:45:11 UTC
It's desirable to split the editor into pieces.
Currently there are two jars:
- nb-editor.jar - reusable library independent on IDE
- editor.jar - editor module working over the
nb-editor.jar

New jars:
Libraries:
- nb-editor.jar - original library without the
parts that follow
- plain-nb-editor.jar - not sure whether this
should not simply be part of the nb-editor.jar
- java-nb-editor.jar - java part of the nb-editor.jar
- html-nb-editor.jar - html part of the nb-editor.jar

Modules:
- editor.jar - original module without the parts
that follow
- plain-editor.jar - Plain editing
- java-completion.jar - Java Code Completion support
- java-editor.jar - Java editing; depends on
java-completion.jar
- html-editor.jar - HTML editing
Comment 1 Miloslav Metelka 2002-09-20 12:47:46 UTC
Additionaly there can be an extra module (editorcore.jar) that will
contain the code for reading the editor annotations and settings.
Comment 2 Torbjorn Norbye 2002-09-25 17:56:05 UTC
Shouldn't there be an editor-completion module which provides
infrastructure for doing completion (keyboard listening,
drawing the window, talking to MDR to fetch results etc.)
and then the java-completion module uses that?
Then it would be easy to add completions for other languages
instead.

Without that, every module has to rewrite all that code, and
undoubtedly there will be inconsistencies; one module will
have a 2 second timeout and another 5; one module will size
its completion window 200x200 and another 300x300, etc.

Also, when refactoring modules, it would be REALLY nice if 
you could create a "Code Editor" that all the language editor
modules could derive from. The Code Editor would define COMMON
settings like font size, color/font of keywords, color/font
of comments, etc. Right now I have to go and edit all of these
for each language. I realize that's because "keyword" is a concept
that doesn't belong in a Plain editor, but in the IDE area there
is a lot of overlap so it would be nice to share all this, not
just from an implementation perspective but from a usability
perspective too.
Comment 3 Miloslav Metelka 2002-09-25 18:23:01 UTC
The future javacompletion module is intended to contain the databases
and provide the basic querying on top of them and updating of them. It
is not intended to do the additional logic such as evaluating the
editor context and presenting the output of the query. That part will
stay in the editor because it depends on the Syntax and other classes
that are "too deep" in the editor. One possibility to move even the
context evaluating part out from the editor would be if the lexer
module would be available because then the javacompletion could depend
on the java-lexer instead of Syntax classes etc. 

IMHO the "Code Editor" is equivalent of the editorcore mentioned in
the previous note.
Comment 4 Miloslav Metelka 2002-09-25 18:37:27 UTC
By "containing databases" I've meant the java code completion
databases management code. So in fact the javacompletion module will
simulate the MDR until the MDR will be ready.
By "evaluating context" I mean that there is a simplified parser that
simply speaking obtains the JTextComponent and the cursor position and
produces the list of completion items appropriate for that context.
Comment 5 Miloslav Metelka 2002-11-25 17:53:55 UTC
The final naming (cvs location to resulting jar(s)):
cvs/editor => editor.jar and editor-lib.jar
cvs/editor/settings => editor-settings.jar and editor-settings-lib.jar
cvs/java/completion => java-completion.jar and java-completion-lib.jar
cvs/java/editor => java-editor.jar and java-editor-lib.jar
cvs/java/editor/settings => java-editor-settings.jar and
java-editor-settings-lib.jar
cvs/html/editor => html-editor.jar and html-editor-lib.jar
cvs/html/editor/settings => html-editor-settings.jar and
html-editor-settings-lib.jar
cvs/text/editor => text-editor.jar and text-editor-lib.jar
cvs/text/editor/settings => text-editor-settings.jar and
text-editor-settings-lib.jar

The editor_split cvs branch will contain the changes related to editor
module split.
Comment 6 Miloslav Metelka 2002-11-29 14:14:06 UTC
Implemented in the editor_split branch. The split was implemented in
the prj40_prototype branch. Please see also issue #27137.
 We are hesitant to implement the split in the main trunk (likely
codebase for 3.5) too as it requires changes in all-editor related
build scripts and manifests (including tests) and still we don't count
with the externally maintained scripts that we don't know about. The
split also requires some incompatible changes in the java code
completion which is not desired to be done in NB3.5 (should stay
compatible with 3.4). Doing the split in NB4.0 is more appropriate as
it is generally expected to have necessary incompatible changes there
in both the code and the build scripts.
Comment 7 Torbjorn Norbye 2002-11-29 17:49:54 UTC
Ok. Is there a way (in the trunk/3.5) to access java completion from
outside the editor?   Martin told me to use
org.netbeans.modules.javacompletion.lib.JCManager().getDefault().getFinder(...)
but I assume that's the way I do it in the split_branch. (Because when
I searched for a org.netbeans.modules.javacompletion in the trunk, I
didn't find it.)
Comment 8 Martin Roskanin 2002-12-02 08:57:10 UTC
In the trunk/3.5 you can use static method 
org.netbeans.editor.ext.java.JavaCompletion.getFinder()
in editor/libsrc CVS folder
Comment 9 Miloslav Metelka 2004-06-03 21:31:06 UTC
Reopening - it's necessary to make the split in the current trunk. The
basis still apply and in addition we may revise whether it would make
sense to separate editor/libsrc into a separate submodule e.g. editor/lib.
Comment 10 Miloslav Metelka 2004-06-03 21:33:16 UTC
*** Issue 44305 has been marked as a duplicate of this issue. ***
Comment 11 Jan Lahoda 2004-06-03 21:40:01 UTC
Removing the PROJECTS keyword, as it is probably not old-projects
specific (re-add it back if you disagree).
Also removing blocked issue #27137, which is probably invalid now
(re-add if you disagree).
Comment 12 Miloslav Metelka 2004-07-22 14:24:58 UTC
The editor/libsrc sources are now projectized and built under a
separate submodule editor/lib.

Unfortunately the editor module splitting will not be integrated into
promo-D but we will perform it early in promo-E.
Comment 13 Miloslav Metelka 2004-07-22 14:46:08 UTC
*** Issue 45965 has been marked as a duplicate of this issue. ***
Comment 14 Miloslav Metelka 2004-11-13 11:23:27 UTC
Making dup of a new issue as this one was already partly implemented
in the original prj40_prototype and contains some obsolete information.
I have transferred the cc and keyword list to the new issue.

*** This issue has been marked as a duplicate of 51486 ***