use of org.eclipse.jface.wizard.WizardPage in project gemoc-studio by eclipse.
the class OptionTemplateSection method flagMissingRequiredOption.
/**
* 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);
}
}
use of org.eclipse.jface.wizard.WizardPage in project webtools.sourceediting by eclipse.
the class NewModelWizard method performFinish.
public boolean performFinish() {
boolean result = true;
WizardPage currentPage = (WizardPage) getContainer().getCurrentPage();
if (currentPage != null) {
result = currentPage.isPageComplete();
}
return result;
}
use of org.eclipse.jface.wizard.WizardPage in project webtools.sourceediting by eclipse.
the class NewXMLWizard method getNextPage.
public IWizardPage getNextPage(IWizardPage currentPage) {
WizardPage nextPage = null;
if (currentPage == startPage) {
nextPage = newFilePage;
} else if (currentPage == newFilePage) {
if (generator.getGrammarURI() == null)
nextPage = fCreateXMLFromWizardPage;
else
nextPage = selectRootElementPage;
} else if (currentPage == fCreateXMLFromWizardPage) {
if (getCreateMode() == CREATE_FROM_SCRATCH) {
nextPage = fNewXMLTemplatesWizardPage;
} else if (generator.getGrammarURI() == null) {
nextPage = selectGrammarFilePage;
} else {
nextPage = selectRootElementPage;
}
} else if (currentPage == selectGrammarFilePage) {
nextPage = selectRootElementPage;
}
return nextPage;
}
use of org.eclipse.jface.wizard.WizardPage in project yamcs-studio by yamcs.
the class ImportYSSLandingWizard method addPages.
@Override
public void addPages() {
super.addPages();
setWindowTitle("Install YSS Landing");
addPage(new WizardPage("YSS Landing") {
@Override
public void createControl(Composite parent) {
setTitle("Install YSS Landing");
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("The 'YSS Landing' project will be imported to your workspace. This project " + "is useful for demo purposes and runs against the simulation example included " + "in the Yamcs repository.\n\n" + "If there is already a project named \"" + InstallYSSLandingAction.PROJECT_NAME + "\" in your workspace, the import will fail. " + "Please rename or delete it and import again.");
}
});
}
use of org.eclipse.jface.wizard.WizardPage in project dbeaver by dbeaver.
the class AbstractNativeToolWizard method updateErrorMessage.
void updateErrorMessage() {
WizardPage currentPage = (WizardPage) getStartingPage();
if (isNativeClientHomeRequired()) {
String clientHomeId = getSettings().getDataSourceContainer().getConnectionConfiguration().getClientHomeId();
List<DBPNativeClientLocation> nativeClientLocations = getSettings().getDataSourceContainer().getDriver().getNativeClientLocations();
if (CommonUtils.isEmpty(clientHomeId)) {
if (nativeClientLocations != null && !nativeClientLocations.isEmpty()) {
settings.setClientHome(nativeClientLocations.get(0));
} else {
settings.setClientHome(null);
}
if (settings.getClientHome() == null) {
currentPage.setErrorMessage(TaskNativeUIMessages.tools_wizard_message_no_client_home);
getContainer().updateMessage();
return;
}
} else {
DBPNativeClientLocation clientHome = DBUtils.findObject(nativeClientLocations, clientHomeId);
if (clientHome == null) {
clientHome = getSettings().findNativeClientHome(clientHomeId);
}
if (clientHome == null) {
// Make local client home from location
clientHome = new LocalNativeClientLocation(clientHomeId, clientHomeId);
}
settings.setClientHome(clientHome);
}
if (settings.getClientHome() == null) {
currentPage.setErrorMessage(NLS.bind(TaskNativeUIMessages.tools_wizard_message_client_home_not_found, clientHomeId));
} else {
currentPage.setErrorMessage(null);
}
getContainer().updateMessage();
}
}
Aggregations