use of org.eclipse.jface.wizard.WizardDialog in project cubrid-manager by CUBRID.
the class CreatePartitionWizard method addPages.
/**
* Add wizard pages
*/
public void addPages() {
if (partitionInfoList.isEmpty()) {
typePage = new PartitionTypePage(dbInfo, schemaInfo, isNewTable);
addPage(typePage);
hashPage = new PartitionEditHashPage(partitionInfoList);
addPage(hashPage);
listPage = new PartitionEditListPage(dbInfo, schemaInfo, partitionInfoList, isNewTable);
addPage(listPage);
rangePage = new PartitionEditRangePage(partitionInfoList);
addPage(rangePage);
WizardDialog dialog = (WizardDialog) getContainer();
dialog.addPageChangedListener(hashPage);
dialog.addPageChangedListener(listPage);
dialog.addPageChangedListener(rangePage);
} else {
if (editedPartitionInfo != null) {
typePage = new PartitionTypePage(dbInfo, schemaInfo, isNewTable);
typePage.setEditedPartitionInfo(editedPartitionInfo);
addPage(typePage);
}
WizardDialog dialog = (WizardDialog) getContainer();
PartitionType partitionType = partitionInfoList.get(0).getPartitionType();
if (partitionType == PartitionType.HASH) {
hashPage = new PartitionEditHashPage(partitionInfoList);
hashPage.setEditedPartitionInfo(editedPartitionInfo);
addPage(hashPage);
if (typePage != null) {
dialog.addPageChangedListener(hashPage);
}
} else if (partitionType == PartitionType.LIST) {
listPage = new PartitionEditListPage(dbInfo, schemaInfo, partitionInfoList, isNewTable);
listPage.setEditedPartitionInfo(editedPartitionInfo);
addPage(listPage);
if (typePage != null) {
dialog.addPageChangedListener(listPage);
}
} else {
rangePage = new PartitionEditRangePage(partitionInfoList);
rangePage.setEditedPartitionInfo(editedPartitionInfo);
addPage(rangePage);
if (typePage != null) {
dialog.addPageChangedListener(rangePage);
}
}
}
}
use of org.eclipse.jface.wizard.WizardDialog in project cubrid-manager by CUBRID.
the class CreateDatabaseWizard method addPages.
public void addPages() {
generalInfoPage = new GeneralInfoPage(server);
addPage(generalInfoPage);
volumeInfoPage = new VolumeInfoPage(server);
addPage(volumeInfoPage);
setAutoAddVolumeInfoPage = new SetAutoAddVolumeInfoPage(server);
addPage(setAutoAddVolumeInfoPage);
setDbaPasswordPage = new SetDbaPasswordPage();
addPage(setDbaPasswordPage);
databaseInfoPage = new DatabaseInfoPage(server);
addPage(databaseInfoPage);
WizardDialog dialog = (WizardDialog) getContainer();
dialog.addPageChangedListener(volumeInfoPage);
dialog.addPageChangedListener(setAutoAddVolumeInfoPage);
dialog.addPageChangedListener(setDbaPasswordPage);
dialog.addPageChangedListener(databaseInfoPage);
}
use of org.eclipse.jface.wizard.WizardDialog in project cubrid-manager by CUBRID.
the class CreateConnectionByUrlWizard method addPages.
/**
* Add wizard page
*/
public void addPages() {
inputUrlPage = new InputUrlPage();
addPage(inputUrlPage);
connectionPriviewPage = new ConnectionPriviewPage(inputUrlPage);
addPage(connectionPriviewPage);
WizardDialog dialog = (WizardDialog) getContainer();
dialog.addPageChangedListener(connectionPriviewPage);
}
use of org.eclipse.jface.wizard.WizardDialog in project sling by apache.
the class ImportContentAction method run.
private void run(ISelection currentSelection) {
if (!(currentSelection instanceof IStructuredSelection)) {
return;
}
IStructuredSelection structuredSelection = (IStructuredSelection) currentSelection;
for (Iterator<?> it = structuredSelection.iterator(); it.hasNext(); ) {
Object selected = it.next();
if (selected instanceof IResource) {
IProject project = (IProject) (((IResource) selected).getProject());
if (!ProjectHelper.isContentProject(project)) {
continue;
}
IModule module = ServerUtil.getModule(project);
if (module == null) {
continue;
}
ImportWizard wiz = new ImportWizard();
wiz.init(PlatformUI.getWorkbench(), structuredSelection);
WizardDialog dialog = new WizardDialog(PlatformUI.getWorkbench().getDisplay().getActiveShell(), wiz);
dialog.open();
}
}
}
use of org.eclipse.jface.wizard.WizardDialog in project sling by apache.
the class NewSightlyFileHandler method execute.
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
ISelection selection = HandlerUtil.getCurrentSelection(event);
NewSightlyFileWizard wiz = new NewSightlyFileWizard();
wiz.init(HandlerUtil.getActiveWorkbenchWindow(event).getWorkbench(), (IStructuredSelection) selection);
WizardDialog dialog = new WizardDialog(PlatformUI.getWorkbench().getDisplay().getActiveShell(), wiz);
dialog.open();
return null;
}
Aggregations