Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

This commit was manufactured by cvs2svn to create tag 'v201205110332'.

  • Loading branch information...
commit 73a7cdc8d2e7920c49069b4a0347fbc93c1aec93 1 parent d8963cf
nitind authored
Showing with 0 additions and 4,932 deletions.
  1. +0 −7 bundles/org.eclipse.wst.jsdt.debug.rhino/.classpath
  2. +0 −34 bundles/org.eclipse.wst.jsdt.debug.rhino/.project
  3. +0 −90 bundles/org.eclipse.wst.jsdt.debug.rhino/.settings/org.eclipse.jdt.core.prefs
  4. +0 −28 bundles/org.eclipse.wst.jsdt.debug.rhino/META-INF/MANIFEST.MF
  5. +0 −12 bundles/org.eclipse.wst.jsdt.debug.rhino/OSGI-INF/l10n/bundle.properties
  6. +0 −28 bundles/org.eclipse.wst.jsdt.debug.rhino/about.html
  7. +0 −19 bundles/org.eclipse.wst.jsdt.debug.rhino/build.properties
  8. +0 −35 bundles/org.eclipse.wst.jsdt.debug.rhino/plugin.xml
  9. +0 −29 bundles/org.eclipse.wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/Constants.java
  10. +0 −126 bundles/org.eclipse.wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/RhinoDebugPlugin.java
  11. +0 −42 ....eclipse.wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/RhinoPreferenceInitializer.java
  12. +0 −69 ...org.eclipse.wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/RhinoPreferencesManager.java
  13. +0 −95 ....jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/breakpoints/RhinoBreakpointParticipant.java
  14. +0 −127 ...org.eclipse.wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/ArrayReferenceImpl.java
  15. +0 −89 ...s/org.eclipse.wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/BooleanValueImpl.java
  16. +0 −68 ....eclipse.wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/FunctionReferenceImpl.java
  17. +0 −104 bundles/org.eclipse.wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/LocationImpl.java
  18. +0 −28 bundles/org.eclipse.wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/Messages.java
  19. +0 −62 bundles/org.eclipse.wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/MirrorImpl.java
  20. +0 −49 bundles/org.eclipse.wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/NullValueImpl.java
  21. +0 −107 ...es/org.eclipse.wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/NumberValueImpl.java
  22. +0 −163 ...rg.eclipse.wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/ObjectReferenceImpl.java
  23. +0 −84 bundles/org.eclipse.wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/PropertyImpl.java
  24. +0 −191 ...rg.eclipse.wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/ScriptReferenceImpl.java
  25. +0 −242 ...les/org.eclipse.wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/StackFrameImpl.java
  26. +0 −61 ...es/org.eclipse.wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/StringValueImpl.java
  27. +0 −250 ...rg.eclipse.wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/ThreadReferenceImpl.java
  28. +0 −58 ...org.eclipse.wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/UndefinedValueImpl.java
  29. +0 −48 bundles/org.eclipse.wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/VariableImpl.java
  30. +0 −463 ...org.eclipse.wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/VirtualMachineImpl.java
  31. +0 −90 ...g.eclipse.wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/connect/HostArgument.java
  32. +0 −35 ...s/org.eclipse.wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/connect/Messages.java
  33. +0 −133 ...g.eclipse.wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/connect/PortArgument.java
  34. +0 −82 ...st.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/connect/RhinoAttachingConnector.java
  35. +0 −16 ...eclipse.wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/connect/messages.properties
  36. +0 −36 ...ipse.wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/event/BreakpointEventImpl.java
  37. +0 −36 ...t.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/event/DebuggerStatementEventImpl.java
  38. +0 −51 ...es/org.eclipse.wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/event/EventImpl.java
  39. +0 −229 ...g.eclipse.wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/event/EventQueueImpl.java
  40. +0 −71 ...org.eclipse.wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/event/EventSetImpl.java
  41. +0 −47 ...lipse.wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/event/ExceptionEventImpl.java
  42. +0 −53 ...lipse.wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/event/LocatableEventImpl.java
  43. +0 −35 ....eclipse.wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/event/ResumeEventImpl.java
  44. +0 −47 ...ipse.wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/event/ScriptLoadEventImpl.java
  45. +0 −36 ...rg.eclipse.wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/event/StepEventImpl.java
  46. +0 −36 ...eclipse.wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/event/SuspendEventImpl.java
  47. +0 −34 ...pse.wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/event/ThreadEnterEventImpl.java
  48. +0 −34 ...ipse.wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/event/ThreadExitEventImpl.java
  49. +0 −32 ...eclipse.wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/event/VMDeathEventImpl.java
  50. +0 −11 ...les/org.eclipse.wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/messages.properties
  51. +0 −165 ....wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/request/BreakpointRequestImpl.java
  52. +0 −57 ...dt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/request/DebuggerStatementRequestImpl.java
  53. +0 −75 ...lipse.wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/request/EventRequestImpl.java
  54. +0 −278 ...st.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/request/EventRequestManagerImpl.java
  55. +0 −49 ...e.wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/request/ExceptionRequestImpl.java
  56. +0 −43 ...ipse.wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/request/ResumeRequestImpl.java
  57. +0 −30 ....wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/request/ScriptLoadRequestImpl.java
  58. +0 −83 ...clipse.wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/request/StepRequestImpl.java
  59. +0 −42 ...pse.wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/request/SuspendRequestImpl.java
  60. +0 −49 ...wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/request/ThreadEnterRequestImpl.java
  61. +0 −49 ....wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/request/ThreadExitRequestImpl.java
  62. +0 −30 ...pse.wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/request/VMDeathRequestImpl.java
  63. +0 −30 ...st.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/request/VMDisconnectRequestImpl.java
View
7 bundles/org.eclipse.wst.jsdt.debug.rhino/.classpath
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
View
34 bundles/org.eclipse.wst.jsdt.debug.rhino/.project
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.wst.jsdt.debug.rhino</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
View
90 bundles/org.eclipse.wst.jsdt.debug.rhino/.settings/org.eclipse.jdt.core.prefs
@@ -1,90 +0,0 @@
-#Fri Apr 30 10:04:28 CDT 2010
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
-org.eclipse.jdt.core.compiler.problem.deadCode=error
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=error
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=ignore
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=disabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=error
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=error
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
-org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=error
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=error
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=error
-org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=error
-org.eclipse.jdt.core.compiler.problem.unusedParameter=error
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
View
28 bundles/org.eclipse.wst.jsdt.debug.rhino/META-INF/MANIFEST.MF
@@ -1,28 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %Bundle-Name
-Bundle-Vendor: %providerName
-Bundle-SymbolicName: org.eclipse.wst.jsdt.debug.rhino;singleton:=true
-Bundle-Version: 1.0.102.qualifier
-Bundle-Activator: org.eclipse.wst.jsdt.debug.internal.rhino.RhinoDebugPlugin
-Require-Bundle: org.eclipse.core.runtime;bundle-version="3.6.0"
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
-Bundle-ActivationPolicy: lazy
-Export-Package: org.eclipse.wst.jsdt.debug.internal.rhino;x-friends:="org.eclipse.wst.jsdt.debug.rhino.ui",
- org.eclipse.wst.jsdt.debug.internal.rhino.breakpoints;x-friends:="org.eclipse.wst.jsdt.debug.rhino.ui",
- org.eclipse.wst.jsdt.debug.internal.rhino.jsdi;x-friends:="org.eclipse.wst.jsdt.debug.rhino.ui",
- org.eclipse.wst.jsdt.debug.internal.rhino.jsdi.connect;x-friends:="org.eclipse.wst.jsdt.debug.rhino.ui",
- org.eclipse.wst.jsdt.debug.internal.rhino.jsdi.event;x-friends:="org.eclipse.wst.jsdt.debug.rhino.ui",
- org.eclipse.wst.jsdt.debug.internal.rhino.jsdi.request;x-friends:="org.eclipse.wst.jsdt.debug.rhino.ui"
-Import-Package: org.eclipse.debug.core.model,
- org.eclipse.wst.jsdt.debug.core.breakpoints,
- org.eclipse.wst.jsdt.debug.core.jsdi,
- org.eclipse.wst.jsdt.debug.core.jsdi.connect,
- org.eclipse.wst.jsdt.debug.core.jsdi.event,
- org.eclipse.wst.jsdt.debug.core.jsdi.request,
- org.eclipse.wst.jsdt.debug.core.model,
- org.eclipse.wst.jsdt.debug.internal.rhino.transport,
- org.eclipse.wst.jsdt.debug.transport,
- org.eclipse.wst.jsdt.debug.transport.exception,
- org.eclipse.wst.jsdt.debug.transport.packet,
- org.eclipse.wst.jsdt.debug.transport.socket
View
12 bundles/org.eclipse.wst.jsdt.debug.rhino/OSGI-INF/l10n/bundle.properties
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2010 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
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-providerName = Eclipse Web Tools Platform
-Bundle-Name = Rhino JavaScript Debug
View
28 bundles/org.eclipse.wst.jsdt.debug.rhino/about.html
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>March 10, 2010</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html>
View
19 bundles/org.eclipse.wst.jsdt.debug.rhino/build.properties
@@ -1,19 +0,0 @@
-###############################################################################
-# Copyright (c) 2010, 2011 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
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- about.html,\
- OSGI-INF/l10n/bundle.properties,\
- OSGI-INF/
-src.includes = about.html
View
35 bundles/org.eclipse.wst.jsdt.debug.rhino/plugin.xml
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?><!--
- Copyright (c) 2009 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
- http://www.eclipse.org/legal/epl-v10.html
-
- Contributors:
- IBM Corporation - initial API and implementation
- -->
-
-<plugin>
- <extension
- point="org.eclipse.wst.jsdt.debug.core.launchingConnectors">
- <connector
- class="org.eclipse.wst.jsdt.debug.internal.rhino.jsdi.connect.RhinoAttachingConnector"
- id="rhino.attaching.connector">
- </connector>
- </extension>
- <extension
- point="org.eclipse.wst.jsdt.debug.core.breakpointParticipants">
- <participant
- class="org.eclipse.wst.jsdt.debug.internal.rhino.breakpoints.RhinoBreakpointParticipant"
- kind="*">
- </participant>
- </extension>
- <extension
- point="org.eclipse.core.runtime.preferences">
- <initializer
- class="org.eclipse.wst.jsdt.debug.internal.rhino.RhinoPreferenceInitializer">
- </initializer>
- </extension>
-
-</plugin>
View
29 ...eclipse.wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/Constants.java
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.debug.internal.rhino;
-
-/**
- * Collection of constants used in Rhino
- *
- * @since 1.0
- */
-public interface Constants {
-
-//############## GENERAL ####################
- public static final String SPACE = " "; //$NON-NLS-1$
- public static String URI_FILE_SCHEME = "file"; //$NON-NLS-1$
- public static String STD_IN = "stdin"; //$NON-NLS-1$
- public static String STD_IN_URI = "<stdin>"; //$NON-NLS-1$
-
-//############## PREFERENCES ################
- public static String SUSPEND_ON_STDIN_LOAD = RhinoDebugPlugin.PLUGIN_ID + ".suspend_on_stdin_load"; //$NON-NLS-1$
-
-}
View
126 ....wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/RhinoDebugPlugin.java
@@ -1,126 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.debug.internal.rhino;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Plugin;
-import org.eclipse.core.runtime.Status;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- *
- * @since 1.0
- */
-public class RhinoDebugPlugin extends Plugin {
-
- /**
- * Status code indicating an unexpected internal error.
- */
- public static final int INTERNAL_ERROR = 120;
- /**
- * The ID of the bundle<br>
- * <br>
- * value is: <code>org.eclipse.wst.jsdt.debug.core</code>
- */
- public static final String PLUGIN_ID = "org.eclipse.wst.jsdt.debug.rhino"; //$NON-NLS-1$
-
- /**
- * The singleton instance
- */
- private static RhinoDebugPlugin plugin;
-
- /**
- * The constructor
- */
- public RhinoDebugPlugin() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static RhinoDebugPlugin getDefault() {
- return plugin;
- }
-
- /**
- * Logs the specified status with this plug-in's log.
- *
- * @param status status to log
- */
- public static void log(IStatus status) {
- if (plugin != null) {
- plugin.getLog().log(status);
- }
- }
-
- /**
- * Logs the specified throwable with this plug-in's log.
- *
- * @param t throwable to log
- */
- public static void log(Throwable t) {
- log(newErrorStatus("Error logged from Rhino Debug: ", t)); //$NON-NLS-1$
- }
-
- /**
- * Logs an internal error with the specified message.
- *
- * @param message the error message to log
- */
- public static void logErrorMessage(String message) {
- log(newErrorStatus("Internal message logged from Rhino Debug: " + message, null)); //$NON-NLS-1$
- }
-
- /**
- * Returns a new error status for this plug-in with the given message
- * @param message the message to be included in the status
- * @param exception the exception to be included in the status or <code>null</code> if none
- * @return a new error status
- */
- public static IStatus newErrorStatus(String message, Throwable exception) {
- return new Status(IStatus.ERROR, PLUGIN_ID, INTERNAL_ERROR, message, exception);
- }
-
- /**
- * Creates a new {@link URI} with the <code>file</code> scheme
- * @param path
- * @return a new {@link URI}
- * @throws URISyntaxException
- */
- public static URI fileURI(IPath path) throws URISyntaxException {
- return new URI(Constants.URI_FILE_SCHEME, null, path.makeAbsolute().toString(), null);
- }
-}
View
42 ...debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/RhinoPreferenceInitializer.java
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2011 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.debug.internal.rhino;
-
-import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
-import org.eclipse.core.runtime.preferences.DefaultScope;
-import org.eclipse.core.runtime.preferences.IEclipsePreferences;
-import org.osgi.service.prefs.BackingStoreException;
-
-/**
- * Initializes the preferences for Rhino
- *
- * @since 1.0
- */
-public class RhinoPreferenceInitializer extends AbstractPreferenceInitializer {
-
- /**
- * Constructor
- */
- public RhinoPreferenceInitializer() {}
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
- */
- public void initializeDefaultPreferences() {
- IEclipsePreferences defaultscope = new DefaultScope().getNode(RhinoDebugPlugin.PLUGIN_ID);
- defaultscope.putBoolean(Constants.SUSPEND_ON_STDIN_LOAD, false);
- try {
- defaultscope.flush();
- } catch (BackingStoreException e) {
- RhinoDebugPlugin.log(e);
- }
- }
-}
View
69 ...dt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/RhinoPreferencesManager.java
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2011 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.debug.internal.rhino;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.preferences.IEclipsePreferences;
-import org.eclipse.core.runtime.preferences.IEclipsePreferences.IPreferenceChangeListener;
-import org.eclipse.core.runtime.preferences.IEclipsePreferences.PreferenceChangeEvent;
-import org.eclipse.core.runtime.preferences.InstanceScope;
-
-/**
- * Handles all of the core Rhino preferences - allows easy access to a variety of preferences
- * and tracks changes to those preferences.
- *
- * @since 1.0
- */
-public class RhinoPreferencesManager implements IPreferenceChangeListener {
-
- /**
- * Starts the manager
- */
- public void start() {
- IEclipsePreferences node = new InstanceScope().getNode(RhinoDebugPlugin.PLUGIN_ID);
- if(node != null) {
- node.addPreferenceChangeListener(this);
- }
- else {
- //our preference node is bogus report the status
- RhinoDebugPlugin.logErrorMessage("The Rhino core preference node could not loaded"); //$NON-NLS-1$
- }
- }
-
- /**
- * Stops the manager and frees any resources held
- */
- public void stop() {
- IEclipsePreferences node = new InstanceScope().getNode(RhinoDebugPlugin.PLUGIN_ID);
- if(node != null) {
- node.removePreferenceChangeListener(this);
- }
- else {
- //our preference node is bogus report the status
- RhinoDebugPlugin.logErrorMessage("The Rhino core preference node could not loaded"); //$NON-NLS-1$
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.preferences.IEclipsePreferences.IPreferenceChangeListener#preferenceChange(org.eclipse.core.runtime.preferences.IEclipsePreferences.PreferenceChangeEvent)
- */
- public void preferenceChange(PreferenceChangeEvent event) {
- }
-
- /**
- * Returns if we should be suspending on script load events from stdin - i.e. from the Rhino console.
- *
- * @return <code>true</code> if we should suspend on a script load for stdin, <code>false</code> otherwise
- */
- public static boolean suspendOnStdinLoad() {
- return Platform.getPreferencesService().getBoolean(RhinoDebugPlugin.PLUGIN_ID, Constants.SUSPEND_ON_STDIN_LOAD, false, null);
- }
-}
View
95 ...src/org/eclipse/wst/jsdt/debug/internal/rhino/breakpoints/RhinoBreakpointParticipant.java
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2011 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.debug.internal.rhino.breakpoints;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.wst.jsdt.debug.core.breakpoints.IJavaScriptBreakpoint;
-import org.eclipse.wst.jsdt.debug.core.breakpoints.IJavaScriptBreakpointParticipant;
-import org.eclipse.wst.jsdt.debug.core.breakpoints.IJavaScriptLineBreakpoint;
-import org.eclipse.wst.jsdt.debug.core.jsdi.BooleanValue;
-import org.eclipse.wst.jsdt.debug.core.jsdi.ScriptReference;
-import org.eclipse.wst.jsdt.debug.core.jsdi.Value;
-import org.eclipse.wst.jsdt.debug.core.model.IJavaScriptPrimitiveValue;
-import org.eclipse.wst.jsdt.debug.core.model.IJavaScriptThread;
-import org.eclipse.wst.jsdt.debug.core.model.IJavaScriptValue;
-import org.eclipse.wst.jsdt.debug.internal.rhino.Constants;
-import org.eclipse.wst.jsdt.debug.internal.rhino.RhinoPreferencesManager;
-
-/**
- * Participant for Rhino
- *
- * @since 1.0
- */
-public class RhinoBreakpointParticipant implements IJavaScriptBreakpointParticipant {
-
- /**
- * Constructor
- */
- public RhinoBreakpointParticipant() {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.jsdt.debug.core.breakpoints.IJavaScriptBreakpointParticipant#breakpointHit(org.eclipse.wst.jsdt.debug.core.model.IJavaScriptThread, org.eclipse.wst.jsdt.debug.core.breakpoints.IJavaScriptBreakpoint)
- */
- public int breakpointHit(IJavaScriptThread thread, IJavaScriptBreakpoint breakpoint) {
- try {
- if(breakpoint instanceof IJavaScriptLineBreakpoint) {
- IJavaScriptLineBreakpoint lbp = (IJavaScriptLineBreakpoint) breakpoint;
- String condition = lbp.getCondition();
- if (condition != null) {
- // evaluate it
- if (thread.getFrameCount() < 1) {
- return DONT_SUSPEND;
- }
- IJavaScriptValue value = thread.evaluate(condition);
- if (lbp.isConditionSuspendOnTrue()) {
- if(suspendForValue(value)) {
- return SUSPEND;
- }
- }
- if(!suspendForValue(value)) {
- return SUSPEND;
- }
- }
- return SUSPEND;
- }
- }
- catch (CoreException ce) {
- //ignore, just don't suspend
- }
- return DONT_SUSPEND;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.jsdt.debug.core.breakpoints.IJavaScriptBreakpointParticipant#scriptLoaded(org.eclipse.wst.jsdt.debug.core.model.IJavaScriptThread, org.eclipse.wst.jsdt.debug.core.jsdi.ScriptReference, org.eclipse.wst.jsdt.debug.core.breakpoints.IJavaScriptBreakpoint)
- */
- public int scriptLoaded(IJavaScriptThread thread, ScriptReference script, IJavaScriptBreakpoint breakpoint) {
- String seg = URIUtil.lastSegment(script.sourceURI());
- if(seg != null && seg.equals(Constants.STD_IN) && !RhinoPreferencesManager.suspendOnStdinLoad()) {
- return DONT_SUSPEND;
- }
- return SUSPEND;
- }
-
- /**
- * If the thread should suspend based on the given {@link Value}. Currently only suspend when the value is non-null and a {@link BooleanValue} that has the value <code>true</code>
- *
- * @param value
- * @return if we should suspend
- */
- private boolean suspendForValue(IJavaScriptValue value) {
- if(value instanceof IJavaScriptPrimitiveValue) {
- return ((IJavaScriptPrimitiveValue)value).booleanValue();
- }
- return false;
- }
-}
View
127 ...dt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/ArrayReferenceImpl.java
@@ -1,127 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.debug.internal.rhino.jsdi;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.wst.jsdt.debug.core.jsdi.ArrayReference;
-import org.eclipse.wst.jsdt.debug.core.jsdi.Property;
-import org.eclipse.wst.jsdt.debug.core.jsdi.Value;
-
-/**
- * Rhino implementation of {@link ArrayReference}
- *
- * @see ArrayReference
- * @see ObjectReferenceImpl
- * @since 1.0
- */
-public class ArrayReferenceImpl extends ObjectReferenceImpl implements ArrayReference {
-
- /**
- * Empty array
- */
- protected static final Value[] NO_VALUES = new Value[0];
-
- /**
- * Raw list of {@link Value}s
- */
- private ArrayList values = null;
-
- /**
- * Constructor
- *
- * @param vm
- * @param stackFrameImpl
- * @param body
- */
- public ArrayReferenceImpl(VirtualMachineImpl vm, Map body, StackFrameImpl stackFrameImpl) {
- super(vm, body, stackFrameImpl);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.jsdt.debug.core.jsdi.ArrayReference#getValue(int)
- */
- public Value getValue(int index) throws IndexOutOfBoundsException {
- Value value = (Value) getValues().get(index);
- if (value == null) {
- return vm.mirrorOfNull();
- }
- return value;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.jsdt.debug.core.jsdi.ArrayReference#getValues()
- */
- public synchronized List getValues() {
- if (values == null) {
- Map members = new HashMap();
- int length = 0;
- for (Iterator iter = properties().iterator(); iter.hasNext();) {
- Property property = (Property) iter.next();
- if (Character.isDigit(property.name().charAt(0))) {
- members.put(Integer.valueOf(property.name()), property.value());
- } else if (property.name().equals("length")) { //$NON-NLS-1$
- length = Integer.parseInt(property.value().valueString());
- }
- }
- values = new ArrayList(length);
- for (int i = 0; i < length; i++) {
- Object value = members.get(new Integer(i));
- if (value == null) {
- value = new UndefinedValueImpl(vm);
- }
- values.add(value);
- }
- }
- return values;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.jsdt.debug.core.jsdi.ArrayReference#length()
- */
- public int length() {
- return getValues().size();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.jsdt.debug.internal.rhino.jsdi.ObjectReferenceImpl#
- * valueString()
- */
- public String valueString() {
- return "Array"; //$NON-NLS-1$
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.wst.jsdt.debug.internal.rhino.jsdi.ObjectReferenceImpl#toString
- * ()
- */
- public String toString() {
- StringBuffer buffer = new StringBuffer();
- buffer.append(NLS.bind(Messages.ArrayReferenceImpl_array_count_, new String[] {Integer.toString(length()) }));
- return buffer.toString();
- }
-}
View
89 ...jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/BooleanValueImpl.java
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.debug.internal.rhino.jsdi;
-
-import java.util.Map;
-
-import org.eclipse.wst.jsdt.debug.core.jsdi.BooleanValue;
-import org.eclipse.wst.jsdt.debug.internal.rhino.transport.JSONConstants;
-
-/**
- * Rhino implementation of {@link BooleanValue}
- *
- * @since 1.0
- */
-public class BooleanValueImpl extends MirrorImpl implements BooleanValue {
-
- private Boolean value;
-
- /**
- * Constructor
- *
- * @param vm
- * @param body
- */
- public BooleanValueImpl(VirtualMachineImpl vm, Map body) {
- this(vm, (Boolean) body.get(JSONConstants.VALUE));
- }
-
- /**
- * Constructor
- *
- * @param vm
- * @param bool
- */
- public BooleanValueImpl(VirtualMachineImpl vm, Boolean bool) {
- super(vm);
- this.value = bool;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.jsdt.debug.core.jsdi.Value#valueString()
- */
- public String valueString() {
- return value.toString();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.jsdt.debug.core.jsdi.PrimitiveValue#intValue()
- */
- public int intValue() {
- return (value.booleanValue() ? 1 : 0);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.jsdt.debug.core.jsdi.PrimitiveValue#doubleValue()
- */
- public double doubleValue() {
- return intValue();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.jsdt.debug.core.jsdi.PrimitiveValue#booleanValue()
- */
- public boolean booleanValue() {
- return value.booleanValue();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.jsdt.debug.core.jsdi.PrimitiveValue#stringValue()
- */
- public String stringValue() {
- return value.toString();
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#toString()
- */
- public String toString() {
- return stringValue();
- }
-}
View
68 ...debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/FunctionReferenceImpl.java
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.debug.internal.rhino.jsdi;
-
-import java.util.Map;
-
-import org.eclipse.wst.jsdt.debug.core.jsdi.FunctionReference;
-import org.eclipse.wst.jsdt.debug.internal.rhino.transport.JSONConstants;
-
-/**
- * Rhino implementation of {@link FunctionReference}
- *
- * @see FunctionReference
- * @see ObjectReferenceImpl
- * @since 1.0
- */
-public class FunctionReferenceImpl extends ObjectReferenceImpl implements FunctionReference {
-
- private String functionName;
-
- /**
- * Constructor
- *
- * @param vm
- * @param body
- * @param stackFrameImpl
- */
- public FunctionReferenceImpl(VirtualMachineImpl vm, Map body, StackFrameImpl stackFrameImpl) {
- super(vm, body, stackFrameImpl);
- this.functionName = (String) body.get(JSONConstants.NAME);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.jsdt.debug.core.jsdi.FunctionReference#functionName()
- */
- public String functionName() {
- return functionName;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.jsdt.debug.internal.rhino.jsdi.ObjectReferenceImpl#valueString()
- */
- public String valueString() {
- return "Function"; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.jsdt.debug.core.jsdi.FunctionReference#functionBody()
- */
- public String functionBody() {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.jsdt.debug.internal.rhino.jsdi.ObjectReferenceImpl#toString()
- */
- public String toString() {
- return valueString();
- }
-}
View
104 ...wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/LocationImpl.java
@@ -1,104 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.debug.internal.rhino.jsdi;
-
-import java.util.Comparator;
-
-import org.eclipse.wst.jsdt.debug.core.jsdi.Location;
-import org.eclipse.wst.jsdt.debug.core.jsdi.ScriptReference;
-
-/**
- * Rhino implementation of {@link Location}
- *
- * @since 1.0
- */
-public class LocationImpl extends MirrorImpl implements Location {
-
- /**
- * Comparator that orders {@link Location}s by line number - useful for debugging
- */
- static class LocationComparator implements Comparator {
- /* (non-Javadoc)
- * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
- */
- public int compare(Object o1, Object o2) {
- int value = -1;
- if(o1 instanceof Location && o2 instanceof Location) {
- int first = ((Location)o1).lineNumber();
- int second = ((Location)o2).lineNumber();
- if(first == second) {
- value = 0;
- }
- else if(first > second) {
- value = 1;
- }
- }
- return value;
- }
-
- }
- private static LocationComparator comparator = new LocationComparator();
- private String functionName;
- private int lineNumber;
- private ScriptReferenceImpl scriptReference;
-
- /**
- * Constructor
- *
- * @param vm
- * @param functionName
- * @param lineNumber
- * @param scriptReference
- */
- public LocationImpl(VirtualMachineImpl vm, String functionName, int lineNumber, ScriptReferenceImpl scriptReference) {
- super(vm);
- this.functionName = functionName;
- this.lineNumber = lineNumber;
- this.scriptReference = scriptReference;
- }
-
- static LocationComparator getLocationComparator() {
- return comparator;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.jsdt.debug.core.jsdi.Location#functionName()
- */
- public String functionName() {
- return functionName;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.jsdt.debug.core.jsdi.Location#lineNumber()
- */
- public int lineNumber() {
- return lineNumber;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.jsdt.debug.core.jsdi.Location#scriptReference()
- */
- public ScriptReference scriptReference() {
- return scriptReference;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#toString()
- */
- public String toString() {
- StringBuffer buffer = new StringBuffer();
- buffer.append("LocationImpl: "); //$NON-NLS-1$
- buffer.append("[script - ").append(scriptReference.sourceURI()).append("] "); //$NON-NLS-1$ //$NON-NLS-2$
- buffer.append("[function - ").append(functionName).append("] "); //$NON-NLS-1$ //$NON-NLS-2$
- buffer.append("[line - ").append(lineNumber).append("]"); //$NON-NLS-1$ //$NON-NLS-2$
- return buffer.toString();
- }
-}
View
28 ...pse.wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/Messages.java
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.debug.internal.rhino.jsdi;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- *
- */
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.wst.jsdt.debug.internal.rhino.jsdi.messages"; //$NON-NLS-1$
- public static String ArrayReferenceImpl_array_count_;
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
View
62 ...e.wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/MirrorImpl.java
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.debug.internal.rhino.jsdi;
-
-import org.eclipse.wst.jsdt.debug.core.jsdi.Mirror;
-import org.eclipse.wst.jsdt.debug.core.jsdi.VirtualMachine;
-
-/**
- * Rhino implementation of {@link Mirror}
- *
- * @since 1.0
- */
-public class MirrorImpl implements Mirror {
-
- protected final VirtualMachineImpl vm;
-
- /**
- * Constructor
- *
- * @param vm
- * @param description
- */
- public MirrorImpl(VirtualMachineImpl vm) {
- this.vm = vm;
- }
-
- /**
- * This constructor is only to be used by {@link VirtualMachineImpl}. The name
- * field is not store anywhere or used in any way.
- *
- * @param name
- * @noreference This constructor is not intended to be referenced by clients.
- */
- public MirrorImpl(String name) {
- vm = (VirtualMachineImpl)this;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.jsdt.debug.core.jsdi.Mirror#virtualMachine()
- */
- public VirtualMachine virtualMachine() {
- return this.vm;
- }
-
- /**
- * Re-throws the given exception as a {@link RuntimeException} with the given message
- * @param message
- * @param t
- * @since 1.1
- */
- protected void handleException(String message, Throwable t) {
- throw new RuntimeException(message, t);
- }
-}
View
49 ...st.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/NullValueImpl.java
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.debug.internal.rhino.jsdi;
-
-import org.eclipse.wst.jsdt.debug.core.jsdi.NullValue;
-
-/**
- * Rhino implementation of {@link NullValue}
- *
- * @since 1.0
- */
-public final class NullValueImpl extends MirrorImpl implements NullValue {
-
- static final String NULL_VALUE = "Null"; //$NON-NLS-1$
-
- /**
- * Constructor
- *
- * @param vm
- * @param description
- */
- public NullValueImpl(VirtualMachineImpl vm) {
- super(vm);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.jsdt.debug.core.jsdi.Value#valueString()
- */
- public String valueString() {
- return NULL_VALUE;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Object#toString()
- */
- public String toString() {
- return valueString();
- }
-}
View
107 ....jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/NumberValueImpl.java
@@ -1,107 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.debug.internal.rhino.jsdi;
-
-import java.util.Map;
-
-import org.eclipse.wst.jsdt.debug.core.jsdi.NumberValue;
-import org.eclipse.wst.jsdt.debug.core.model.JavaScriptDebugModel;
-import org.eclipse.wst.jsdt.debug.internal.rhino.transport.JSONConstants;
-
-/**
- * Rhino implementation of {@link NumberValue}
- *
- * @since 1.0
- */
-public class NumberValueImpl extends MirrorImpl implements NumberValue {
-
- /**
- * The underlying value
- */
- private Number value;
-
- /**
- * Constructor
- *
- * @param vm
- * @param body
- */
- public NumberValueImpl(VirtualMachineImpl vm, Map body) {
- this(vm, (Number) body.get(JSONConstants.VALUE));
- }
-
- /**
- * Constructor
- *
- * @param vm
- * @param number
- */
- public NumberValueImpl(VirtualMachineImpl vm, Number number) {
- super(vm);
- this.value = number;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.jsdt.debug.core.jsdi.NumberValue#value()
- */
- public Number value() {
- return value;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.jsdt.debug.core.jsdi.NumberValue#isNaN()
- */
- public boolean isNaN() {
- return value == null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.jsdt.debug.core.jsdi.Value#valueString()
- */
- public String valueString() {
- return JavaScriptDebugModel.numberToString(value);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.jsdt.debug.core.jsdi.PrimitiveValue#intValue()
- */
- public int intValue() {
- return value.intValue();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.jsdt.debug.core.jsdi.PrimitiveValue#doubleValue()
- */
- public double doubleValue() {
- return value.doubleValue();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.jsdt.debug.core.jsdi.PrimitiveValue#booleanValue()
- */
- public boolean booleanValue() {
- return (value.intValue() > 0 ? true : false);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.jsdt.debug.core.jsdi.PrimitiveValue#stringValue()
- */
- public String stringValue() {
- return JavaScriptDebugModel.numberToString(value);
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#toString()
- */
- public String toString() {
- return stringValue();
- }
-}
View
163 ...t.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/ObjectReferenceImpl.java
@@ -1,163 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.debug.internal.rhino.jsdi;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.wst.jsdt.debug.core.jsdi.ObjectReference;
-import org.eclipse.wst.jsdt.debug.core.jsdi.Property;
-import org.eclipse.wst.jsdt.debug.core.jsdi.Value;
-import org.eclipse.wst.jsdt.debug.internal.rhino.transport.JSONConstants;
-
-/**
- * Rhino implementation of {@link ObjectReference}
- *
- * @see MirrorImpl
- * @see ObjectReference
- * @see Property
- * @since 1.0
- */
-public class ObjectReferenceImpl extends MirrorImpl implements ObjectReference {
-
- protected static final ArrayList NO_PROPERTIES = new ArrayList(0);
-
- /**
- * The name of the class backing this object
- */
- private final String className;
- /**
- * The reference id to the constructor for this object
- */
- private final Number constructorRef;
- /**
- * The reference id to the prototype for this object
- */
- private final Number prototypeRef;
- /**
- * The reference id for this object
- */
- private final Number id;
- /**
- * The stackframe context for this object
- */
- protected StackFrameImpl frame;
- /**
- * The JSDI handle to the constructor for this object - lazily computed in {@link #constructor()}
- */
- private Value constructor = null;
- /**
- * The JSDI handle to the prototype for this object - lazily computed in {@link #prototype()}
- */
- private Value prototype = null;
- /**
- * The backing list of {@link PropertyReference}s for this object
- */
- private List properties = null;
-
- /**
- * Constructor
- *
- * @param vm
- * @param body
- * @param frame
- */
- public ObjectReferenceImpl(VirtualMachineImpl vm, Map body, StackFrameImpl frame) {
- super(vm);
- this.frame = frame;
- this.className = (String) body.get(JSONConstants.CLASS_NAME);
- this.id = (Number) body.get(JSONConstants.REF);
- this.constructorRef = (Number) body.get(JSONConstants.CONSTRUCTOR_FUNCTION);
- this.prototypeRef = (Number) body.get(JSONConstants.PROTOTYPE_OBJECT);
- List proplist = (List) body.get(JSONConstants.PROPERTIES);
- if (proplist != null) {
- this.properties = new ArrayList(proplist.size());
- Map props = null;
- for (Iterator iter = proplist.iterator(); iter.hasNext();) {
- props = (Map) iter.next();
- this.properties.add(new PropertyImpl(vm, frame, props.get(JSONConstants.NAME).toString(), (Number) props.get(JSONConstants.REF)));
- }
- } else {
- this.properties = NO_PROPERTIES;
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.jsdt.debug.core.jsdi.ObjectReference#className()
- */
- public String className() {
- return this.className;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.jsdt.debug.core.jsdi.ObjectReference#constructor()
- */
- public Value constructor() {
- synchronized (this.frame) {
- if (this.constructor == null) {
- this.constructor = this.frame.lookupValue(constructorRef);
- if (this.constructor == null) {
- this.constructor = this.vm.mirrorOfNull();
- }
- }
- }
- return this.constructor;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.jsdt.debug.core.jsdi.ObjectReference#prototype()
- */
- public Value prototype() {
- synchronized (this.frame) {
- if (this.prototype == null) {
- this.prototype = this.frame.lookupValue(prototypeRef);
- if (this.prototype == null) {
- this.prototype = this.vm.mirrorOfNull();
- }
- }
- }
- return this.prototype;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.jsdt.debug.core.jsdi.ObjectReference#properties()
- */
- public List properties() {
- return this.properties;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Object#toString()
- */
- public String toString() {
- StringBuffer buffer = new StringBuffer();
- buffer.append("Object Reference\n"); //$NON-NLS-1$
- return buffer.toString();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.jsdt.debug.core.jsdi.Value#valueString()
- */
- public String valueString() {
- return "Object"; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.jsdt.debug.core.jsdi.ObjectReference#id()
- */
- public Number id() {
- return this.id;
- }
-}
View
84 ...wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/PropertyImpl.java
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.debug.internal.rhino.jsdi;
-
-import org.eclipse.wst.jsdt.debug.core.jsdi.Property;
-import org.eclipse.wst.jsdt.debug.core.jsdi.Value;
-
-/**
- * Rhino implementation of {@link Property}
- *
- * @see MirrorImpl
- * @see Property
- * @see Value
- * @since 1.0
- */
-public class PropertyImpl extends MirrorImpl implements Property {
-
- /**
- * The name of the property
- */
- private String name;
- /**
- * The reference used to look up the property value in the stackframe
- * context
- */
- private Number ref;
- private StackFrameImpl frame;
- private Value value;
-
- /**
- * Constructor
- *
- * @param vm
- * @param name
- * @param ref
- */
- public PropertyImpl(VirtualMachineImpl vm, StackFrameImpl frame,
- String name, Number ref) {
- super(vm);
- this.frame = frame;
- this.name = name;
- this.ref = ref;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.jsdt.debug.core.jsdi.Property#name()
- */
- public String name() {
- return name;
- }
-
- /**
- * The reference id of this property
- *
- * @return the reference id of this property
- */
- public Number getRef() {
- return ref;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.jsdt.debug.core.jsdi.StringValue#value()
- */
- public Value value() {
- synchronized (this.frame) {
- if (this.value == null) {
- this.value = frame.lookupValue(ref);
- }
- }
- return this.value;
- }
-}
View
191 ...t.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/ScriptReferenceImpl.java
@@ -1,191 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.debug.internal.rhino.jsdi;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.wst.jsdt.debug.core.jsdi.Location;
-import org.eclipse.wst.jsdt.debug.core.jsdi.ScriptReference;
-import org.eclipse.wst.jsdt.debug.internal.rhino.RhinoDebugPlugin;
-import org.eclipse.wst.jsdt.debug.internal.rhino.transport.JSONConstants;
-import org.osgi.framework.Constants;
-
-/**
- * Rhino implementation of {@link ScriptReference}
- *
- * @see MirrorImpl
- * @see ScriptReference
- * @since 1.0
- */
-public class ScriptReferenceImpl extends MirrorImpl implements ScriptReference {
-
- /**
- * The id of the script - this can be used to look it up in the {@link VirtualMachineImpl}
- */
- private final Long scriptId;
- private String sourcePath = null;
- private URI sourceuri = null;
- private final String source;
- private final Boolean generated;
- private final List lineLocations = new ArrayList();
- private final List functionLocations = new ArrayList();
- private Map sourceProperties = null;
-
- /**
- * Constructor
- *
- * @param vm
- * @param jsonScript
- */
- public ScriptReferenceImpl(VirtualMachineImpl vm, Map jsonScript) {
- super(vm);
- this.scriptId = new Long(((Number) jsonScript.get(JSONConstants.SCRIPT_ID)).longValue());
- this.sourcePath = (String) jsonScript.get(JSONConstants.LOCATION);
- this.sourceProperties = (Map) jsonScript.get(JSONConstants.PROPERTIES);
- this.source = (String) jsonScript.get(JSONConstants.SOURCE);
- this.generated = (Boolean) jsonScript.get(JSONConstants.GENERATED);
- List lines = (List) jsonScript.get(JSONConstants.LINES);
- for (Iterator iterator = lines.iterator(); iterator.hasNext();) {
- Number lineNumber = (Number) iterator.next();
- Location location = new LocationImpl(vm, null, lineNumber.intValue(), this);
- lineLocations.add(location);
- }
- List functions = (List) jsonScript.get(JSONConstants.FUNCTIONS);
- for (Iterator iterator = functions.iterator(); iterator.hasNext();) {
- String functionName = (String) iterator.next();
- Location location = new LocationImpl(vm, functionName, 0, this);
- functionLocations.add(location);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.jsdt.debug.core.jsdi.ScriptReference#allFunctionLocations()
- */
- public List allFunctionLocations() {
- return Collections.unmodifiableList(functionLocations);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.jsdt.debug.core.jsdi.ScriptReference#allLineLocations()
- */
- public List allLineLocations() {
- return Collections.unmodifiableList(lineLocations);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.jsdt.debug.core.jsdi.ScriptReference#functionLocation(java.lang.String)
- */
- public Location functionLocation(String functionName) {
- for (Iterator iterator = functionLocations.iterator(); iterator.hasNext();) {
- Location location = (Location) iterator.next();
- if (location.functionName().equals(functionName))
- return location;
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.jsdt.debug.core.jsdi.ScriptReference#lineLocation(int)
- */
- public Location lineLocation(int lineNumber) {
- for (Iterator iterator = lineLocations.iterator(); iterator.hasNext();) {
- Location location = (Location) iterator.next();
- if (location.lineNumber() == lineNumber)
- return location;
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.jsdt.debug.core.jsdi.ScriptReference#source()
- */
- public String source() {
- return source;
- }
-
- /**
- * @return the id of the {@link ScriptReference}
- */
- public Long getScriptId() {
- return scriptId;
- }
-
-
- /**
- * Return if the script is generated or not
- * @return <code>true</code> if the script was generated <code>false</code> otherwise
- */
- public boolean isGenerated() {
- return generated.booleanValue();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.jsdt.debug.core.jsdi.ScriptReference#sourceURI()
- */
- public synchronized URI sourceURI() {
- if (this.sourceuri == null) {
- try {
- if (this.sourceProperties != null) {
- IPath path = new Path((String) this.sourceProperties.get(Constants.BUNDLE_SYMBOLICNAME));
- path = path.append((String) this.sourceProperties.get(JSONConstants.PATH));
- path = path.append((String) this.sourceProperties.get(JSONConstants.NAME));
- this.sourceuri = URIUtil.fromString(path.toString());
- } else if (this.sourcePath != null) {
- try {
- this.sourceuri = new URI(this.sourcePath);
- }
- catch(URISyntaxException use) {
- this.sourceuri = URIUtil.fromString(sourcePath);
- }
- } else {
- this.sourceuri = RhinoDebugPlugin.fileURI(new Path("script")); //$NON-NLS-1$
- }
- } catch (URISyntaxException urise) {
- RhinoDebugPlugin.log(urise);
- }
- }
- return this.sourceuri;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#toString()
- */
- public String toString() {
- StringBuffer buffer = new StringBuffer();
- buffer.append("ScriptReferenceImpl: "); //$NON-NLS-1$
- buffer.append("[sourceuri - ").append(sourceURI()).append("]\n"); //$NON-NLS-1$ //$NON-NLS-2$
- buffer.append("Line locations: \n"); //$NON-NLS-1$
- List list = new ArrayList(allLineLocations());
- Collections.sort(list, LocationImpl.getLocationComparator());
- for (Iterator iter = list.iterator(); iter.hasNext();) {
- Location loc = (Location) iter.next();
- buffer.append("\t").append(loc.toString()).append("\n"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- buffer.append("Function locations: \n"); //$NON-NLS-1$
- list = new ArrayList(allFunctionLocations());
- Collections.sort(list, LocationImpl.getLocationComparator());
- for (Iterator iter = list.iterator(); iter.hasNext();) {
- Location loc = (Location) iter.next();
- buffer.append("\t").append(loc.toString()).append("\n"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- buffer.append("\n"); //$NON-NLS-1$
- return buffer.toString();
- }
-}
View
242 ...t.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/StackFrameImpl.java
@@ -1,242 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.debug.internal.rhino.jsdi;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.wst.jsdt.debug.core.jsdi.Location;
-import org.eclipse.wst.jsdt.debug.core.jsdi.StackFrame;
-import org.eclipse.wst.jsdt.debug.core.jsdi.Value;
-import org.eclipse.wst.jsdt.debug.core.jsdi.Variable;
-import org.eclipse.wst.jsdt.debug.internal.rhino.RhinoDebugPlugin;
-import org.eclipse.wst.jsdt.debug.internal.rhino.transport.JSONConstants;
-import org.eclipse.wst.jsdt.debug.internal.rhino.transport.RhinoRequest;
-import org.eclipse.wst.jsdt.debug.internal.rhino.transport.RhinoResponse;
-import org.eclipse.wst.jsdt.debug.transport.exception.DisconnectedException;
-import org.eclipse.wst.jsdt.debug.transport.exception.TimeoutException;
-
-/**
- * Rhino implementation of {@link StackFrame}
- *
- * @see MirrorImpl
- * @see StackFrame
- * @since 1.0
- */
-public class StackFrameImpl extends MirrorImpl implements StackFrame {
-
- private final Number frameId;
- private final Number threadId;
- private final Number contextId;
- private final Number ref;
- private final Location location;
- private List variables;
- private VariableImpl thisVariable;
- private HashMap cache = new HashMap();
-
- /**
- * Constructor
- *
- * @param vm
- * @param jsonFrame
- */
- public StackFrameImpl(VirtualMachineImpl vm, Map jsonFrame) {
- super(vm);
- this.threadId = (Number) jsonFrame.get(JSONConstants.THREAD_ID);
- this.frameId = (Number) jsonFrame.get(JSONConstants.FRAME_ID);
- this.contextId = (Number) jsonFrame.get(JSONConstants.CONTEXT_ID);
- this.ref = (Number) jsonFrame.get(JSONConstants.REF);
-
- Long scriptId = new Long(((Number) jsonFrame.get(JSONConstants.SCRIPT_ID)).longValue());
- ScriptReferenceImpl script = vm.getScript(scriptId);
-
- String function = (String) jsonFrame.get(JSONConstants.FUNCTION);
- if (function != null) {
- this.location = script.functionLocation(function);
- } else {
- Number line = (Number) jsonFrame.get(JSONConstants.LINE);
- Location lineLocation = script.lineLocation(line.intValue());
- this.location = lineLocation != null ? lineLocation : new LocationImpl(vm, function, line.intValue(), script);
- }
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.jsdt.debug.core.jsdi.StackFrame#evaluate(java.lang.String)
- */
- public Value evaluate(String expression) {
- RhinoRequest request = new RhinoRequest(JSONConstants.EVALUATE);
- request.getArguments().put(JSONConstants.THREAD_ID, threadId);
- request.getArguments().put(JSONConstants.FRAME_ID, frameId);
- request.getArguments().put(JSONConstants.EXPRESSION, expression);
- try {
- RhinoResponse response = vm.sendRequest(request, 30000);
- return createValue(response.getBody(), true);
- } catch (DisconnectedException e) {
- handleException(e.getMessage(), e);
- } catch (TimeoutException e) {
- RhinoDebugPlugin.log(e);
- }
- return null;
- }
-
- /**
- * Utility method to look up the {@link Value} with the given reference id <br>
- * or <code>null</code> if there is no {@link Value} with the given id
- *
- * @param ref
- * @return the {@link Value} or <code>null</code>
- */
- public Value lookupValue(Number ref) {
- Value value = (Value) this.cache.get(ref);
- if (value == null) {
- RhinoRequest request = new RhinoRequest(JSONConstants.LOOKUP);
- request.getArguments().put(JSONConstants.THREAD_ID, threadId);
- request.getArguments().put(JSONConstants.FRAME_ID, frameId);
- request.getArguments().put(JSONConstants.REF, ref);
- try {
- RhinoResponse response = vm.sendRequest(request, 30000);
- value = createValue(response.getBody(), false);
- this.cache.put(ref, value);
- return value;
- } catch (DisconnectedException e) {
- handleException(e.getMessage(), e);
- } catch (TimeoutException e) {
- RhinoDebugPlugin.log(e);
- }
- }
- return value;
- }
-
- /**
- * Creates a new type value for the given type description in the map
- *
- * @param body
- * @param iseval
- * @return the new type
- * @throws IllegalStateException
- * if the type description in the map is unknown
- */
- private Value createValue(Map body, boolean iseval) throws IllegalStateException {
- Map value = (Map) body.get((iseval ? JSONConstants.EVALUATE : JSONConstants.LOOKUP));
- if(value == null) {
- return vm.nullValue;
- }
- String type = (String) value.get(JSONConstants.TYPE);
- if(type == null) {
- return vm.nullValue;
- }
- // "undefined", "null", "boolean", "number", "string", "object",
- // "function"
-
- if (type.equals(JSONConstants.UNDEFINED)) {
- return vm.undefinedValue;
- } else if (type.equals(JSONConstants.NULL)) {
- return vm.nullValue;
- } else if (type.equals(JSONConstants.BOOLEAN)) {
- return new BooleanValueImpl(vm, value);
- } else if (type.equals(JSONConstants.NUMBER)) {
- return new NumberValueImpl(vm, value);
- } else if (type.equals(JSONConstants.STRING)) {
- return new StringValueImpl(vm, value);
- } else if (type.equals(JSONConstants.OBJECT)) {
- return new ObjectReferenceImpl(vm, value, this);
- } else if (type.equals(JSONConstants.FUNCTION)) {
- return new FunctionReferenceImpl(vm, value, this);
- } else if (type.equals(JSONConstants.ARRAY)) {
- return new ArrayReferenceImpl(vm, value, this);
- }
- throw new IllegalStateException();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.jsdt.debug.core.jsdi.StackFrame#location()
- */
- public Location location() {
- return location;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.jsdt.debug.core.jsdi.StackFrame#thisObject()
- */
- public synchronized Variable thisObject() {
- initializeVariables();
- return thisVariable;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.jsdt.debug.core.jsdi.StackFrame#variables()
- */
- public synchronized List variables() {
- initializeVariables();
- if(variables == null) {
- //return this to maintain the API contract, and to allow variable initialization happen again
- return Collections.EMPTY_LIST;
- }
- return variables;
- }
-
- /**
- * Initializes and caches the live set of variables
- */
- private void initializeVariables() {
- if (variables != null) {
- return;
- }
- RhinoRequest request = new RhinoRequest(JSONConstants.LOOKUP);
- request.getArguments().put(JSONConstants.THREAD_ID, threadId);
- request.getArguments().put(JSONConstants.FRAME_ID, frameId);
- request.getArguments().put(JSONConstants.REF, ref);
- try {
- RhinoResponse response = vm.sendRequest(request, 30000);
- if(response.isSuccess()) {
- Map lookup = (Map) response.getBody().get(JSONConstants.LOOKUP);
- List properties = (List) lookup.get(JSONConstants.PROPERTIES);
- variables = new ArrayList();
- for (Iterator iterator = properties.iterator(); iterator.hasNext();) {
- Map property = (Map) iterator.next();
- String name = (String) property.get(JSONConstants.NAME);
- Number ref = (Number) property.get(JSONConstants.REF);
- VariableImpl variable = new VariableImpl(vm, this, name, ref);
- if (name.equals(JSONConstants.THIS))
- thisVariable = variable;
- else
- variables.add(variable);
- }
- }
- } catch (DisconnectedException e) {
- handleException(e.getMessage(), e);
- } catch (TimeoutException e) {
- RhinoDebugPlugin.log(e);
- }
- }
-
- /**
- * Returns if this stack frame is visible
- *
- * @param variable
- * @return true if this frame is visible, false otherwise
- */
- public synchronized boolean isVisible(VariableImpl variable) {
- return variables != null && (thisVariable == variable || variables.contains(variable));
- }
-
- /**
- * @return the context id for this frame
- */
- public Number getContextId() {
- return contextId;
- }
-}
View
61 ....jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/StringValueImpl.java
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.debug.internal.rhino.jsdi;
-
-import java.util.Map;
-
-import org.eclipse.wst.jsdt.debug.core.jsdi.StringValue;
-import org.eclipse.wst.jsdt.debug.internal.rhino.transport.JSONConstants;
-
-/**
- * Rhino implementation of {@link StringValue}
- *
- * @since 1.0
- */
-public class StringValueImpl extends MirrorImpl implements StringValue {
-
- private String value;
-
- /**
- * Constructor
- *
- * @param vm
- * @param value
- */
- public StringValueImpl(VirtualMachineImpl vm, String value) {
- super(vm);
- this.value = value;
- }
-
- /**
- * Constructor
- *
- * @param vm
- * @param body
- */
- public StringValueImpl(VirtualMachineImpl vm, Map body) {
- this(vm, (String) body.get(JSONConstants.VALUE));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.jsdt.debug.core.jsdi.StringValue#value()
- */
- public String value() {
- return value;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.jsdt.debug.core.jsdi.Value#valueString()
- */
- public String valueString() {
- return value;
- }
-}
View
250 ...t.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/ThreadReferenceImpl.java
@@ -1,250 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.debug.internal.rhino.jsdi;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.wst.jsdt.debug.core.jsdi.StackFrame;
-import org.eclipse.wst.jsdt.debug.core.jsdi.ThreadReference;
-import org.eclipse.wst.jsdt.debug.internal.rhino.RhinoDebugPlugin;
-import org.eclipse.wst.jsdt.debug.internal.rhino.transport.JSONConstants;
-import org.eclipse.wst.jsdt.debug.internal.rhino.transport.RhinoRequest;
-import org.eclipse.wst.jsdt.debug.internal.rhino.transport.RhinoResponse;
-import org.eclipse.wst.jsdt.debug.transport.exception.DisconnectedException;
-import org.eclipse.wst.jsdt.debug.transport.exception.TimeoutException;
-
-/**
- * Rhino implementation of {@link ThreadReference}
- *
- * @since 1.0
- */
-public class ThreadReferenceImpl extends MirrorImpl implements ThreadReference {
-
- private Number threadId;
- private List frames;
- private int status = THREAD_STATUS_RUNNING;
- private boolean suspended;
- private boolean atBreakpoint = false;
- private String name;
- private String step;
-
- /**
- * Constructor
- *
- * @param vm
- * @param jsonThread
- */
- public ThreadReferenceImpl(VirtualMachineImpl vm, Map jsonThread) {
- super(vm);
- this.threadId = (Number) jsonThread.get(JSONConstants.THREAD_ID);
- this.name = (String) jsonThread.get(JSONConstants.NAME);
- if (this.name == null) {
- // TODO NLS this
- this.name = "Rhino - " + threadId; //$NON-NLS-1$
- }
- this.suspended = JSONConstants.SUSPENDED.equals(jsonThread.get(JSONConstants.STATE));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.jsdt.debug.core.jsdi.ThreadReference#frameCount()
- */
- public synchronized int frameCount() {
- frames();
- return (frames == null ? 0 : frames.size());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.jsdt.debug.core.jsdi.ThreadReference#frame(int)
- */
- public synchronized StackFrame frame(int index) {
- frames();
- return (StackFrame) frames.get(index);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.jsdt.debug.core.jsdi.ThreadReference#frames()
- */
- public synchronized List frames() {
- if (!suspended || status == THREAD_STATUS_ZOMBIE) {
- return Collections.EMPTY_LIST;
- }
- if (frames != null) {
- return frames;
- }
- RhinoRequest request = new RhinoRequest(JSONConstants.FRAMES);
- request.getArguments().put(JSONConstants.THREAD_ID, threadId);
- try {
- RhinoResponse response = vm.sendRequest(request, 30000);
- List frameIds = (List) response.getBody().get(JSONConstants.FRAMES);
- if (frameIds.isEmpty()) {
- return Collections.EMPTY_LIST;
- }
- frames = new ArrayList();
- for (Iterator iterator = frameIds.iterator(); iterator.hasNext();) {
- Long frameId = new Long(((Number) iterator.next()).longValue());
- StackFrameImpl frame = createStackFrame(frameId);
- frames.add(frame);
- }
- } catch (DisconnectedException e) {
- handleException(e.getMessage(), e);
- } catch (TimeoutException e) {
- RhinoDebugPlugin.log(e);
- }
- if(frames != null) {
- return frames;
- }
- return Collections.EMPTY_LIST;
- }
-
- /**
- * Sends a request to make a new {@link StackFrameReference} in the current debugger.
- * Returns a new {@link StackFrameReference} on success, <code>null</code> on failure
- *
- * @param frameId
- * @return a new {@link StackFrameReference} or <code>null</code>
- */
- private StackFrameImpl createStackFrame(Long frameId) {
- RhinoRequest request = new RhinoRequest(JSONConstants.FRAME);
- request.getArguments().put(JSONConstants.THREAD_ID, threadId);
- request.getArguments().put(JSONConstants.FRAME_ID, frameId);
- try {
- RhinoResponse response = vm.sendRequest(request);
- Map jsonFrame = (Map) response.getBody().get(JSONConstants.FRAME);
- return new StackFrameImpl(vm, jsonFrame);
- } catch (DisconnectedException e) {
- handleException(e.getMessage(), e);
- } catch (TimeoutException e) {
- RhinoDebugPlugin.log(e);
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.jsdt.debug.core.jsdi.ThreadReference#isAtBreakpoint()
- */
- public synchronized boolean isAtBreakpoint() {
- return suspended && atBreakpoint;
- }
-
- /**
- * Marks the current thread reference as suspended
- *
- * @param atBreakpoint
- */
- public synchronized void markSuspended(boolean atBreakpoint) {
- this.suspended = true;
- this.atBreakpoint = atBreakpoint;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.jsdt.debug.core.jsdi.ThreadReference#isSuspended()
- */
- public synchronized boolean isSuspended() {
- return suspended;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.jsdt.debug.core.jsdi.ThreadReference#name()
- */
- public String name() {
- return name;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.jsdt.debug.core.jsdi.ThreadReference#resume()
- */
- public synchronized void resume() {
- if (status == THREAD_STATUS_ZOMBIE) {
- return;
- }
- RhinoRequest request = new RhinoRequest(JSONConstants.CONTINUE);
- request.getArguments().put(JSONConstants.THREAD_ID, threadId);
- if (step != null) {
- request.getArguments().put(JSONConstants.STEP, step);
- }
- try {
- RhinoResponse response = vm.sendRequest(request);
- if (response.isSuccess()) {
- step = null;
- frames = null;
- suspended = false;
- atBreakpoint = false;
- }
- } catch (DisconnectedException e) {
- handleException(e.getMessage(), e);
- } catch (TimeoutException e) {
- RhinoDebugPlugin.log(e);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.jsdt.debug.core.jsdi.ThreadReference#suspend()
- */
- public synchronized void suspend() {
- if (status == THREAD_STATUS_ZOMBIE) {
- return;
- }
- RhinoRequest request = new RhinoRequest(JSONConstants.SUSPEND);
- request.getArguments().put(JSONConstants.THREAD_ID, threadId);
- try {
- RhinoResponse response = vm.sendRequest(request);
- if(response.isSuccess()) {
- markSuspended(false);
- }
- } catch (DisconnectedException e) {
- handleException(e.getMessage(), e);
- } catch (TimeoutException e) {
- RhinoDebugPlugin.log(e);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.jsdt.debug.core.jsdi.ThreadReference#interrupt()
- */
- public void interrupt() {
- throw new UnsupportedOperationException();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.jsdt.debug.core.jsdi.ThreadReference#status()
- */
- public synchronized int status() {
- return status;
- }
-
- /**
- * Returns the step type
- *
- * @return the step type
- * @see JSONConstants#STEP_IN
- * @see JSONConstants#STEP_NEXT
- * @see JSONConstants#STEP_OUT
- */
- public synchronized String getStep() {
- return step;
- }
-
- /**
- * Sets the current step type
- *
- * @param step
- * @see JSONConstants#STEP_IN
- * @see JSONConstants#STEP_NEXT
- * @see JSONConstants#STEP_OUT
- */
- public synchronized void setStep(String step) {
- this.step = step;
- }
-}