Example usage for org.eclipse.jface.window Window open

List of usage examples for org.eclipse.jface.window Window open

Introduction

In this page you can find the example usage for org.eclipse.jface.window Window open.

Prototype

public int open() 

Source Link

Document

Opens this window, creating it first if it has not yet been created.

Usage

From source file:com.aptana.ide.debug.internal.ui.actions.PopupInspectAction.java

License:Open Source License

private void showPopup32(IWatchExpressionResult result) {
    expression = new JSInspectExpression(result);
    Window displayPopup = null;

    /*/*from   w  w  w  .  j av a 2s  . co  m*/
     * Compatibility replacement for: new org.eclipse.debug.ui.InspectPopupDialog(getShell(),
     * getPopupAnchor(viewer), ACTION_DEFININIITION_ID, expression);
     */
    try {
        Class clazz = Class.forName("org.eclipse.debug.ui.InspectPopupDialog"); //$NON-NLS-1$
        Constructor constructor = clazz
                .getConstructor(new Class[] { Shell.class, Point.class, String.class, IExpression.class });
        displayPopup = (Window) constructor.newInstance(
                new Object[] { getShell(), getPopupAnchor(viewer), ACTION_DEFININIITION_ID, expression });
    } catch (Exception e) {
        IdeLog.logError(DebugUiPlugin.getDefault(), StringUtils.EMPTY, e);
    }
    if (displayPopup != null) {
        displayPopup.open();
    }
}

From source file:com.aptana.js.debug.ui.internal.actions.PopupInspectAction.java

License:Open Source License

/**
 * showPopup/*from w ww . jav  a2s  .  co m*/
 * 
 * @param result
 */
protected void showPopup(final IWatchExpressionResult result) {
    expression = JSDebugModel.createInspectExpression(result);
    Window displayPopup = new InspectPopupDialog(getShell(), getPopupAnchor(viewer), ACTION_DEFININIITION_ID,
            expression);
    if (displayPopup != null) {
        displayPopup.open();
    }
}

From source file:org.drools.eclipse.rulebuilder.ui.RuleModeller.java

License:Apache License

private void createAddToolItem(Section sect, final Window popup) {
    ToolBar tbar = new ToolBar(sect, SWT.FLAT | SWT.HORIZONTAL);
    ToolItem titem = new ToolItem(tbar, SWT.SEPARATOR);
    titem = new ToolItem(tbar, SWT.PUSH);
    titem.setImage(PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_TOOL_NEW_WIZARD));

    titem.addListener(SWT.Selection, new Listener() {
        public void handleEvent(Event event) {
            popup.open();
        }/*from   www . j a  va  2 s.c  om*/
    });
    sect.setTextClient(tbar);
}

From source file:org.eclipse.ease.modules.incubation.DialogModule.java

License:Open Source License

/**
 * Open a dialog/*from  ww  w .  j a v  a  2s .  com*/
 * 
 * @param window
 *            A Window to open
 * @return window.open().
 */
@WrapToScript
public static int openDialog(final Window window) {
    RunnableWithResult<Integer> run = new RunnableWithResult<Integer>() {

        @Override
        public void run() {
            setResult(window.open());
        }
    };
    Display.getDefault().syncExec(run);
    return run.getResult();
}

From source file:org.eclipse.ease.modules.incubation.DialogModule.java

License:Open Source License

public static void openWindow(final Window window) {
    Runnable runnable = new Runnable() {

        @Override//www.  j a v  a  2 s . c  o m
        public void run() {
            window.open();
        }
    };
    Display.getDefault().syncExec(runnable);
}

From source file:org.eclipse.ease.modules.platform.UIModule.java

License:Open Source License

/**
 * Show a generic dialog.//from   w  w  w . ja va 2  s  . c  o  m
 *
 * @param dialog
 *            dialog to display
 * @return result of dialog.open() method
 */
@WrapToScript
public static int openDialog(final Window dialog) {
    final RunnableWithResult<Integer> run = new RunnableWithResult<Integer>() {

        @Override
        public void run() {
            setResult(dialog.open());
        }
    };
    Display.getDefault().syncExec(run);

    return run.getResult();
}

From source file:org.eclipse.jpt.common.ui.tests.internal.jface.DelegatingLabelProviderUiTest.java

License:Open Source License

public static void main(String[] args) {
    Window window = new DelegatingLabelProviderUiTest();
    window.setBlockOnOpen(true);/*from  www .ja va 2s.  co m*/
    window.open();

    Display.getCurrent().dispose();
    System.exit(0);
}

From source file:org.eclipse.jpt.common.ui.tests.internal.jface.DelegatingTreeContentProviderUiTest.java

License:Open Source License

public static void main(String[] args) {
    Window window = new DelegatingTreeContentProviderUiTest();
    window.setBlockOnOpen(true);// ww w .  j  a  v a  2s  . c o m
    window.open();

    Display.getCurrent().dispose();
    System.exit(0);
}

From source file:org.eclipse.jpt.common.ui.tests.internal.swt.TriStateCheckBoxModelAdapterUITest.java

License:Open Source License

public static void main(String[] args) throws Exception {
    Window window = new TriStateCheckBoxModelAdapterUITest(args);
    window.setBlockOnOpen(true);/*from ww w.  j a v a  2 s .c o m*/
    window.open();
    Display.getCurrent().dispose();
    System.exit(0);
}

From source file:org.eclipse.jpt.common.ui.tests.internal.utility.swt.BooleanStateControllerUITest.java

License:Open Source License

public static void main(String[] args) throws Exception {
    Window window = new BooleanStateControllerUITest(args);
    window.setBlockOnOpen(true);/*from ww  w  . ja  v  a  2  s.com*/
    window.open();
    Display.getCurrent().dispose();
    System.exit(0);
}