Examples of IBreakpointManager


Examples of org.eclipse.debug.core.IBreakpointManager

  }

  protected IBreakpoint[] findBreakpoints(String localPath,
      PHPDebugTarget debugTarget) {

    IBreakpointManager breakpointManager = debugTarget
        .getBreakpointManager();
    if (!breakpointManager.isEnabled()) {
      return new IBreakpoint[0];
    }

    IBreakpoint[] breakpoints = breakpointManager
        .getBreakpoints(IPHPDebugConstants.ID_PHP_DEBUG_CORE);
    List<IBreakpoint> l = new LinkedList<IBreakpoint>();

    for (IBreakpoint bp : breakpoints) {
View Full Code Here

Examples of org.eclipse.debug.core.IBreakpointManager

    // copy markers
    IWorkspaceRoot resource = ResourcesPlugin.getWorkspace().getRoot();
    try {
      IMarker[] markers = resource.findMarkers(null, true,
          IResource.DEPTH_ZERO);
      final IBreakpointManager breakpointManager = DebugPlugin
          .getDefault().getBreakpointManager();
      for (IMarker marker : markers) {
        String markerType = MarkerUtilities.getMarkerType(marker);
        if (markerType != null) {
          String fileName = (String) marker
              .getAttribute(StructuredResourceMarkerAnnotationModel.SECONDARY_ID_KEY);
          if (fileName != null && new File(fileName).equals(oldFile)) {
            IBreakpoint breakpoint = breakpointManager
                .getBreakpoint(marker);
            if (breakpoint != null) {
              if (newFile != null) {
                IMarker createdMarker = newFile
                    .createMarker(markerType);
                createdMarker.setAttributes(breakpoint
                    .getMarker().getAttributes());
                breakpointManager.removeBreakpoint(breakpoint,
                    true);
                breakpoint.setMarker(createdMarker);
                breakpointManager.addBreakpoint(breakpoint);
              } else {
                breakpointManager.removeBreakpoint(breakpoint,
                    true);
              }
            } else {
              if (newFile != null) {
                MarkerUtilities.createMarker(newFile, marker
View Full Code Here

Examples of org.eclipse.debug.core.IBreakpointManager

          // get it from the workspace root
          allMarkers = resource.getWorkspace().getRoot().findMarkers(
              IBreakpoint.LINE_BREAKPOINT_MARKER, true,
              IResource.DEPTH_ZERO);
          IBreakpointManager manager = DebugPlugin.getDefault()
              .getBreakpointManager();
          if (allMarkers != null) {
            for (IMarker marker : allMarkers) {
              if (manager.getBreakpoint(marker) != null) {
                String markerSecondaryId = marker
                    .getAttribute(
                        StructuredResourceMarkerAnnotationModel.SECONDARY_ID_KEY,
                        null);
                if ((secondaryId == null || secondaryId
View Full Code Here

Examples of org.eclipse.debug.core.IBreakpointManager

          String secondaryId = getSecondaryId(textEditor);
          allMarkers = resource.getWorkspace().getRoot().findMarkers(
              IBreakpoint.BREAKPOINT_MARKER, true,
              IResource.DEPTH_ZERO);
          if (allMarkers != null) {
            IBreakpointManager manager = DebugPlugin.getDefault()
                .getBreakpointManager();
            for (IMarker marker : allMarkers) {
              if (manager.getBreakpoint(marker) != null) {
                String markerSecondaryId = marker
                    .getAttribute(
                        StructuredResourceMarkerAnnotationModel.SECONDARY_ID_KEY,
                        null);
                if ((secondaryId == null || secondaryId
View Full Code Here

Examples of org.eclipse.debug.core.IBreakpointManager

  // Return the markers
  // TODO - This is buggy since the lines might be different now.
  private void reinsertMarkers(IMarker[] allMarkers, IFile file)
      throws CoreException {
    final IBreakpointManager breakpointManager = DebugPlugin.getDefault()
        .getBreakpointManager();
    if (allMarkers != null) {
      for (IMarker marker : allMarkers) {
        String markerType = MarkerUtilities.getMarkerType(marker);
        if (markerType != null) {
          IBreakpoint breakpoint = breakpointManager
              .getBreakpoint(marker);
          if (breakpoint != null) {
            IMarker createdMarker = file.createMarker(markerType);
            createdMarker.setAttributes(breakpoint.getMarker()
                .getAttributes());
            breakpointManager.removeBreakpoint(breakpoint, true);
            breakpoint.setMarker(createdMarker);
            breakpointManager.addBreakpoint(breakpoint);
          } else {
            MarkerUtilities.createMarker(file,
                marker.getAttributes(), markerType);
          }
        }
View Full Code Here

Examples of org.eclipse.debug.core.IBreakpointManager

        IResource resource = getResource(editor.getEditorInput());
        AbstractMarkerAnnotationModel model = getAnnotationModel(editor);
        IBreakpoint[] breakpoints = getBreakpoints(resource, document,
            model, lineNumber);
        if (breakpoints.length > 0) {
          IBreakpointManager breakpointManager = DebugPlugin
              .getDefault().getBreakpointManager();
          for (int i = 0; i < breakpoints.length; i++) {
            breakpoints[i].getMarker().delete();
            breakpointManager
                .removeBreakpoint(breakpoints[i], true);
          }
        } else {
          createBreakpoints(editor, lineNumber + 1);
        }
View Full Code Here

Examples of org.eclipse.debug.core.IBreakpointManager

    return true;
  }

  protected IBreakpoint[] getBreakpoints(IMarker[] markers) {
    IBreakpointManager manager = DebugPlugin.getDefault()
        .getBreakpointManager();
    List breakpoints = new ArrayList(markers.length);
    for (int i = 0; i < markers.length; i++) {
      IBreakpoint breakpoint = manager.getBreakpoint(markers[i]);
      if (breakpoint != null) {
        breakpoints.add(breakpoint);
      }
    }
    return (IBreakpoint[]) breakpoints.toArray(new IBreakpoint[0]);
View Full Code Here

Examples of org.eclipse.debug.core.IBreakpointManager

          }
        }
      } catch (CoreException x) {
      }
    }
    IBreakpointManager manager = DebugPlugin.getDefault()
        .getBreakpointManager();
    List breakpoints = new ArrayList(markers.size());
    for (int i = 0; i < markers.size(); i++) {
      IBreakpoint breakpoint = manager.getBreakpoint((IMarker) markers
          .get(i));
      if (breakpoint != null) {
        breakpoints.add(breakpoint);
      }
    }
View Full Code Here

Examples of org.eclipse.debug.core.IBreakpointManager

          // remove all RunToLine breakpoints while we search through
          // the
          // list of all our breakpoints looking for the one that was
          // hit
          if (breakpoint instanceof PHPRunToLineBreakpoint) {
            IBreakpointManager bmgr = DebugPlugin.getDefault()
                .getBreakpointManager();
            try {
              if (DBGpLogger.debugBP()) {
                DBGpLogger
                    .debug("removing runtoline breakpoint"); //$NON-NLS-1$
              }
              bmgr.removeBreakpoint(breakpoint, true);
            } catch (CoreException e) {
              DBGpLogger
                  .logException(
                      "Exception trying to remove a runtoline breakpoint", //$NON-NLS-1$
                      this, e);
View Full Code Here

Examples of org.eclipse.debug.core.IBreakpointManager

  /**
   * Installs all Java breakpoints that currently exist in the breakpoint
   * manager
   */
  protected void initializeBreakpoints() {
    IBreakpointManager manager = DebugPlugin.getDefault()
        .getBreakpointManager();
    manager.addBreakpointListener(this);
    IBreakpoint[] bps = manager.getBreakpoints(JDIDebugModel
        .getPluginIdentifier());
    for (IBreakpoint bp : bps) {
      if (bp instanceof IJavaBreakpoint) {
        breakpointAdded(bp);
      }
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.