当前位置: 首页>>代码示例>>Java>>正文


Java Wizard类代码示例

本文整理汇总了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();
}
 
开发者ID:Nextzero,项目名称:hadoop-2.6.0-cdh5.4.3,代码行数:27,代码来源:NewLocationAction.java

示例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.");

	}
}
 
开发者ID:cplutte,项目名称:bts,代码行数:20,代码来源:TESTER.java

示例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();
}
 
开发者ID:spoenemann,项目名称:xtext-gef,代码行数:22,代码来源:StatemachineDiagramEditorUtil.java

示例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$
}
 
开发者ID:spoenemann,项目名称:xtext-gef,代码行数:29,代码来源:StatemachineInitDiagramFileAction.java

示例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;
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:21,代码来源:WizardSubPageDataSource.java

示例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;
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:21,代码来源:WizardSubPage.java

示例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);
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:18,代码来源:WizardStartPage.java

示例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();
}
 
开发者ID:eclipse,项目名称:thym,代码行数:22,代码来源:NativeArtifactExportAction.java

示例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);
}
 
开发者ID:kopl,项目名称:SPLevo,代码行数:17,代码来源:RenameVariationPointGroupHandler.java

示例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();
}
 
开发者ID:road-framework,项目名称:ROADDesigner,代码行数:22,代码来源:SmcDiagramEditorUtil.java

示例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$
}
 
开发者ID:road-framework,项目名称:ROADDesigner,代码行数:28,代码来源:SmcInitDiagramFileAction.java

示例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);
    }
}
 
开发者ID:Elphel,项目名称:vdt-plugin,代码行数:21,代码来源:AbstractOpenWizardAction.java

示例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();
}
 
开发者ID:ggxx,项目名称:HelloBrazil,代码行数:22,代码来源:Wc2014DiagramEditorUtil.java

示例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$
}
 
开发者ID:ggxx,项目名称:HelloBrazil,代码行数:29,代码来源:Wc2014InitDiagramFileAction.java

示例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();
}
 
开发者ID:bluezio,项目名称:simplified-bpmn-example,代码行数:22,代码来源:SimpleBPMNDiagramEditorUtil.java


注:本文中的org.eclipse.jface.wizard.Wizard类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。