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 217633

Summary: java.source has too heavyweight dependencies
Product: java Reporter: Jaroslav Tulach <jtulach>
Component: SourceAssignee: Jaroslav Tulach <jtulach>
Status: RESOLVED WONTFIX    
Severity: normal CC: apireviews, Jachym_Vojtek, ralphbenjamin, tpavek
Priority: P3 Keywords: API_REVIEW
Version: 7.2   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Attachments: Changes in java.source, java.preprocessor bridge, java.editor (plus one independent in nbjunit), bundle keys are probably not ok

Description Jaroslav Tulach 2012-08-30 14:07:21 UTC
I'd like to reuse java.source in an unusual environment - one that does not have the NetBeans editor. I am mostly interested in the Java parsing and modeling functionality, I will handle the editing via different means.

From the public signatures API point of view the java.source module is completely NetBeans editor independent. Internally, there however is a lot of dependencies and even some editor extensions (reformat, reindent, sidebar, options). I will work on "reverting" these dependencies - e.g. make java.source NetBeans editor independent and put the editor related functionality into a common bridge.
Comment 1 Jaroslav Tulach 2012-08-30 14:19:08 UTC
Created attachment 123746 [details]
Changes in java.source, java.preprocessor bridge, java.editor (plus one independent in nbjunit), bundle keys are probably not ok

My plan is to place an API for communication from java.source to the editor into java.preprocessor and implement it in java.editor - e.g. the TalkToEditor class and its impl.

I moved the UI configuration panels from java.source to java.editor and created an API in java.preprocesor that those panels can use to talk back to java.source non-public API (e.g. FmtContants implemented as FmtOptions).

I have not solved Reindenter and Reformater and SideBar. It seems to me their registrations belong to editor, yet their depend a lot on internals of java.source. I will probably expose their core functionality through FmtContants and do the registrations of appropriate editor classes (delegating to the core functionality) in java.editor.

The goal of this change is to keep current functionality, just change its physical packaging to simplify re-use.

I am looking for an initial feedback - e.g. where to put what. Once there is an agreement, I plan to set a branch and Hudson job up and run all suggested tests to verify the functionality really remains unchanged.
Comment 2 Jaroslav Tulach 2012-11-06 11:24:20 UTC
Looks like java.source is not going to be base for JDev Java integration anytime soon.