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 244679

Summary: Extract document manipulation from editor.lib(2)
Product: editor Reporter: Svata Dedic <sdedic>
Component: -- Other --Assignee: Svata Dedic <sdedic>
Status: NEW ---    
Severity: normal CC: mmetelka
Priority: P2    
Version: 8.0.1   
Hardware: PC   
OS: Linux   
Issue Type: TASK Exception Reporter:

Description Svata Dedic 2014-05-23 08:35:57 UTC
Modules editor.lib and editor.lib2 contain many Swing-related interfaces in addition to document features. 
If the document is to be used without Swing (e.g. editor replacement, some service implementation), at least interfaces to BaseDocument should be extracted to a separate module so that client code may declared dependency on Document manipulation API/utils and not require the rest.

The APIs/suitable utilities should be moved to editor.document module.

Milo please review the API/module contents in the server_split branch; especially the AtomicLockDocument interface -- while the original AtomicLockDocument interface in editor.lib was not deprecated, BaseDocument.atomicLock was. If the design should promote runAtomic over lock/unlock pairs, these can be still removed from the API until we merge/release the code.

I have also some doubts about exposing the (Adjust)Finder interface; it seems ancient and not widely used.
Comment 1 Svata Dedic 2014-05-23 08:59:22 UTC
See http://hg.netbeans.org/jet-main/rev/53f02b33dc09
Comment 2 Miloslav Metelka 2014-05-29 16:32:36 UTC
Removed ALD.atomicLock()/Unlock() and improved javadocs. Removed compilation warnings.
http://hg.netbeans.org/jet-main/rev/96eebb6d9751
Comment 3 Quality Engineering 2014-10-18 05:13:05 UTC
Integrated into 'main-silver', will be available in build *201410180001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/96eebb6d9751
User: Miloslav Metelka <mmetelka@netbeans.org>
Log: #244679 - Extract document manipulation from editor.lib(2) - removed AtomicLockDocument.atomicLock()/Unlock().