use of org.eclipse.jface.wizard.WizardPage in project yamcs-studio by yamcs.
the class ImportOPIExamplesWizard method addPages.
@Override
public void addPages() {
super.addPages();
setWindowTitle("Install OPI Examples");
addPage(new WizardPage("OPI Examples") {
@Override
public void createControl(Composite parent) {
setTitle("Install OPI Examples");
setDescription("Creates a new project with sample OPI displays");
var container = new Composite(parent, SWT.None);
container.setLayout(new GridLayout());
setControl(container);
var label = new Label(container, SWT.WRAP);
var gd = new GridData();
gd.widthHint = 500;
label.setLayoutData(gd);
label.setText("OPI Examples will be imported to your workspace. " + NLS.bind("If there is already a project named \"{0}\" in your workspace," + "the import will fail. ", InstallOPIExamplesAction.PROJECT_NAME) + "Please rename or delete it and import again.");
}
});
}
use of org.eclipse.jface.wizard.WizardPage in project egit by eclipse.
the class RepositoryLocationPage method getWizardPage.
private WizardPage getWizardPage(CloneSourceProvider repositoryImport) {
WizardPage nextPage;
nextPage = resolvedWizardPages.get(repositoryImport);
if (nextPage == null) {
try {
nextPage = repositoryImport.getRepositorySearchPage();
} catch (CoreException e) {
Activator.error(e.getLocalizedMessage(), e);
}
if (nextPage != null) {
nextPage.setWizard(getWizard());
resolvedWizardPages.put(repositoryImport, nextPage);
}
}
return nextPage;
}
use of org.eclipse.jface.wizard.WizardPage in project ecf by eclipse.
the class RemoteServiceHostExample1Template method addPages.
public void addPages(Wizard wizard) {
WizardPage page = createPage(0, "org.eclipse.pde.doc.user.rcp_mail");
page.setTitle("Hello Remote Service Host");
page.setDescription("This template creates and exports a Hello remote service");
wizard.addPage(page);
markPagesAdded();
}
use of org.eclipse.jface.wizard.WizardPage in project gemoc-studio by eclipse.
the class OptionTemplateSection method resetPageState.
/**
* 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);
}
use of org.eclipse.jface.wizard.WizardPage in project gemoc-studio by eclipse.
the class OptionTemplateSection method flagErrorOnOption.
/**
* 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);
}
}
Aggregations