Examples of PyConfigureExceptionDialog


Examples of org.python.pydev.debug.ui.PyConfigureExceptionDialog

public class PyConfigureExceptionAction extends PyAction implements IWorkbenchWindowActionDelegate {

    public void run(IAction action) {

        PyConfigureExceptionDialog dialog = new PyConfigureExceptionDialog(getShell(), "",
                new PyExceptionListProvider(), new LabelProvider(), "");

        dialog.setInitialElementSelections(PyExceptionBreakPointManager.getInstance().getExceptionsList());
        dialog.setTitle("Add Python Exception Breakpoint");
        if (dialog.open() == PyConfigureExceptionDialog.OK) {

            Object[] selectedItems = dialog.getResult();
            String[] exceptionArray;
            if (selectedItems != null) {
                exceptionArray = new String[selectedItems.length];
                System.arraycopy(selectedItems, 0, exceptionArray, 0, selectedItems.length);
            } else {
                exceptionArray = new String[0];
            }
            PyExceptionBreakPointManager.getInstance().setBreakOn(dialog.getResultHandleCaughtExceptions(),
                    dialog.getResultHandleUncaughtExceptions(), exceptionArray);
        }
    }
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.