Example usage for org.eclipse.jface.wizard WizardDialog setTitle

List of usage examples for org.eclipse.jface.wizard WizardDialog setTitle

Introduction

In this page you can find the example usage for org.eclipse.jface.wizard WizardDialog setTitle.

Prototype

public void setTitle(String newTitle) 

Source Link

Document

Sets the title to be shown in the title area of this dialog.

Usage

From source file:ar.com.fluxit.jqa.handler.JQAHandler.java

License:Open Source License

@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
    Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
    WizardDialog dialog = new WizardDialog(shell, new JQAWizard());
    // TODO dialog title don't work
    dialog.setTitle("Run JQA");
    dialog.open();//from   ww w  .  jav a2 s  .  com
    return null;
}

From source file:ca.mcgill.cs.swevo.qualyzer.handlers.ExportProjectHandler.java

License:Open Source License

@Override
public Object execute(ExecutionEvent event) throws ExecutionException {

    Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
    ProjectExportWizard wizard = new ProjectExportWizard();
    WizardDialog wDialog = new WizardDialog(shell, wizard);
    wDialog.create();//ww  w .  jav  a 2s  .com
    wDialog.setTitle(DataTransferMessages.DataTransfer_export);
    wDialog.setBlockOnOpen(!fTesting);
    wDialog.open();
    fTester.execute(wDialog);

    return null;
}

From source file:ca.uvic.cs.tagsea.monitoring.internal.Monitoring.java

License:Open Source License

public static Monitoring getDefault() {
    final ArrayList<ITagSEAMonitor> newMonitors = new ArrayList<ITagSEAMonitor>();
    synchronized (LOCK) {
        if (instance != null)
            return instance;

        instance = new Monitoring();
        IConfigurationElement[] elements = Platform.getExtensionRegistry()
                .getConfigurationElementsFor("ca.uvic.cs.tagsea.monitor");
        for (IConfigurationElement element : elements) {
            try {
                ITagSEAMonitor monitor = (ITagSEAMonitor) element.createExecutableExtension("class");
                if (monitor != null) {
                    instance.allMonitors.add(monitor);
                    if (isNewMonitor(monitor)) {
                        newMonitors.add(monitor);
                    }//from   ww  w  . ja  v a2  s .c om
                }
            } catch (CoreException e) {
                TagSEAPlugin.log("Error Loading Plugin", e);
            }
        }

    }

    final Wizard wizard = new MonitorAcceptanceWizard();
    TagSEAPlugin.getDefault().getWorkbench().getDisplay().syncExec(new Runnable() {
        public void run() {
            synchronized (LOCK) {
                Shell shell = TagSEAPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getShell();
                instance.hookWorkbenchListeners();
                if (newMonitors.size() > 0) {
                    for (ITagSEAMonitor monitor : newMonitors) {
                        wizard.addPage(new MonitorAcceptanceWizardPage(monitor.getName(), monitor));
                    }
                    final WizardDialog d = new WizardDialog(shell, wizard);
                    d.setTitle("Monitor Acceptance");
                    //d.setMessage("In order to help with the research of TagSEA, some monitors....");
                    d.open();
                }
            }
        }
    });
    synchronized (LOCK) {
        instance.hookPreferences();
        instance.updatePreferences();
        instance.publisher.start();
        return instance;
    }

}

From source file:ch.gpb.elexis.kgexporter.handlers.KgExportHandler.java

License:Open Source License

/**
 * the command has been executed, so extract extract the needed information
 * from the application context.//from  w  w w. j a v a 2 s  .  com
 */
public Object execute(ExecutionEvent event) throws ExecutionException {
    IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindowChecked(event);
    activeShell = window.getShell();

    // init the selection
    ISelection selection = HandlerUtil.getActiveWorkbenchWindow(event).getActivePage().getSelection();
    if (selection instanceof IStructuredSelection) {

        IStructuredSelection strucSelection = (IStructuredSelection) selection;
        Object selected = strucSelection.getFirstElement();
        if (selected instanceof Patient) {
            patient = (Patient) selected;
            String msg = "Exporting Patient with ID: " + patient.getId();
            final KgExportWizard kgExportWizard = new KgExportWizard();

            WizardDialog wizardDialog = new WizardDialog(activeShell, kgExportWizard);
            wizardDialog.setTitle(msg);

            if (wizardDialog.open() == Window.OK) {
                CoreHub.userCfg.set(KgExportPreference.PREF_KGEXPORT_FOOTERTEXT,
                        kgExportWizard.getFooterText());

                UiDesk.asyncExec(new Runnable() {
                    public void run() {
                        export(kgExportWizard.getExportPath(), kgExportWizard.getSelectedCategories(),
                                kgExportWizard.getFooterText());

                    }
                });
            }

        }
    }

    return null;
}

From source file:cn.cstv.wspscm.commands.CreateOperatorCommand.java

License:Open Source License

@Override
public void execute() {
    /*/*  ww w .j av  a 2 s . com*/
    shell = new Shell(display, SWT.NONE);
    shell.setSize(503, 242);
    shell.setText("Select Type and Number");
            
    final Composite composite = new Composite(shell, SWT.NONE);
    composite.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));
    composite.setBounds(0, 0, 494, 64);
            
    shell.open();
    shell.layout();
    operator.setLocation(bounds.getLocation());
    operator.setSize(bounds.getSize());
    redo();
    */
    CreateOperatorWizard wizard = new CreateOperatorWizard("TypeOfOperator");
    WizardDialog dialog = new WizardDialog(shell, wizard);
    dialog.create();
    dialog.getShell().setSize(280, 325);

    dialog.setTitle("Set Operator Wizard");
    if (dialog.open() == WizardDialog.OK) {
        type = wizard.getType();
        num = wizard.getNum();
    }
    operator.setType(type);
    if (!num.equals("")) {
        operator.setNum(Integer.parseInt(num));
    }
    parent.addChild(operator);
    operator.setLocation(bounds.getLocation());//??operatorpoint
    operator.setSize(bounds.getSize());
}

From source file:cn.cstv.wspscm.commands.SetConstraintOfLineConnectionCommand.java

License:Open Source License

public void execute() {
    //       InputDialog dlg = new InputDialog(shell, "Gef Practice", "New node's name:", "Node", null);
    //       if (Window.OK == dlg.open()) {
    //           value = dlg.getValue();
    //       }//from  w  ww.  jav a  2 s  . co m
    if (typeOfConstraint.equals("Strict")) {
        lineConnection.setIsStrict_int(1);
    } else {
        CreateConstraintOfLineConnectionWizard wizard = new CreateConstraintOfLineConnectionWizard(
                typeOfConstraint);
        WizardDialog dialog = new WizardDialog(shell, wizard);
        dialog.create();
        dialog.getShell().setSize(280, 325);

        dialog.setTitle("Set Constraint Wizard");
        dialog.setMessage("Set " + typeOfConstraint);
        if (dialog.open() == WizardDialog.OK) {
            pastOrFuture = wizard.getPastOrFuture();
            value = wizard.getValue();
            constraint = wizard.getConstraint();
            reset = wizard.getReset();
        }

        if (typeOfConstraint.equals("PresentConstraint")) {
            oldValue = lineConnection.getPresentConstraintValue();
            oldConstraint = lineConnection.getPresentConstraintConstraint();
            oldReset = lineConnection.getPresentConstraintReset();
            lineConnection.setPresentConstraintValue(value);
            lineConnection.setPresentConstraintConstraint(constraint);
            lineConnection.setPresentConstraintReset(reset);
        } else if (typeOfConstraint.equals("BooleanConstraint")) {
            if (pastOrFuture.equals("Past")) {
                oldValue = lineConnection.getPastUnwantedMessageConstraintValue();
                oldConstraint = lineConnection.getPastUnwantedMessageConstraintConstraint();
                oldReset = lineConnection.getPastUnwantedMessageConstraintReset();
                lineConnection.setPastUnwantedMessageConstraintValue(value);
                lineConnection.setPastUnwantedMessageConstraintConstraint(constraint);
                lineConnection.setPastUnwantedMessageConstraintReset(reset);
            } else if (pastOrFuture.equals("Future")) {
                oldValue = lineConnection.getFutureUnwantedMessageConstraintValue();
                oldConstraint = lineConnection.getFutureUnwantedMessageConstraintConstraint();
                oldReset = lineConnection.getFutureUnwantedMessageConstraintReset();
                lineConnection.setFutureUnwantedMessageConstraintValue(value);
                lineConnection.setFutureUnwantedMessageConstraintConstraint(constraint);
                lineConnection.setFutureUnwantedMessageConstraintReset(reset);
            }
        } else if (typeOfConstraint.equals("UnwantedMessageConstraint")) {
            if (pastOrFuture.equals("Past")) {
                oldValue = lineConnection.getPastUnwantedMessageConstraintValue();
                oldConstraint = lineConnection.getPastUnwantedMessageConstraintConstraint();
                oldReset = lineConnection.getPastUnwantedMessageConstraintReset();
                lineConnection.setPastUnwantedMessageConstraintValue(value);
                lineConnection.setPastUnwantedMessageConstraintConstraint(constraint);
                lineConnection.setPastUnwantedMessageConstraintReset(reset);
            } else if (pastOrFuture.equals("Future")) {
                oldValue = lineConnection.getFutureUnwantedMessageConstraintValue();
                oldConstraint = lineConnection.getFutureUnwantedMessageConstraintConstraint();
                oldReset = lineConnection.getFutureUnwantedMessageConstraintReset();
                lineConnection.setFutureUnwantedMessageConstraintValue(value);
                lineConnection.setFutureUnwantedMessageConstraintConstraint(constraint);
                lineConnection.setFutureUnwantedMessageConstraintReset(reset);
            }
        } else if (typeOfConstraint.equals("Present")) {
            if (pastOrFuture.equals("Past")) {
                oldValue = lineConnection.getPresentPastValue();
                oldConstraint = lineConnection.getPresentPastConstraint();
                oldReset = lineConnection.getPresentPastReset();
                lineConnection.setPresentPastValue(value);
                lineConnection.setPresentPastConstraint(constraint);
                lineConnection.setPresentPastReset(reset);
            } else if (pastOrFuture.equals("Future")) {
                oldValue = lineConnection.getPresentFutureValue();
                oldConstraint = lineConnection.getPresentFutureConstraint();
                oldReset = lineConnection.getPresentFutureReset();
                lineConnection.setPresentFutureValue(value);
                lineConnection.setPresentFutureConstraint(constraint);
                lineConnection.setPresentFutureReset(reset);
            }
        } else if (typeOfConstraint.equals("WantedChainConstraint")) {
            if (pastOrFuture.equals("Past")) {
                oldValue = lineConnection.getPastWantedChainConstraintValue();
                oldConstraint = lineConnection.getPastWantedChainConstraintConstraint();
                oldReset = lineConnection.getPastWantedChainConstraintReset();
                lineConnection.setPastWantedChainConstraintValue(value);
                lineConnection.setPastWantedChainConstraintConstraint(constraint);
                lineConnection.setPastWantedChainConstraintReset(reset);
            } else if (pastOrFuture.equals("Future")) {
                oldValue = lineConnection.getFutureWantedChainConstraintValue();
                oldConstraint = lineConnection.getFutureWantedChainConstraintConstraint();
                oldReset = lineConnection.getFutureWantedChainConstraintReset();
                lineConnection.setFutureWantedChainConstraintValue(value);
                lineConnection.setFutureWantedChainConstraintConstraint(constraint);
                lineConnection.setFutureWantedChainConstraintReset(reset);
            }
        } else if (typeOfConstraint.equals("UnwantedChainConstraint")) {
            if (pastOrFuture.equals("Past")) {
                oldValue = lineConnection.getPastUnwantedChainConstraintValue();
                oldConstraint = lineConnection.getPastUnwantedChainConstraintConstraint();
                oldReset = lineConnection.getPastUnwantedChainConstraintReset();
                lineConnection.setPastUnwantedChainConstraintValue(value);
                lineConnection.setPastUnwantedChainConstraintConstraint(constraint);
                lineConnection.setPastUnwantedChainConstraintReset(reset);
            } else if (pastOrFuture.equals("Future")) {
                oldValue = lineConnection.getFutureUnwantedChainConstraintValue();
                oldConstraint = lineConnection.getFutureUnwantedChainConstraintConstraint();
                oldReset = lineConnection.getFutureUnwantedChainConstraintReset();
                lineConnection.setFutureUnwantedChainConstraintValue(value);
                lineConnection.setFutureUnwantedChainConstraintConstraint(constraint);
                lineConnection.setFutureUnwantedChainConstraintReset(reset);
            }
        }

    }

}

From source file:com.appnativa.studio.Studio.java

License:Open Source License

public static void openWizard(String id, Shell shell) {
    // First see if this is a "new wizard".
    IWizardDescriptor descriptor = PlatformUI.getWorkbench().getNewWizardRegistry().findWizard(id);

    // If not check if it is an "import wizard".
    if (descriptor == null) {
        descriptor = PlatformUI.getWorkbench().getImportWizardRegistry().findWizard(id);
    }/*from   w w w. j ava  2s . c  o m*/

    // Or maybe an export wizard
    if (descriptor == null) {
        descriptor = PlatformUI.getWorkbench().getExportWizardRegistry().findWizard(id);
    }

    try {
        // Then if we have a wizard, open it.
        if (descriptor != null) {
            IWizard wizard = descriptor.createWizard();
            WizardDialog wd = new WizardDialog(shell, wizard);

            wd.setTitle(wizard.getWindowTitle());
            wd.open();
        }
    } catch (CoreException e) {
        e.printStackTrace();
    }
}

From source file:com.mercatis.lighthouse3.ui.status.handler.EditErrorTemplateHandler.java

License:Apache License

@Override
protected void execute(Object element) throws ExecutionException {
    if (element instanceof StatusEditingObject) {
        StatusEditingObject statusEditingObject = (StatusEditingObject) element;
        final Status status = statusEditingObject.getStatus();
        LighthouseDomain lighthouseDomain = CommonBaseActivator.getPlugin().getStatusService()
                .getLighthouseDomainForEntity(status);

        TemplateEditor wizard = new TemplateEditor(lighthouseDomain, status.getErrorTemplate());
        WizardDialog dialog = new WizardDialog(Display.getCurrent().getActiveShell(), wizard);
        dialog.create();/*from  w ww  . j a v  a2 s  .co m*/
        dialog.getShell().setText("Template editor");
        dialog.setTitle("Edit Error template on " + LabelConverter.getLabel(status));
        dialog.setMessage("An event matching this template will result in an erroneous status.");
        if (dialog.open() == Window.OK) {
            BusyIndicator.showWhile(null, new Runnable() {
                public void run() {
                    CommonBaseActivator.getPlugin().getStatusService().updateStatus(status);
                }
            });
        }
    }
}

From source file:com.mercatis.lighthouse3.ui.status.handler.EditNotificationSettingsHandler.java

License:Apache License

@Override
protected void execute(Object element) throws ExecutionException {
    if (element instanceof StatusEditingObject) {
        StatusEditingObject statusEditingObject = (StatusEditingObject) element;
        final Status status = statusEditingObject.getStatus();
        LighthouseDomain lighthouseDomain = CommonBaseActivator.getPlugin().getStatusService()
                .getLighthouseDomainForEntity(status);

        StatusNotificationEditor wizard = new StatusNotificationEditor(lighthouseDomain, status);
        WizardDialog dialog = new WizardDialog(Display.getCurrent().getActiveShell(), wizard);
        dialog.create();//from  w w w  . j a  v  a2  s .c  o m
        dialog.getShell().setText("Status Notification Editor");
        dialog.setTitle("Edit status notification template on " + LabelConverter.getLabel(status));
        dialog.setMessage("Please provide information about the receiver and the email templates.");
        if (dialog.open() == Window.OK) {
            BusyIndicator.showWhile(null, new Runnable() {
                public void run() {
                    CommonBaseActivator.getPlugin().getStatusService().updateStatus(status);
                }
            });
        }
    }
}

From source file:com.mercatis.lighthouse3.ui.status.handler.EditOkTemplateHandler.java

License:Apache License

@Override
protected void execute(Object element) throws ExecutionException {
    if (element instanceof StatusEditingObject) {
        StatusEditingObject statusEditingObject = (StatusEditingObject) element;
        final Status status = statusEditingObject.getStatus();
        LighthouseDomain lighthouseDomain = CommonBaseActivator.getPlugin().getStatusService()
                .getLighthouseDomainForEntity(status);

        TemplateEditor wizard = new TemplateEditor(lighthouseDomain, status.getOkTemplate());
        WizardDialog dialog = new WizardDialog(Display.getCurrent().getActiveShell(), wizard);
        dialog.create();/*  w  ww.  j av a 2  s .  co  m*/
        dialog.getShell().setText("Template editor");
        dialog.setTitle("Edit OK template on " + LabelConverter.getLabel(status));
        dialog.setMessage("An event matching this template will result in an ok status.");
        if (dialog.open() == Window.OK) {
            BusyIndicator.showWhile(null, new Runnable() {
                public void run() {
                    CommonBaseActivator.getPlugin().getStatusService().updateStatus(status);
                }
            });
        }
    }
}