[378905] [3.2.5P] Crossfire Variables are missing some values
diff --git a/bundles/org.eclipse.wst.jsdt.debug.core/src/org/eclipse/wst/jsdt/debug/internal/core/launching/SourceLookup.java b/bundles/org.eclipse.wst.jsdt.debug.core/src/org/eclipse/wst/jsdt/debug/internal/core/launching/SourceLookup.java
index 29a09da..f91199d 100644
--- a/bundles/org.eclipse.wst.jsdt.debug.core/src/org/eclipse/wst/jsdt/debug/internal/core/launching/SourceLookup.java
+++ b/bundles/org.eclipse.wst.jsdt.debug.core/src/org/eclipse/wst/jsdt/debug/internal/core/launching/SourceLookup.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 IBM Corporation and others.
+ * Copyright (c) 2010, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -238,6 +238,11 @@
}
if(i < path.segments().length-1) {
segment = segment.replaceAll("\\.js", "\\_js"); //$NON-NLS-1$ //$NON-NLS-2$
+ segment = segment.replaceAll("\\.html", "\\_html"); //$NON-NLS-1$ //$NON-NLS-2$
+ //segments can never end in '.' it is reserved on all platforms
+ if(segment.endsWith(".")) { //$NON-NLS-1$
+ segment = segment.substring(0, segment.length()-1) + '_';
+ }
}
}
segments.add(segment);
diff --git a/bundles/org.eclipse.wst.jsdt.debug.crossfire/src/org/eclipse/wst/jsdt/debug/internal/crossfire/jsdi/CFBooleanValue.java b/bundles/org.eclipse.wst.jsdt.debug.crossfire/src/org/eclipse/wst/jsdt/debug/internal/crossfire/jsdi/CFBooleanValue.java
index e27ea20..7b3bdc2 100644
--- a/bundles/org.eclipse.wst.jsdt.debug.crossfire/src/org/eclipse/wst/jsdt/debug/internal/crossfire/jsdi/CFBooleanValue.java
+++ b/bundles/org.eclipse.wst.jsdt.debug.crossfire/src/org/eclipse/wst/jsdt/debug/internal/crossfire/jsdi/CFBooleanValue.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010 IBM Corporation and others.
+ * Copyright (c) 2010, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -20,6 +20,11 @@
*/
public class CFBooleanValue extends CFMirror implements BooleanValue {
+ /**
+ * The type "boolean"
+ */
+ public static final String BOOLEAN = "boolean"; //$NON-NLS-1$
+
private boolean bool = false;
/**
diff --git a/bundles/org.eclipse.wst.jsdt.debug.crossfire/src/org/eclipse/wst/jsdt/debug/internal/crossfire/jsdi/CFNumberValue.java b/bundles/org.eclipse.wst.jsdt.debug.crossfire/src/org/eclipse/wst/jsdt/debug/internal/crossfire/jsdi/CFNumberValue.java
index 8ad4724..9996622 100644
--- a/bundles/org.eclipse.wst.jsdt.debug.crossfire/src/org/eclipse/wst/jsdt/debug/internal/crossfire/jsdi/CFNumberValue.java
+++ b/bundles/org.eclipse.wst.jsdt.debug.crossfire/src/org/eclipse/wst/jsdt/debug/internal/crossfire/jsdi/CFNumberValue.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010 IBM Corporation and others.
+ * Copyright (c) 2010, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -33,6 +33,11 @@
*/
public static final Double INFINITY_OBJ = new Double(Double.POSITIVE_INFINITY);
+ /**
+ * The type "number"
+ */
+ public static final String NUMBER = "number"; //$NON-NLS-1$
+
private Number number = null;
/**
diff --git a/bundles/org.eclipse.wst.jsdt.debug.crossfire/src/org/eclipse/wst/jsdt/debug/internal/crossfire/jsdi/CFObjectReference.java b/bundles/org.eclipse.wst.jsdt.debug.crossfire/src/org/eclipse/wst/jsdt/debug/internal/crossfire/jsdi/CFObjectReference.java
index 25a0981..f4b7134 100644
--- a/bundles/org.eclipse.wst.jsdt.debug.crossfire/src/org/eclipse/wst/jsdt/debug/internal/crossfire/jsdi/CFObjectReference.java
+++ b/bundles/org.eclipse.wst.jsdt.debug.crossfire/src/org/eclipse/wst/jsdt/debug/internal/crossfire/jsdi/CFObjectReference.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010 IBM Corporation and others.
+ * Copyright (c) 2010, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -42,6 +42,11 @@
private Value prototype = null;
private List properties = null;
private String source = null;
+
+ /**
+ * The "this" attribute
+ */
+ public static final String THIS = "this"; //$NON-NLS-1$
/**
* Constructor
diff --git a/bundles/org.eclipse.wst.jsdt.debug.crossfire/src/org/eclipse/wst/jsdt/debug/internal/crossfire/jsdi/CFStackFrame.java b/bundles/org.eclipse.wst.jsdt.debug.crossfire/src/org/eclipse/wst/jsdt/debug/internal/crossfire/jsdi/CFStackFrame.java
index 56b6beb..dff5cf0 100644
--- a/bundles/org.eclipse.wst.jsdt.debug.crossfire/src/org/eclipse/wst/jsdt/debug/internal/crossfire/jsdi/CFStackFrame.java
+++ b/bundles/org.eclipse.wst.jsdt.debug.crossfire/src/org/eclipse/wst/jsdt/debug/internal/crossfire/jsdi/CFStackFrame.java
@@ -13,7 +13,6 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
-import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
@@ -113,8 +112,8 @@
else {
vars = new ArrayList();
}
- Map thismap = (Map) json.get(Attributes.THIS);
- thisvar = new CFVariable(crossfire(), this, Attributes.THIS, null, (thismap == null ? new HashMap(0) : thismap));
+ Map thismap = (Map) json.get(CFObjectReference.THIS);
+ thisvar = new CFVariable(crossfire(), this, CFObjectReference.THIS, null, thismap);
}
}
@@ -127,31 +126,11 @@
Object o = info.get(Attributes.HANDLE);
//if handle is not a Number check for that
//hack to prevent http://code.google.com/p/fbug/issues/detail?id=4635
+ Number ref = null;
if(o instanceof Number) {
- varcollector.add(
- new CFVariable(
- crossfire(),
- this,
- (String) entry.getKey(),
- (Number) o,
- info));
+ ref = (Number) o;
}
- //not an initialized object, try to see if the map has a type (or not null)
- o = info.get(Attributes.TYPE);
- if(o instanceof String) {
- if("undefined".equals(o)) { //$NON-NLS-1$
- varcollector.add(new CFVariable(crossfire(), this, (String) entry.getKey(), null, info));
- }
- }
- }
- else {
- varcollector.add(
- new CFVariable(
- crossfire(),
- this,
- (String) entry.getKey(),
- null,
- null));
+ varcollector.add(new CFVariable(crossfire(), this, (String) entry.getKey(), ref, info));
}
}
}
@@ -275,7 +254,7 @@
if(CFUndefinedValue.UNDEFINED.equals(type)) {
return crossfire().mirrorOfUndefined();
}
- if(Attributes.NUMBER.equals(type)) {
+ if(CFNumberValue.NUMBER.equals(type)) {
//could be NaN, Infinity or -Infinity, check for strings
Object o = map.get(Attributes.VALUE);
if(o instanceof Number) {
diff --git a/bundles/org.eclipse.wst.jsdt.debug.crossfire/src/org/eclipse/wst/jsdt/debug/internal/crossfire/jsdi/CFVariable.java b/bundles/org.eclipse.wst.jsdt.debug.crossfire/src/org/eclipse/wst/jsdt/debug/internal/crossfire/jsdi/CFVariable.java
index dcb59fc..df149e5 100644
--- a/bundles/org.eclipse.wst.jsdt.debug.crossfire/src/org/eclipse/wst/jsdt/debug/internal/crossfire/jsdi/CFVariable.java
+++ b/bundles/org.eclipse.wst.jsdt.debug.crossfire/src/org/eclipse/wst/jsdt/debug/internal/crossfire/jsdi/CFVariable.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 IBM Corporation and others.
+ * Copyright (c) 2010, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -39,29 +39,34 @@
try {
if(values != null) {
String kind = (String) values.get(Attributes.TYPE);
- //if we have a primitive type create it value now
- if(kind != null) {
- if(kind.equals(Attributes.STRING)) {
- value = new CFStringValue(vm, (String) values.get(Attributes.VALUE));
+ if(CFStringValue.STRING.equals(kind)) {
+ value = new CFStringValue(vm, (String) values.get(Attributes.VALUE));
+ }
+ else if(CFNumberValue.NUMBER.equals(kind)) {
+ Object o = values.get(Attributes.VALUE);
+ if(o instanceof Number) {
+ value = new CFNumberValue(vm, (Number)o);
}
- else if(kind.equals(Attributes.NUMBER)) {
- Object o = values.get(Attributes.VALUE);
- if(o instanceof Number) {
- value = new CFNumberValue(vm, (Number)o);
- }
- else if(o instanceof String) {
- value = new CFNumberValue(vm, (String)o);
- }
+ else if(o instanceof String) {
+ value = new CFNumberValue(vm, (String)o);
}
- else if(kind.equals(Attributes.BOOLEAN)) {
- value = new CFBooleanValue(vm, ((Boolean)values.get(Attributes.VALUE)).booleanValue());
- }
- if(Attributes.THIS.equals(name)) {
+ }
+ else if(CFBooleanValue.BOOLEAN.equals(kind)) {
+ value = new CFBooleanValue(vm, ((Boolean)values.get(Attributes.VALUE)).booleanValue());
+ }
+ if(CFUndefinedValue.UNDEFINED.equals(kind)) {
+ value = crossfire().mirrorOfUndefined();
+ }
+ else if(CFObjectReference.OBJECT.equals(kind)) {
+ if(CFObjectReference.THIS.equals(name)) {
//special object that has no lookup so we have to pre-populate the properties
value = new CFObjectReference(crossfire(), frame, values);
}
- if(CFUndefinedValue.UNDEFINED.equals(kind)) {
- value = crossfire().mirrorOfUndefined();
+ else if(ref == null) {
+ Object o = values.get(Attributes.VALUE);
+ if(CFNullValue.NULL.equals(o)) {
+ value = crossfire().mirrorOfNull();
+ }
}
}
}
diff --git a/bundles/org.eclipse.wst.jsdt.debug.crossfire/src/org/eclipse/wst/jsdt/debug/internal/crossfire/jsdi/CFVirtualMachine.java b/bundles/org.eclipse.wst.jsdt.debug.crossfire/src/org/eclipse/wst/jsdt/debug/internal/crossfire/jsdi/CFVirtualMachine.java
index 816c99a..fdd7571 100644
--- a/bundles/org.eclipse.wst.jsdt.debug.crossfire/src/org/eclipse/wst/jsdt/debug/internal/crossfire/jsdi/CFVirtualMachine.java
+++ b/bundles/org.eclipse.wst.jsdt.debug.crossfire/src/org/eclipse/wst/jsdt/debug/internal/crossfire/jsdi/CFVirtualMachine.java
@@ -162,7 +162,8 @@
Map bp = null;
for (Iterator i = list.iterator(); i.hasNext();) {
bp = (Map) i.next();
- BreakpointTracker.addBreakpoint(this, bp);
+ BreakpointTracker.createLocalBreakpoint(this, bp);
+ //BreakpointTracker.addBreakpoint(this, bp);
}
}
else if(TRACE) {
diff --git a/bundles/org.eclipse.wst.jsdt.debug.crossfire/src/org/eclipse/wst/jsdt/debug/internal/crossfire/transport/Attributes.java b/bundles/org.eclipse.wst.jsdt.debug.crossfire/src/org/eclipse/wst/jsdt/debug/internal/crossfire/transport/Attributes.java
index e94d79b..12b621a 100644
--- a/bundles/org.eclipse.wst.jsdt.debug.crossfire/src/org/eclipse/wst/jsdt/debug/internal/crossfire/transport/Attributes.java
+++ b/bundles/org.eclipse.wst.jsdt.debug.crossfire/src/org/eclipse/wst/jsdt/debug/internal/crossfire/transport/Attributes.java
@@ -30,10 +30,6 @@
*/
public static final String BODY = "body"; //$NON-NLS-1$
/**
- * The type "boolean"
- */
- public static final String BOOLEAN = "boolean"; //$NON-NLS-1$
- /**
* The "breakpoint" attribute
*/
public static final String BREAKPOINT = "breakpoint"; //$NON-NLS-1$
@@ -42,10 +38,6 @@
*/
public static final String BREAKPOINTS = "breakpoints"; //$NON-NLS-1$
/**
- * The "category" attribute
- */
- public static final String CATEGORY = "category"; //$NON-NLS-1$
- /**
* The "callee attribute"
*/
public static final String CALLEE = "callee"; //$NON-NLS-1$
@@ -54,6 +46,10 @@
*/
public static final String CALLING_FRAME = "callingFrame"; //$NON-NLS-1$
/**
+ * The "category" attribute
+ */
+ public static final String CATEGORY = "category"; //$NON-NLS-1$
+ /**
* The code attribute for this packet
*/
public static final String CODE = "code"; //$NON-NLS-1$
@@ -134,14 +130,14 @@
*/
public static final String FROM_FRAME = "fromFrame"; //$NON-NLS-1$
/**
- * The "functionName" attribute
- */
- public static final String FUNCTION_NAME = "functionName"; //$NON-NLS-1$
- /**
* The type "function"
*/
public static final String FUNCTION = "function"; //$NON-NLS-1$
/**
+ * The "functionName" attribute
+ */
+ public static final String FUNCTION_NAME = "functionName"; //$NON-NLS-1$
+ /**
* The "handle" attribute
*/
public static final String HANDLE = "handle"; //$NON-NLS-1$
@@ -186,14 +182,14 @@
*/
public static final String LINE_COUNT = "lineCount"; //$NON-NLS-1$
/**
- * The "lineNumber" attribute
- */
- public static final String LINE_NUMBER = "lineNumber"; //$NON-NLS-1$
- /**
* The "lineNo" attribute
*/
public static final String LINE_NO = "lineNo"; //$NON-NLS-1$
/**
+ * The "lineNumber" attribute
+ */
+ public static final String LINE_NUMBER = "lineNumber"; //$NON-NLS-1$
+ /**
* The "lineOffset" attribute
*/
public static final String LINE_OFFSET = "lineOffset"; //$NON-NLS-1$
@@ -214,10 +210,6 @@
*/
public static final String NAME = "name"; //$NON-NLS-1$
/**
- * The type "number"
- */
- public static final String NUMBER = "number"; //$NON-NLS-1$
- /**
* The type "proto"
*/
public static final String PROTO = "proto"; //$NON-NLS-1$
@@ -242,14 +234,14 @@
*/
public static final String SCOPE = "scope"; //$NON-NLS-1$
/**
- * The "scopes" attribute
- */
- public static final String SCOPES = "scopes"; //$NON-NLS-1$
- /**
* The "scopeIndexes" attribute
*/
public static final String SCOPE_INDEXES = "scopeIndexes"; //$NON-NLS-1$
/**
+ * The "scopes" attribute
+ */
+ public static final String SCOPES = "scopes"; //$NON-NLS-1$
+ /**
* The "script" attribute
*/
public static final String SCRIPT = "script"; //$NON-NLS-1$
@@ -290,14 +282,6 @@
*/
public static final String STEPACTION = "stepAction"; //$NON-NLS-1$
/**
- * The type "string"
- */
- public static final String STRING = "string"; //$NON-NLS-1$
- /**
- * The "this" attribute
- */
- public static final String THIS = "this"; //$NON-NLS-1$
- /**
* The thisValue" attribute
*/
public static final String THIS_VALUE = "thisValue"; //$NON-NLS-1$