use of org.eclipse.jface.wizard.IWizardPage in project cubrid-manager by CUBRID.
the class TableLabelProvider method pageChanged.
/**
* Call this method when from a page to a page
*
* @param event the page changed event
*/
public void pageChanged(PageChangedEvent event) {
IWizardPage page = (IWizardPage) event.getSelectedPage();
if (page.getName().equals(PAGENAME)) {
setMessage(null);
parsedDatabaseList = parseDatabases();
priviewViewer.setInput(parsedDatabaseList);
priviewViewer.refresh();
if (parsedDatabaseList.size() == 0) {
setErrorMessage(Messages.errNoParseDatabase);
setPageComplete(false);
} else {
setErrorMessage(null);
setPageComplete(true);
}
CommonUITool.packTable(priviewViewer.getTable(), 20, 200);
}
}
use of org.eclipse.jface.wizard.IWizardPage in project bndtools by bndtools.
the class LocalRepositorySelectionPage method createControl.
public void createControl(Composite parent) {
setTitle("Select Local Repository");
setMessage("Bundle will be imported into the selected repository.");
Table table = new Table(parent, SWT.BORDER | SWT.SINGLE | SWT.FULL_SELECTION);
final TableViewer viewer = new TableViewer(table);
viewer.setContentProvider(new RepositoryTreeContentProvider());
viewer.setLabelProvider(new RepositoryTreeLabelProvider(false));
viewer.setFilters(new ViewerFilter[] { new ViewerFilter() {
@Override
public boolean select(Viewer viewer, Object parentElement, Object element) {
return (element instanceof RepositoryPlugin) && ((RepositoryPlugin) element).canWrite();
}
} });
try {
Workspace workspace = Central.getWorkspace();
viewer.setInput(workspace);
if (selectedRepository != null)
viewer.setSelection(new StructuredSelection(selectedRepository));
validate(workspace);
} catch (Exception e) {
logger.logError("Error querying local repositories", e);
setErrorMessage("Error querying local repositories, see log for details.");
}
// LISTENERS
viewer.addSelectionChangedListener(new ISelectionChangedListener() {
public void selectionChanged(SelectionChangedEvent event) {
IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
setSelectedRepository((RepositoryPlugin) selection.getFirstElement());
}
});
viewer.addOpenListener(new IOpenListener() {
public void open(OpenEvent evt) {
IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
setSelectedRepository((RepositoryPlugin) selection.getFirstElement());
IWizardPage nextPage = getNextPage();
if (nextPage != null)
getContainer().showPage(nextPage);
}
});
setControl(table);
}
use of org.eclipse.jface.wizard.IWizardPage in project Palladio-Editors-Sirius by PalladioSimulator.
the class NewModelWizard method addPages.
@Override
public void addPages() {
super.addPages();
addPage(this.modelCreationPage);
addPage(this.representationCreationPage);
for (IWizardPage page : additionalPages) {
addPage(page);
}
}
use of org.eclipse.jface.wizard.IWizardPage in project translationstudio8 by heartsome.
the class TSWizardDialog method backPressed.
/**
* The Back button has been pressed.
*/
protected void backPressed() {
IWizardPage page = currentPage.getPreviousPage();
if (page == null) {
// should never happen since we have already visited the page
return;
}
// set flag to indicate that we are moving back
isMovingToPreviousPage = true;
// show the page
showPage(page);
}
use of org.eclipse.jface.wizard.IWizardPage 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;
}
Aggregations