當前位置: 首頁>>代碼示例>>Java>>正文


Java BasicNewProjectResourceWizard類代碼示例

本文整理匯總了Java中org.eclipse.ui.wizards.newresource.BasicNewProjectResourceWizard的典型用法代碼示例。如果您正苦於以下問題:Java BasicNewProjectResourceWizard類的具體用法?Java BasicNewProjectResourceWizard怎麽用?Java BasicNewProjectResourceWizard使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


BasicNewProjectResourceWizard類屬於org.eclipse.ui.wizards.newresource包,在下文中一共展示了BasicNewProjectResourceWizard類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: performFinish

import org.eclipse.ui.wizards.newresource.BasicNewProjectResourceWizard; //導入依賴的package包/類
@Override
public boolean performFinish() {
	String name = _pageOne.getProjectName();
	URI location = null;
	
	if (!_pageOne.useDefaults()) {
		location = _pageOne.getLocationURI();
	}
	
	try {
		ProjectSupport.createProject(name, location);
	} catch (UnsupportedEncodingException e) {
		logger.error("Error creating the project",e);
	}
	BasicNewProjectResourceWizard.updatePerspective(_configurationElement);
	
	return true;
}
 
開發者ID:germanattanasio,項目名稱:traceability-assistant-eclipse-plugins,代碼行數:19,代碼來源:ProjectNewWizard.java

示例2: performFinish

import org.eclipse.ui.wizards.newresource.BasicNewProjectResourceWizard; //導入依賴的package包/類
@Override
public boolean performFinish() {
	boolean res= super.performFinish();
	if (res) {
		final IJavaElement newElement= getCreatedElement();

		IWorkingSet[] workingSets= fFirstPage.getWorkingSets();
		if (workingSets.length > 0) {
			PlatformUI.getWorkbench().getWorkingSetManager().addToWorkingSets(newElement, workingSets);
		}

		BasicNewProjectResourceWizard.updatePerspective(fConfigElement);
		selectAndReveal(fSecondPage.getJavaProject().getProject());

		Display.getDefault().asyncExec(new Runnable() {
			public void run() {
				IWorkbenchPart activePart= getActivePart();
				if (activePart instanceof IPackagesViewPart) {
					PackageExplorerPart view= PackageExplorerPart.openInActivePerspective();
					view.tryToReveal(newElement);
				}
			}
		});
	}
	return res;
}
 
開發者ID:trylimits,項目名稱:Eclipse-Postfix-Code-Completion,代碼行數:27,代碼來源:JavaProjectWizard.java

示例3: performFinish

import org.eclipse.ui.wizards.newresource.BasicNewProjectResourceWizard; //導入依賴的package包/類
@Override
public boolean performFinish() {
  boolean res = super.performFinish();
  if (res) {
    {
      org.eclipse.ui.IWorkingSet[] workingSets = fFirstPage.getWorkingSets();
      if (workingSets.length > 0) {
        IJavaProject newElement = getCreatedElement();
        org.eclipse.ui.PlatformUI.getWorkbench().getWorkingSetManager().addToWorkingSets(
            newElement,
            workingSets);
      }
    }
    BasicNewProjectResourceWizard.updatePerspective(fConfigElement);
   // BasicNewResourceWizard.selectAndReveal(
     //   fSecondPage.getJavaProject().getProject(),
   //     DesignerPlugin.getActiveWorkbenchWindow());
  }
  return res;
}
 
開發者ID:HuaweiSNC,項目名稱:OpsDev,代碼行數:21,代碼來源:DesignerJavaProjectWizard.java

示例4: performFinish

import org.eclipse.ui.wizards.newresource.BasicNewProjectResourceWizard; //導入依賴的package包/類
@Override
public boolean performFinish() {
	NullProgressMonitor pm = new NullProgressMonitor();
	try {
		pageTwo.performFinish(pm);
	} catch (Exception e) {
		//TODO not sure how to handle this. There don't seem to be any ways to report an error back to the caller.
		LeJOSEV3Util.log(e);
	}
	
	IJavaProject newProject = pageTwo.getJavaProject();
	IWorkingSet[] workingSets= pageOne.getWorkingSets();
	if (workingSets != null && workingSets.length > 0) {
		fWorkbench.getWorkingSetManager().addToWorkingSets(newProject, workingSets);
	}

	BasicNewProjectResourceWizard.updatePerspective(fConfigElement);
	BasicNewResourceWizard.selectAndReveal(newProject.getProject(), fWorkbench.getActiveWorkbenchWindow());
	
	return true;
}
 
開發者ID:JanKoehnlein,項目名稱:XRobot,代碼行數:22,代碼來源:AbstractNewProjectWizard.java

示例5: performFinish

import org.eclipse.ui.wizards.newresource.BasicNewProjectResourceWizard; //導入依賴的package包/類
@Override
public boolean performFinish() {
	String name = pageOne.getProjectName();
	URI location = null;
	if (!pageOne.useDefaults()) {
		location = pageOne.getLocationURI();
	}//else location = null
	
	LEProjectSupport.createProject(name, location);
	BasicNewProjectResourceWizard.updatePerspective(configurationElement);
	
	return true;
}
 
開發者ID:Imhotup,項目名稱:LibertyEiffel-Eclipse-Plugin,代碼行數:14,代碼來源:LEProjectNewWizard.java

示例6: performFinish

import org.eclipse.ui.wizards.newresource.BasicNewProjectResourceWizard; //導入依賴的package包/類
public boolean performFinish() {
	String name = importProjectPage.getProjectName();
	IPath projectPath = importProjectPage.getLocationPath();
	new GaugeProjectCreator(name, projectPath).addProjectToWorkspace();
	BasicNewProjectResourceWizard.updatePerspective(configurationElement);
	return true;
}
 
開發者ID:getgauge-contrib,項目名稱:Gauge-Eclipse,代碼行數:8,代碼來源:ImportGaugeProjectWizard.java

示例7: performFinish

import org.eclipse.ui.wizards.newresource.BasicNewProjectResourceWizard; //導入依賴的package包/類
@Override
public boolean performFinish() {
	String name = _newProjectPage.getProjectName();
	
	if (_newProjectPage.useDefaults()) {
		new GaugeProjectCreator(name, _newProjectPage.getLocationPath().append(name)).createProject();
	} else {
		new GaugeProjectCreator(name, _newProjectPage.getLocationPath()).createProject();
	}
	BasicNewProjectResourceWizard.updatePerspective(_configurationElement);
	return true;
}
 
開發者ID:getgauge-contrib,項目名稱:Gauge-Eclipse,代碼行數:13,代碼來源:NewGaugeProjectWizard.java

示例8: performFinish

import org.eclipse.ui.wizards.newresource.BasicNewProjectResourceWizard; //導入依賴的package包/類
/**
 * The user clicked Finish button
 * 
 * Launches another thread to create Python project. A progress monitor is shown in the UI thread.
 */
public boolean performFinish() {
    createdProject = createNewProject();
    // Switch to default perspective (will ask before changing)
    BasicNewProjectResourceWizard.updatePerspective(fConfigElement);

    return true;
}
 
開發者ID:HuaweiSNC,項目名稱:OpsDev,代碼行數:13,代碼來源:PythonProjectWizard.java

示例9: performFinish

import org.eclipse.ui.wizards.newresource.BasicNewProjectResourceWizard; //導入依賴的package包/類
@Override
public boolean performFinish() {
	String host = pageTwo.getHost();
	String port = pageTwo.getPort();

	if (!pageTwo.testConnection()) {
		ServiceClientWrapper.showConnectionProblemMessage(null, host, port, true);
		return false;
	}

	String name = pageOne.getProjectName();
	URI location = null;
	if (!pageOne.useDefaults()) {
		location = pageOne.getLocationURI();
	} // else location == null

	// make sure there are no preferences cached from an old project with
	// the same name
	SpotterProjectSupport.deleteProjectPreferences(name);

	ServiceClientWrapper client = Activator.getDefault().getClient(name);
	if (!client.saveServiceClientSettings(host, port)) {
		return false;
	}
	if (SpotterProjectSupport.createProject(name, location) == null) {
		return false;
	}
	// change to proper perspective
	BasicNewProjectResourceWizard.updatePerspective(configurationElement);

	return true;
}
 
開發者ID:sopeco,項目名稱:DynamicSpotter,代碼行數:33,代碼來源:NewProjectWizard.java

示例10: performFinish

import org.eclipse.ui.wizards.newresource.BasicNewProjectResourceWizard; //導入依賴的package包/類
@Override
public boolean performFinish()
{
    IProject project = createProject();
    if (project == null) {
        return false;
    }

    BasicNewProjectResourceWizard.updatePerspective(configElement);
    BasicNewResourceWizard.selectAndReveal(project, workbench.getActiveWorkbenchWindow());
    return true;
}
 
開發者ID:vobject,項目名稱:maru,代碼行數:13,代碼來源:ScenarioProjectWizard.java

示例11: performFinish

import org.eclipse.ui.wizards.newresource.BasicNewProjectResourceWizard; //導入依賴的package包/類
/**
 * The user clicked Finish button
 *
 * Launches another thread to create Python project. A progress monitor is shown in the UI thread.
 */
@Override
public boolean performFinish() {
    createdProject = createNewProject();

    IWorkingSet[] workingSets = projectPage.getWorkingSets();
    if (workingSets.length > 0) {
        PlatformUI.getWorkbench().getWorkingSetManager().addToWorkingSets(createdProject, workingSets);

        //Workaround to properly show project in Package Explorer: if Top Level Elements are
        //working sets, and the destination working set of the new project is selected, that set
        //must be reselected in order to display the project.
        PydevPackageExplorer pView = (PydevPackageExplorer) PlatformUI.getWorkbench()
                .getActiveWorkbenchWindow().getActivePage()
                .findView("org.python.pydev.navigator.view");
        if (pView != null) {
            IWorkingSet[] inputSets = ((PydevCommonViewer) pView.getCommonViewer()).getSelectedWorkingSets();
            if (inputSets != null && inputSets.length == 1) {
                IWorkingSet inputSet = inputSets[0];
                if (inputSet != null) {
                    for (IWorkingSet destinationSet : workingSets) {
                        if (inputSet.equals(destinationSet)) {
                            pView.getCommonViewer().setInput(inputSet);
                            break;
                        }
                    }
                }
            }
        }
    }

    // Switch to default perspective (will ask before changing)
    BasicNewProjectResourceWizard.updatePerspective(fConfigElement);
    BasicNewResourceWizard.selectAndReveal(createdProject, workbench.getActiveWorkbenchWindow());

    return true;
}
 
開發者ID:fabioz,項目名稱:Pydev,代碼行數:42,代碼來源:PythonProjectWizard.java

示例12: performFinish

import org.eclipse.ui.wizards.newresource.BasicNewProjectResourceWizard; //導入依賴的package包/類
@Override
public boolean performFinish() {

    // Switch to default 'Pydev' perspective (asks before changing)
    BasicNewProjectResourceWizard.updatePerspective(fConfigElement);
    return true;
}
 
開發者ID:fabioz,項目名稱:Pydev,代碼行數:8,代碼來源:PythonGettingStartedWizard.java

示例13: performFinish

import org.eclipse.ui.wizards.newresource.BasicNewProjectResourceWizard; //導入依賴的package包/類
@Override
public boolean performFinish() {
	ProjectCreationOperation projectCreator = getProjectCreator();
	boolean success = projectCreator.performCreateProject();
	if(success) {
		BasicNewProjectResourceWizard.updatePerspective(fConfigElement);
		selectAndReveal(projectCreator.getCreatedProject());
		projectCreator.performFinishActions();
	}
	return success;
}
 
開發者ID:GoClipse,項目名稱:goclipse,代碼行數:12,代碼來源:LangNewProjectWizard.java

示例14: performFinish

import org.eclipse.ui.wizards.newresource.BasicNewProjectResourceWizard; //導入依賴的package包/類
public boolean performFinish() {
	WorkspaceModifyOperation op = new WorkspaceModifyOperation() {
		protected void execute(IProgressMonitor monitor)
				throws CoreException, InvocationTargetException, InterruptedException {
			javaPage.performFinish(monitor);
		}
	};
	try {
		getContainer().run(false, true, op);

		IJavaProject newElement = javaPage.getJavaProject();

		GW4ENature.setGW4ENature(newElement.getProject());

		IWorkingSet[] workingSets = mainPage.getWorkingSets();
		if (workingSets.length > 0) {
			PlatformUI.getWorkbench().getWorkingSetManager().addToWorkingSets(newElement, workingSets);
		}

		BasicNewProjectResourceWizard.updatePerspective(fConfigElement);
		BasicNewResourceWizard.selectAndReveal(newElement.getResource(),
				PlatformUI.getWorkbench().getActiveWorkbenchWindow());
	
		fMavenPage.create();
		
		if (provider==null) {
			provider = new NoneTemplate();
		}

		IPath p = newElement.getProject().getFullPath().append(targetFolder.getName()).append(fMavenPage.getPackagePath());
		ResourceManager.ensureFolderPath(p);
		
		IFolder f = (IFolder) ResourceManager.getResource(p.toString());

		
		IRunnableWithProgress operation = provider.createResourceOperation(newElement.getProject(),f,policies,filename);
		getContainer().run(false, false, operation);
		return provider.openInEditor(workbench);
	} catch (Exception e) {
		ResourceManager.logException(e);
		return false;
	}
}
 
開發者ID:gw4e,項目名稱:gw4e.project,代碼行數:44,代碼來源:GW4ECreationWizard.java

示例15: performFinish

import org.eclipse.ui.wizards.newresource.BasicNewProjectResourceWizard; //導入依賴的package包/類
@Override
public boolean performFinish() {
	IProject project = ProjectStructureCreator.INSTANCE.createProject(pageOne.getProjectName(), pageOne.getProjectLocationURI());
    BasicNewProjectResourceWizard.updatePerspective(configurationElement);
    return project!=null ? true : false;
}
 
開發者ID:capitalone,項目名稱:Hydrograph,代碼行數:7,代碼來源:CustomWizard.java


注:本文中的org.eclipse.ui.wizards.newresource.BasicNewProjectResourceWizard類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。