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 120357 - Rework and stabilize Editor Indentation API
Summary: Rework and stabilize Editor Indentation API
Status: RESOLVED WONTFIX
Alias: None
Product: editor
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Dusan Balek
URL:
Keywords: API
Depends on: 189638
Blocks: 152645
  Show dependency tree
 
Reported: 2007-10-29 14:47 UTC by Jaroslav Tulach
Modified: 2016-05-25 06:01 UTC (History)
4 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 Jaroslav Tulach 2007-10-29 14:47:54 UTC
The indent usecases:
http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-indent/overview-summary.html
refer to doc.atomicLock, doc.atomicUnlock. Imho the examples should use NbDocument.* methods which work on any 
document, not just BaseDocument.
Comment 1 Vitezslav Stejskal 2007-10-29 15:32:28 UTC
We will have to run the Editor Indentation API through the full review process and polish it. I moved the classes to
unofficial packages and marked the API as 'under development'. We intend to stabilize it in the next release.
Comment 2 Vitezslav Stejskal 2007-11-08 11:24:59 UTC
We need to have another look at the API and especially its usecases. The current state is way below the needs of JSP and
Ruby folks. Tomasz Slota knows a lot about what is needed. Tomasz, could you please summarize usecase/problems you've
learned when implementing formatters for Nb6. Thanks

Also, for Nb6 we hardcoded the order in which formatters are applied for certain languages (eg. rhtml, jsp), see
o.n.m.e.indent.TaskHandler. These hacks need to be removed.
Comment 3 Miloslav Metelka 2007-11-08 16:03:40 UTC
Regarding Yarda's request I think that we should rather have just the "top-level" methods in the API e.g.
reformat(Position startPos, Position endPos); or reindentLine(Position pos);
The locking and additional logic such as guarded block skipping etc. would be hidden in the impl.
Comment 4 Vitezslav Stejskal 2008-11-07 11:32:59 UTC
One part of this work is to separate and deprecate the old formatting API and infrastructure. This also depends on #152655.
Comment 5 Vitezslav Stejskal 2010-08-18 13:07:18 UTC
(In reply to comment #4)
> One part of this work is to separate and deprecate the old formatting API and
> infrastructure. This also depends on #152655.

I filed a separate issue for deprecating the old formatting API - issue #189638.
Comment 6 Quality Engineering 2010-08-31 03:23:34 UTC
Integrated into 'main-golden', will be available in build *201008310001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/de609369a4a6
User: Vita Stejskal <vstejskal@netbeans.org>
Log: #120357: updating module dependencies and removing unneccessary use of the old formatting API; full IDE is buildable and runs somehow