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 115739

Summary: Add an ability to participate on formatting by other modules
Product: editor Reporter: Jan Pokorsky <jpokorsky>
Component: Formatting & IndentationAssignee: Dusan Balek <dbalek>
Status: RESOLVED FIXED    
Severity: blocker    
Priority: P1    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description Jan Pokorsky 2007-09-17 18:20:03 UTC
It would be great if the editor would provide a possibility to plug to the line formatting process. Today it is
hardwired in BaseKit.InsertBreakAction and you have to subclass the action. The registration via the mime lookup would
help. See also org.netbeans.modules.editor.java.JavaKit.JavaInsertBreakAction that temporarily work around this.
Comment 1 Vitezslav Stejskal 2007-09-18 10:01:08 UTC
Is not the API/SPI in the editor/indent module suitable for this? If yes, please close this RFE. If not, make it a
defect and describe usecases that are not covered by the API. Thanks a lot.

Oh, btw, the API's javadoc is probably still not available on the web site. I'll fix that.
Comment 2 Jan Pokorsky 2007-09-18 10:53:44 UTC
The API is nice. I have not been aware of it at all. Publishing the javadoc would be great to advertise this and I would
propose to deprecate IndentEngine with a reference to the editor/indent.

Unfortunately I need to distinguish cases user enters a new line. It is why I mentioned InsertBreakAction.

Use case 1:
In order to generate javadoc in editor user writes "/**" + <ENTER>. I need to close the javadoc with "*/" and generate
the content.

Use case 2:
User writes a bracket + <ENTER>. I want to close it.

So it relates rather to editor actions than to indentation/formatting directly as I need to plug to the point when the
indentation is triggered.

Comment 3 Dusan Balek 2013-09-06 15:11:38 UTC
Already fixed with the Typing Hooks API.