Examples of PyBreakpoint


Examples of org.python.pydev.debug.model.PyBreakpoint

    /**
     * Creates the labels displayed for the breakpoint.
     * @param parent
     */
    protected void createLabels(Composite parent) {
        PyBreakpoint breakpoint = (PyBreakpoint) getElement();
        Composite labelComposite = createComposite(parent, 2);
        String typeName = breakpoint.getFile();
        if (typeName != null) {
            createLabel(labelComposite, "File"); //$NON-NLS-1$
            createLabel(labelComposite, typeName);
        }
        createTypeSpecificLabels(labelComposite);
View Full Code Here

Examples of org.python.pydev.debug.model.PyBreakpoint

     * breakpoint page.
     * @param parent
     */
    protected void createTypeSpecificLabels(Composite parent) {
        //         Line number
        PyBreakpoint breakpoint = (PyBreakpoint) getBreakpoint();
        StringBuffer lineNumber = new StringBuffer(4);
        try {
            int lNumber = breakpoint.getLineNumber();
            if (lNumber > 0) {
                lineNumber.append(lNumber);
            }
        } catch (CoreException ce) {
            PydevDebugPlugin.log(IStatus.ERROR, ce.getLocalizedMessage(), ce);
View Full Code Here

Examples of org.python.pydev.debug.model.PyBreakpoint

    * Allows subclasses to add type specific editors to the common Java
    * breakpoint page.
    * @param parent
    */
    protected void createTypeSpecificEditors(Composite parent) throws CoreException {
        PyBreakpoint breakpoint = (PyBreakpoint) getBreakpoint();
        if (breakpoint.supportsCondition()) {
            createConditionEditor(parent);
        }
    }
View Full Code Here

Examples of org.python.pydev.debug.model.PyBreakpoint

     * @see org.eclipse.jface.preference.IPreferencePage#performOk()
     */
    public boolean performOk() {
        IWorkspaceRunnable wr = new IWorkspaceRunnable() {
            public void run(IProgressMonitor monitor) throws CoreException {
                PyBreakpoint breakpoint = getBreakpoint();
                boolean delOnCancel = breakpoint.getMarker().getAttribute(ATTR_DELETE_ON_CANCEL) != null;
                if (delOnCancel) {
                    // if this breakpoint is being created, remove the "delete on cancel" attribute
                    // and register with the breakpoint manager
                    breakpoint.getMarker().setAttribute(ATTR_DELETE_ON_CANCEL, (String) null);
                    breakpoint.setRegistered(true);
                }
                doStore();
            }
        };
        try {
View Full Code Here

Examples of org.python.pydev.debug.model.PyBreakpoint

     * Stores the values configured in this page. This method
     * should be called from within a workspace runnable to
     * reduce the number of resource deltas.
     */
    protected void doStore() throws CoreException {
        PyBreakpoint breakpoint = getBreakpoint();
        storeEnabled(breakpoint);

        if (fConditionEditor != null) {
            boolean enableCondition = fEnableConditionButton.getSelection();
            String condition = fConditionEditor.getCondition();
            //boolean suspendOnTrue= fConditionIsTrue.getSelection();
            boolean suspendOnTrue = true;
            if (breakpoint.isConditionEnabled() != enableCondition) {
                breakpoint.setConditionEnabled(enableCondition);
            }
            if (!condition.equals(breakpoint.getCondition())) {
                breakpoint.setCondition(condition);
            }
        }
    }
View Full Code Here

Examples of org.python.pydev.debug.model.PyBreakpoint

     * condition
     * @param parent the composite in which the condition editor should be created
     * @throws CoreException if an exception occurs accessing the breakpoint
     */
    private void createConditionEditor(Composite parent) throws CoreException {
        PyBreakpoint breakpoint = (PyBreakpoint) getBreakpoint();

        String label = null;
        ICommandManager commandManager = PlatformUI.getWorkbench().getCommandSupport().getCommandManager();
        ICommand command = commandManager.getCommand("org.eclipse.ui.edit.text.contentAssist.proposals"); //$NON-NLS-1$
        if (command != null) {
            List keyBindings = command.getKeySequenceBindings();
            if (keyBindings != null && keyBindings.size() > 0) {
                IKeySequenceBinding binding = (IKeySequenceBinding) keyBindings.get(0);
                label = MessageFormat.format("E&nable Condition", new String[] { binding.getKeySequence().format() }); //$NON-NLS-1$
            }
        }

        if (label == null) {
            label = "E&nable Condition (code assist not available)"; //$NON-NLS-1$
        }
        Composite conditionComposite = new Group(parent, SWT.NONE);
        conditionComposite.setFont(parent.getFont());
        conditionComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
        conditionComposite.setLayout(new GridLayout());
        fEnableConditionButton = createCheckButton(conditionComposite, label);
        fEnableConditionButton.setSelection(breakpoint.isConditionEnabled());
        fEnableConditionButton.addSelectionListener(new SelectionAdapter() {
            public void widgetSelected(SelectionEvent e) {
                setConditionEnabled(fEnableConditionButton.getSelection());
            }
        });
View Full Code Here

Examples of org.python.pydev.debug.model.PyBreakpoint

            IWorkspaceRunnable runnable = new IWorkspaceRunnable() {
                public void run(IProgressMonitor monitor) throws CoreException {
                    IMarker marker = resource.createMarker(PyBreakpoint.PY_BREAK_MARKER);
                    marker.setAttributes(map);
                    PyBreakpoint br = new PyBreakpoint();
                    br.setMarker(marker);
                    IBreakpointManager breakpointManager = DebugPlugin.getDefault().getBreakpointManager();
                    breakpointManager.addBreakpoint(br);
                }
            };
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.