本文整理汇总了Java中org.eclipse.ui.wizards.newresource.BasicNewResourceWizard类的典型用法代码示例。如果您正苦于以下问题:Java BasicNewResourceWizard类的具体用法?Java BasicNewResourceWizard怎么用?Java BasicNewResourceWizard使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BasicNewResourceWizard类属于org.eclipse.ui.wizards.newresource包,在下文中一共展示了BasicNewResourceWizard类的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: performFinish
import org.eclipse.ui.wizards.newresource.BasicNewResourceWizard; //导入依赖的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);
}
BasicNewResourceWizard.selectAndReveal(fSecondPage.getJavaProject().getProject(), getWorkbench()
.getActiveWorkbenchWindow());
}
return res;
}
开发者ID:equella,项目名称:Equella,代码行数:19,代码来源:NewPluginWizard.java
示例2: openResource
import org.eclipse.ui.wizards.newresource.BasicNewResourceWizard; //导入依赖的package包/类
protected final void openResource(final IFile resource, final String editorId) {
final IWorkbenchPage activePage = PlatformUI.getWorkbench()
.getActiveWorkbenchWindow().getActivePage();
if (activePage != null) {
final Display display = getShell().getDisplay();
if (display != null) {
display.asyncExec(new Runnable() {
public void run() {
try {
IDE.setDefaultEditor(resource, editorId);
BasicNewResourceWizard.selectAndReveal(
resource,PlatformUI.getWorkbench()
.getActiveWorkbenchWindow() );
activePage.openEditor(new FileEditorInput(resource), editorId);
} catch (PartInitException e) {
ConsoleFactory.printToConsole(e.getMessage(), true);
}
}
});
}
}
}
开发者ID:HuaweiSNC,项目名称:OpsDev,代码行数:24,代码来源:DesignerNewElementWizard.java
示例3: openResource
import org.eclipse.ui.wizards.newresource.BasicNewResourceWizard; //导入依赖的package包/类
private void openResource(final IResource resource) {
if (resource.getType() != IResource.FILE)
return;
IWorkbenchWindow window = VerilogPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow();
if (window == null)
return;
final IWorkbenchPage activePage = window.getActivePage();
if (activePage != null) {
Display display = getShell().getDisplay();
display.asyncExec(new Runnable() {
public void run() {
try {
IDE.openEditor(activePage, (IFile)resource, true);
} catch(PartInitException e) {
MessageUI.log(e);
}
}
});
BasicNewResourceWizard.selectAndReveal(resource, activePage.getWorkbenchWindow());
}
}
开发者ID:Elphel,项目名称:vdt-plugin,代码行数:23,代码来源:NewProjectWizard.java
示例4: performFinish
import org.eclipse.ui.wizards.newresource.BasicNewResourceWizard; //导入依赖的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: deployProject
import org.eclipse.ui.wizards.newresource.BasicNewResourceWizard; //导入依赖的package包/类
private void deployProject(
SubMonitor monitor,
File projectDirectory, IWorkingSet[] workingSets) throws CoreException {
monitor.beginTask(Messages.NewProjectWizard_monitorLoadProject, 100);
IProjectDescription description = loadDescription(monitor.newChild(20), projectDirectory);
IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(description.getName());
if (project.exists()) {
throw new CoreException(new Status(
IStatus.ERROR,
Activator.PLUGIN_ID,
MessageFormat.format(
Messages.NewProjectWizard_errorProjectConflict,
project.getName())));
}
project.create(description, new SubProgressMonitor(monitor, 20));
project.open(new SubProgressMonitor(monitor, 10));
if (workingSets.length > 0) {
currentWorkbench.getWorkingSetManager().addToWorkingSets(project, workingSets);
}
BasicNewResourceWizard.selectAndReveal(project, currentWorkbench.getActiveWorkbenchWindow());
}
开发者ID:asakusafw,项目名称:asakusafw-shafu,代码行数:22,代码来源:NewProjectWizard.java
示例6: createResourceOperation
import org.eclipse.ui.wizards.newresource.BasicNewResourceWizard; //导入依赖的package包/类
protected IRunnableWithProgress createResourceOperation(IFolder folder,InitialBuildPolicies policies) {
WorkspaceModifyOperation operation = new WorkspaceModifyOperation() {
@Override
protected void execute(IProgressMonitor monitor) {
String resource = "";
String targetFile = "";
try {
for (int i = 0; i < resources.length; i++) {
resource = resources[i];
targetFile = targetFiles[i];
IFile file = create(folder, resource, targetFile, monitor);
if (file != null) {
createdResources.add(file);
policies.setFile(file);
policies.run();
BasicNewResourceWizard.selectAndReveal(file,
PlatformUI.getWorkbench().getActiveWorkbenchWindow());
}
}
} catch (Exception exception) {
ResourceManager.logException(exception, "Unable to create " + resource);
} finally {
monitor.done();
}
}
};
return operation;
}
开发者ID:gw4e,项目名称:gw4e.project,代码行数:29,代码来源:TemplateProvider.java
示例7: selectAndReveal
import org.eclipse.ui.wizards.newresource.BasicNewResourceWizard; //导入依赖的package包/类
public static void selectAndReveal(Shell shell, final IResource resource) {
shell.getDisplay().asyncExec(new Runnable() {
public void run() {
IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
BasicNewResourceWizard.selectAndReveal(resource, window);
}
});
}
开发者ID:jason-lang,项目名称:jason-eclipse-plugin,代码行数:9,代码来源:Utils.java
示例8: openAndSelectConfigFile
import org.eclipse.ui.wizards.newresource.BasicNewResourceWizard; //导入依赖的package包/类
private void openAndSelectConfigFile(IProject project){
IWorkbenchPage activePage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
HybridProject hp = HybridProject.getHybridProject(project);
IFile file = hp.getConfigFile();
BasicNewResourceWizard.selectAndReveal(file, PlatformUI.getWorkbench().getActiveWorkbenchWindow());
try {
IDE.openEditor(activePage, file);
} catch (PartInitException e) {
HybridUI.log(IStatus.ERROR, "Error opening the config.xml", e);
}
}
开发者ID:eclipse,项目名称:thym,代码行数:13,代码来源:NewHybridProjectWizard.java
示例9: performFinish
import org.eclipse.ui.wizards.newresource.BasicNewResourceWizard; //导入依赖的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
示例10: performFinish
import org.eclipse.ui.wizards.newresource.BasicNewResourceWizard; //导入依赖的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
示例11: performFinish
import org.eclipse.ui.wizards.newresource.BasicNewResourceWizard; //导入依赖的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
示例12: WizardNewNgProjectCreationPage
import org.eclipse.ui.wizards.newresource.BasicNewResourceWizard; //导入依赖的package包/类
public WizardNewNgProjectCreationPage(String pageName, BasicNewResourceWizard wizard) {
super(pageName, wizard);
}
开发者ID:angelozerr,项目名称:angular-eclipse,代码行数:4,代码来源:WizardNewNgProjectCreationPage.java
示例13: WizardNewTypeScriptProjectCreationPage
import org.eclipse.ui.wizards.newresource.BasicNewResourceWizard; //导入依赖的package包/类
public WizardNewTypeScriptProjectCreationPage(String pageName, BasicNewResourceWizard wizard) {
super(pageName, wizard);
}
开发者ID:angelozerr,项目名称:typescript.java,代码行数:4,代码来源:WizardNewTypeScriptProjectCreationPage.java
示例14: AbstractWizardNewTypeScriptProjectCreationPage
import org.eclipse.ui.wizards.newresource.BasicNewResourceWizard; //导入依赖的package包/类
public AbstractWizardNewTypeScriptProjectCreationPage(String pageName, BasicNewResourceWizard wizard) {
super(pageName);
this.wizard = wizard;
}
开发者ID:angelozerr,项目名称:typescript.java,代码行数:5,代码来源:AbstractWizardNewTypeScriptProjectCreationPage.java
示例15: selectAndReveal
import org.eclipse.ui.wizards.newresource.BasicNewResourceWizard; //导入依赖的package包/类
protected void selectAndReveal(IResource newResource) {
BasicNewResourceWizard.selectAndReveal(newResource, fWorkbench.getActiveWorkbenchWindow());
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:4,代码来源:NewElementWizard.java
示例16: selectAndReveal
import org.eclipse.ui.wizards.newresource.BasicNewResourceWizard; //导入依赖的package包/类
protected void selectAndReveal(IResource newResource) {
BasicNewResourceWizard.selectAndReveal(newResource, workbench.getActiveWorkbenchWindow());
}
开发者ID:GoClipse,项目名称:goclipse,代码行数:4,代码来源:LangNewProjectWizard.java
示例17: selectAndReveal
import org.eclipse.ui.wizards.newresource.BasicNewResourceWizard; //导入依赖的package包/类
/**
* @param file
* the file that should be selected. May be <code>null</code>.
*/
public void selectAndReveal(IFile file) {
BasicNewResourceWizard.selectAndReveal(file, workbench.getActiveWorkbenchWindow());
}
开发者ID:cplutte,项目名称:bts,代码行数:8,代码来源:FileOpener.java
注:本文中的org.eclipse.ui.wizards.newresource.BasicNewResourceWizard类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论