當前位置: 首頁>>代碼示例>>Java>>正文


Java WizardDialog.open方法代碼示例

本文整理匯總了Java中org.eclipse.jface.wizard.WizardDialog.open方法的典型用法代碼示例。如果您正苦於以下問題:Java WizardDialog.open方法的具體用法?Java WizardDialog.open怎麽用?Java WizardDialog.open使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.eclipse.jface.wizard.WizardDialog的用法示例。


在下文中一共展示了WizardDialog.open方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: 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

示例2: 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

示例3: 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,代碼來源:FinalAssmblWizardCommand.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: 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

示例7: 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

示例8: 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

示例9: doEditFormula

import org.eclipse.jface.wizard.WizardDialog; //導入方法依賴的package包/類
protected Assignment doEditFormula(Assignment formula) // gets called when editing a constant and ...
{
    Assert.isNotNull(formula);

    // Create the wizard
    AssignmentWizard wizard = new AssignmentWizard(getSection().getText(), getSection().getDescription(),
            (Assignment) formula, AssignmentWizard.SHOW_OPTION, AssignmentWizardPage.CONSTANT_WIZARD_ID);
    // Create the wizard dialog
    WizardDialog dialog = new WizardDialog(getTableViewer().getTable().getShell(), wizard);
    wizard.setWizardDialog(dialog);
    dialog.setHelpAvailable(true);

    // Open the wizard dialog
    if (Window.OK == dialog.open())
    {
        return wizard.getFormula();
    } else
    {
        return null;  // We get here if the user cancels.
    }
}
 
開發者ID:tlaplus,項目名稱:tlaplus,代碼行數:22,代碼來源:ValidateableConstantSectionPart.java

示例10: doRun

import org.eclipse.jface.wizard.WizardDialog; //導入方法依賴的package包/類
@Override
public void doRun(final IAction action) {
    if (items == null) {
        return;
    }

    final TfsImportWizard importWizard = new TfsImportWizard();

    // Add current selected folders as selection.
    final String[] importFolders = new String[items.length];
    for (int i = 0; i < importFolders.length; i++) {
        importFolders[i] = items[i].getFullPath();
    }
    importWizard.setImportFolders(importFolders);

    importWizard.init(getWorkbenchWindow().getWorkbench(), null);

    final WizardDialog dialog = new WizardDialog(getShell(), importWizard);
    dialog.open();
}
 
開發者ID:Microsoft,項目名稱:team-explorer-everywhere,代碼行數:21,代碼來源:ImportFolderAction.java

示例11: execute

import org.eclipse.jface.wizard.WizardDialog; //導入方法依賴的package包/類
@Override
public void execute() {
	if (newChart == null) {
		JRDesignComponentElement clone = (JRDesignComponentElement) oldChart
				.clone();
		SpiderChartComponent scc = (SpiderChartComponent) clone
				.getComponent();
		// TODO SHOULD TAKE THIS ONE FROM EDITOR

		ChartWizard wizard = new ChartWizard(new MSpiderChart(null, clone,
				-1), (JRDesignElementDataset) scc.getDataset());
		wizard.init(jConfig);
		wizard.setExpressionContext(ModelUtils.getElementExpressionContext(oldChart,originalNode));
		WizardDialog dialog = new WizardDialog(Display.getDefault()
				.getActiveShell(), wizard);
		dialog.create();
		if (dialog.open() == Dialog.OK) {
			this.newChart = (JRDesignComponentElement) wizard.getChart()
					.getValue();
		} else
			return;
	}
	switchCharts(oldChart, newChart);
}
 
開發者ID:OpenSoftwareSolutions,項目名稱:PDFReporter-Studio,代碼行數:25,代碼來源:EditSpiderChartCommand.java

示例12: execute

import org.eclipse.jface.wizard.WizardDialog; //導入方法依賴的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

示例13: showDialog

import org.eclipse.jface.wizard.WizardDialog; //導入方法依賴的package包/類
public int showDialog() {
	if(!ExpressionEditorSupportUtil.isExpressionEditorDialogOpen()) {
		JRExpressionEditor wizard = new JRExpressionEditor();
		wizard.setValue(JRCloneUtils.nullSafeClone(originalExpression));
		ExpressionContext ec = ModelUtils.getElementExpressionContext((JRDesignTextField) textField.getValue(), textField);
		wizard.setExpressionContext(ec);

		WizardDialog dialog = ExpressionEditorSupportUtil.getExpressionEditorWizardDialog(UIUtils.getShell(), wizard);
		if (dialog.open() == Dialog.OK) {
			isExpressionChanged = true;
			newExpression=wizard.getValue();
			return Window.OK;
		}
	}
	isExpressionChanged=false;
	return Window.CANCEL;
}
 
開發者ID:OpenSoftwareSolutions,項目名稱:PDFReporter-Studio,代碼行數:18,代碼來源:EditTextFieldExpressionCommand.java

示例14: run

import org.eclipse.jface.wizard.WizardDialog; //導入方法依賴的package包/類
@Override
public void run ( final IAction action )
{
    if ( this.selection == null )
    {
        return;
    }

    final IWorkbenchWizard wiz = new WriteAttributesOperationWizard ();
    wiz.init ( this.site.getWorkbenchWindow ().getWorkbench (), this.selection );

    // Embed the wizard into a dialog
    final WizardDialog dialog = new WizardDialog ( this.site.getShell (), wiz );
    dialog.open ();
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:16,代碼來源:WriteAttributesOperationAction.java

示例15: execute

import org.eclipse.jface.wizard.WizardDialog; //導入方法依賴的package包/類
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
	IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindow(event);
	ISelection selection = HandlerUtil.getCurrentSelection(event);
	POJO2DataTypeWizard wizard = new POJO2DataTypeWizard();
	wizard.init(window.getWorkbench(), 
			selection instanceof IStructuredSelection
			? (IStructuredSelection) selection : StructuredSelection.EMPTY);
	WizardDialog dialog = new WizardDialog(window.getShell(), wizard);
	dialog.open();
	return null;
}
 
開發者ID:bsteker,項目名稱:bdf2,代碼行數:13,代碼來源:POJO2DataTypeHandler.java


注:本文中的org.eclipse.jface.wizard.WizardDialog.open方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。