Examples of DialogMemento


Examples of org.python.pydev.core.uiutils.DialogMemento

     * Constructor
     */
    public GlobalsTwoPaneElementSelector(Shell parent) {
        super(parent, new NameIInfoLabelProvider(false), new ModuleIInfoLabelProvider());
        setTitle("PyDev: Globals Browser");
        memento = new DialogMemento(getShell(), "com.python.pydev.analysis.actions.GlobalsTwoPaneElementSelector");
    }
View Full Code Here

Examples of org.python.pydev.core.uiutils.DialogMemento

        PyEdit pyEdit = getPyEdit();
        final Tuple<String, IInterpreterManager> launchConfigurationTypeAndInterpreterManager = this
                .getLaunchConfigurationTypeAndInterpreterManager(pyEdit, true);

        final DialogMemento memento = new DialogMemento(getShell(),
                "org.python.pydev.debug.ui.actions.RunEditorAsCustomUnitTestAction");
        SimpleNode ast = pyEdit.getAST();

        TreeSelectionDialog dialog = new TreeSelectionDialog(getShell(), new SelectTestLabelProvider(),
                new SelectTestTreeContentProvider()) {

            Link configTestRunner;

            public boolean close() {
                memento.writeSettings(getShell());
                return super.close();
            }

            public Control createDialogArea(Composite parent) {
                memento.readSettings();
                Control ret = super.createDialogArea(parent);
                this.text.addKeyListener(new KeyListener() {

                    public void keyReleased(KeyEvent e) {
                    }

                    public void keyPressed(KeyEvent e) {
                        if (e.keyCode == SWT.CR || e.keyCode == SWT.LF || e.keyCode == SWT.KEYPAD_CR) {
                            okPressed();
                        }
                    }
                });
                return ret;
            }

            /* (non-Javadoc)
             * @see org.python.pydev.ui.dialogs.TreeSelectionDialog#createButtonBar(org.eclipse.swt.widgets.Composite)
             */
            @Override
            protected Control createButtonBar(Composite parent) {
                configTestRunner = new Link(parent, SWT.PUSH);
                configTestRunner.setText(" <a>Configure test runner</a>");
                configTestRunner.addSelectionListener(new SelectionAdapter() {
                    public void widgetSelected(SelectionEvent e) {
                        PyUnitPrefsPage2.showPage();
                    }

                });
                return configTestRunner;
            }

            protected Point getInitialSize() {
                return memento.getInitialSize(super.getInitialSize(), getShell());
            }

            protected Point getInitialLocation(Point initialSize) {
                return memento.getInitialLocation(initialSize, super.getInitialLocation(initialSize), getShell());
            }

            /*
             * @see SelectionStatusDialog#computeResult()
             */
 
View Full Code Here

Examples of org.python.pydev.core.uiutils.DialogMemento

     */
    public SelectExistingOrCreateNewDialog(Shell parent, IPreferenceStore preferenceStore, String preferenceKey,
            String shellMementoId) {

        super(parent, new ToStringLabelProvider(), new StringFromListContentProvider());
        this.memento = new DialogMemento(parent, shellMementoId);
        this.preferenceStore = preferenceStore;

        final String initialValue = preferenceStore.getString(preferenceKey);

        this.preferenceKey = preferenceKey;
View Full Code Here

Examples of org.python.pydev.core.uiutils.DialogMemento

    private PyOutlineSelectionDialog(Shell shell) {
        super(shell, createLabelProvider(), new TreeNodeContentProvider());
        setShellStyle(getShellStyle() & ~SWT.APPLICATION_MODAL); //Not modal because then the user may cancel the progress.
        if (CorePlugin.getDefault() != null) {
            memento = new DialogMemento(getShell(), "com.python.pydev.actions.PyShowOutline");
        } else {
            memento = null;
        }

        setMessage("Filter (press enter to go to selected element)");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.