Class FormatAllAction

  • All Implemented Interfaces:
    IAction, ISelectionChangedListener

    public class FormatAllAction
    extends SelectionDispatchAction
    Formats the code of the compilation units contained in the selection.

    The action is applicable to selections containing elements of type ICompilationUnit, IPackage , IPackageFragmentRoot and IJavaProject.

    This class may be instantiated; it is not intended to be subclassed.

    Since:
    3.0
    Restriction:
    This class is not intended to be subclassed by clients.
    • Constructor Detail

      • FormatAllAction

        public FormatAllAction​(IWorkbenchSite site)
        Creates a new FormatAllAction. The action requires that the selection provided by the site's selection provider is of type org.eclipse.jface.viewers.IStructuredSelection.
        Parameters:
        site - the site providing context information for this action
    • Method Detail

      • runOnMultiple

        public void runOnMultiple​(ICompilationUnit[] cus)
        Perform format all on the given compilation units.
        Parameters:
        cus - The compilation units to format.