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/code> and IJavaProject.

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

    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.
        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.
        cus - The compilation units to format.