本文整理汇总了Java中org.eclipse.jface.wizard.WizardPage.setMessage方法的典型用法代码示例。如果您正苦于以下问题:Java WizardPage.setMessage方法的具体用法?Java WizardPage.setMessage怎么用?Java WizardPage.setMessage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.jface.wizard.WizardPage
的用法示例。
在下文中一共展示了WizardPage.setMessage方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: flagErrorMessage
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 flagErrorMessage ( final TemplateOption option, final String newMessage, final int newType )
{
for ( int i = 0; i < getPageCount (); i++ )
{
final WizardPage page = getPage ( i );
for ( final TemplateOption pageOption : getOptions ( i ) )
{
if ( pageOption.equals ( option ) )
{
page.setPageComplete ( false );
page.setMessage ( newMessage, newType );
}
}
}
}
示例2: setupPages
import org.eclipse.jface.wizard.WizardPage; //导入方法依赖的package包/类
private List<StepDetail> setupPages(String projectname, Engine engine) throws Exception {
int max = PreferenceManager.getMaxStepsForManualTestWizard(projectname);
List<StepPage> all = new ArrayList<StepPage>();
int index = 0;
while (engine.hasNextstep()) {
StepPage p = computeNextPage();
if (p == null)
continue;
// System.out.println("title " + p.getTitle());
addPage(p);
all.add(p);
index++;
if (index > max) {
DialogManager.displayWarning(MessageUtil.getString("incomplete_steps_list_in_manual_wizard"),
MessageUtil.getString("max_steps_reached_change_setting_in_preference_project"));
break;
}
}
index = 1;
for (WizardPage wizardPage : all) {
wizardPage.setMessage(" Step (" + index + "/" + all.size() + ")");
index++;
}
List<StepDetail> ret = all.stream().map(item -> item.getDetail()).collect(Collectors.toList());
return ret;
}