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


Java IWizardContainer类代码示例

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


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

示例1: saveModel

import org.eclipse.jface.wizard.IWizardContainer; //导入依赖的package包/类
protected void saveModel(final IFile file) throws InvocationTargetException, InterruptedException {
	WorkspaceModifyOperation operation = new WorkspaceModifyOperation() {
		@Override
		protected void execute(IProgressMonitor progressMonitor) {
			try {
				EObject model = createInitialModel();
				EcoreIOUtil.saveModelAs(model, file);
			} finally {
				progressMonitor.done();
			}
		}
	};

	IWizardContainer container = getContainer();
	container.run(false, false, operation);
}
 
开发者ID:DarwinSPL,项目名称:DarwinSPL,代码行数:17,代码来源:DwFeatureModelWizard.java

示例2: validateHostname

import org.eclipse.jface.wizard.IWizardContainer; //导入依赖的package包/类
/**
 * Run the host name validator in the context of the wizard container and
 * provide a custom error message
 * @param appUrl
 * @param server
 * @param container
 * @param message - override with custom error message
 * @return
 */
public static HostnameValidationResult validateHostname(CloudApplicationURL appUrl, CloudFoundryServer server,
		IWizardContainer container, String message) {
	HostnameValidator val = message == null ? new HostnameValidator(appUrl, server)
			: new HostnameValidator(appUrl, server, message);
	try {
		container.run(true, true, val);
	}
	catch (Exception e) {
		CloudFoundryPlugin.logWarning("Hostname taken validation was not completed. " + e.getMessage()); //$NON-NLS-1$

		IStatus status = new Status(IStatus.ERROR, CloudFoundryServerUiPlugin.PLUGIN_ID,
				Messages.CloudApplicationUrlPart_ERROR_UNABLE_TO_CHECK_HOSTNAME);
		return new HostnameValidationResult(status, val.isRouteCreated());
	}

	return new HostnameValidationResult(val.getStatus(), val.isRouteCreated());
}
 
开发者ID:eclipse,项目名称:cft,代码行数:27,代码来源:CFUiUtil.java

示例3: createModelFile

import org.eclipse.jface.wizard.IWizardContainer; //导入依赖的package包/类
public IFile createModelFile(IWizardContainer context, IPackageFragmentRoot packageFragmentRoot,
		IPackageFragment packageFragment, String typeName, boolean isXtxtUml) {
	try {
		String filename;
		StringBuilder contentBuilder = new StringBuilder();
		if (isXtxtUml) {
			filename = buildXtxtUmlModelFileContent(packageFragment, typeName, contentBuilder);
		} else {
			filename = buildJavaModelFileContent(packageFragment, typeName, contentBuilder);
		}

		if (createFile(context, packageFragmentRoot, packageFragment, contentBuilder.toString(), filename)) {
			return (IFile) resource;
		}
	} catch (Throwable e) {
		Logger.sys.error("Error while creating package/model-info file", e);
	}
	return null;
}
 
开发者ID:ELTE-Soft,项目名称:txtUML,代码行数:20,代码来源:FileCreator.java

示例4: carefullyDisplayErrorDialog

import org.eclipse.jface.wizard.IWizardContainer; //导入依赖的package包/类
private void carefullyDisplayErrorDialog(String message) {
  	if(message == null) {
  		message = "Unknown error."; 
  	}
      int errorCode = MessageDialog.ERROR;
IWizardContainer container = getContainer();
Shell shell = null;
if(container != null) {
	shell = container.getShell();
}

// get a shell if the current one is null, we need to show the error.
if(shell == null) {
	shell = WidgetUtils.getShell();
}

MessageDialog.open(errorCode, shell,
              getErrorDialogTitle(), "Error encountered while " + getExportingActionVerb() + " " + getOutputProductNameSingular() + ": "
              	+ message, SWT.SHEET);
  }
 
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:21,代码来源:AbstractEnsembleProjectExportWizardPage.java

示例5: openPlanEditorFromWizard

import org.eclipse.jface.wizard.IWizardContainer; //导入依赖的package包/类
public static IEditorPart openPlanEditorFromWizard(final IFile planFile, final IWorkbench workbench, IWizardContainer container) {
	final IEditorPart[] result = new IEditorPart[1];
	try {
		container.run(false, false, new IRunnableWithProgress() {
			@Override
			public void run(IProgressMonitor monitor) {
				try {
					monitor.beginTask("Opening " + planFile.getName() + " in editor", IProgressMonitor.UNKNOWN);
					result[0] = openEditorOnPlanFile(planFile, workbench);
				} finally {
					monitor.done();
				}
			}
		});
	} catch (Exception e) {
		LogUtil.error(e);
	}
	return result[0];
}
 
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:20,代码来源:SpifeResourceUtils.java

示例6: setErrorMessage

import org.eclipse.jface.wizard.IWizardContainer; //导入依赖的package包/类
/**
 * Sets the error message for the active wizard page.
 *
 * Note that this method has no effect if the current page doesn't support error messages.
 */
private void setErrorMessage(String message) {
	IWizardContainer container = getContainer();
	if (container != null) {
		IWizardPage currentPage = container.getCurrentPage();
		if (currentPage instanceof DialogPage) {
			((DialogPage) currentPage).setErrorMessage(message);
		}
	}
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:15,代码来源:N4JSNewClassifierWizard.java

示例7: setContainer

import org.eclipse.jface.wizard.IWizardContainer; //导入依赖的package包/类
@Override
public void setContainer(IWizardContainer wizardContainer) {

	IWizardContainer oldContainer = this.getContainer();
	if (oldContainer instanceof WizardDialog) {
		((WizardDialog) oldContainer).removePageChangedListener(pageListener);
	}

	if (wizardContainer instanceof WizardDialog) {
		WizardDialog wizDialog = (WizardDialog) wizardContainer;
		wizDialog.addPageChangedListener(pageListener);
	}

	super.setContainer(wizardContainer);
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:16,代码来源:NpmExportWizard.java

示例8: setUseTemplate

import org.eclipse.jface.wizard.IWizardContainer; //导入依赖的package包/类
public void setUseTemplate(boolean useTemplate){
	fUseTemplate.setSelection(useTemplate);
	wizardSelectionViewer.getControl().setEnabled(useTemplate);
	if (!useTemplate)
		setDescription(""); //$NON-NLS-1$
	setDescriptionEnabled(useTemplate);
	
	IWizardContainer container = getContainer();
	if(container.getCurrentPage() != null){
		container.updateButtons();
	}
}
 
开发者ID:eclipse,项目名称:gemoc-studio,代码行数:13,代码来源:TemplateListSelectionPage.java

示例9: resetPageState

import org.eclipse.jface.wizard.IWizardContainer; //导入依赖的package包/类
/**
 * Resets the current page state by clearing the error message and making
 * the page complete, thereby allowing users to flip to the next page.
 */
protected void resetPageState() {
	if (pages.size() == 0)
		return;
	WizardPage firstPage = pages.get(0).page;
	IWizardContainer container = firstPage.getWizard().getContainer();
	WizardPage currentPage = (WizardPage) container.getCurrentPage();
	currentPage.setErrorMessage(null);
	currentPage.setPageComplete(true);
}
 
开发者ID:eclipse,项目名称:gemoc-studio,代码行数:14,代码来源:OptionTemplateSection.java

示例10: createXtxtUmlFile

import org.eclipse.jface.wizard.IWizardContainer; //导入依赖的package包/类
public IFile createXtxtUmlFile(IWizardContainer context, IPackageFragmentRoot packageFragmentRoot,
		IPackageFragment packageFragment, String filename) {
	try {
		StringBuilder contentBuilder = new StringBuilder();
		buildXtxtUmlFileContent(packageFragment, contentBuilder);

		if (createFile(context, packageFragmentRoot, packageFragment, contentBuilder.toString(), filename)) {
			return (IFile) resource;
		}
	} catch (Throwable e) {
		Logger.sys.error("Error while creating XtxtUML file", e);
	}

	return null;
}
 
开发者ID:ELTE-Soft,项目名称:txtUML,代码行数:16,代码来源:FileCreator.java

示例11: setContainer

import org.eclipse.jface.wizard.IWizardContainer; //导入依赖的package包/类
@Override
public void setContainer(IWizardContainer wizardContainer) {
	super.setContainer(wizardContainer);
	if (wizardContainer instanceof WizardDialog) {
		WizardDialog wizardDialog = (WizardDialog) wizardContainer;
		wizardDialog.addPageChangingListener(new ChangingListener());
		wizardDialog.addPageChangedListener(new ChangedListener(wizardDialog));
        wizardDialog.setHelpAvailable(true);
	}
}
 
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:11,代码来源:FixingViolationsWizard.java

示例12: setContainer

import org.eclipse.jface.wizard.IWizardContainer; //导入依赖的package包/类
@Override
public void setContainer(IWizardContainer wizardContainer)
{
    if(getContainer() instanceof IPageChangeProvider) {
        ((IPageChangeProvider)getContainer()).removePageChangedListener(mPageChangedListener);
    }
    super.setContainer(wizardContainer);
    if(getContainer() instanceof IPageChangeProvider) {
        ((IPageChangeProvider)getContainer()).addPageChangedListener(mPageChangedListener);
    }
}
 
开发者ID:henrikor2,项目名称:eclipsensis,代码行数:12,代码来源:NSISManualConfigWizard.java

示例13: setContainer

import org.eclipse.jface.wizard.IWizardContainer; //导入依赖的package包/类
@Override
public void setContainer(IWizardContainer wizardContainer) {
    super.setContainer(wizardContainer);

    if (wizardContainer != null) {
        final WizardDialog wizardDialog = (WizardDialog)wizardContainer;
        wizardDialog.addPageChangingListener(authenticationWizardPage);
        wizardDialog.addPageChangedListener(workspaceWizardPage);
    }
}
 
开发者ID:codenvy-legacy,项目名称:eclipse-plugin,代码行数:11,代码来源:ExportProjectToCodenvyWizard.java

示例14: setContainer

import org.eclipse.jface.wizard.IWizardContainer; //导入依赖的package包/类
@Override
public void setContainer(IWizardContainer wizardContainer) {
    super.setContainer(wizardContainer);

    if (wizardContainer != null) {
        final WizardDialog wizardDialog = (WizardDialog)wizardContainer;
        wizardDialog.addPageChangingListener(authenticationWizardPage);
        wizardDialog.addPageChangedListener(projectWizardPage);
    }
}
 
开发者ID:codenvy-legacy,项目名称:eclipse-plugin,代码行数:11,代码来源:ImportProjectFromCodenvyWizard.java

示例15: pageChanged

import org.eclipse.jface.wizard.IWizardContainer; //导入依赖的package包/类
/**
 * Called whenever the wizard page has changed and forces its container
 * to resize its content.
 * 
 * @see org.eclipse.jface.dialogs.IPageChangedListener#pageChanged(org.eclipse.jface.dialogs.PageChangedEvent)
 */
public void pageChanged( PageChangedEvent event )
{
	if ( this.wizardPage == event.getSelectedPage( ) )
	{
		// force size update
		IWizardContainer container = getContainer( );
		if ( container instanceof IWizardContainer2 )
		{
			( (IWizardContainer2) container ).updateSize( );
		}
	}
}
 
开发者ID:eclipse,项目名称:birt,代码行数:19,代码来源:BirtWebProjectWizardConfigurationPage.java


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