[jboss-svn-commits] JBL Code SVN: r15683 - in labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse: debug/core and 2 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Tue Oct 9 05:44:13 EDT 2007
Author: KrisVerlaenen
Date: 2007-10-09 05:44:13 -0400 (Tue, 09 Oct 2007)
New Revision: 15683
Modified:
labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/debug/DroolsDebugEventHandlerView.java
labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/debug/ObjectWrapper.java
labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/debug/core/MVELStackFrame.java
labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/flow/common/datatype/DefaultDataTypeRegistry.java
labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/util/DroolsClasspathContainer.java
labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/util/ProjectClassLoader.java
Log:
- Upgraded to eclipse 3.3
Modified: labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/debug/DroolsDebugEventHandlerView.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/debug/DroolsDebugEventHandlerView.java 2007-10-09 08:57:40 UTC (rev 15682)
+++ labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/debug/DroolsDebugEventHandlerView.java 2007-10-09 09:44:13 UTC (rev 15683)
@@ -8,10 +8,12 @@
import org.eclipse.debug.core.model.IVariable;
import org.eclipse.debug.internal.ui.VariablesViewModelPresentation;
import org.eclipse.debug.internal.ui.contexts.DebugContextManager;
-import org.eclipse.debug.internal.ui.contexts.provisional.IDebugContextListener;
import org.eclipse.debug.ui.AbstractDebugView;
import org.eclipse.debug.ui.IDebugModelPresentation;
import org.eclipse.debug.ui.IDebugUIConstants;
+import org.eclipse.debug.ui.contexts.DebugContextEvent;
+import org.eclipse.debug.ui.contexts.IDebugContextListener;
+import org.eclipse.debug.ui.contexts.IDebugContextService;
import org.eclipse.jdt.debug.core.IJavaObject;
import org.eclipse.jdt.debug.core.IJavaStackFrame;
import org.eclipse.jdt.debug.core.IJavaThread;
@@ -47,7 +49,7 @@
private Object[] oldExpandedElements = new Object[0];
public void dispose() {
- DebugContextManager.getDefault().removeDebugContextListener(this, getSite().getWorkbenchWindow());
+ DebugContextManager.getDefault().removeDebugContextListener(this);
getSite().getPage().removeSelectionListener(IDebugUIConstants.ID_VARIABLE_VIEW, this);
super.dispose();
}
@@ -80,27 +82,30 @@
// else get selected thread and determine if any of the stack frames
// is executing in a working memory, if so, use that one
if (input == null) {
- ISelection stackSelection = DebugContextManager.getDefault().getActiveContext(getSite().getWorkbenchWindow());
- if (stackSelection instanceof IStructuredSelection) {
- Object selection = ((IStructuredSelection) stackSelection).getFirstElement();
- if (selection instanceof IJavaStackFrame) {
- try {
- IJavaThread thread = (IJavaThread) ((IJavaStackFrame) selection).getThread();
- IStackFrame[] frames = thread.getStackFrames();
- for (int i = 0; i < frames.length; i++) {
- IJavaObject stackObj = ((IJavaStackFrame) frames[i]).getThis();
- if ((stackObj != null)
- && (stackObj.getJavaType() != null)
- && ("org.drools.reteoo.ReteooStatefulSession".equals(
- stackObj.getJavaType().getName()))) {
- input = stackObj;
- break;
- }
- }
- } catch (Throwable t) {
- DroolsEclipsePlugin.log(t);
- }
- }
+ IDebugContextService debugContextService = DebugContextManager.getDefault().getContextService(getSite().getWorkbenchWindow());
+ if (debugContextService != null) {
+ ISelection stackSelection = debugContextService.getActiveContext();
+ if (stackSelection instanceof IStructuredSelection) {
+ Object selection = ((IStructuredSelection) stackSelection).getFirstElement();
+ if (selection instanceof IJavaStackFrame) {
+ try {
+ IJavaThread thread = (IJavaThread) ((IJavaStackFrame) selection).getThread();
+ IStackFrame[] frames = thread.getStackFrames();
+ for (int i = 0; i < frames.length; i++) {
+ IJavaObject stackObj = ((IJavaStackFrame) frames[i]).getThis();
+ if ((stackObj != null)
+ && (stackObj.getJavaType() != null)
+ && ("org.drools.reteoo.ReteooStatefulSession".equals(
+ stackObj.getJavaType().getName()))) {
+ input = stackObj;
+ break;
+ }
+ }
+ } catch (Throwable t) {
+ DroolsEclipsePlugin.log(t);
+ }
+ }
+ }
}
}
@@ -127,7 +132,7 @@
variablesViewer.setLabelProvider(new VariablesViewLabelProvider(
getModelPresentation()));
variablesViewer.setUseHashlookup(true);
- DebugContextManager.getDefault().addDebugContextListener(this, getSite().getWorkbenchWindow());
+ DebugContextManager.getDefault().addDebugContextListener(this);
getSite().getPage().addSelectionListener(IDebugUIConstants.ID_VARIABLE_VIEW, this);
return variablesViewer;
}
@@ -180,7 +185,8 @@
showViewer();
}
- public void contextChanged(ISelection selection, IWorkbenchPart part) {
+ public void debugContextChanged(DebugContextEvent event) {
+ selectionChanged(null, event.getContext());
}
public void selectionChanged(IWorkbenchPart part, ISelection selection) {
Modified: labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/debug/ObjectWrapper.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/debug/ObjectWrapper.java 2007-10-09 08:57:40 UTC (rev 15682)
+++ labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/debug/ObjectWrapper.java 2007-10-09 09:44:13 UTC (rev 15683)
@@ -95,10 +95,14 @@
}
public IJavaThread[] getWaitingThreads() throws DebugException {
- return null;
+ return object.getWaitingThreads();
}
public IJavaThread getOwningThread() throws DebugException {
- return null;
+ return object.getOwningThread();
}
+
+ public IJavaObject[] getReferringObjects(long max) throws DebugException {
+ return object.getReferringObjects(max);
+ }
}
Modified: labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/debug/core/MVELStackFrame.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/debug/core/MVELStackFrame.java 2007-10-09 08:57:40 UTC (rev 15682)
+++ labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/debug/core/MVELStackFrame.java 2007-10-09 09:44:13 UTC (rev 15683)
@@ -64,74 +64,77 @@
*/
private static final IJavaReferenceType REF_TYPE = new IJavaReferenceType() {
- public String[] getAllFieldNames() throws DebugException {
- return null;
- }
+ public IJavaFieldVariable getField(String name) throws DebugException {
+ return null;
+ }
+ public IJavaClassObject getClassObject() throws DebugException {
+ return null;
+ }
+
+ public String[] getAvailableStrata() throws DebugException {
+ return null;
+ }
+
+ public String getDefaultStratum() throws DebugException {
+ return "MVEL";
+ }
+
+ public String[] getDeclaredFieldNames() throws DebugException {
+ return null;
+ }
+
+ public String[] getAllFieldNames() throws DebugException {
+ return null;
+ }
+
+ public IJavaObject getClassLoaderObject() throws DebugException {
+ return null;
+ }
+
+ public String getGenericSignature() throws DebugException {
+ return null;
+ }
+
+ public String getSourceName() throws DebugException {
+ return null;
+ }
+
+ public String[] getSourceNames(String stratum) throws DebugException {
+ return null;
+ }
+
+ public String[] getSourcePaths(String stratum) throws DebugException {
+ return null;
+ }
+
+ public IJavaObject[] getInstances(long max) throws DebugException {
+ return null;
+ }
+
+ public String getName() throws DebugException {
+ return null;
+ }
+
+ public String getSignature() throws DebugException {
+ return null;
+ }
+
+ public IDebugTarget getDebugTarget() {
+ return null;
+ }
+
+ public ILaunch getLaunch() {
+ return null;
+ }
+
+ public String getModelIdentifier() {
+ return null;
+ }
+
+ public Object getAdapter(Class adapter) {
+ return null;
+ }
- public String[] getAvailableStrata() throws DebugException {
- return null;
- }
-
- public IJavaObject getClassLoaderObject() throws DebugException {
- return null;
- }
-
- public IJavaClassObject getClassObject() throws DebugException {
- return null;
- }
-
- public String[] getDeclaredFieldNames() throws DebugException {
- return null;
- }
-
- public String getDefaultStratum() throws DebugException {
- return "MVEL";
- }
-
- public IJavaFieldVariable getField(String name) throws DebugException {
- return null;
- }
-
- public String getGenericSignature() throws DebugException {
- return null;
- }
-
- public String getSourceName() throws DebugException {
- return null;
- }
-
- public String[] getSourceNames(String stratum) throws DebugException {
- return null;
- }
-
- public String[] getSourcePaths(String stratum) throws DebugException {
- return null;
- }
-
- public String getName() throws DebugException {
- return null;
- }
-
- public String getSignature() throws DebugException {
- return null;
- }
-
- public IDebugTarget getDebugTarget() {
- return null;
- }
-
- public ILaunch getLaunch() {
- return null;
- }
-
- public String getModelIdentifier() {
- return null;
- }
-
- public Object getAdapter(Class adapter) {
- return null;
- }
-
};
public MVELStackFrame(DroolsThread thread,
Modified: labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/flow/common/datatype/DefaultDataTypeRegistry.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/flow/common/datatype/DefaultDataTypeRegistry.java 2007-10-09 08:57:40 UTC (rev 15682)
+++ labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/flow/common/datatype/DefaultDataTypeRegistry.java 2007-10-09 09:44:13 UTC (rev 15683)
@@ -27,8 +27,8 @@
import org.drools.ruleflow.common.datatype.impl.type.StringDataType;
import org.drools.ruleflow.common.datatype.impl.type.UndefinedDataType;
-import sun.beans.editors.FloatEditor;
-import sun.beans.editors.StringEditor;
+//import sun.beans.editors.FloatEditor;
+//import sun.beans.editors.StringEditor;
/**
* Default datatype registry containing default datatypes.
@@ -52,12 +52,12 @@
registerVariableDataType(IntegerDataType.class,
new InstanceDataTypeFactory(IntegerDataType.class), "Integer",
IntegerEditor.class, EmptyEditor.class);
- registerVariableDataType(FloatDataType.class,
- new InstanceDataTypeFactory(FloatDataType.class), "Float",
- FloatEditor.class, EmptyEditor.class);
- registerVariableDataType(StringDataType.class,
- new InstanceDataTypeFactory(StringDataType.class), "String",
- StringEditor.class, EmptyEditor.class);
+// registerVariableDataType(FloatDataType.class,
+// new InstanceDataTypeFactory(FloatDataType.class), "Float",
+// FloatEditor.class, EmptyEditor.class);
+// registerVariableDataType(StringDataType.class,
+// new InstanceDataTypeFactory(StringDataType.class), "String",
+// StringEditor.class, EmptyEditor.class);
}
public static void registerVariableDataType(Class type,
Modified: labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/util/DroolsClasspathContainer.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/util/DroolsClasspathContainer.java 2007-10-09 08:57:40 UTC (rev 15682)
+++ labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/util/DroolsClasspathContainer.java 2007-10-09 09:44:13 UTC (rev 15683)
@@ -59,7 +59,7 @@
File pluginRoot = new Path(pluginRootString).toFile();
File[] files = pluginRoot.listFiles();
for (int i = 0; i < files.length; i++) {
- if (files[i].getAbsolutePath().indexOf("org.eclipse.jdt.core_3.2") > -1) {
+ if (files[i].getAbsolutePath().indexOf("org.eclipse.jdt.core_3.3") > -1) {
Path path = new Path(files[i].getAbsolutePath());
list.add(JavaCore.newLibraryEntry(path, path, null));
break;
Modified: labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/util/ProjectClassLoader.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/util/ProjectClassLoader.java 2007-10-09 08:57:40 UTC (rev 15682)
+++ labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/util/ProjectClassLoader.java 2007-10-09 09:44:13 UTC (rev 15683)
@@ -70,7 +70,6 @@
IClasspathEntry[] paths = project.getResolvedClasspath(true);
Set outputPaths = new HashSet();
if (paths != null) {
-
for ( int i = 0; i < paths.length; i++ ) {
IClasspathEntry path = paths[i];
if (path.getEntryKind() == IClasspathEntry.CPE_LIBRARY) {
@@ -85,8 +84,7 @@
}
}
IPath location = getProjectLocation(project.getProject());
- IPath outputPath = location.append(project.getOutputLocation()
- .removeFirstSegments(1));
+ IPath outputPath = location.append(project.getOutputLocation().removeFirstSegments(1));
pathElements.add(outputPath.toFile().toURI().toURL());
for (Iterator iterator = outputPaths.iterator(); iterator.hasNext(); ) {
IPath path = (IPath) iterator.next();
More information about the jboss-svn-commits
mailing list