use of org.eclipse.jface.wizard.WizardPage in project translationstudio8 by heartsome.
the class NewTermDbBaseInfoPage method getNextPage.
public IWizardPage getNextPage() {
WizardPage nextPage = (WizardPage) super.getNextPage();
IRunnableWithProgress runnable = new IRunnableWithProgress() {
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
if (canCreateDb(monitor) != null) {
throw new InterruptedException();
}
}
};
try {
getContainer().run(true, true, runnable);
} catch (InvocationTargetException e) {
logger.error("", e);
e.printStackTrace();
return null;
} catch (InterruptedException e) {
e.printStackTrace();
return null;
}
nextPage.setErrorMessage(null);
return nextPage;
}
use of org.eclipse.jface.wizard.WizardPage in project translationstudio8 by heartsome.
the class NewTmDbBaseInfoPage method getNextPage.
public IWizardPage getNextPage() {
WizardPage nextPage = (WizardPage) super.getNextPage();
IRunnableWithProgress runnable = new IRunnableWithProgress() {
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
if (canCreateDb(monitor) != null) {
throw new InterruptedException();
}
}
};
try {
getContainer().run(true, true, runnable);
} catch (InvocationTargetException e) {
e.printStackTrace();
return null;
} catch (InterruptedException e) {
e.printStackTrace();
return null;
}
nextPage.setErrorMessage(null);
return nextPage;
}
use of org.eclipse.jface.wizard.WizardPage in project sling by apache.
the class AbstractNewSlingApplicationWizard method reportError.
public void reportError(CoreException e) {
WizardPage currentPage = getCurrentWizardPage();
if (currentPage != null) {
currentPage.setMessage(e.getMessage(), IMessageProvider.ERROR);
} else {
MessageDialog.openError(getShell(), "Unexpected error", e.getMessage());
}
Activator.getDefault().getLog().log(e.getStatus());
}
use of org.eclipse.jface.wizard.WizardPage in project yamcs-studio by yamcs.
the class NewOPIImageLibExampleWizard method addPages.
@Override
public void addPages() {
super.addPages();
setWindowTitle(WINDOW_TITLE);
addPage(new WizardPage(WIZARD_PAGE) {
@Override
public void createControl(Composite parent) {
setTitle(WIZARD_PAGE_TITLE);
setDescription(WIZARD_PAGE_DESCRIPTION);
Composite container = new Composite(parent, SWT.None);
container.setLayout(new GridLayout());
setControl(container);
Label label = new Label(container, SWT.WRAP);
GridData gd = new GridData();
gd.widthHint = 500;
label.setLayoutData(gd);
label.setText("OPI Image Library will be imported to your workspace. " + NLS.bind("If there is already a project named \"{0}\" in your workspace," + "the import will fail. ", InstallOPIImageLibraryAction.PROJECT_NAME) + "Please rename or delete it and import again.");
}
});
}
use of org.eclipse.jface.wizard.WizardPage in project epp.mpc by eclipse.
the class MarketplacePage method showNextPage.
protected void showNextPage() {
IWizardContainer container = getContainer();
if (container == null) {
return;
}
IWizardPage currentPage = container.getCurrentPage();
if (currentPage == MarketplacePage.this && currentPage.isPageComplete()) {
IWizardPage nextPage = getNextPage();
if (nextPage != null && nextPage instanceof WizardPage) {
((WizardPage) nextPage).setPageComplete(true);
container.showPage(nextPage);
}
}
}
Aggregations