| java.lang.Object org.eclipse.ui.internal.ide.actions.BuildUtilities
BuildUtilities | public class BuildUtilities (Code) | | This class contains convenience methods used by the various build commands
to determine enablement. These utilities cannot be factored into a common
class because some build actions are API and some are not.
since: 3.1 |
Method Summary | |
public static IProject[] | extractProjects(Object[] selection) Extracts the selected projects from a selection. | public static IProject[] | findSelectedProjects(IWorkbenchWindow window) | public static boolean | isEnabled(IProject[] projects, int trigger) Returns whether a build command with the given trigger should
be enabled for the given selection.
Parameters: projects - The projects to use to determine enablement Parameters: trigger - The build trigger (IncrementalProjectBuilder.*_BUILD constants). | public static void | saveEditors(Collection projects) Causes all editors to save any modified resources in the provided collection
of projects depending on the user's preference. |
extractProjects | public static IProject[] extractProjects(Object[] selection)(Code) | | Extracts the selected projects from a selection.
Parameters: selection - The selection to analyze The selected projects |
findSelectedProjects | public static IProject[] findSelectedProjects(IWorkbenchWindow window)(Code) | | Finds and returns the selected projects in the given window
Parameters: window - The window to find the selection in The selected projects, or an empty array if no selection could be found. |
isEnabled | public static boolean isEnabled(IProject[] projects, int trigger)(Code) | | Returns whether a build command with the given trigger should
be enabled for the given selection.
Parameters: projects - The projects to use to determine enablement Parameters: trigger - The build trigger (IncrementalProjectBuilder.*_BUILD constants). true if the action should be enabled, andfalse otherwise. |
saveEditors | public static void saveEditors(Collection projects)(Code) | | Causes all editors to save any modified resources in the provided collection
of projects depending on the user's preference.
Parameters: projects - The projects in which to save editors, or null to save editors in all projects. |
|
|