Clean Ups

Identifier:
org.eclipse.jdt.ui.cleanUps

Since:
3.5

Description:
This extension point allows to add clean ups that can solve problems in a compilation unit.

Configuration Markup:

<!ELEMENT extension (cleanUp* , cleanUpConfigurationUI* , cleanUpOptionsInitializer*)>

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #IMPLIED

name  CDATA #IMPLIED>


<!ELEMENT cleanUp EMPTY>

<!ATTLIST cleanUp

class    CDATA #REQUIRED

id       CDATA #REQUIRED

runAfter IDREF #IMPLIED>


<!ELEMENT cleanUpConfigurationUI EMPTY>

<!ATTLIST cleanUpConfigurationUI

name        CDATA #REQUIRED

class       CDATA #REQUIRED

cleanUpKind (cleanUp|saveAction) >

A clean up configuration UI for the given clean up kind. Each contributed clean up must at least provide UI that allows to disable it.



<!ELEMENT cleanUpOptionsInitializer EMPTY>

<!ATTLIST cleanUpOptionsInitializer

cleanUpKind (cleanUp|saveAction)

class       CDATA #REQUIRED>

An options initializer that returns default options for a clean up kind. Each clean up will consult all contributed initializers to check whether it is enabled.



Examples:
The following is an example of a clean up that updates a copyright on save:


   <extension
         point="org.eclipse.jdt.ui.cleanUps">
      <cleanUp
            id="org.eclipse.jdt.copyrightsaveaction.copyright_clean_up"
            class="org.eclipse.jdt.ui.internal.copyrightupdater.CopyrightUpdaterCleanUp">
      </cleanUp>
      
      <cleanUpOptionsInitializer
            class="org.eclipse.jdt.ui.internal.copyrightupdater.CopyrightOnSaveOptionsInitializer"
            cleanUpKind="saveAction">
      </cleanUpOptionsInitializer>
      
      <cleanUpConfigurationUI
            class="org.eclipse.jdt.ui.internal.copyrightupdater.CopyrightTabPage"
            name="%cleanUpConfigurationUI.name"
            cleanUpKind="saveAction">
      </cleanUpConfigurationUI>
   </extension>


Copyright (c) 2008, 2009 IBM Corporation and others.
This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0 which accompanies this distribution, and is available at https://www.eclipse.org/legal/epl-v20.html/ SPDX-License-Identifier: EPL-2.0