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


Java WizardDialog类代码示例

本文整理汇总了Java中org.eclipse.jface.wizard.WizardDialog的典型用法代码示例。如果您正苦于以下问题:Java WizardDialog类的具体用法?Java WizardDialog怎么用?Java WizardDialog使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


WizardDialog类属于org.eclipse.jface.wizard包,在下文中一共展示了WizardDialog类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: run

import org.eclipse.jface.wizard.WizardDialog; //导入依赖的package包/类
@Override
public void run() {
	UIJob uiJob = new UIJob(Messages.MANAGE_SERVICES_TO_APPLICATIONS_TITLE) {
		public IStatus runInUIThread(IProgressMonitor monitor) {
			try {
				if (serverBehaviour != null) {
					ServiceToApplicationsBindingWizard wizard = new ServiceToApplicationsBindingWizard(
							servicesHandler, serverBehaviour.getCloudFoundryServer(), editorPage);
					WizardDialog dialog = new WizardDialog(editorPage.getSite().getShell(), wizard);
					dialog.open();
				}
			}
			catch (CoreException e) {
				if (Logger.ERROR) {
					Logger.println(Logger.ERROR_LEVEL, this, "runInUIThread", "Error launching wizard", e); //$NON-NLS-1$ //$NON-NLS-2$
				}
			}

			return Status.OK_STATUS;
		}

	};
	uiJob.setSystem(true);
	uiJob.setPriority(Job.INTERACTIVE);
	uiJob.schedule();
}
 
开发者ID:eclipse,项目名称:cft,代码行数:27,代码来源:ServiceToApplicationsBindingAction.java

示例2: createWorkingSet

import org.eclipse.jface.wizard.WizardDialog; //导入依赖的package包/类
private void createWorkingSet() {
	if (manager instanceof MutableWorkingSetManager) {

		final WorkingSetNewWizard wizard = ((MutableWorkingSetManager) manager).createNewWizard();
		// set allWorkingSets according to dialog to use it as a base for validation
		wizard.setAllWorkingSets(allWorkingSets);

		final WizardDialog dialog = new WizardDialog(getShell(), wizard);
		if (dialog.open() == Window.OK) {
			final WorkingSet workingSet = wizard.getWorkingSet().orNull();
			if (workingSet != null) {
				diffBuilder.add(workingSet);
				getShell().getDisplay().asyncExec(new Runnable() {

					@Override
					public void run() {
						allWorkingSets.add(workingSet);
						tableViewer.add(workingSet);
						tableViewer.setChecked(workingSet, true);
					}

				});
			}
		}
	}
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:27,代码来源:WorkingSetConfigurationDialog.java

示例3: run

import org.eclipse.jface.wizard.WizardDialog; //导入依赖的package包/类
@Override
public void run(IAction action) {
	Display display = Display.getDefault();
	Cursor waitCursor = new Cursor(display, SWT.CURSOR_WAIT);		
	
	Shell shell = getParentShell();
	shell.setCursor(waitCursor);
	
       try {
		ImportWizard importWizard = new ImportWizard();
		importWizard.setWindowTitle("Convertigo project import Wizard");
   		WizardDialog wzdlg = new WizardDialog(shell, importWizard);
   		wzdlg.open();
       }
       catch (Throwable e) {
       	ConvertigoPlugin.logException(e, "Unable to import project!");
       }
       finally {
		shell.setCursor(null);
		waitCursor.dispose();
       }
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:23,代码来源:ProjectExplorerImportAction.java

示例4: runSetup

import org.eclipse.jface.wizard.WizardDialog; //导入依赖的package包/类
public static boolean runSetup() {
	Display display = Display.getDefault();
	WizardDialog wizardDialog = new WizardDialog(display.getActiveShell(), new SetupWizard()) {
		
		@Override
		protected void configureShell(Shell shell) {
			super.configureShell(shell);
			shell.setSize(730, 700);
			setReturnCode(WizardDialog.CANCEL);
		}
		
	};
	
	int ret = wizardDialog.open(); 
	
	return ret == WizardDialog.OK;
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:18,代码来源:SetupAction.java

示例5: createCriteriasFromSelection

import org.eclipse.jface.wizard.WizardDialog; //导入依赖的package包/类
public void createCriteriasFromSelection(Document dom) throws EngineException {
	String className = "com.twinsoft.convertigo.beans.core.Criteria";
	
	// Retrieve selected criterias xpath
	String criteriaXpath = xpathEvaluator.getSelectionXpath();

	// Retrieve parent ScreenClass
	HtmlScreenClass parentObject = getParentHtmlScreenClass();

	NewObjectWizard newObjectWizard = new NewObjectWizard(parentObject, className, criteriaXpath, dom);
	WizardDialog wzdlg = new WizardDialog(Display.getCurrent().getActiveShell(), newObjectWizard);
	wzdlg.setPageSize(850, 650);
	wzdlg.open();
	if (wzdlg.getReturnCode() != Window.CANCEL) {
		Criteria criteria = (Criteria)newObjectWizard.newBean;

		// Reload parent ScreenClass in Tree
		fireObjectChanged(new CompositeEvent(parentObject));

		// Set selection on last created criteria (will expand tree to new criteria)
		if (criteria != null) fireObjectSelected(new CompositeEvent(criteria));

		// Set back selection on parent ScreenClass
		fireObjectSelected(new CompositeEvent(parentObject));
	}
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:27,代码来源:HtmlConnectorDesignComposite.java

示例6: 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;
}
 
开发者ID:dstl,项目名称:Open_Source_ECOA_Toolset_AS5,代码行数:22,代码来源:ServicesWizardCommand.java

示例7: open

import org.eclipse.jface.wizard.WizardDialog; //导入依赖的package包/类
public static void open(String modelPath, ModelData[] additionalModels, String generatorstopcondition,
		String startnode, boolean removeBlockedElements, boolean omitEgdeswithoutDescription) {
	try {
		Display.getDefault().asyncExec(() -> {
			RunAsManualWizard wizard = new RunAsManualWizard(modelPath, additionalModels, generatorstopcondition,
					startnode, removeBlockedElements, omitEgdeswithoutDescription);
			wizard.init(PlatformUI.getWorkbench(), (IStructuredSelection) null);
			Shell activeShell = Display.getDefault().getActiveShell();
			if (activeShell == null)
				return;
			WizardDialog dialog = new WizardDialog(activeShell, wizard);
			dialog.open();
		});
	} catch (Exception e) {
		ResourceManager.logException(e);
	}
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:18,代码来源:RunAsManualWizard.java

示例8: execute

import org.eclipse.jface.wizard.WizardDialog; //导入依赖的package包/类
public Object execute(ExecutionEvent event) throws ExecutionException {

		ISelection sel = HandlerUtil.getCurrentSelection(event);
		if (sel.isEmpty())
			return null;
		if (!(sel instanceof IStructuredSelection))
			return null;
		Object obj = ((IStructuredSelection) sel).getFirstElement();
		if (!(obj instanceof IFile))
			return null;
 
		try {
			ConvertToFileCreationWizard wizard = new ConvertToFileCreationWizard( );
			wizard.init(PlatformUI.getWorkbench(), (IStructuredSelection)sel);
			Shell activeShell = HandlerUtil.getActiveShell(event);
			if (activeShell==null) return null;
			WizardDialog dialog = new WizardDialog(activeShell,wizard);
			dialog.open();
		} catch (Exception e) {
			ResourceManager.logException(e);
		}
 
		return null;
	}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:25,代码来源:ConvertToHandler.java

示例9: 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;
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:24,代码来源:SubJobUtility.java

示例10: execute

import org.eclipse.jface.wizard.WizardDialog; //导入依赖的package包/类
public Object execute(ExecutionEvent event) throws ExecutionException {

		final INewWizard wizard = new NewModelWizard();

		// Initialize the selection
		final IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
		final ISelectionService service = window.getSelectionService();
		final IStructuredSelection selection = (IStructuredSelection)service
				.getSelection("org.eclipse.sirius.ui.tools.views.model.explorer"); //$NON-NLS-1$
		wizard.init(PlatformUI.getWorkbench(), selection);

		// Open the new model wizard
		final WizardDialog dialog = new WizardDialog(window.getShell(), wizard);
		dialog.open();
		return null;
	}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:17,代码来源:NewTime4SysModel.java

示例11: execute

import org.eclipse.jface.wizard.WizardDialog; //导入依赖的package包/类
@Override
public Object execute(final ExecutionEvent event) throws ExecutionException {

	final IEditorPart editorPart = HandlerUtil.getActiveEditor(event);
	final ICompilationUnit icu = JavaUI.getWorkingCopyManager().getWorkingCopy(editorPart.getEditorInput());

	try {
		final IType type = icu.getTypes()[0];
		final List<Field> fields = new ArrayList<>();
		for (final IField field : type.getFields()) {
			final String fieldName = field.getElementName();
			final String fieldType = Signature.getSignatureSimpleName(field.getTypeSignature());
			fields.add(new Field(fieldName, fieldType));
		}

		new WizardDialog(HandlerUtil.getActiveShell(event), new BuilderGeneratorWizard(icu, fields)).open();

	}
	catch (final JavaModelException e) {
		e.printStackTrace();
	}

	return null;
}
 
开发者ID:khabali,项目名称:java-builders-generator,代码行数:25,代码来源:GenerateBuildersHandler.java

示例12: run

import org.eclipse.jface.wizard.WizardDialog; //导入依赖的package包/类
@Override
public IStatus run() {
    final AddFilesWizard wizard = new AddFilesWizard(startingBrowseLocalPath, startingBrowseServerPath);

    final WizardDialog dialog = new WizardDialog(getShell(), wizard);

    if (dialog.open() != IDialogConstants.OK_ID) {
        return Status.CANCEL_STATUS;
    }

    final String[] addPaths = wizard.getLocalPaths();
    if (addPaths.length == 0) {
        return Status.OK_STATUS;
    }

    final AddCommand command = new AddCommand(repository, addPaths);

    return getCommandExecutor().execute(command);
}
 
开发者ID:Microsoft,项目名称:team-explorer-everywhere,代码行数:20,代码来源:AddTask.java

示例13: connectToServer

import org.eclipse.jface.wizard.WizardDialog; //导入依赖的package包/类
public static void connectToServer(final Shell shell) {
    final TFSProductPlugin plugin = TFSCommonUIClientPlugin.getDefault().getProductPlugin();
    final ITeamProjectWizard wizard = plugin.getTeamProjectWizard();
    final WizardDialog dialog = new WizardDialog(shell, wizard);

    if (dialog.open() == IDialogConstants.OK_ID) {
        final TFSServer defaultServer = plugin.getServerManager().getDefaultServer();
        final TFSRepository[] repositories = plugin.getRepositoryManager().getRepositories();

        if (defaultServer != null) {
            defaultServer.refresh(true);
        }

        for (int i = 0; i < repositories.length; i++) {
            repositories[i].getPendingChangeCache().refresh();
        }
    }
}
 
开发者ID:Microsoft,项目名称:team-explorer-everywhere,代码行数:19,代码来源:ConnectHelpers.java

示例14: getCreateButtonSelectionListener

import org.eclipse.jface.wizard.WizardDialog; //导入依赖的package包/类
@Override
protected SelectionListener getCreateButtonSelectionListener(final Shell shell) {
    return new SelectionAdapter() {
        @Override
        public void widgetSelected(final SelectionEvent e) {
            final CreateBuildConfigurationWizard wizard = new CreateBuildConfigurationWizard();

            // update the build definition to contain values as
            // currently defined, that way
            // information inside is available in the creation wizard.
            updateAndVerifyBuildDefinition(true);

            wizard.init(buildDefinition);

            final WizardDialog dialog = new WizardDialog(getShell(), wizard);
            final int rc = dialog.open();

            if (rc == IDialogConstants.OK_ID) {
                checkForBuildFileExistence(true);
                validate();
            }
        }
    };
}
 
开发者ID:Microsoft,项目名称:team-explorer-everywhere,代码行数:25,代码来源:TfsBuildDefinitionDialog.java

示例15: run

import org.eclipse.jface.wizard.WizardDialog; //导入依赖的package包/类
@Override
public void run() {
    try {
        if (!GitHelpers.isEGitInstalled(true)) {
            final String errorMessage =
                Messages.getString("TeamExplorerGitWizardNavigationLink.EGitMissingErrorMessageText"); //$NON-NLS-1$
            final String title =
                Messages.getString("TeamExplorerGitWizardNavigationLink.EGitMissingErrorMessageTitle"); //$NON-NLS-1$

            log.error("Cannot import from a Git Repository. EGit plugin is required for this action."); //$NON-NLS-1$
            MessageDialog.openError(treeViewer.getControl().getShell(), title, errorMessage);
            return;
        }

        // open Git import wizard
        final GitImportWizard wizard = new GitImportWizard(serverItems);
        wizard.init(PlatformUI.getWorkbench(), null);
        final WizardDialog dialog = new WizardDialog(treeViewer.getControl().getShell(), wizard);
        dialog.open();
    } catch (final Exception e) {
        log.error("", e); //$NON-NLS-1$
    }
}
 
开发者ID:Microsoft,项目名称:team-explorer-everywhere,代码行数:24,代码来源:TeamExplorerGitRepositoriesSection.java


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