Java 类org.eclipse.ui.actions.OpenResourceAction 实例源码

项目:NEXCORE-UML-Modeler    文件:ResourceManager.java   
/**
 * 
 * 
 *  
 * @param projects void
 */
private void openProject(final IProject[] projects) {
    IShellProvider shellProvider = new IShellProvider() {
        public Shell getShell() {
            return ResourceManager.this.getShell();
        }
    };

    OpenResourceAction action = new OpenResourceAction(shellProvider){
        protected List getSelectedResources() {
            return Arrays.asList(projects);
        }

    };
    action.run();
}
项目:Eclipse-Postfix-Code-Completion    文件:OpenProjectAction.java   
/**
 * Creates a new <code>OpenProjectAction</code>. The action requires
 * that the selection provided by the site's selection provider is of type <code>
 * org.eclipse.jface.viewers.IStructuredSelection</code>.
 *
 * @param site the site providing context information for this action
 */
public OpenProjectAction(IWorkbenchSite site) {
    super(site);
    fWorkbenchAction= new OpenResourceAction(site);
    setText(fWorkbenchAction.getText());
    setToolTipText(fWorkbenchAction.getToolTipText());
    PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.OPEN_PROJECT_ACTION);
    setEnabled(hasClosedProjectsInWorkspace());
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:OpenProjectAction.java   
/**
 * Creates a new <code>OpenProjectAction</code>. The action requires
 * that the selection provided by the site's selection provider is of type <code>
 * org.eclipse.jface.viewers.IStructuredSelection</code>.
 *
 * @param site the site providing context information for this action
 */
public OpenProjectAction(IWorkbenchSite site) {
    super(site);
    fWorkbenchAction= new OpenResourceAction(site);
    setText(fWorkbenchAction.getText());
    setToolTipText(fWorkbenchAction.getToolTipText());
    PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.OPEN_PROJECT_ACTION);
    setEnabled(hasClosedProjectsInWorkspace());
}