Search in sources :

Example 26 with WizardDialog

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);
            }
        }
    }
}
Also used : PartitionType(com.cubrid.common.core.common.model.PartitionType) WizardDialog(org.eclipse.jface.wizard.WizardDialog)

Example 27 with WizardDialog

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);
}
Also used : WizardDialog(org.eclipse.jface.wizard.WizardDialog)

Example 28 with WizardDialog

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);
}
Also used : WizardDialog(org.eclipse.jface.wizard.WizardDialog)

Example 29 with WizardDialog

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();
        }
    }
}
Also used : IModule(org.eclipse.wst.server.core.IModule) ImportWizard(org.apache.sling.ide.eclipse.ui.wizards.ImportWizard) IStructuredSelection(org.eclipse.jface.viewers.IStructuredSelection) WizardDialog(org.eclipse.jface.wizard.WizardDialog) IResource(org.eclipse.core.resources.IResource) IProject(org.eclipse.core.resources.IProject)

Example 30 with WizardDialog

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;
}
Also used : ISelection(org.eclipse.jface.viewers.ISelection) WizardDialog(org.eclipse.jface.wizard.WizardDialog)

Aggregations

WizardDialog (org.eclipse.jface.wizard.WizardDialog)115 ISelection (org.eclipse.jface.viewers.ISelection)26 Shell (org.eclipse.swt.widgets.Shell)26 IStructuredSelection (org.eclipse.jface.viewers.IStructuredSelection)25 IWorkbench (org.eclipse.ui.IWorkbench)14 IRepositoryNode (org.talend.repository.model.IRepositoryNode)13 RepositoryNode (org.talend.repository.model.RepositoryNode)13 IPath (org.eclipse.core.runtime.IPath)12 IStatus (org.eclipse.core.runtime.IStatus)10 IWorkbenchPage (org.eclipse.ui.IWorkbenchPage)10 IFile (org.eclipse.core.resources.IFile)9 Status (org.eclipse.core.runtime.Status)7 PartInitException (org.eclipse.ui.PartInitException)7 ArrayList (java.util.ArrayList)6 IProgressMonitor (org.eclipse.core.runtime.IProgressMonitor)6 Composite (org.eclipse.swt.widgets.Composite)6 CoreException (org.eclipse.core.runtime.CoreException)5 IWorkbenchWindow (org.eclipse.ui.IWorkbenchWindow)5 File (java.io.File)4 InvocationTargetException (java.lang.reflect.InvocationTargetException)4