|
|
Re: How to invoke XML formatter from Plugin [message #179505 is a reply to message #179449] |
Wed, 20 September 2006 21:57 |
Michael Giroux Messages: 287 Registered: July 2009 |
Senior Member |
|
|
For the moment, I am using
org.eclipse.wst.sse.ui.internal.actions.FormatActionDelegate to accomplish
the formatting, but I have a couple of issues:
1. format(IProgressMonitor, IFile) is protected, so it is necessary to
extend FormatActionDelegate to expose a method that invokes format(). A
public API would really be appreciated.
2. The IProgressMonitor that is passed to format() is not notified when the
formatting is complete. The done() method is not called. It is not clear
if this is an issue or not. If format() blocks until the task is complete
then the caller knows the formatting is complete when the method returns.
In this case, why does the method require an IProgressMonitor? If the
method does not block, then I would think that it is a bug that the progress
monitor done() is not invoked. As far as I can see, the progress monitor
worked() method is invoked once at the start of formatting, and from then
on, the monitor is never used.
3. formatting options (indentation amount, and tab or space) is workspace
global. There is no project specific configuration.
Michael Giroux
|
|
|
Powered by
FUDForum. Page generated in 0.02974 seconds