</library>
</runtime>
<requires>
- <import plugin="org.eclipse.core.runtime.compatibility"/>
<import plugin="org.eclipse.ui.ide"/>
<import plugin="org.eclipse.ui.views"/>
<import plugin="org.eclipse.jface.text"/>
int bpNo= 0;
try {
PHPLineBreakpoint phpLBP;
- if(breakpoint.getModelIdentifier() == PHPDebugCorePlugin.getDefault().getDescriptor().getUniqueIdentifier()) {
+ if(breakpoint.getModelIdentifier() == PHPDebugCorePlugin.getUniqueIdentifier()) {
IPath filename;
phpLBP= (PHPLineBreakpoint)breakpoint;
// bpNo= DBGInt.addBreakpoint(phpLBP.getMarker().getResource().getLocation().toOSString(), phpLBP.getLineNumber());
if (DBGInt == null) return;
try {
PHPLineBreakpoint phpLBP;
- if(breakpoint.getModelIdentifier() == PHPDebugCorePlugin.getDefault().getDescriptor().getUniqueIdentifier()) {
+ if(breakpoint.getModelIdentifier() == PHPDebugCorePlugin.getUniqueIdentifier()) {
phpLBP= (PHPLineBreakpoint)breakpoint;
IPath filename;
if (remote)
while (!shouldStop)
{
newconnect=true;
- try {
- newSocket = server.accept();
+ try {
+ newSocket = server.accept();
//System.out.println("Accepted! : " + socket.toString());
- } catch (SocketTimeoutException e) {
+ } catch (SocketTimeoutException e) {
// no one wants to connect
newconnect=false;
- } catch (IOException e) {
- PHPDebugCorePlugin.log(e);
- return;
- }
+ } catch (IOException e) {
+ PHPDebugCorePlugin.log(e);
+ return;
+ }
if (newconnect)
{
server.setSoTimeout(1);
newDBGInt= new PHPDBGInterface(getReader(newSocket), newSocket.getOutputStream(), thisProxy);
newDBGInt.waitResponse(1000);
- newDBGInt.flushAllPackets();
+ newDBGInt.flushAllPackets();
// Check version and session ID
- if ((DBGInt==null) || (DBGInt.getSID()==newDBGInt.getSID()))
- {
- DBGInt=newDBGInt;
+ if ((DBGInt==null) || (DBGInt.getSID()==newDBGInt.getSID()))
+ {
+ DBGInt=newDBGInt;
try {
closeSocket();
} catch (IOException e) {
PHPDebugCorePlugin.log(e);
shouldStop=true;
}
- socket=newSocket;
+ socket=newSocket;
setBreakPoints();
DBGInt.continueExecution();
- } else
- {
+ } else
+ {
newDBGInt.continueExecution();
- newSocket.close();
- }
+ newSocket.close();
+ }
}
- if(DBGInt.waitResponse(interval))
- {
+ if(DBGInt.waitResponse(interval))
+ {
- DBGInt.flushAllPackets();
-
- if (DBGInt.BPUnderHit != 0) {
- StackList = DBGInt.getStackList();
- if (StackList.length > 0) {
- for (i = 0; i < StackList.length; i++) {
- StackList[i].setThread(PHPMainThread);
- if (DBGInt.getModByNo(StackList[i].getModNo()).equals("")) {
- DBGInt.getSourceTree();
- }
- StackList[i].setFile(
- DBGInt.getModByNo(StackList[i].getModNo()));
- }
- PHPMainThread.setStackFrames(StackList);
- }
- // Fire debug event
- PHPMainThread.suspend();
-
- synchronized (this) {
- wait();
- }
- }
- }
- if (remote) {
- if (PHPMainThread.isTerminated())
- {
- shouldStop=true;
- break;
- }
- } else {
- if (PHPMainThread.isTerminated() || getDebugTarget().getProcess().isTerminated())
- {
+ DBGInt.flushAllPackets();
+
+ if (DBGInt.BPUnderHit != 0) {
+ StackList = DBGInt.getStackList();
+ if (StackList.length > 0) {
+ for (i = 0; i < StackList.length; i++) {
+ StackList[i].setThread(PHPMainThread);
+ if (DBGInt.getModByNo(StackList[i].getModNo()).equals("")) {
+ DBGInt.getSourceTree();
+ }
+ StackList[i].setFile(
+ DBGInt.getModByNo(StackList[i].getModNo()));
+ }
+ PHPMainThread.setStackFrames(StackList);
+ }
+ // Fire debug event
+ PHPMainThread.suspend();
+
+ synchronized (this) {
+ wait();
+ }
+ }
+ }
+ if (remote) {
+ if (PHPMainThread.isTerminated()) {
+ shouldStop=true;
+ break;
+ }
+ } else {
+ if (PHPMainThread.isTerminated() || getDebugTarget().getProcess().isTerminated()) {
shouldStop=true;
break;
- }
- }
+ }
+ }
+ }
+ }
+ catch (Exception ex) {
+ PHPDebugCorePlugin.log(ex);
+ System.out.println(ex);
+ }
+ finally {
+ try {
+ getDebugTarget().terminate();
+ closeSocket();
+ closeServerSocket();
+ } catch (IOException e) {
+ PHPDebugCorePlugin.log(e);
+ return;
}
- }
- catch (Exception ex) {
- PHPDebugCorePlugin.log(ex);
- System.out.println(ex);
- }
- finally {
- try {
- getDebugTarget().terminate();
- closeSocket();
- closeServerSocket();
- }
- catch (IOException e) {
- PHPDebugCorePlugin.log(e);
- return;
- }
//System.out.println("Socket loop finished.");
- }
+ }
}
}
}
import net.sourceforge.phpeclipse.PHPeclipsePlugin;
import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.runtime.IPluginDescriptor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Plugin;
import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.*;
+//import org.eclipse.core.runtime.*;
import org.osgi.framework.BundleContext;
/**
/**
* The constructor.
*/
- public PHPDebugCorePlugin(IPluginDescriptor descriptor) {
- super(descriptor);
+ public PHPDebugCorePlugin() {
+ super();
plugin = this;
}
/**
* Convenience method which returns the unique identifier of this plugin.
*/
-// public static String getUniqueIdentifier() {
-// if (getDefault() == null) {
-// // If the default instance is not yet initialized,
-// // return a static identifier. This identifier must
-// // match the plugin id defined in plugin.xml
-// return PLUGIN_ID;
-// }
-// return getDefault().getDescriptor().getUniqueIdentifier();
-// }
+ public static String getUniqueIdentifier() {
+ return PLUGIN_ID;
+ }
/**
* @see Plugin#shutdown()
*/
- public void shutdown() throws CoreException {
+/* public void shutdown() throws CoreException {
plugin = null;
super.shutdown();
}
+*/
/**
* This method is called upon plug-in activation
*/
* This method is called when the plug-in is stopped
*/
public void stop(BundleContext context) throws Exception {
+ plugin=null;
super.stop(context);
}
}
* @see IBreakpoint#getModelIdentifier()
*/
public String getModelIdentifier() {
- if (PHPDebugCorePlugin.getDefault() == null) {
- // If the default instance is not yet initialized,
- // return a static identifier. This identifier must
- // match the plugin id defined in plugin.xml
- return "net.sourceforge.phpeclipse.debug.core"; //$NON-NLS-1$
- }
- return PHPDebugCorePlugin.getDefault().getDescriptor().getUniqueIdentifier();
+ return PHPDebugCorePlugin.getUniqueIdentifier();
}
public void setDBGBpNo(int bpNo) {
</library>
</runtime>
<requires>
- <import plugin="org.eclipse.core.runtime.compatibility"/>
<import plugin="org.eclipse.ui.ide"/>
- <import plugin="org.eclipse.ui.views"/>
<import plugin="org.eclipse.jface.text"/>
<import plugin="org.eclipse.ui.workbench.texteditor"/>
<import plugin="org.eclipse.ui.editors"/>
import java.net.MalformedURLException;
import java.net.URL;
-import net.sourceforge.phpdt.internal.debug.ui.PHPDebugUiPlugin;
+// import net.sourceforge.phpdt.internal.debug.ui.PHPDebugUiPlugin;
+//import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.swt.graphics.Image;
+import net.sourceforge.phpdt.internal.debug.ui.PHPDebugUiPlugin;
public class PHPDebugUiImages {
protected static final int NAME_PREFIX_LENGTH = NAME_PREFIX.length();
protected static URL iconBaseURL;
+
+ static {
+ iconBaseURL= PHPDebugUiPlugin.getDefault().getBundle().getEntry("/icons/"); //$NON-NLS-1$
+ }
+/*
static {
String pathSuffix = "icons/";
try {
PHPDebugUiPlugin.log(e);
}
}
-
+*/
protected static final ImageRegistry IMAGE_REGISTRY = new ImageRegistry();
protected static final String CTOOL_PREFIX = "ctool16";
import net.sourceforge.phpeclipse.PHPeclipsePlugin;
import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.runtime.IPluginDescriptor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.dialogs.ErrorDialog;
public static final String PLUGIN_ID = "net.sourceforge.phpeclipse.debug.ui"; //$NON-NLS-1$
protected static PHPDebugUiPlugin plugin;
- public PHPDebugUiPlugin(IPluginDescriptor descriptor) {
- super(descriptor);
+ public PHPDebugUiPlugin() {
+ super();
plugin = this;
}
package net.sourceforge.phpdt.internal.debug.ui.actions;
import java.util.ArrayList;
-import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
-import java.util.Map;
import net.sourceforge.phpdt.core.Flags;
import net.sourceforge.phpdt.core.ICompilationUnit;
-import net.sourceforge.phpdt.core.IField;
import net.sourceforge.phpdt.core.IJavaElement;
-import net.sourceforge.phpdt.core.IJavaProject;
-import net.sourceforge.phpdt.core.IMember;
import net.sourceforge.phpdt.core.IMethod;
-import net.sourceforge.phpdt.core.ISourceRange;
import net.sourceforge.phpdt.core.IType;
-import net.sourceforge.phpdt.core.JavaCore;
import net.sourceforge.phpdt.core.JavaModelException;
import net.sourceforge.phpdt.core.Signature;
-import net.sourceforge.phpdt.core.dom.CompilationUnit;
-import net.sourceforge.phpdt.core.search.IJavaSearchConstants;
-import net.sourceforge.phpdt.core.search.ITypeNameRequestor;
import net.sourceforge.phpdt.debug.core.PHPDebugModel;
import net.sourceforge.phpdt.internal.debug.core.breakpoints.PHPLineBreakpoint;
import net.sourceforge.phpdt.internal.debug.ui.PHPDebugUiPlugin;
import net.sourceforge.phpdt.internal.ui.util.ExceptionHandler;
-import net.sourceforge.phpdt.ui.IWorkingCopyManager;
-import net.sourceforge.phpdt.ui.JavaUI;
-
-import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.core.DebugException;
import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.IBreakpointManager;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.model.IBreakpoint;
import org.eclipse.debug.internal.ui.actions.ActionMessages;
import org.eclipse.debug.ui.actions.IToggleBreakpointsTarget;
-import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.ITextSelection;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IFileEditorInput;
<runtime>
<library name="launch.jar">
<export name="*"/>
+ <packages prefixes="net.sourceforge.phpdt.internal.launching"/>
</library>
</runtime>
<requires>
- <import plugin="org.eclipse.core.runtime.compatibility"/>
- <import plugin="org.eclipse.ui.ide"/>
- <import plugin="org.eclipse.ui.views"/>
- <import plugin="org.eclipse.jface.text"/>
- <import plugin="org.eclipse.ui.workbench.texteditor"/>
- <import plugin="org.eclipse.ui.editors"/>
+<!-- <import plugin="org.eclipse.core.runtime.compatibility"/> -->
<import plugin="org.eclipse.core.runtime"/>
<import plugin="org.eclipse.core.resources"/>
<import plugin="org.eclipse.ui"/>
<import plugin="org.eclipse.debug.core"/>
- <import plugin="org.junit"/>
<import plugin="net.sourceforge.phpeclipse"/>
<import plugin="net.sourceforge.phpeclipse.debug.core"/>
</requires>
//import java.io.OutputStream;
+
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.model.ILaunchConfigurationDelegate;
+import org.eclipse.debug.core.model.LaunchConfigurationDelegate;
+//import org.eclipse.debug.core.model.ILaunchConfigurationDelegate;
-public class PHPLaunchConfigurationDelegate implements ILaunchConfigurationDelegate {
+public class PHPLaunchConfigurationDelegate extends LaunchConfigurationDelegate {
protected static final InterpreterRunner interpreterRunner = new InterpreterRunner();
protected static final DebuggerRunner debuggerRunner = new DebuggerRunner();
- public PHPLaunchConfigurationDelegate() {
+/* public PHPLaunchConfigurationDelegate() {
super();
}
-
+*/
/**
* @see ILaunchConfigurationDelegate#launch(ILaunchConfiguration, String, ILaunch, IProgressMonitor)
*/
import net.sourceforge.phpeclipse.PHPeclipsePlugin;
import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.runtime.IPluginDescriptor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.ui.plugin.AbstractUIPlugin;
protected static PHPLaunchingPlugin plugin;
- public PHPLaunchingPlugin(IPluginDescriptor descriptor) {
- super(descriptor);
+ public PHPLaunchingPlugin() {
+ super();
plugin = this;
}
-
public static PHPLaunchingPlugin getDefault() {
return plugin;
}