import net.sourceforge.phpdt.internal.debug.core.PHPDebugCorePlugin;
import net.sourceforge.phpdt.internal.debug.core.breakpoints.PHPLineBreakpoint;
+import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.Preferences;
* @exception CoreException
* If this method fails.
*/
- public static PHPLineBreakpoint lineBreakpointExists(int lineNumber)
+ public static PHPLineBreakpoint lineBreakpointExists(IResource resource, int lineNumber)
throws CoreException {
String modelId = PHPDebugCorePlugin.PLUGIN_ID; // getPluginIdentifier();
String markerType = PHPLineBreakpoint.getMarkerType();
continue;
}
PHPLineBreakpoint breakpoint = (PHPLineBreakpoint) breakpoints[i];
- if (breakpoint.getMarker().getType().equals(markerType)) {
- if (breakpoint.getLineNumber() == lineNumber) {
+ if (breakpoint.getLineNumber() == lineNumber) {
+ if (breakpoint.getMarker().getResource().equals(resource)) {
return breakpoint;
}
}
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.IFile;
.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);
// breakpoint, true );
//
PHPLineBreakpoint existingBreakpoint = PHPDebugModel
- .lineBreakpointExists(lineNumber); // typeName,
+ .lineBreakpointExists(resource, lineNumber); // typeName,
// lineNumber);
if (existingBreakpoint != null) {
DebugPlugin.getDefault().getBreakpointManager()
public static String resolveMethodSignature(IType type,
String methodSignature) throws JavaModelException {
String[] parameterTypes = Signature.getParameterTypes(methodSignature);
- int length = length = parameterTypes.length;
+ int length = parameterTypes.length;
String[] resolvedParameterTypes = new String[length];
for (int i = 0; i < length; i++) {