public class CleanupStep<T extends org.eclipse.wst.sse.core.internal.cleanup.AbstractStructuredCleanupProcessor & CleanupStep.ProcessorAccessor>
extends java.lang.Object
Some WTP formatters do not apply all formatting within a formatter process, but provide a cleanup and a formatter process, whereas the cleanup process calls the formatter process.
Not all cleanup processes provided by WTP are suitable for Spotless formatting. For example the XML cleanup processor focus on syntax and line delimiter corrections. The syntax correction is based on the corresponding XSD/DTD, but it must be assumed by the Spotless formatter that the provided files are valid. It cannot be the purpose of a formatter to correct syntax. A Java formatter should also not attempt to correct compilation errors. A line delimiter correction would furthermore violate the Spotless rule that the strings processed by a Spotless formatter chain must use UNIX style delimiters.
AbstractStructuredCleanupProcessor| Modifier and Type | Class and Description |
|---|---|
static interface |
CleanupStep.ProcessorAccessor
Some of the SEE AbstractStructuredCleanupProcessor interface shall be
made public to provide cleaner interfaces.
|
| Modifier | Constructor and Description |
|---|---|
protected |
CleanupStep(T processor,
java.util.function.Consumer<java.util.Collection<org.osgi.framework.BundleActivator>> addptionalPlugins) |
protected |
CleanupStep(T processor,
java.util.function.Consumer<com.diffplug.spotless.extra.eclipse.base.SpotlessEclipseCoreConfig> core,
java.util.function.Consumer<java.util.Collection<org.osgi.framework.BundleActivator>> addptionalPlugins) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
configure(java.util.Properties properties,
boolean usesPreferenceService,
org.eclipse.core.runtime.Plugin plugin,
org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer preferencesInit) |
java.lang.String |
format(java.lang.String raw)
Calls the cleanup and formatting task of the processor and returns the formatted string.
|
protected final T extends org.eclipse.wst.sse.core.internal.cleanup.AbstractStructuredCleanupProcessor & CleanupStep.ProcessorAccessor processor
protected CleanupStep(T processor, java.util.function.Consumer<java.util.Collection<org.osgi.framework.BundleActivator>> addptionalPlugins) throws java.lang.Exception
java.lang.Exceptionprotected CleanupStep(T processor, java.util.function.Consumer<com.diffplug.spotless.extra.eclipse.base.SpotlessEclipseCoreConfig> core, java.util.function.Consumer<java.util.Collection<org.osgi.framework.BundleActivator>> addptionalPlugins) throws java.lang.Exception
java.lang.Exceptionprotected final void configure(java.util.Properties properties,
boolean usesPreferenceService,
org.eclipse.core.runtime.Plugin plugin,
org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer preferencesInit)
public java.lang.String format(java.lang.String raw)
throws java.lang.Exception
raw - Dirty stringjava.lang.Exception - All exceptions are considered fatal to the build process (Gradle, Maven, ...) and should not be caught.