import net.sourceforge.phpdt.debug.core.PHPDebugModel;
import net.sourceforge.phpdt.internal.debug.ui.PHPDebugUiMessages;
+//import net.sourceforge.phpdt.internal.debug.ui.PHPDebugUiPlugin;
-import org.eclipse.core.resources.IContainer;
+//import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IResource;
private ITextEditor fTextEditor;
- private String fMarkerType;
+ //private String fMarkerType;
private List fMarkers;
ITextEditor editor) {
fRuler = ruler;
fTextEditor = editor;
- fMarkerType = IBreakpoint.BREAKPOINT_MARKER;
+ //fMarkerType = IBreakpoint.BREAKPOINT_MARKER;
fAddLabel = PHPDebugUiMessages
.getString("PHPManageBreakpointRulerAction.ToggleBreakpoint"); //$NON-NLS-1$
fRemoveLabel = PHPDebugUiMessages
.getLineOfLastMouseButtonActivity();
// create the marker
try {
- // Falta verificar si la ubicaci�n del Breakpoint es v�lida
+ // Falta verificar si la ubicaci?�n del Breakpoint es v?�lida
int lineNumber = rulerLine + 1;
if (lineNumber > 0) {
- if (PHPDebugModel.lineBreakpointExists(lineNumber) == null) {
+ IResource resource = ((IFileEditorInput) editorInput).getFile();
+ if (PHPDebugModel.lineBreakpointExists(resource, lineNumber) == null) {
// Map attributes = new HashMap(10);
IRegion line = document.getLineInformation(lineNumber - 1);
int start = line.getOffset();
// PHPDebugModel.createLineBreakpoint(getResource(),
// lineNumber, start, end, 0, true, attributes);
PHPDebugModel.createLineBreakpoint(
- ((IFileEditorInput) editorInput).getFile(),
- lineNumber, start, end, 0, true, null);
+ resource, lineNumber, start, end, 0, true, null);
// PHPDebugModel.createLineBreakpoint(((IFileEditorInput)
// editorInput).getFile(), lineNumber, 0, true, attributes);
}
}
- public IResource getUnderlyingResource(String fName) {
- IResource parentResource = getResource(); // fParent.getUnderlyingResource();
- if (parentResource == null) {
- return null;
- }
- int type = parentResource.getType();
- if (type == IResource.FOLDER || type == IResource.PROJECT) {
- IContainer folder = (IContainer) parentResource;
- IResource resource = folder.findMember(fName);
- if (resource == null) {
- // throw newNotPresentException();
- return null;
- } else {
- return resource;
- }
- } else {
- return parentResource;
- }
- }
+// public IResource getUnderlyingResource(String fName) {
+// IResource parentResource = getResource(); // fParent.getUnderlyingResource();
+// if (parentResource == null) {
+// return null;
+// }
+// int type = parentResource.getType();
+// if (type == IResource.FOLDER || type == IResource.PROJECT) {
+// IContainer folder = (IContainer) parentResource;
+// IResource resource = folder.findMember(fName);
+// if (resource == null) {
+// // throw newNotPresentException();
+// return null;
+// } else {
+// return resource;
+// }
+// } else {
+// return parentResource;
+// }
+// }
}