Package org.eclipse.jdt.core.formatter
Class CodeFormatterApplication
java.lang.Object
org.eclipse.jdt.core.formatter.CodeFormatterApplication
- All Implemented Interfaces:
IApplication
Implements an Eclipse Application for org.eclipse.jdt.core.JavaCodeFormatter.
On MacOS, when invoked using the Eclipse executable, the "user.dir" property is set to the folder in which the eclipse.ini file is located. This makes it harder to use relative paths to point to the files to be formatted or the configuration file to use to set the code formatter's options.
There are a couple improvements that could be made: 1. Make a list of all the files first so that a file does not get formatted twice. 2. Use a text based progress monitor for output.
- Since:
- 3.2
- Restriction:
- This class is not intended to be subclassed by clients.
- Restriction:
- This class is not intended to be instantiated by clients.
-
Field Summary
Fields inherited from interface org.eclipse.equinox.app.IApplication
EXIT_OK, EXIT_RELAUNCH, EXIT_RESTART
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstart
(IApplicationContext context) Runs the Java code formatter applicationvoid
stop()
-
Constructor Details
-
CodeFormatterApplication
public CodeFormatterApplication()
-
-
Method Details
-
start
Runs the Java code formatter application- Specified by:
start
in interfaceIApplication
- Throws:
Exception
-
stop
public void stop()- Specified by:
stop
in interfaceIApplication
-