本文整理汇总了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);
}
}
示例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);
}
}
示例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);
}
示例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);
}
示例5: error
import org.eclipse.jface.wizard.WizardPage; //导入方法依赖的package包/类
private void error(String message)
{
WizardPage lastPage = this.getLastPage();
lastPage.setErrorMessage(message);
}