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;
+//import org.eclipse.core.runtime.Preferences;
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.IBreakpointManager;
import org.eclipse.debug.core.model.IBreakpoint;
* @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();
+ //String markerType = PHPLineBreakpoint.getMarkerType();
IBreakpointManager manager = DebugPlugin.getDefault()
.getBreakpointManager();
IBreakpoint[] breakpoints = manager.getBreakpoints(modelId);
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;
}
}
*
* @return the preference store for this plug-in
*/
- public static Preferences getPreferences() {
- PHPDebugCorePlugin deflt = PHPDebugCorePlugin.getDefault();
- if (deflt != null) {
- return deflt.getPluginPreferences();
- }
- return null;
- }
+// public static Preferences getPreferences() {
+// PHPDebugCorePlugin deflt = PHPDebugCorePlugin.getDefault();
+// if (deflt != null) {
+// return deflt.getPluginPreferences();
+// }
+// return null;
+// }
/**
* Saves the preference store for this plug-in.
*
* @return the preference store for this plug-in
*/
- public static void savePreferences() {
- PHPDebugCorePlugin.getDefault().savePluginPreferences();
- }
+// public static void savePreferences() {
+// PHPDebugCorePlugin.getDefault().savePluginPreferences();
+// }
/**
* Creates and returns a debug target for the given VM, with the specified