本文整理汇总了Java中org.eclipse.jface.wizard.WizardDialog.setTitle方法的典型用法代码示例。如果您正苦于以下问题:Java WizardDialog.setTitle方法的具体用法?Java WizardDialog.setTitle怎么用?Java WizardDialog.setTitle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.jface.wizard.WizardDialog
的用法示例。
在下文中一共展示了WizardDialog.setTitle方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: execute
import org.eclipse.jface.wizard.WizardDialog; //导入方法依赖的package包/类
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
IWizardDescriptor descriptor = PlatformUI.getWorkbench().getNewWizardRegistry().findWizard(ID);
if (descriptor == null) {
descriptor = PlatformUI.getWorkbench().getImportWizardRegistry().findWizard(ID);
}
if (descriptor == null) {
descriptor = PlatformUI.getWorkbench().getExportWizardRegistry().findWizard(ID);
}
try {
if (descriptor != null) {
IWizard wizard = descriptor.createWizard();
WizardDialog wd = new WizardDialog(Display.getDefault().getActiveShell(), wizard);
wd.setTitle(wizard.getWindowTitle());
wd.open();
}
} catch (CoreException e) {
e.printStackTrace();
}
return null;
}
示例2: openSubJobSaveDialog
import org.eclipse.jface.wizard.WizardDialog; //导入方法依赖的package包/类
/**
* Open sub graph save dialog.
*
* @return the i file
*/
public IFile openSubJobSaveDialog() {
IFile iFile = null;
IWizardDescriptor descriptor = PlatformUI.getWorkbench().getNewWizardRegistry().findWizard(Messages.JOB_WIZARD_ID);
if (descriptor != null) {
IWizard wizard = null;
try {
wizard = descriptor.createWizard();
} catch (CoreException coreException) {
logger.error("Error while opening create job wizard", coreException);
}
WizardDialog wizardDialog = new WizardDialog(Display.getDefault().getActiveShell(), wizard);
wizardDialog.setTitle(wizard.getWindowTitle());
wizardDialog.open();
JobCreationPage jobCreationPage = (JobCreationPage) wizardDialog.getSelectedPage();
iFile = jobCreationPage.getNewFile();
}
return iFile;
}
示例3: openWizard
import org.eclipse.jface.wizard.WizardDialog; //导入方法依赖的package包/类
public void openWizard(String id) {
IWizardDescriptor descriptor = PlatformUI.getWorkbench()
.getNewWizardRegistry().findWizard(id);
if (descriptor == null) {
descriptor = PlatformUI.getWorkbench().getImportWizardRegistry()
.findWizard(id);
}
if (descriptor == null) {
descriptor = PlatformUI.getWorkbench().getExportWizardRegistry()
.findWizard(id);
}
try {
if (descriptor != null) {
IWizard wizard = descriptor.createWizard();
WizardDialog wd = new WizardDialog(Display.getDefault()
.getActiveShell(), wizard);
wd.setTitle(wizard.getWindowTitle());
wd.open();
}
} catch (CoreException e) {
e.printStackTrace();
}
}
示例4: openWizard
import org.eclipse.jface.wizard.WizardDialog; //导入方法依赖的package包/类
public static void openWizard(final String id, final IStructuredSelection selection) {
// First see if this is a "new wizard".
IWizardDescriptor descriptor = PlatformUI.getWorkbench().getNewWizardRegistry().findWizard(id);
// If not check if it is an "import wizard".
if (descriptor == null) {
descriptor = PlatformUI.getWorkbench().getImportWizardRegistry().findWizard(id);
}
// Or maybe an export wizard
if (descriptor == null) {
descriptor = PlatformUI.getWorkbench().getExportWizardRegistry().findWizard(id);
}
try {
// Then if we have a wizard, open it.
if (descriptor != null) {
final IWorkbenchWizard wizard = descriptor.createWizard();
wizard.init(PlatformUI.getWorkbench(), selection);
final WizardDialog wd = new WizardDialog(WorkbenchHelper.getDisplay().getActiveShell(), wizard);
wd.setTitle(wizard.getWindowTitle());
wd.open();
}
} catch (final CoreException e) {
e.printStackTrace();
}
}
示例5: getReplacementText
import org.eclipse.jface.wizard.WizardDialog; //导入方法依赖的package包/类
@Override
public String getReplacementText() {
IWizardDescriptor descriptor = WizardFinder.findNewWizardDescriptor("org.eclipse.ecoretools.emf.design.wizardID");
// Then if we have a wizard, open it.
if (descriptor != null) {
// add a listener to capture the creation of the resulting project
NewProjectWorkspaceListener workspaceListener = new NewProjectWorkspaceListener();
ResourcesPlugin.getWorkspace().addResourceChangeListener(
workspaceListener);
try {
IWizard wizard = descriptor.createWizard();
// this wizard need some dedicated initialization
String newProjectName = (packageName+"."+languageName+".model").toLowerCase();
((EcoreModelerWizard) wizard).setInitialProjectName(newProjectName);
((EcoreModelerWizard) wizard).init(PlatformUI.getWorkbench(),null);
WizardDialog wd = new WizardDialog(PlatformUI.getWorkbench()
.getActiveWorkbenchWindow().getShell(), wizard);
wd.create();
wd.setTitle(wizard.getWindowTitle());
int res = wd.open();
if (res == WizardDialog.OK) {
ResourcesPlugin.getWorkspace().removeResourceChangeListener(workspaceListener);
ecoreProject = workspaceListener.getLastCreatedProject();
}
} catch (CoreException e) {
Activator.error(e.getMessage(), e);
} finally {
// make sure to remove listener in all situations
ResourcesPlugin.getWorkspace().removeResourceChangeListener(
workspaceListener);
if(ecoreProject != null){
return getCreatedEcoreUri();
}
}
}
return "";
}
示例6: createNewEMFProject
import org.eclipse.jface.wizard.WizardDialog; //导入方法依赖的package包/类
protected void createNewEMFProject() {
// launch the appropriate wizard
// "org.eclipse.emf.importer.ui.EMFProjectWizard" = create EMFProject
// from existing Ecore file
IWizardDescriptor descriptor = WizardFinder
.findNewWizardDescriptor("org.eclipse.ecoretools.emf.design.wizardID");
// Then if we have a wizard, open it.
if (descriptor != null) {
// add a listener to capture the creation of the resulting project
NewProjectWorkspaceListener workspaceListener = new NewProjectWorkspaceListener();
ResourcesPlugin.getWorkspace().addResourceChangeListener(
workspaceListener);
try {
IWizard wizard;
wizard = descriptor.createWizard();
// this wizard need some dedicated initialization
((EcoreModelerWizard) wizard)
.setInitialProjectName(MelangeXDSMLProjectHelper
.baseProjectName(gemocLanguageIProject)
+ ".model");
((EcoreModelerWizard) wizard).init(PlatformUI.getWorkbench(),
(IStructuredSelection) PlatformUI.getWorkbench()
.getActiveWorkbenchWindow()
.getSelectionService().getSelection());
// ((EcoreModelWizard)wizard).init(PlatformUI.getWorkbench(),
// (IStructuredSelection) selection);
WizardDialog wd = new WizardDialog(PlatformUI.getWorkbench()
.getActiveWorkbenchWindow().getShell(), wizard);
wd.create();
wd.setTitle(wizard.getWindowTitle());
int res = wd.open();
if (res == WizardDialog.OK) {
ResourcesPlugin.getWorkspace()
.removeResourceChangeListener(workspaceListener);
createdProject = workspaceListener
.getLastCreatedProject();
// update the project configuration model
if (createdProject != null) {
addEMFProjectToConf(createdProject);
}
}
} catch (CoreException e) {
Activator.error(e.getMessage(), e);
} finally {
// make sure to remove listener in all situations
ResourcesPlugin.getWorkspace().removeResourceChangeListener(
workspaceListener);
}
}
}
开发者ID:eclipse,项目名称:gemoc-studio-modeldebugging,代码行数:55,代码来源:CreateDomainModelWizardContextAction.java
示例7: createNewODProject
import org.eclipse.jface.wizard.WizardDialog; //导入方法依赖的package包/类
protected void createNewODProject() {
final IWizardDescriptor descriptor = WizardFinder
.findNewWizardDescriptor(org.eclipse.gemoc.xdsmlframework.extensions.sirius.Activator.PLUGIN_ID
+ ".wizards.NewGemocDebugRepresentationWizard");
// Then if we have a wizard, open it.
if (descriptor != null) {
NewProjectWorkspaceListener workspaceListener = new NewProjectWorkspaceListener();
ResourcesPlugin.getWorkspace().addResourceChangeListener(
workspaceListener);
try {
IWorkbenchWizard wizard;
wizard = descriptor.createWizard();
((NewGemocDebugRepresentationWizard) wizard).setInitialProjectName(gemocLanguageIProject.getName());
if(melangeLanguage != null){
((NewGemocDebugRepresentationWizard) wizard)
.setInitialLanguageName(melangeLanguage.getName());
}
IWorkbench workbench = PlatformUI.getWorkbench();
wizard.init(workbench, null);
WizardDialog wd = new WizardDialog(workbench
.getActiveWorkbenchWindow().getShell(), wizard);
wd.create();
wd.setTitle(wizard.getWindowTitle());
int res = wd.open();
if (res == WizardDialog.OK) {
ResourcesPlugin.getWorkspace()
.removeResourceChangeListener(workspaceListener);
IProject createdProject = workspaceListener
.getLastCreatedProject();
// update the project configuration model
if (createdProject != null) {
/* SiriusAnimatorProject animatorProject = Xdsml_baseFactoryImpl.eINSTANCE
.createSiriusAnimatorProject();
animatorProject
.setProjectName(createdProject.getName());
addOrUpdateProjectToConf(animatorProject); */
// DVK may be we should update something the melange files ?
} else {
Activator
.error("not able to detect which project was created by wizard",
null);
}
}
} catch (CoreException e) {
Activator.error(e.getMessage(), e);
} finally {
ResourcesPlugin.getWorkspace().removeResourceChangeListener(
workspaceListener);
}
} else {
Activator
.error("wizard with id=org.eclipse.gemoc.xdsmlframework.extensions.sirius.wizards.NewGemocDebugRepresentationWizard not found",
null);
}
}
开发者ID:eclipse,项目名称:gemoc-studio-modeldebugging,代码行数:56,代码来源:CreateAnimatorProjectWizardContextAction.java
示例8: createNewXTextProject
import org.eclipse.jface.wizard.WizardDialog; //导入方法依赖的package包/类
protected void createNewXTextProject() {
/*
* MessageDialog.openWarning(
* PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
* "Gemoc Language Workbench UI",
* "Action not completly implemented yet");
*/
// create xtext project from existing ecore model
// wizard id =
// org.eclipse.xtext.xtext.ui.wizard.ecore2xtext.NewXtextProjectFromEcoreWizard
// launch the appropriate wizard
IWizardDescriptor descriptor = WizardFinder
.findNewWizardDescriptor("org.eclipse.xtext.xtext.ui.wizard.ecore2xtext.NewXtextProjectFromEcoreWizard");
// Then if we have a wizard, open it.
if (descriptor != null) {
// add a listener to capture the creation of the resulting project
NewProjectWorkspaceListener workspaceListener = new NewProjectWorkspaceListener();
ResourcesPlugin.getWorkspace().addResourceChangeListener(
workspaceListener);
try {
IWizard wizard;
wizard = descriptor.createWizard();
// this wizard need some dedicated initialization
// ((EcoreModelerWizard )wizard).init(PlatformUI.getWorkbench(),
// (IStructuredSelection)
// PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService().getSelection());
// ((EcoreModelWizard)wizard).init(PlatformUI.getWorkbench(),
// (IStructuredSelection) selection);
WizardDialog wd = new WizardDialog(PlatformUI.getWorkbench()
.getActiveWorkbenchWindow().getShell(), wizard);
wd.create();
wd.setTitle(wizard.getWindowTitle());
int res = wd.open();
if (res == WizardDialog.OK) {
ResourcesPlugin.getWorkspace()
.removeResourceChangeListener(workspaceListener);
ArrayList<IProject> newlyCreatedProjects = workspaceListener
.getNewlyCreatedProjects();
// find the created project with xtext files in it
FileFinderVisitor fileFinder = new FileFinderVisitor(
"xtext");
for (Iterator<IProject> iterator = newlyCreatedProjects
.iterator(); iterator.hasNext();) {
IProject iProject = (IProject) iterator.next();
iProject.accept(fileFinder);
if (fileFinder.getFile() != null) {
createdProject = iProject;
break;
}
}
// update the project configuration model
if (createdProject != null) {
// maybe we should do something in the melange file ?
} else {
Activator
.error("not able to detect which project was created by wizard",
null);
}
}
} catch (CoreException e) {
Activator.error(e.getMessage(), e);
} finally {
// make sure to remove listener in all situations
ResourcesPlugin.getWorkspace().removeResourceChangeListener(
workspaceListener);
}
} else {
Activator
.error("wizard with id=org.eclipse.xtext.xtext.ui.wizard.ecore2xtext.NewXtextProjectFromEcoreWizard not found",
null);
}
}
开发者ID:eclipse,项目名称:gemoc-studio-modeldebugging,代码行数:75,代码来源:CreateEditorProjectWizardContextAction.java
示例9: createNewODProject
import org.eclipse.jface.wizard.WizardDialog; //导入方法依赖的package包/类
protected void createNewODProject() {
final IWizardDescriptor descriptor = WizardFinder
.findNewWizardDescriptor("org.eclipse.gemoc.xdsmlframework.extensions.sirius.wizards.NewGemocSiriusProjectWizard");
// Then if we have a wizard, open it.
if (descriptor != null) {
NewProjectWorkspaceListener workspaceListener = new NewProjectWorkspaceListener();
ResourcesPlugin.getWorkspace().addResourceChangeListener(
workspaceListener);
try {
IWorkbenchWizard wizard;
wizard = descriptor.createWizard();
((NewGemocSiriusProjectWizard)wizard).setInitialProjectName(MelangeXDSMLProjectHelper
.baseProjectName(gemocLanguageIProject));
IWorkbench workbench = PlatformUI.getWorkbench();
wizard.init(workbench, null);
WizardDialog wd = new WizardDialog(workbench
.getActiveWorkbenchWindow().getShell(), wizard);
wd.create();
wd.setTitle(wizard.getWindowTitle());
int res = wd.open();
if (res == WizardDialog.OK) {
ResourcesPlugin.getWorkspace()
.removeResourceChangeListener(workspaceListener);
createdProject = workspaceListener
.getLastCreatedProject();
// update the project configuration model
if (createdProject != null) {
// maybe we should do something in the melange file ?
} else {
Activator
.error("not able to detect which project was created by wizard",
null);
}
}
} catch (CoreException e) {
Activator.error(e.getMessage(), e);
} finally {
ResourcesPlugin.getWorkspace().removeResourceChangeListener(
workspaceListener);
}
} else {
Activator
.error("wizard with id=org.eclipse.sirius.ui.specificationproject.wizard not found",
null);
}
}
开发者ID:eclipse,项目名称:gemoc-studio-modeldebugging,代码行数:49,代码来源:CreateEditorProjectWizardContextAction.java
示例10: importCreatedProject
import org.eclipse.jface.wizard.WizardDialog; //导入方法依赖的package包/类
private void importCreatedProject(File targetFolder) throws CoreException {
/* open import wizard with correct setup */
IWizardDescriptor descriptor = PlatformUI.getWorkbench().getImportWizardRegistry()
.findWizard(EGradleRootProjectImportWizard.ID);
if (descriptor == null) {
throw new IllegalStateException("Import was not possible, because of missing wizard!");
}
IWizard wizard = descriptor.createWizard();
if (!(wizard instanceof EGradleRootProjectImportWizard)) {
throw new IllegalStateException("Not a root project wizard but:" + wizard);
}
outputToSystemConsole("- start import for generated project");
EGradleRootProjectImportWizard piw = (EGradleRootProjectImportWizard) wizard;
piw.setCustomRootProjectpath(targetFolder.getAbsolutePath());
piw.setCustomJavaHome(context.getJavaHome());
piw.setImportMode(RootProjectConfigMode.NEW_PROJECT_WIZARD);
WizardDialog wd = new WizardDialog(getShell(), piw);
wd.setTitle("Import generated gradle project");
EclipseUtil.safeAsyncExec(new Runnable() {
@Override
public void run() {
boolean resultOkay = false;
if (context.isSupportingHeadlessImport()) {
/* headless usage of import wizard:*/
piw.addPages();
piw.createPageControls(new Shell());
piw.setContainer(getContainer());
resultOkay = piw.performFinish();
if (resultOkay) {
outputToSystemConsole("[DONE]");
} else {
outputToSystemConsole("[CANCELED]");
}
return;
}else{
int result = wd.open();
if (MessageDialog.OK == result) {
resultOkay = true;
}
}
if (resultOkay) {
outputToSystemConsole("[DONE]");
} else {
outputToSystemConsole("[CANCELED]");
}
}
});
}