本文整理汇总了Java中org.eclipse.jface.wizard.WizardPage类的典型用法代码示例。如果您正苦于以下问题:Java WizardPage类的具体用法?Java WizardPage怎么用?Java WizardPage使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
WizardPage类属于org.eclipse.jface.wizard包,在下文中一共展示了WizardPage类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例3: 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);
}
}
示例4: 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);
}
}
示例5: showStatus
import org.eclipse.jface.wizard.WizardPage; //导入依赖的package包/类
private void showStatus(IStatus status){
String message = status.getMessage();
if (message.length() == 0) message= null;
switch (status.getSeverity()) {
case IStatus.OK:
setErrorMessage(null);
setMessage(message);
break;
case IStatus.WARNING:
setErrorMessage(null);
setMessage(message, WizardPage.WARNING);
break;
case IStatus.INFO:
setErrorMessage(null);
setMessage(message, WizardPage.INFORMATION);
break;
default:
setErrorMessage(message);
setMessage(null);
break;
}
}
示例6: getNextPage
import org.eclipse.jface.wizard.WizardPage; //导入依赖的package包/类
@Override
public IWizardPage getNextPage() {
// Set the IP info in the opening of page
lblIp.setText("- IP: " + config.getDatabaseIp());
((ControlNextEvent) super.getNextPage()).setNextPageEventType(NextPageEventType.CLICK_FROM_PREV_PAGE);
// Set page complete to true, otherwise it does not go into getNextPage
// method of DatabaseInstallationStatus page.
((WizardPage) super.getNextPage()).setPageComplete(true);
// Set global variable to false before every installation status page,
// if it is not set and there are more than one component to be
// installed, finish button will be enabled directly in the last
// installation page.
config.setInstallationFinished(false);
return super.getNextPage();
}
示例7: getNextPage
import org.eclipse.jface.wizard.WizardPage; //导入依赖的package包/类
@Override
public IWizardPage getNextPage() {
// Set the IP info in the opening of page
lblIp.setText("- IP: " + config.getXmppIp());
((ControlNextEvent) super.getNextPage()).setNextPageEventType(NextPageEventType.CLICK_FROM_PREV_PAGE);
// Set page complete to true, otherwise it does not go into getNextPage
// method of XmppInstallationStatus page.
((WizardPage) super.getNextPage()).setPageComplete(true);
// Set global variable to false before every installation status page,
// if it is not set and there are more than one component to be
// installed, finish button will be enabled directly in the last
// installation page.
config.setInstallationFinished(false);
return super.getNextPage();
}
示例8: addContentPages
import org.eclipse.jface.wizard.WizardPage; //导入依赖的package包/类
@Override
public void addContentPages() {
mainPage = getWizardNewProjectCreationPage();
this.addPage(mainPage);
/* never add the reference page
// only add page if there are already projects in the workspace
if (ResourcesPlugin.getWorkspace().getRoot().getProjects().length > 0) {
referencePage = getWizardNewProjectReferencePage();
this.addPage(referencePage);
}
*/
List<? extends WizardPage> additionalWizardPages = getAdditionalWizardPages();
if (additionalWizardPages != null) {
for (WizardPage wizardPage : additionalWizardPages) {
this.addPage(wizardPage);
}
}
}
示例9: runJob
import org.eclipse.jface.wizard.WizardPage; //导入依赖的package包/类
protected boolean runJob(IRunnableWithProgress runnable) {
// Clear any errors
((WizardPage)getContainer().getCurrentPage()).setErrorMessage(null);
_jobException = null;
// Start the job
try {
getContainer().run(true, true, runnable);
} catch (Exception e) {
_jobException = e;
}
// Check for errors
if (_jobException != null) {
String msg = StringUtil.format("{0} : {1}", _jobException.getMessage(), BluemixUtil.getErrorText(_jobException));
((WizardPage)getContainer().getCurrentPage()).setErrorMessage(msg);
if (BluemixLogger.BLUEMIX_LOGGER.isErrorEnabled()) {
BluemixLogger.BLUEMIX_LOGGER.errorp(this, "runJob", BluemixUtil.getRootCause(_jobException), "Error running job"); // $NON-NLS-1$ $NLE-AbstractBluemixWizard.Errorrunningjob-2$
}
return false;
}
return true;
}
示例10: handlePageChanging
import org.eclipse.jface.wizard.WizardPage; //导入依赖的package包/类
@Override
public void handlePageChanging(final PageChangingEvent event) {
// Assume success
event.doit = true;
// Get the current and target pages
WizardPage currPage = (WizardPage)event.getCurrentPage();
WizardPage targetPage = (WizardPage)event.getTargetPage();
if ((currPage instanceof AlwStartPage) && (targetPage instanceof AlwPropertiesPage)) {
// Moving from first to second page
LayoutConfig lc = getStartPage().getSelectedLayoutConfig();
if (lc != null) {
String errorMsg = "This configuration is in a library that is not yet enabled in this application.\nEnabling the library will add it as a dependency in Xsp Properties.\nXsp Properties is currently open in another editor and cannot be modified.\nClose Xsp Properties in order to proceed."; // $NLX-ApplicationLayoutDropWizard.Thisconfigurationisinalibrarythat-1$
String proceedMsg = "This configuration is in a library that is not yet enabled in this application.\nEnabling the library will add it as a dependency in Xsp Properties.\nClick Continue to update your Xsp Properties."; // $NLX-ApplicationLayoutDropWizard.Thisconfigurationisinalibrarythat.1-1$
event.doit = WizardUtils.findStandardDefAndAddDependency(lc.facesDef.getNamespaceUri(), lc.tagName, _panelData.getDesignerProject(), errorMsg, proceedMsg);
}
}
}
示例11: getNextPage
import org.eclipse.jface.wizard.WizardPage; //导入依赖的package包/类
@Override
public WizardPage getNextPage() {
refreshData();
switch(dsType) {
case DS_VIEW:
if (!(pageData.wizardPage[2] instanceof WizardSubPageDataView)) {
pageData.wizardPage[2] = new WizardSubPageDataView(pageData);
((Wizard)getWizard()).addPage(pageData.wizardPage[2]);
}
return(pageData.wizardPage[2]);
case DS_DOC:
if (!(pageData.wizardPage[2] instanceof WizardSubPageFormTable)) {
pageData.wizardPage[2] = new WizardSubPageFormTable(pageData);
((Wizard)getWizard()).addPage(pageData.wizardPage[2]);
}
return(pageData.wizardPage[2]);
}
return null;
}
示例12: getNextPage
import org.eclipse.jface.wizard.WizardPage; //导入依赖的package包/类
@Override
public WizardPage getNextPage() {
refreshData();
// Get the Next Sub Main Page
// If pages provide more Sub Pages this function
// should be overridden
int newPageNumber = getSubPageNumber()+1;
if(newPageNumber < wizardData.getPageCount()) {
WizardDataSub pd = wizardData.pageList.get(newPageNumber);
if(pd != null) {
if (pd.wizardPage[0] == null) {
pd.wizardPage[0] = new WizardSubPageMain(pd);
((Wizard)getWizard()).addPage(pd.wizardPage[0]);
}
return(pd.wizardPage[0]);
}
}
return null;
}
示例13: getNextPage
import org.eclipse.jface.wizard.WizardPage; //导入依赖的package包/类
@Override
public WizardPage getNextPage() {
refreshData();
if(wizardData.pageList.size() > 0) {
// Add the first sub page
WizardDataSub pd = wizardData.pageList.get(0);
if (pd != null) {
if (pd.wizardPage[0] == null) {
pd.wizardPage[0] = new WizardSubPageMain(pd);
((Wizard)(getWizard())).addPage(pd.wizardPage[0]);
}
return(pd.wizardPage[0]);
}
}
return(null);
}
示例14: applyToStatusLine
import org.eclipse.jface.wizard.WizardPage; //导入依赖的package包/类
/**
* Applies the given status to the status line of a wizard page. This method
* is mostly used by subclasses upon receiving an event and setting a status
* accordingly.
*
* @param status
* the status
*/
protected void applyToStatusLine(IStatus status) {
String message = status.getMessage();
if (message.length() == 0) {
message = null;
}
switch (status.getSeverity()) {
case IStatus.OK:
this.setErrorMessage(null);
this.setMessage(message);
break;
case IStatus.WARNING:
this.setErrorMessage(null);
this.setMessage(message, WizardPage.WARNING);
break;
case IStatus.INFO:
this.setErrorMessage(null);
this.setMessage(message, WizardPage.INFORMATION);
break;
default:
this.setErrorMessage(message);
this.setMessage(null);
break;
}
}
示例15: addPages
import org.eclipse.jface.wizard.WizardPage; //导入依赖的package包/类
public void addPages(Wizard wizard) {
WizardPage page = createPage(0, IHelpContextIds.TEMPLATE_SEQUENTIAL_EXTENDED_LANGUAGE);
page.setTitle(WizardTemplateMessages.SequentialExtendedLanguageTemplate_title);
page.setDescription(WizardTemplateMessages.SequentialExtendedLanguageTemplate_desc);
wizard.addPage(page);
markPagesAdded();
}