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 68324 - Use proper indentation API
Summary: Use proper indentation API
Status: RESOLVED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Templates (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-09 03:24 UTC by Martin Krauskopf
Modified: 2011-10-26 14:26 UTC (History)
1 user (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 Martin Krauskopf 2005-11-09 03:24:43 UTC
Just to don't fortet this....

Consider using org.openide.text.IndentEngine instead of current code for
templates formatting. Jesse believes that depending on
org.netbeans.modules.editor.lib is bad. True is, that current formatting code is
rather copy-pasted-adjusted magic than readable code.
Comment 1 Martin Krauskopf 2005-11-09 03:25:34 UTC
Let's say 5.0 and maybe set future later.
Comment 2 Martin Krauskopf 2008-02-07 17:51:04 UTC
I'm not working on APISupport anymore. Reassigning to owner of the component, so
the issue is not 'forgotten' forever.
Comment 3 Jesse Glick 2008-06-20 02:41:59 UTC
Need to check with editor team to see what the recommended APIs are.
Comment 4 Vitezslav Stejskal 2008-06-23 12:47:49 UTC
I'm not sure what you need, but I think editor.indent module - Reformat.format(...) - should help.
Comment 5 Vitezslav Stejskal 2008-10-16 10:41:33 UTC
Whatever you decide to do please do not use IndentEngine. They are generally poor designed and totally wrong for
per-project formatting settings. As I said earlier Reformat class from editor.indent is what you should use for
formatting documents.
Comment 6 Jesse Glick 2008-11-07 03:04:18 UTC
In fact IndentEngine (which apisupport currently uses) is now deprecated.
Comment 7 Jesse Glick 2011-10-25 18:51:32 UTC
core-main #e713cd99c3b0
Comment 8 Quality Engineering 2011-10-26 14:26:54 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/e713cd99c3b0
User: Jesse Glick <jglick@netbeans.org>
Log: #68324: Use proper indentation API