當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。