Example usage for org.eclipse.jface.dialogs MessageDialog openWarning

List of usage examples for org.eclipse.jface.dialogs MessageDialog openWarning

Introduction

In this page you can find the example usage for org.eclipse.jface.dialogs MessageDialog openWarning.

Prototype

public static void openWarning(Shell parent, String title, String message) 

Source Link

Document

Convenience method to open a standard warning dialog.

Usage

From source file:com.centurylink.mdw.plugin.project.WorkflowProjectManager.java

License:Apache License

public void deleteProject(WorkflowProject workflowProject) {
    if (!workflowProject.isRemote() && !workflowProject.isCloudProject())
        throw new RuntimeException("Can only delete remote or cloud projects");
    workflowProject.shutdownNoticeChecks();
    deRegisterProject(workflowProject);/*from   www.j a  v  a2 s . co m*/
    try {
        workflowProject.getSourceProject().delete(true, null);
    } catch (CoreException ex) {
        if (ex instanceof ResourceException
                && ex.getMessage().startsWith("Problems encountered while deleting"))
            MessageDialog.openWarning(MdwPlugin.getShell(), "Problems Deleting",
                    "Not all resources under project '" + workflowProject.getName()
                            + "' could be deleted.\nPlease delete the project manually on the file system.");
        else
            PluginMessages.uiError(ex, "Delete Project", workflowProject);
    }
    if (getWorkflowProjects().contains(workflowProject)) {
        getWorkflowProjects().remove(workflowProject);
        fireProjectChangeEvent(workflowProject, ChangeType.ELEMENT_DELETE);
    }
}

From source file:com.centurylink.mdw.plugin.server.JavaSourceHyperlink.java

License:Apache License

private void cantFindSourceWarning() {
    String msg = "Can't locate source code for:\n" + getTypeName()
            + "\nMake sure an MDW workflow project is deployed.";
    MessageDialog.openWarning(MdwPlugin.getShell(), "No Java Element Selected", msg);
}

From source file:com.centurylink.mdw.plugin.server.JBossServerConfigurator.java

License:Apache License

public void doConfigure(Shell shell) {
    MessageDialog.openWarning(shell, "TODO", "Not yet implemented for JBoss");
}

From source file:com.centurylink.mdw.plugin.server.JBossServerConfigurator.java

License:Apache License

public void doDeploy(Shell shell) {
    MessageDialog.openWarning(shell, "TODO", "Not yet implemented for JBoss");
}

From source file:com.centurylink.mdw.plugin.server.JBossServerConfigurator.java

License:Apache License

public String launchNewServerCreation(Shell shell) {

    MessageDialog.openWarning(shell, "TODO", "Not yet implemented for JBoss");
    return null;
}

From source file:com.centurylink.mdw.plugin.server.WebLogicServerConfigurator.java

License:Apache License

public void doConfigure(Shell shell) {
    setShell(shell);//from w  ww  . j a  v a  2  s  . c  o m

    try {
        ProgressMonitorDialog pmDialog = new MdwProgressMonitorDialog(shell);
        pmDialog.run(true, true, this);
    } catch (InvocationTargetException ex) {
        PluginMessages.uiError(shell, ex, "Configure Server", getServerSettings().getProject());
    } catch (InterruptedException ex) {
        PluginMessages.log(ex);
        MessageDialog.openWarning(shell, "Configure Server", "Configuration cancelled");
    }
}

From source file:com.centurylink.mdw.plugin.server.WebLogicServerConfigurator.java

License:Apache License

public void doDeploy(Shell shell) {
    setShell(shell);//from w w  w  . j  av  a2  s.c  om
    deployOnly = true;
    try {
        ProgressMonitorDialog pmDialog = new MdwProgressMonitorDialog(shell);
        pmDialog.run(true, true, this);
    } catch (InvocationTargetException ex) {
        PluginMessages.uiError(shell, ex, "Server Deploy", getServerSettings().getProject());
    } catch (InterruptedException ex) {
        PluginMessages.log(ex);
        MessageDialog.openWarning(shell, "Server Deploy", "Deployment cancelled");
    }
}

From source file:com.cisco.yangide.ext.model.editor.dialog.ChooseParentModuleDialog.java

License:Open Source License

@Override
protected void okPressed() {
    computeResult();/*from w ww. ja  v a 2s .co  m*/
    if (null == getFirstResult()) {
        MessageDialog.openWarning(getShell(), "Warning", "No module was choosen");
    } else if (null == prefix.getText() || prefix.getText().isEmpty()) {
        MessageDialog.openWarning(getShell(), "Warning", "Prefix is not defined");
    } else {
        setResultObject();
        super.okPressed();
    }
}

From source file:com.cisco.yangide.ext.model.editor.dialog.YangElementListSelectionDialog.java

License:Open Source License

@Override
protected void okPressed() {
    computeResult();/*w  ww .  jav a 2  s. com*/
    if (null == getFirstResult()) {

        MessageDialog.openWarning(getShell(), "Warning", "No element was choosen");
    } else {
        setResultObject();
        super.okPressed();
    }
}

From source file:com.cisco.yangide.ext.model.editor.YangMultiPageEditorPart.java

License:Open Source License

@Override
protected void pageChange(int newPageIndex) {
    if (newPageIndex == 1) {
        modelSynchronizer.syncWithSource();
        if (modelSynchronizer.isSourceInvalid()) {
            MessageDialog.openWarning(getSite().getShell(), "Yang source is invalid",
                    "Yang source has syntax error and diagram view cannot be synchronized correctly.\n"
                            + "Please correct syntax error first.");
        }/*  w w  w  .  j a  va2 s . co m*/
        yangSourceViewer.disableProjection();
        if (yangSourceViewer.getReconciler() != null) {
            yangSourceViewer.getReconciler().uninstall();
        }
        yangSourceViewer.disableTextListeners();
        try {
            getEditorSite().getPage().showView("org.eclipse.ui.views.PropertySheet");
        } catch (PartInitException e) {
            YangEditorPlugin.log(e);
        }
        yangDiagramEditor.startSourceSelectionUpdater();
    } else {
        yangDiagramEditor.stopSourceSelectionUpdater();
        IRegion highlightRange = yangSourceEditor.getHighlightRange();
        yangSourceViewer.enableTextListeners();
        yangSourceViewer.updateDocument();

        yangSourceViewer.enableProjection();
        if (yangSourceViewer.getReconciler() != null) {
            yangSourceViewer.getReconciler().install(yangSourceEditor.getViewer());
        }
        setSourceSelection(highlightRange);
    }
    super.pageChange(newPageIndex);
}