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


Java WizardPage.setErrorMessage方法代码示例

本文整理汇总了Java中org.eclipse.jface.wizard.WizardPage.setErrorMessage方法的典型用法代码示例。如果您正苦于以下问题:Java WizardPage.setErrorMessage方法的具体用法?Java WizardPage.setErrorMessage怎么用?Java WizardPage.setErrorMessage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.jface.wizard.WizardPage的用法示例。


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

示例1: flagMissingRequiredOption

import org.eclipse.jface.wizard.WizardPage; //导入方法依赖的package包/类
/**
 * Locates the page that this option is presented in and flags that the
 * option is required and is currently not set. The flagging is done by
 * setting the page incomplete and setting the error message that uses
 * option's message label.
 * 
 * @param option
 *            the option that is required and currently not set
 */
protected void flagMissingRequiredOption(TemplateOption option) {
	WizardPage page = null;
	for (int i = 0; i < pages.size(); i++) {
		TemplatePage tpage = pages.get(i);
		ArrayList<TemplateOption> list = tpage.options;
		if (list.contains(option)) {
			page = tpage.page;
			break;
		}
	}
	if (page != null) {
		page.setPageComplete(false);
		String message = NLS.bind(PDEUIMessages.OptionTemplateSection_mustBeSet, option.getMessageLabel());
		page.setErrorMessage(message);
	}
}
 
开发者ID:eclipse,项目名称:gemoc-studio,代码行数:26,代码来源:OptionTemplateSection.java

示例2: flagErrorOnOption

import org.eclipse.jface.wizard.WizardPage; //导入方法依赖的package包/类
/**
 * Locates the page that this option is presented in and flags that the
 * option has an error. The flagging is done by
 * setting the page incomplete and setting the error message with the 
 * provided message prefixed by the option's message label.
 * 
 * @param option
 *            the option that is required and currently not set
 * @param msg
 *            the message indicating the error for the given option
 */
protected void flagErrorOnOption(TemplateOption option, String msg) {
	WizardPage page = null;
	for (int i = 0; i < pages.size(); i++) {
		TemplatePage tpage = pages.get(i);
		ArrayList<TemplateOption> list = tpage.options;
		if (list.contains(option)) {
			page = tpage.page;
			break;
		}
	}
	if (page != null) {
		page.setPageComplete(false);
		String message = option.getMessageLabel()+": "+msg;
		page.setErrorMessage(message);
	}
}
 
开发者ID:eclipse,项目名称:gemoc-studio,代码行数:28,代码来源:OptionTemplateSection.java

示例3: resetPageState

import org.eclipse.jface.wizard.WizardPage; //导入方法依赖的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

示例4: validateOptions

import org.eclipse.jface.wizard.WizardPage; //导入方法依赖的package包/类
@Override
public void validateOptions(TemplateOption changed) {
	WizardPage page = getPage(0);

	for (TemplateOption option : options.keySet()) {
		if (option.isRequired() && option.isEmpty()) {
			page.setPageComplete(false);
			page.setErrorMessage("Required information is missing");
			return;
		}
	}

	page.setPageComplete(true);
	page.setErrorMessage(null);
}
 
开发者ID:secondfiddle,项目名称:pep-tools,代码行数:16,代码来源:ProjectTemplateSection.java

示例5: error

import org.eclipse.jface.wizard.WizardPage; //导入方法依赖的package包/类
private void error(String message)
{
  WizardPage lastPage = this.getLastPage();

  lastPage.setErrorMessage(message);
}
 
开发者ID:terraframe,项目名称:geoprism,代码行数:7,代码来源:LocatedInWizard.java


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