本文整理匯總了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;
}