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.
Created attachment 132148 [details] Proposed SPI During discussions following issue #226368, it was decided to split editor.fold into two modules to reduce dependencies of Fold API clients to the deprecated editor.lib. Because of that separation, a hook is needed to attach handlers to UI components; formerly this would be done in the FoldHierarchyExecution, but that class should remain independent of editor.lib dependencies now. Currently it is not possible to observe that folding (or an editor) was initialized for a JTextComponent, except hooking using "doc-install-action-name-list" preference key, which seems as inappropriate for this initialization API. As a minimal change the FoldHierarchyMonitor SPI will be introduced (see the attached diff). It allows to "ping" implementations of UI that a FoldHierarchy was created and - depending on future observations of the performance - when the 1st FoldManager registers for the hierarchy. The UI (e.g. BaseCaret bridge) can then hook to UI (folding changes and caret movement) and mediate the processing.
Changeset: 0d6c8d4a4534 Author: Svata Dedic <sdedic@netbeans.org> Date: 2013-03-08 18:24 Message: Added hook to initialize on fold hierarchy creation.
Integrated into 'main-golden', will be available in build *201303122300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/0d6c8d4a4534 User: Svata Dedic <sdedic@netbeans.org> Log: Issue #226978 - Fold SPI to integrate with NB Editor UI: fixed Added hook to initialize on fold hierarchy creation.