本文整理汇总了Java中org.eclipse.jface.wizard.Wizard类的典型用法代码示例。如果您正苦于以下问题:Java Wizard类的具体用法?Java Wizard怎么用?Java Wizard使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Wizard类属于org.eclipse.jface.wizard包,在下文中一共展示了Wizard类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: run
import org.eclipse.jface.wizard.Wizard; //导入依赖的package包/类
@Override
public void run() {
WizardDialog dialog = new WizardDialog(null, new Wizard() {
private HadoopLocationWizard page = new HadoopLocationWizard();
@Override
public void addPages() {
super.addPages();
setWindowTitle("New Hadoop location...");
addPage(page);
}
@Override
public boolean performFinish() {
page.performFinish();
return true;
}
});
dialog.create();
dialog.setBlockOnOpen(true);
dialog.open();
super.run();
}
示例2: execute
import org.eclipse.jface.wizard.Wizard; //导入依赖的package包/类
@Execute
public void execute(@Preference(nodePath = "org.bbaw.bts.app") IEclipsePreferences prefs, IEclipseContext context,
ApplicationStartupController startupController)
{
// PartHolderDialog dialog = ContextInjectionFactory.make(PartHolderDialog.class, context);
// // context.set(UserManagementDialog.class, dialog);
//
// if (dialog.open() == dialog.OK)
// {
// }
Wizard w = new InstallationWizard(context, startupController, null, null);
WizardDialog dialog = new WizardDialog(new Shell(), w);
if (dialog.open() == dialog.OK)
{
System.out.println("new project created.");
}
}
示例3: runWizard
import org.eclipse.jface.wizard.Wizard; //导入依赖的package包/类
/**
* Runs the wizard in a dialog.
*
* @generated
*/
public static void runWizard(Shell shell, Wizard wizard, String settingsKey) {
IDialogSettings pluginDialogSettings = StatemachineDiagramEditorPlugin
.getInstance().getDialogSettings();
IDialogSettings wizardDialogSettings = pluginDialogSettings
.getSection(settingsKey);
if (wizardDialogSettings == null) {
wizardDialogSettings = pluginDialogSettings
.addNewSection(settingsKey);
}
wizard.setDialogSettings(wizardDialogSettings);
WizardDialog dialog = new WizardDialog(shell, wizard);
dialog.create();
dialog.getShell().setSize(Math.max(500, dialog.getShell().getSize().x),
500);
dialog.open();
}
示例4: run
import org.eclipse.jface.wizard.Wizard; //导入依赖的package包/类
/**
* @generated
*/
public void run(IAction action) {
TransactionalEditingDomain editingDomain = GMFEditingDomainFactory.INSTANCE
.createEditingDomain();
ResourceSet resourceSet = editingDomain.getResourceSet();
EObject diagramRoot = null;
try {
Resource resource = resourceSet.getResource(domainModelURI, true);
diagramRoot = (EObject) resource.getContents().get(0);
} catch (WrappedException ex) {
StatemachineDiagramEditorPlugin.getInstance().logError(
"Unable to load resource: " + domainModelURI, ex); //$NON-NLS-1$
}
if (diagramRoot == null) {
MessageDialog.openError(getShell(),
Messages.InitDiagramFile_ResourceErrorDialogTitle,
Messages.InitDiagramFile_ResourceErrorDialogMessage);
return;
}
Wizard wizard = new StatemachineNewDiagramFileWizard(domainModelURI,
diagramRoot, editingDomain);
wizard.setWindowTitle(NLS.bind(Messages.InitDiagramFile_WizardTitle,
StatemachineEditPart.MODEL_ID));
StatemachineDiagramEditorUtil.runWizard(getShell(), wizard,
"InitDiagramFile"); //$NON-NLS-1$
}
示例5: getNextPage
import org.eclipse.jface.wizard.Wizard; //导入依赖的package包/类
@Override
public WizardPage getNextPage() {
refreshData();
switch(dsType) {
case DS_VIEW:
if (!(pageData.wizardPage[2] instanceof WizardSubPageDataView)) {
pageData.wizardPage[2] = new WizardSubPageDataView(pageData);
((Wizard)getWizard()).addPage(pageData.wizardPage[2]);
}
return(pageData.wizardPage[2]);
case DS_DOC:
if (!(pageData.wizardPage[2] instanceof WizardSubPageFormTable)) {
pageData.wizardPage[2] = new WizardSubPageFormTable(pageData);
((Wizard)getWizard()).addPage(pageData.wizardPage[2]);
}
return(pageData.wizardPage[2]);
}
return null;
}
示例6: getNextPage
import org.eclipse.jface.wizard.Wizard; //导入依赖的package包/类
@Override
public WizardPage getNextPage() {
refreshData();
// Get the Next Sub Main Page
// If pages provide more Sub Pages this function
// should be overridden
int newPageNumber = getSubPageNumber()+1;
if(newPageNumber < wizardData.getPageCount()) {
WizardDataSub pd = wizardData.pageList.get(newPageNumber);
if(pd != null) {
if (pd.wizardPage[0] == null) {
pd.wizardPage[0] = new WizardSubPageMain(pd);
((Wizard)getWizard()).addPage(pd.wizardPage[0]);
}
return(pd.wizardPage[0]);
}
}
return null;
}
示例7: getNextPage
import org.eclipse.jface.wizard.Wizard; //导入依赖的package包/类
@Override
public WizardPage getNextPage() {
refreshData();
if(wizardData.pageList.size() > 0) {
// Add the first sub page
WizardDataSub pd = wizardData.pageList.get(0);
if (pd != null) {
if (pd.wizardPage[0] == null) {
pd.wizardPage[0] = new WizardSubPageMain(pd);
((Wizard)(getWizard())).addPage(pd.wizardPage[0]);
}
return(pd.wizardPage[0]);
}
}
return(null);
}
示例8: run
import org.eclipse.jface.wizard.Wizard; //导入依赖的package包/类
@Override
public void run() {
IWorkbench workbench = PlatformUI.getWorkbench();
IStructuredSelection selection = null;
if(editor != null ){
IFileEditorInput editorInput = (IFileEditorInput) editor.getEditorInput().getAdapter(IFileEditorInput.class);
if(editorInput != null ){
selection = new StructuredSelection(editorInput.getFile().getProject());
}
}
Wizard wizard = null;
NativeBinaryExportWizard wiz = new NativeBinaryExportWizard();
wiz.init(workbench, selection);
wizard = wiz;
WizardDialog dialog = new WizardDialog(workbench.getActiveWorkbenchWindow().getShell(), wizard);
dialog.open();
}
示例9: createWizardFor
import org.eclipse.jface.wizard.Wizard; //导入依赖的package包/类
@Override
protected Wizard createWizardFor(Object selectedObject) {
if (!(selectedObject instanceof VariationPointGroup)) {
return null;
}
RenameEObjectEAttributeWrapper wrapper = new RenameEObjectEAttributeWrapper("Variation Point Group",
(VariationPointGroup) selectedObject, variabilityPackage.eINSTANCE.getCustomizableNameHaving_Name()) {
@Override
public String getAttributeValue() {
return ((CustomizableNameHaving) getElement()).getName();
}
};
return new RenameElementWizard(wrapper);
}
示例10: runWizard
import org.eclipse.jface.wizard.Wizard; //导入依赖的package包/类
/**
* Runs the wizard in a dialog.
*
* @generated
*/
public static void runWizard(Shell shell, Wizard wizard, String settingsKey) {
IDialogSettings pluginDialogSettings = SmcDiagramEditorPlugin
.getInstance().getDialogSettings();
IDialogSettings wizardDialogSettings = pluginDialogSettings
.getSection(settingsKey);
if (wizardDialogSettings == null) {
wizardDialogSettings = pluginDialogSettings
.addNewSection(settingsKey);
}
wizard.setDialogSettings(wizardDialogSettings);
WizardDialog dialog = new WizardDialog(shell, wizard);
dialog.create();
dialog.getShell().setSize(Math.max(500, dialog.getShell().getSize().x),
500);
dialog.open();
}
示例11: run
import org.eclipse.jface.wizard.Wizard; //导入依赖的package包/类
/**
* @generated
*/
public void run(IAction action) {
TransactionalEditingDomain editingDomain = GMFEditingDomainFactory.INSTANCE
.createEditingDomain();
ResourceSet resourceSet = editingDomain.getResourceSet();
EObject diagramRoot = null;
try {
Resource resource = resourceSet.getResource(domainModelURI, true);
diagramRoot = (EObject) resource.getContents().get(0);
} catch (WrappedException ex) {
SmcDiagramEditorPlugin.getInstance().logError(
"Unable to load resource: " + domainModelURI, ex); //$NON-NLS-1$
}
if (diagramRoot == null) {
MessageDialog.openError(getShell(),
Messages.InitDiagramFile_ResourceErrorDialogTitle,
Messages.InitDiagramFile_ResourceErrorDialogMessage);
return;
}
Wizard wizard = new SmcNewDiagramFileWizard(domainModelURI,
diagramRoot, editingDomain);
wizard.setWindowTitle(NLS.bind(Messages.InitDiagramFile_WizardTitle,
SystemEditPart.MODEL_ID));
SmcDiagramEditorUtil.runWizard(getShell(), wizard, "InitDiagramFile"); //$NON-NLS-1$
}
示例12: run
import org.eclipse.jface.wizard.Wizard; //导入依赖的package包/类
/**
* The user has invoked this action.
*/
public void run() {
Shell shell= VerilogPlugin.getActiveWorkbenchShell();
try {
Wizard wizard= createWizard();
if (wizard instanceof IWorkbenchWizard) {
((IWorkbenchWizard)wizard).init(getWorkbench(), getCurrentSelection());
}
WizardDialog dialog= new WizardDialog(shell, wizard);
dialog.create();
int res= dialog.open();
notifyResult(res == Window.OK);
} catch (CoreException e) {
MessageUI.error(e);
}
}
示例13: runWizard
import org.eclipse.jface.wizard.Wizard; //导入依赖的package包/类
/**
* Runs the wizard in a dialog.
*
* @generated
*/
public static void runWizard(Shell shell, Wizard wizard, String settingsKey) {
IDialogSettings pluginDialogSettings = Wc2014DiagramEditorPlugin
.getInstance().getDialogSettings();
IDialogSettings wizardDialogSettings = pluginDialogSettings
.getSection(settingsKey);
if (wizardDialogSettings == null) {
wizardDialogSettings = pluginDialogSettings
.addNewSection(settingsKey);
}
wizard.setDialogSettings(wizardDialogSettings);
WizardDialog dialog = new WizardDialog(shell, wizard);
dialog.create();
dialog.getShell().setSize(Math.max(500, dialog.getShell().getSize().x),
500);
dialog.open();
}
示例14: run
import org.eclipse.jface.wizard.Wizard; //导入依赖的package包/类
/**
* @generated
*/
public void run(IAction action) {
TransactionalEditingDomain editingDomain = GMFEditingDomainFactory.INSTANCE
.createEditingDomain();
ResourceSet resourceSet = editingDomain.getResourceSet();
EObject diagramRoot = null;
try {
Resource resource = resourceSet.getResource(domainModelURI, true);
diagramRoot = (EObject) resource.getContents().get(0);
} catch (WrappedException ex) {
Wc2014DiagramEditorPlugin.getInstance().logError(
"Unable to load resource: " + domainModelURI, ex); //$NON-NLS-1$
}
if (diagramRoot == null) {
MessageDialog.openError(getShell(),
Messages.InitDiagramFile_ResourceErrorDialogTitle,
Messages.InitDiagramFile_ResourceErrorDialogMessage);
return;
}
Wizard wizard = new Wc2014NewDiagramFileWizard(domainModelURI,
diagramRoot, editingDomain);
wizard.setWindowTitle(NLS.bind(Messages.InitDiagramFile_WizardTitle,
WorldCupEditPart.MODEL_ID));
Wc2014DiagramEditorUtil
.runWizard(getShell(), wizard, "InitDiagramFile"); //$NON-NLS-1$
}
示例15: runWizard
import org.eclipse.jface.wizard.Wizard; //导入依赖的package包/类
/**
* Runs the wizard in a dialog.
*
* @generated
*/
public static void runWizard(Shell shell, Wizard wizard, String settingsKey) {
IDialogSettings pluginDialogSettings = SimpleBPMN.diagram.part.SimpleBPMNDiagramEditorPlugin
.getInstance().getDialogSettings();
IDialogSettings wizardDialogSettings = pluginDialogSettings
.getSection(settingsKey);
if (wizardDialogSettings == null) {
wizardDialogSettings = pluginDialogSettings
.addNewSection(settingsKey);
}
wizard.setDialogSettings(wizardDialogSettings);
WizardDialog dialog = new WizardDialog(shell, wizard);
dialog.create();
dialog.getShell().setSize(Math.max(500, dialog.getShell().getSize().x),
500);
dialog.open();
}