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 106423

Summary: Unnecessary dependency Core -> Text API
Product: platform Reporter: _ tboudreau <tboudreau>
Component: -- Other --Assignee: Jesse Glick <jglick>
Severity: blocker CC: jglick, jtulach, vstejskal
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Attachments: Diff for openide/text
Diff for core

Description _ tboudreau 2007-06-12 19:45:34 UTC
Core currently depends on Text API, which means almost any platform application will need to include the Text API even though they do not use it.

It is referenced from org.netbeans.beaninfo, in IndentEngine, IndentEngineBeanInfo and IndentEngineEditor (and the layer file, though I don't really understand 
what NoIndentEngine.instance is for).

These could easily be moved either into the Text API module or possibly just deleted (the only two indentation engines registered in NB 6 which have any 
custom properties are Java and JSP, and at least Java is handled differently in the Basic Options dialog in 6.0).

It should take very little work to break this dependency and make many platform apps smaller.  Any reason not to do it for 6.0?  At worst, we just move the 
BeanInfo into o.n.m.text and register it in a static initializer for IndentationEngine.
Comment 1 _ tboudreau 2007-06-13 06:18:00 UTC
Created attachment 43589 [details]
Diff for openide/text
Comment 2 _ tboudreau 2007-06-13 06:21:33 UTC
Created attachment 43590 [details]
Diff for core
Comment 3 _ tboudreau 2007-06-13 06:26:39 UTC
The attached patch almost works;  I rewrote IndentEngineEditor to remove the dependency on ServiceTypeEditor (Lookups.forPath() is very handy).  However, 
for some reason the property sheet is resetting the property editor with the old value immediately after setAsText() is called with a new value.  So that needs 
to be diagnosed some more (I can't depend on ExPropertyEditor unless we want to create a bridge module just for this one property editor).

But basically it works.
Comment 4 Stanislav Aubrecht 2009-02-03 15:01:10 UTC
reassigning back to tim to re-evaluate
Comment 5 Jesse Glick 2009-02-03 16:20:42 UTC
Just leave openide.text alone and delete the customizers. IndentEngine is deprecated and not used for customizing
formatting any more, so there is no need for a prop editor / customizer. Vita can confirm I guess.

Also I am not sure what <friend>org.netbeans.modules.indentationbridge</friend> is all about.

BTW do not use the IDE's wacky diff tool to generate diff. Use 'hg diff --git'. And make sure that you use 'hg ren' when
renaming files (renames from the IDE should do it right); diff --git will show these files as renamed, not necessarily

Feel free to assign to me.
Comment 6 Vitezslav Stejskal 2009-02-03 16:28:20 UTC
"IndentEngine is deprecated and not used ..." - correct
Comment 7 _ tboudreau 2009-02-04 03:58:14 UTC
Reassigning to Jesse per his request
Comment 8 Jesse Glick 2009-02-12 18:28:30 UTC
Will remove dep: core-main #0f94078d5899

Note that the IndentEngine editors were in fact already deleted. So the dep was just a relic.

Most platform applications will _still_ need to include the Text API because it is used by other modules, such as the
Loaders API. It would be possible to split this off with some further effort.
Comment 9 Quality Engineering 2009-02-13 09:26:18 UTC
Integrated into 'main-golden', will be available in build *200902130336* on (upload may still be in progress)
User: Jesse Glick <>
Log: #106423: removing unnecessary dep o.n.core -> openide.text.