You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2014/04/26 05:39:46 UTC
[25/27] fdb with worker support
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/a3765ae5/modules/fdbworkers/src/flash/tools/debugger/SuspendReason.java
----------------------------------------------------------------------
diff --git a/modules/fdbworkers/src/flash/tools/debugger/SuspendReason.java b/modules/fdbworkers/src/flash/tools/debugger/SuspendReason.java
new file mode 100644
index 0000000..b35c748
--- /dev/null
+++ b/modules/fdbworkers/src/flash/tools/debugger/SuspendReason.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package flash.tools.debugger;
+
+/**
+ * Reasons for which the Flash Player will suspend itself
+ */
+public interface SuspendReason
+{
+ public static final int Unknown = 0;
+
+ /** We hit a breakpoint */
+ public static final int Breakpoint = 1;
+
+ /** A watchpoint was triggered */
+ public static final int Watch = 2;
+
+ /** A fault occurred */
+ public static final int Fault = 3;
+
+ public static final int StopRequest = 4;
+
+ /** A step completed */
+ public static final int Step = 5;
+
+ public static final int HaltOpcode = 6;
+
+ /**
+ * Either a new SWF was loaded, or else one or more scripts (ABCs)
+ * from an existing SWF were loaded.
+ */
+ public static final int ScriptLoaded = 7;
+}
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/a3765ae5/modules/fdbworkers/src/flash/tools/debugger/SuspendedException.java
----------------------------------------------------------------------
diff --git a/modules/fdbworkers/src/flash/tools/debugger/SuspendedException.java b/modules/fdbworkers/src/flash/tools/debugger/SuspendedException.java
new file mode 100644
index 0000000..49c2308
--- /dev/null
+++ b/modules/fdbworkers/src/flash/tools/debugger/SuspendedException.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package flash.tools.debugger;
+
+/**
+ * SuspendedException is thrown when the Player
+ * is in a state for which the action cannot be performed.
+ */
+public class SuspendedException extends PlayerDebugException
+{
+ private static final long serialVersionUID = 1168900295788494483L;
+
+ @Override
+ public String getMessage()
+ {
+ return Bootstrap.getLocalizationManager().getLocalizedTextString("suspended"); //$NON-NLS-1$
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/a3765ae5/modules/fdbworkers/src/flash/tools/debugger/SwfInfo.java
----------------------------------------------------------------------
diff --git a/modules/fdbworkers/src/flash/tools/debugger/SwfInfo.java b/modules/fdbworkers/src/flash/tools/debugger/SwfInfo.java
new file mode 100644
index 0000000..c1632a8
--- /dev/null
+++ b/modules/fdbworkers/src/flash/tools/debugger/SwfInfo.java
@@ -0,0 +1,110 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package flash.tools.debugger;
+
+/**
+ * The SwfInfo object contains information relating to
+ * a particular swf file that was loaded by the Player.
+ * Each SWF file contains a list of actionscript source
+ * files from which execution is performed.
+ *
+ * It is important to note 2 or more SWF files may contain
+ * multiple copies of the same source code. From the
+ * Player's perspective and the API perspective these
+ * copies are unique and it is up to the user of the
+ * API to detect these 'duplicate' files and either
+ * filter them from the user and/or present an
+ * appropriate disambiguous representation of
+ * the file names. Also internally they are treated
+ * as two distinct files and thus breakpoints
+ * will most likely need to be set on both files
+ * independently.
+ */
+public interface SwfInfo
+{
+ /**
+ * The full path of the SWF.
+ */
+ public String getPath();
+
+ /**
+ * The URL for the SWF. Includes any options
+ * at the end of the URL. For example ?debug=true
+ */
+ public String getUrl();
+
+ /**
+ * The size of this SWF in bytes
+ */
+ public int getSwfSize();
+
+ /**
+ * The size of the debug SWD file, if any
+ * This may also be zero if the SWD load is in progress
+ * @throws InProgressException if the SWD has not yet been loaded
+ */
+ public int getSwdSize(Session s) throws InProgressException;
+
+ /**
+ * Indication that this SWF, which was previously loaded into
+ * the Player, is now currently unloaded. All breakpoints
+ * set on any of the files contained within this SWF will
+ * be inactive. These breakpoints will still exist in the
+ * list returned by Session.getBreakpointList()
+ */
+ public boolean isUnloaded();
+
+ /**
+ * Indicates whether the contents of the SWF file
+ * have been completely processed.
+ * Completely processed means that calls to getSwdSize
+ * and other calls that may throw an InProgressException will
+ * not throw this exception. Additionally the function
+ * and offset related calls within SourceFile will return
+ * non-null values once this call returns true.
+ * @since Version 2
+ */
+ public boolean isProcessingComplete();
+
+ /**
+ * Number of source files in this SWF.
+ * May be zero if no debug
+ * @throws InProgressException if the SWD has not yet been loaded
+ */
+ public int getSourceCount(Session s) throws InProgressException;
+
+ /**
+ * List of source files that are contained within
+ * this SWF.
+ * @throws InProgressException if the SWD has not yet been loaded
+ * @since Version 2
+ */
+ public SourceFile[] getSourceList(Session s) throws InProgressException;
+
+ /**
+ * Returns true if the given source file is contained
+ * within this SWF.
+ * @since Version 2
+ */
+ public boolean containsSource(SourceFile f);
+
+ /**
+ * Return the worker ID to which this SWF belongs.
+ */
+ public int getIsolateId();
+}
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/a3765ae5/modules/fdbworkers/src/flash/tools/debugger/Value.java
----------------------------------------------------------------------
diff --git a/modules/fdbworkers/src/flash/tools/debugger/Value.java b/modules/fdbworkers/src/flash/tools/debugger/Value.java
new file mode 100644
index 0000000..1f97e9e
--- /dev/null
+++ b/modules/fdbworkers/src/flash/tools/debugger/Value.java
@@ -0,0 +1,255 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package flash.tools.debugger;
+
+import flash.tools.debugger.concrete.DVariable;
+
+/**
+ * An ActionScript value, for example, the value of a variable or constant.
+ *
+ * @author mmorearty
+ */
+public interface Value
+{
+ /**
+ * A special object representing ActionScript's "undefined" value.
+ */
+ public static final Object UNDEFINED = new Object() {
+ @Override
+ public String toString() {
+ return "undefined"; //$NON-NLS-1$
+ }
+ };
+
+ /**
+ * The value returned if somone calls getId() for a Variable
+ * which stores a variable of simple type such as String or
+ * integer, rather than an Object or MovieClip.
+ * @see getId()
+ */
+ public static final long UNKNOWN_ID = -1;
+
+ /**
+ * The special ID for pseudo-variable "_global". (Note, this only
+ * exists in AS2, not AS3.)
+ * @see getId()
+ */
+ public static final long GLOBAL_ID = -2;
+
+ /**
+ * The special ID for pseudo-variable "this".
+ * @see getId()
+ */
+ public static final long THIS_ID = -3;
+
+ /**
+ * The special ID for pseudo-variable "_root". (Note, this only
+ * exists in AS2, not AS3.)
+ * @see getId()
+ */
+ public static final long ROOT_ID = -4;
+
+ /**
+ * The special ID for the top frame of the stack. Locals and
+ * arguments are "members" of this pseudo-variable.
+ *
+ * All the stack frames have IDs counting down from here. For example,
+ * the top stack frame has ID <code>BASE_ID</code>; the next
+ * stack frame has ID <code>BASE_ID - 1</code>; and so on.
+ *
+ * @see getId()
+ */
+ public static final long BASE_ID = -100;
+
+ /**
+ * _level0 == LEVEL_ID, _level1 == LEVEL_ID-1, ...
+ *
+ * all IDs below this line are dynamic.
+ */
+ public static final long LEVEL_ID = -300;
+
+ /**
+ * The return value of getTypeName() if this value represents the traits of a class.
+ */
+ public static final String TRAITS_TYPE_NAME = "traits"; //$NON-NLS-1$
+
+ /**
+ * Variable type can be one of VariableType.OBJECT,
+ * VariableType.FUNCTION, VariableType.NUMBER, VariableType.STRING,
+ * VariableType.UNDEFINED, VariableType.NULL.
+ */
+ public int getType();
+
+ /**
+ * The type name of the value:
+ *
+ * <ul>
+ * <li> <code>"Number"</code> </li>
+ * <li> <code>"Boolean"</code> </li>
+ * <li> <code>"String"</code> </li>
+ * <li> <code>"null"</code> </li>
+ * <li> <code>"undefined"</code> </li>
+ * <li> <code>Value.TRAITS_TYPE_NAME</code> if this value represents the
+ * traits of a class </li>
+ * <li> <code>"[package::]Classname@hexaddr"</code> if this value
+ * represents an instance of a non-primitive object. For example, if this is
+ * an instance of mx.core.Application, the type name might be
+ * "mx.core::Application@1234abcd". </li>
+ * </ul>
+ */
+ public String getTypeName();
+
+ /**
+ * The class name of the value. This isn't actually very useful, and should
+ * probably go away; it had more relevant in ActionScript 2, when the return
+ * value from this function could have been any one of the strings returned
+ * by {@link DVariable#classNameFor(long, boolean)}.
+ *
+ * In the AS3 world, the only possible return values from this function are:
+ *
+ * <ul>
+ * <li> <code>"Object"</code> for instances of non-primitive classes such
+ * as Object, Array, etc. </li>
+ * <li> <code>""</code> all primitive values (Number, Boolean, String,
+ * null, undefined), or the traits of a class. </li>
+ * </ul>
+ */
+ public String getClassName();
+
+ /**
+ * Variable attributes define further information
+ * regarding the variable. They are bitfields identified
+ * as VariableAttribute.xxx
+ *
+ * @see VariableAttribute
+ */
+ public int getAttributes();
+
+ /**
+ * @see VariableAttribute
+ */
+ public boolean isAttributeSet(int variableAttribute);
+
+ /**
+ * Returns a unique ID for the object referred to by this variable.
+ * If two variables point to the same underlying object, their
+ * getId() functions will return the same value.
+ *
+ * This is only meaningful for variables that store an Object or
+ * MovieClip. For other types of variables (e.g. integers and
+ * strings), this returns <code>UNKNOWN_ID</code>.
+ */
+ public long getId();
+
+ /**
+ * Returns the value of the variable, as an Object. The return
+ * value will always be one of the following:
+ *
+ * <ul>
+ * <li> <code>null</code> </li>
+ * <li> <code>Value.UNDEFINED</code> </li>
+ * <li> a <code>Boolean</code> </li>
+ * <li> a <code>Double</code> (careful, it might be <code>Double.NaN</code>) </li>
+ * <li> a <code>String</code> </li>
+ * <li> a <code>Long</code> if this value represents a non-primitive
+ * type, such as an Object. If it is a Long, then it is the id of
+ * the Value (the same value returned by <code>getId()</code>).
+ * </ul>
+ */
+ public Object getValueAsObject();
+
+ /**
+ * Returns the value of the variable, converted to a string. Strings
+ * are returned as the exact value of the string itself, with no
+ * extra quotation marks and no escaping of characters within the
+ * string.
+ */
+ public String getValueAsString();
+
+ /**
+ * Returns all child members of this variable. Can only be called for
+ * variables of type Object or MovieClip.
+ * @throws NotConnectedException
+ * @throws NoResponseException
+ * @throws NotSuspendedException
+ */
+ public Variable[] getMembers(Session s) throws NotSuspendedException, NoResponseException, NotConnectedException;
+
+ /**
+ * Returns a specific child member of this variable. Can only be called for
+ * variables of type <code>Object<code> or <code>MovieClip<code>.
+ * @param s the session
+ * @param name just a varname name, without its namespace (see <code>getName()</code>)
+ * @return the specified child member, or null if there is no such child.
+ * @throws NotConnectedException
+ * @throws NoResponseException
+ * @throws NotSuspendedException
+ */
+ public Variable getMemberNamed(Session s, String name) throws NotSuspendedException, NoResponseException, NotConnectedException;
+
+ /**
+ * Returns the number of child members of this variable. If called for
+ * a variable which has a simple type such as integer or string,
+ * returns zero.
+ * @throws NotConnectedException
+ * @throws NoResponseException
+ * @throws NotSuspendedException
+ */
+ public int getMemberCount(Session s) throws NotSuspendedException, NoResponseException, NotConnectedException;
+
+ /**
+ * Returns the list of classes that contributed members to this object, from
+ * the class itself all the way down to <code>Object</code> (or, if
+ * allLevels == false, down to the lowest-level class that actually
+ * contributed members).
+ *
+ * @param allLevels
+ * if <code>true</code>, the caller wants the entire class
+ * hierarchy. If <code>false</code>, the caller wants only
+ * that portion of the class hierarchy that actually contributed
+ * member variables to the object. For example,
+ * <code>Object</code> has no members, so if the caller passes
+ * <code>true</code> then the returned array of strings will
+ * always end with <code>Object</code>, but if the caller
+ * passes <code>false</code> then the returned array of strings
+ * will <em>never</em> end with <code>Object</code>.
+ * @return an array of fully qualified class names.
+ */
+ public String[] getClassHierarchy(boolean allLevels);
+
+ /**
+ * Returns all child members of this variable that are private and are present
+ * in its inheritance chain. Only relevant after a call to getMembers().
+ *
+ * Warning: This may contain variables with the same name (when there is more
+ * than two level inheritance).
+ */
+ public Variable[] getPrivateInheritedMembers();
+
+ /**
+ * Get all the private variables with the given name. Usually one, but more
+ * may be present if the inheritance chain is long.
+ * @param name Variable name.
+ */
+ public Variable[] getPrivateInheritedMemberNamed(String name);
+
+ /**
+ * Get the worker id of the isolate to which this value belongs.
+ */
+ public int getIsolateId();
+}
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/a3765ae5/modules/fdbworkers/src/flash/tools/debugger/ValueAttribute.java
----------------------------------------------------------------------
diff --git a/modules/fdbworkers/src/flash/tools/debugger/ValueAttribute.java b/modules/fdbworkers/src/flash/tools/debugger/ValueAttribute.java
new file mode 100644
index 0000000..00b62c8
--- /dev/null
+++ b/modules/fdbworkers/src/flash/tools/debugger/ValueAttribute.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package flash.tools.debugger;
+
+/**
+ * @author mmorearty
+ */
+public interface ValueAttribute
+{
+
+ /**
+ * Indicates that the value that has been returned for a variable
+ * is actually not its real value; instead, it is the message of
+ * an exception that was thrown while executing the getter for
+ * the variable.
+ */
+ public static final int IS_EXCEPTION = 0x00040000;
+
+ /**
+ * Indicates that an object is actually a Class. For example, if you have
+ *
+ * <pre> var someClass:Class = Button;</pre>
+ *
+ * ... then someClass will have IS_CLASS set to true.
+ */
+ public static final int IS_CLASS = 0x04000000;
+}
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/a3765ae5/modules/fdbworkers/src/flash/tools/debugger/Variable.java
----------------------------------------------------------------------
diff --git a/modules/fdbworkers/src/flash/tools/debugger/Variable.java b/modules/fdbworkers/src/flash/tools/debugger/Variable.java
new file mode 100644
index 0000000..a424525
--- /dev/null
+++ b/modules/fdbworkers/src/flash/tools/debugger/Variable.java
@@ -0,0 +1,169 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package flash.tools.debugger;
+
+import flash.tools.debugger.events.FaultEvent;
+
+/**
+ * A Variable is any ActionScript variable, such as a String, Number, etc.
+ * It encapsulates the concept of a type and a value.
+ */
+public interface Variable
+{
+ /**
+ * The name of the variable.
+ */
+ public String getName();
+
+ /**
+ * The fully qualified name of the variable, i.e. "namespace::name"
+ * if there is a namespace, or just "name" if not.
+ */
+ public String getQualifiedName();
+
+ /**
+ * The namespace of the variable. This is everything before the
+ * "::". For example:
+ *
+ * <ul>
+ * <li> If a variable was declared "private var x", then the
+ * namespace is "ClassName$3", where "3" might be
+ * any number. </li>
+ * <li> If a variable was declared within a namespace, e.g.
+ * "mynamespace var x", then the namespace might be
+ * "http://blahblah::x", where "http://blahblah" is the URL
+ * of the namespace.
+ * <li> If a variable was declared neither public nor private
+ * (and is therefore "internal"), and it is inside of a
+ * package, then the namespace might be
+ * "packagename". </li>
+ * </ul>
+ *
+ * @return namespace or "", never <code>null</code>
+ */
+ public String getNamespace();
+
+ /**
+ * Returns just the scope bits of the attributes. The scope values from
+ * VariableAttribute (PUBLIC_SCOPE etc.) are NOT bitfields, so the returned
+ * value can be compared directly to VariableAttribute.PUBLIC_SCOPE, etc.
+ * using "==".
+ *
+ * @see VariableAttribute
+ */
+ public int getScope();
+
+ /**
+ * For a member variable of an instance of some class, its "level" indicates
+ * how far up the class hierarchy it is from the actual class of the instance.
+ * For example, suppose you have this code:
+ *
+ * <pre>
+ * class A { int a }
+ * class B extends A { int b }
+ * class C extends B { int c }
+ * var myObject: C
+ * </pre>
+ *
+ * In this case, for <code>myObject</code>, the "level" of variable <code>c</code>
+ * is 0; the level of <code>b</code> is 1; and the level of <code>a</code> is 2.
+ */
+ public int getLevel();
+
+ /**
+ * The class in which this member was actually defined. For example, if class
+ * B extends class A, and class A has member variable V, then for variable
+ * V, the defining class is always "A", even though the parent variable might
+ * be an instance of class B.
+ */
+ public String getDefiningClass();
+
+ /**
+ * Variable attributes define further information
+ * regarding the variable. They are bitfields identified
+ * as VariableAttribute.xxx
+ *
+ * @see VariableAttribute
+ */
+ public int getAttributes();
+
+ /**
+ * @see VariableAttribute
+ */
+ public boolean isAttributeSet(int variableAttribute);
+
+ /**
+ * Returns the value of the variable.
+ */
+ public Value getValue();
+
+ /**
+ * Returns whether the value of the variable has changed since the last
+ * time the program was suspended. If the previous value of the
+ * variable is unknown, this function will return <code>false</code>.
+ */
+ public boolean hasValueChanged(Session s);
+
+ /**
+ * Changes the value of a variable. New members cannot be added to a Variable,
+ * only the value of existing scalar members can be modified.
+ *
+ * @param type
+ * the type of the member which is being set. Use
+ * VariableType.UNDEFINED in order to set the variable to an
+ * undefined state; the contents of 'value' will be ignored.
+ * @param value
+ * the string value of the member. May be 'true' or 'false' for
+ * Boolean types or any valid number for Number types.
+ * @return null, if set was successful; or a FaultEvent if a setter was
+ * invoked and the setter threw an exception. In that case, look at
+ * FaultEvent.information to see the error text of the exception
+ * that occurred.
+ * @throws NoResponseException
+ * if times out
+ * @throws NotSuspendedException
+ * if Player is running
+ * @throws NotConnectedException
+ * if Player is disconnected from Session
+ */
+ public FaultEvent setValue(Session s, int type, String value) throws NotSuspendedException, NoResponseException, NotConnectedException;
+
+ /**
+ * @return True if this variable has a getter, and the getter has not yet been invoked.
+ */
+ public boolean needsToInvokeGetter();
+
+ /**
+ * Executes the getter for this variable, and changes its value accordingly. Note that
+ * the <code>HAS_GETTER</code> flag is not affected by this call -- even after this
+ * call, <code>HAS_GETTER</code> will still be true. If you want to test whether the
+ * getter has already been executed, call <code>needsToInvokeGetter()</code>.
+ * <p>
+ * Has no effect if <code>needsToInvokeGetter()</code> is false.
+ *
+ * @throws NotSuspendedException
+ * @throws NoResponseException
+ * @throws NotConnectedException
+ */
+ public void invokeGetter(Session s) throws NotSuspendedException, NoResponseException, NotConnectedException;
+
+ /**
+ * Get the worker id of the isolate to which this value belongs.
+ */
+ public int getIsolateId();
+}
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/a3765ae5/modules/fdbworkers/src/flash/tools/debugger/VariableAttribute.java
----------------------------------------------------------------------
diff --git a/modules/fdbworkers/src/flash/tools/debugger/VariableAttribute.java b/modules/fdbworkers/src/flash/tools/debugger/VariableAttribute.java
new file mode 100644
index 0000000..8283137
--- /dev/null
+++ b/modules/fdbworkers/src/flash/tools/debugger/VariableAttribute.java
@@ -0,0 +1,168 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package flash.tools.debugger;
+
+/**
+ * Specific attributes which further qualify a Variable. The values in the low
+ * 16 bits correspond to the enumeration fields defined in the player's
+ * "splay.h" file, e.g. <code>kDontEnumerate</code> etc. The values from the
+ * high 16 bits correspond to <code>enum InVariableFlags</code> from
+ * playerdebugger.h, e.g. <code>kIsArgument</code> etc.
+ */
+public interface VariableAttribute
+{
+ /**
+ * Indicates that this member is invisible to an enumeration
+ * of its parent.
+ */
+ public static final int DONT_ENUMERATE = 0x00000001;
+
+ /**
+ * Indicates that a variable is read-only.
+ */
+ public static final int READ_ONLY = 0x00000004;
+
+ /**
+ * Indicates that a variable is a local.
+ */
+ public static final int IS_LOCAL = 0x00000020;
+
+ /**
+ * Indicates that a variable is an argument to a function.
+ */
+ public static final int IS_ARGUMENT = 0x00010000;
+
+ /**
+ * Indicates that a variable is "dynamic" -- that is, whether it
+ * is a dynamic property of a class declared with keyword "dynamic".
+ * Note, this attribute only works with AS3 and above.
+ */
+ public static final int IS_DYNAMIC = 0x00020000;
+
+ // 0x00040000 is reserved for IS_EXCEPTION, which is now part of
+ // ValueAttribute rather than VariableAttribute.
+
+ /**
+ * Indicates that a variable has a getter.
+ */
+ public static final int HAS_GETTER = 0x00080000;
+
+ /**
+ * Indicates that a variable has a setter.
+ */
+ public static final int HAS_SETTER = 0x00100000;
+
+ /**
+ * Indicates that a variable is a static member of its parent.
+ */
+ public static final int IS_STATIC = 0x00200000;
+
+ /**
+ * Indicates that a variable was declared "const". READ_ONLY, on the other
+ * hand, applies both to "const" variables and also to various other types
+ * of objects. IS_CONST implies READ_ONLY; READ_ONLY does not imply
+ * IS_CONST.
+ */
+ public static final int IS_CONST = 0x00400000;
+
+ /**
+ * Indicates that a variable is a public member of its parent.
+ *
+ * Note: the scope attributes are not bitfields. To determine the scope
+ * of a variable, use variable.getScope() and compare the result to the
+ * various *_SCOPE values using ==. For example:
+ *
+ * <pre>
+ * if (myVar.getScope() == VariableAttribute.PUBLIC_SCOPE) ...
+ * </pre>
+ */
+ public static final int PUBLIC_SCOPE = 0x00000000;
+
+ /**
+ * Indicates that a variable is a private member of its parent.
+ *
+ * Note: the scope attributes are not bitfields. To determine the scope
+ * of a variable, use variable.getScope() and compare the result to the
+ * various *_SCOPE values using ==. For example:
+ *
+ * <pre>
+ * if (myVar.getScope() == VariableAttribute.PRIVATE_SCOPE) ...
+ * </pre>
+ */
+ public static final int PRIVATE_SCOPE = 0x00800000;
+
+ /**
+ * Indicates that a variable is a protected member of its parent.
+ *
+ * Note: the scope attributes are not bitfields. To determine the scope
+ * of a variable, use variable.getScope() and compare the result to the
+ * various *_SCOPE values using ==. For example:
+ *
+ * <pre>
+ * if (myVar.getScope() == VariableAttribute.PROTECTED_SCOPE) ...
+ * </pre>
+ */
+ public static final int PROTECTED_SCOPE = 0x01000000;
+
+ /**
+ * Indicates that a variable is an internal member of its parent.
+ * Internally scoped variables are visible to all classes that
+ * are in the same package.
+ *
+ * Note: the scope attributes are not bitfields. To determine the scope
+ * of a variable, use variable.getScope() and compare the result to the
+ * various *_SCOPE values using ==. For example:
+ *
+ * <pre>
+ * if (myVar.getScope() == VariableAttribute.INTERNAL_SCOPE) ...
+ * </pre>
+ */
+ public static final int INTERNAL_SCOPE = 0x01800000;
+
+ /**
+ * Indicates that a variable is scoped by a namespace. For
+ * example, it may have been declared as:
+ * <code>my_namespace var x;</code>
+ *
+ * Note: the scope attributes are not bitfields. To determine the scope
+ * of a variable, use variable.getScope() and compare the result to the
+ * various *_SCOPE values using ==. For example:
+ *
+ * <pre>
+ * if (myVar.getScope() == VariableAttribute.NAMESPACE_SCOPE) ...
+ * </pre>
+ */
+ public static final int NAMESPACE_SCOPE = 0x02000000;
+
+ /**
+ * A mask which can be used to get back only the scope-related
+ * attributes.
+ *
+ * Note: the scope attributes are not bitfields. To determine the scope
+ * of a variable, use variable.getScope() and compare the result to the
+ * various *_SCOPE values using ==. For example:
+ *
+ * <pre>
+ * if (myVar.getScope() == VariableAttribute.PRIVATE_SCOPE) ...
+ * </pre>
+ */
+ public static final int SCOPE_MASK = PUBLIC_SCOPE|PRIVATE_SCOPE|PROTECTED_SCOPE|INTERNAL_SCOPE|NAMESPACE_SCOPE;
+
+ // 0x04000000 is reserved for IS_CLASS, which is now part of
+ // ValueAttribute rather than VariableAttribute.
+}
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/a3765ae5/modules/fdbworkers/src/flash/tools/debugger/VariableType.java
----------------------------------------------------------------------
diff --git a/modules/fdbworkers/src/flash/tools/debugger/VariableType.java b/modules/fdbworkers/src/flash/tools/debugger/VariableType.java
new file mode 100644
index 0000000..48554da
--- /dev/null
+++ b/modules/fdbworkers/src/flash/tools/debugger/VariableType.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package flash.tools.debugger;
+
+/**
+ * An identifier for the type of a Variable.
+ */
+public interface VariableType
+{
+ public static final int NUMBER = 0;
+ public static final int BOOLEAN = 1;
+ public static final int STRING = 2;
+ public static final int OBJECT = 3;
+ public static final int FUNCTION = 4;
+ public static final int MOVIECLIP = 5;
+ public static final int NULL = 6;
+ public static final int UNDEFINED = 7;
+ public static final int UNKNOWN = 8;
+}
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/a3765ae5/modules/fdbworkers/src/flash/tools/debugger/VersionException.java
----------------------------------------------------------------------
diff --git a/modules/fdbworkers/src/flash/tools/debugger/VersionException.java b/modules/fdbworkers/src/flash/tools/debugger/VersionException.java
new file mode 100644
index 0000000..5ecb0ca
--- /dev/null
+++ b/modules/fdbworkers/src/flash/tools/debugger/VersionException.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package flash.tools.debugger;
+
+/**
+ * VersionException is thrown when the Session
+ * is connected to a Player that does not support
+ * a given operation.
+ */
+public class VersionException extends PlayerDebugException
+{
+ private static final long serialVersionUID = 4966523681921720567L;
+
+ @Override
+ public String getMessage()
+ {
+ return Bootstrap.getLocalizationManager().getLocalizedTextString("unexpectedPlayerVersion"); //$NON-NLS-1$
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/a3765ae5/modules/fdbworkers/src/flash/tools/debugger/Watch.java
----------------------------------------------------------------------
diff --git a/modules/fdbworkers/src/flash/tools/debugger/Watch.java b/modules/fdbworkers/src/flash/tools/debugger/Watch.java
new file mode 100644
index 0000000..d8d9aef
--- /dev/null
+++ b/modules/fdbworkers/src/flash/tools/debugger/Watch.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package flash.tools.debugger;
+
+/**
+ * The Watch object represents a single watchpoint within a Session
+ * A watchpoint is a mechanism by which execution of the Player
+ * can be halted when a particular variable is accessed. The
+ * access type can be one of read, write or read/write.
+ * @since Version 2
+ */
+public interface Watch
+{
+ /**
+ * Value id of the value whose member is being watched.
+ * For example if the watch is placed on 'a.b.c' then the id
+ * will be that of the value 'a.b'. Session.getVariable()
+ * can be used to obtain the variable. This combined with
+ * the memberName() forms the unique identifier for the Watch.
+ */
+ public long getValueId();
+
+ /**
+ * Name of variable member that is being watched.
+ */
+ public String getMemberName();
+
+ /**
+ * The kind of watch placed on the variable being watched.
+ */
+ public int getKind();
+
+ /**
+ * The isolate to which this watchpoint belongs.
+ */
+ public int getIsolateId();
+}
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/a3765ae5/modules/fdbworkers/src/flash/tools/debugger/WatchKind.java
----------------------------------------------------------------------
diff --git a/modules/fdbworkers/src/flash/tools/debugger/WatchKind.java b/modules/fdbworkers/src/flash/tools/debugger/WatchKind.java
new file mode 100644
index 0000000..b5a9d01
--- /dev/null
+++ b/modules/fdbworkers/src/flash/tools/debugger/WatchKind.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package flash.tools.debugger;
+
+/**
+ * A descriptor for the type of watchpoint.
+ * It may be one of three values; read, write or
+ * both read and write.
+ * @since Version 2
+ */
+public interface WatchKind
+{
+ /* kind of a watchpoint (one of) */
+ public static final int NONE = 0;
+ public static final int READ = 1;
+ public static final int WRITE = 2;
+ public static final int READWRITE = 3;
+}
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/a3765ae5/modules/fdbworkers/src/flash/tools/debugger/concrete/AIRPlayer.java
----------------------------------------------------------------------
diff --git a/modules/fdbworkers/src/flash/tools/debugger/concrete/AIRPlayer.java b/modules/fdbworkers/src/flash/tools/debugger/concrete/AIRPlayer.java
new file mode 100644
index 0000000..2aeefd3
--- /dev/null
+++ b/modules/fdbworkers/src/flash/tools/debugger/concrete/AIRPlayer.java
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package flash.tools.debugger.concrete;
+
+import java.io.File;
+
+import flash.tools.debugger.Browser;
+import flash.tools.debugger.Player;
+
+/**
+ * @author Mike Morearty
+ */
+public class AIRPlayer implements Player
+{
+ File m_adl;
+
+ /**
+ * @param adl
+ * The path to adl (Mac/Linux) or adl.exe (Windows); may be null
+ */
+ public AIRPlayer(File adl)
+ {
+ m_adl = adl;
+ }
+
+ /*
+ * @see flash.tools.debugger.Player#getType()
+ */
+ public int getType()
+ {
+ return AIR;
+ }
+
+ /*
+ * @see flash.tools.debugger.Player#getPath()
+ */
+ public File getPath()
+ {
+ return m_adl;
+ }
+
+ /*
+ * @see flash.tools.debugger.Player#getBrowser()
+ */
+ public Browser getBrowser()
+ {
+ return null;
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/a3765ae5/modules/fdbworkers/src/flash/tools/debugger/concrete/AbstractPlayer.java
----------------------------------------------------------------------
diff --git a/modules/fdbworkers/src/flash/tools/debugger/concrete/AbstractPlayer.java b/modules/fdbworkers/src/flash/tools/debugger/concrete/AbstractPlayer.java
new file mode 100644
index 0000000..d147768
--- /dev/null
+++ b/modules/fdbworkers/src/flash/tools/debugger/concrete/AbstractPlayer.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package flash.tools.debugger.concrete;
+
+import java.io.File;
+
+import flash.tools.debugger.Browser;
+import flash.tools.debugger.Player;
+
+/**
+ * @author mmorearty
+ */
+public abstract class AbstractPlayer implements Player
+{
+ private Browser m_browser;
+ private File m_flashPlayer;
+
+ public AbstractPlayer(File webBrowser, File flashPlayer)
+ {
+ if (webBrowser != null)
+ m_browser = new DBrowser(webBrowser);
+ m_flashPlayer = flashPlayer;
+ }
+
+ /*
+ * @see flash.tools.debugger.Player#getPath()
+ */
+ public File getPath()
+ {
+ return m_flashPlayer;
+ }
+
+ /*
+ * @see flash.tools.debugger.Player#getBrowser()
+ */
+ public Browser getBrowser()
+ {
+ return m_browser; // this is null if we're using the standalone player
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/a3765ae5/modules/fdbworkers/src/flash/tools/debugger/concrete/ActiveXPlayer.java
----------------------------------------------------------------------
diff --git a/modules/fdbworkers/src/flash/tools/debugger/concrete/ActiveXPlayer.java b/modules/fdbworkers/src/flash/tools/debugger/concrete/ActiveXPlayer.java
new file mode 100644
index 0000000..45cf5eb
--- /dev/null
+++ b/modules/fdbworkers/src/flash/tools/debugger/concrete/ActiveXPlayer.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package flash.tools.debugger.concrete;
+
+import java.io.File;
+
+/**
+ * @author mmorearty
+ */
+public class ActiveXPlayer extends AbstractPlayer
+{
+ public ActiveXPlayer(File iexploreExe, File path)
+ {
+ super(iexploreExe, path);
+ }
+
+ /*
+ * @see flash.tools.debugger.Player#getType()
+ */
+ public int getType()
+ {
+ return ACTIVEX;
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/a3765ae5/modules/fdbworkers/src/flash/tools/debugger/concrete/BinaryOp.java
----------------------------------------------------------------------
diff --git a/modules/fdbworkers/src/flash/tools/debugger/concrete/BinaryOp.java b/modules/fdbworkers/src/flash/tools/debugger/concrete/BinaryOp.java
new file mode 100644
index 0000000..d5bd0b4
--- /dev/null
+++ b/modules/fdbworkers/src/flash/tools/debugger/concrete/BinaryOp.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package flash.tools.debugger.concrete;
+
+/**
+ * @author Mike Morearty
+ */
+public enum BinaryOp {
+ // These correspond to the values in the player, in playerdebugger.h,
+ // enum BinaryOp. These values must be kept synchronized with those
+ // ones.
+ Is(0, "is"), //$NON-NLS-1$
+ Instanceof(1, "instanceof"), //$NON-NLS-1$
+ In(2, "in"), //$NON-NLS-1$
+ As(3, "as"); //$NON-NLS-1$
+
+ private int m_value;
+ private String m_name;
+
+ private BinaryOp(int value, String name) {
+ m_value = value;
+ m_name = name;
+ }
+
+ public int getValue() {
+ return m_value;
+ }
+
+ public String getName() {
+ return m_name;
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/a3765ae5/modules/fdbworkers/src/flash/tools/debugger/concrete/DBrowser.java
----------------------------------------------------------------------
diff --git a/modules/fdbworkers/src/flash/tools/debugger/concrete/DBrowser.java b/modules/fdbworkers/src/flash/tools/debugger/concrete/DBrowser.java
new file mode 100644
index 0000000..cd69fa4
--- /dev/null
+++ b/modules/fdbworkers/src/flash/tools/debugger/concrete/DBrowser.java
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package flash.tools.debugger.concrete;
+
+import java.io.File;
+
+import flash.tools.debugger.Browser;
+
+/**
+ * @author mmorearty
+ */
+public class DBrowser implements Browser
+{
+ private File m_path;
+ private int m_type;
+
+ public DBrowser(File exepath)
+ {
+ m_path = exepath;
+ String exename = exepath.getName().toLowerCase();
+ if (exename.equals("iexplore.exe")) //$NON-NLS-1$
+ m_type = INTERNET_EXPLORER;
+ else if (exename.equals("mozilla.exe")) //$NON-NLS-1$
+ m_type = MOZILLA;
+ else if (exename.equals("firefox.exe")) //$NON-NLS-1$
+ m_type = MOZILLA_FIREFOX;
+ else if (exename.equals("opera.exe")) //$NON-NLS-1$
+ m_type = OPERA;
+ else if (exename.equals("netscape.exe")) //$NON-NLS-1$
+ m_type = NETSCAPE_NAVIGATOR;
+ else
+ m_type = UNKNOWN;
+ }
+
+ /*
+ * @see flash.tools.debugger.Browser#getType()
+ */
+ public int getType()
+ {
+ return m_type;
+ }
+
+ /*
+ * @see flash.tools.debugger.Browser#getPath()
+ */
+ public File getPath()
+ {
+ return m_path;
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/a3765ae5/modules/fdbworkers/src/flash/tools/debugger/concrete/DIsolate.java
----------------------------------------------------------------------
diff --git a/modules/fdbworkers/src/flash/tools/debugger/concrete/DIsolate.java b/modules/fdbworkers/src/flash/tools/debugger/concrete/DIsolate.java
new file mode 100644
index 0000000..3a0b21b
--- /dev/null
+++ b/modules/fdbworkers/src/flash/tools/debugger/concrete/DIsolate.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package flash.tools.debugger.concrete;
+
+import flash.tools.debugger.Isolate;
+
+/**
+ * Concrete implementation of an Isolate.
+ * @author anirudhs
+ */
+public class DIsolate implements Isolate {
+
+ /** Isolate object behind the primordial or main thread (always exists) */
+ public static final DIsolate DEFAULT_ISOLATE = new DIsolate(Isolate.DEFAULT_ID);
+
+ private int id;
+
+ public DIsolate(int id) {
+ this.id = id;
+ }
+
+ /* (non-Javadoc)
+ * @see flash.tools.debugger.Isolate#getId()
+ */
+ @Override
+ public int getId() {
+ return id;
+ }
+
+ @Override
+ public String toString() {
+ return "Worker " + getId(); //$NON-NLS-1$
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/a3765ae5/modules/fdbworkers/src/flash/tools/debugger/concrete/DLocation.java
----------------------------------------------------------------------
diff --git a/modules/fdbworkers/src/flash/tools/debugger/concrete/DLocation.java b/modules/fdbworkers/src/flash/tools/debugger/concrete/DLocation.java
new file mode 100644
index 0000000..01c5ab3
--- /dev/null
+++ b/modules/fdbworkers/src/flash/tools/debugger/concrete/DLocation.java
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package flash.tools.debugger.concrete;
+
+import flash.tools.debugger.Location;
+import flash.tools.debugger.SourceFile;
+
+public class DLocation implements Location
+{
+ SourceFile m_source;
+ int m_line;
+ int m_isolateId;
+ boolean m_removed;
+
+ DLocation(SourceFile src, int line, int isolateId)
+ {
+ m_source = src;
+ m_line = line;
+ m_removed = false;
+ m_isolateId = isolateId;
+ }
+
+ /* getters/setters */
+ public SourceFile getFile() { return m_source; }
+ public int getLine() { return m_line; }
+ public boolean isRemoved() { return m_removed; }
+ public void setRemoved(boolean removed) { m_removed = removed; }
+
+ public int getId() { return encodeId(getFile().getId(), getLine()); }
+
+ /* encode /decode */
+ public static final int encodeId(int fileId, int line)
+ {
+ return ( (line << 16) | fileId );
+ }
+
+ public static final int decodeFile(long id)
+ {
+ return (int)(id & 0xffff);
+ }
+
+ public static final int decodeLine(long id)
+ {
+ return (int)(id >> 16 & 0xffff);
+ }
+
+ /** for debugging */
+ @Override
+ public String toString()
+ {
+ return m_source.toString() + ":" + m_line; //$NON-NLS-1$
+ }
+
+ @Override
+ public int getIsolateId() {
+ return m_isolateId;
+ }
+}