-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' of https://github.com/uqbar-project/wollok into ad…
…d-wko-parent-constructor-to-ts
- Loading branch information
Showing
159 changed files
with
3,575 additions
and
1,638 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
...ollok.launch/src/org/uqbar/project/wollok/contextState/server/XContextStateListener.xtend
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package org.uqbar.project.wollok.contextState.server | ||
|
||
import java.util.List | ||
import org.uqbar.project.wollok.debugger.server.rmi.XDebugStackFrameVariable | ||
|
||
/** | ||
* Listens to the state of a certain context of execution | ||
*/ | ||
interface XContextStateListener { | ||
|
||
def void stateChanged(List<XDebugStackFrameVariable> variables) | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
80 changes: 80 additions & 0 deletions
80
...launch/src/org/uqbar/project/wollok/debugger/server/rmi/XWollokCollectionDebugValue.xtend
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
package org.uqbar.project.wollok.debugger.server.rmi | ||
|
||
import java.util.Collection | ||
import java.util.Collections | ||
import org.uqbar.project.wollok.interpreter.context.WVariable | ||
import org.uqbar.project.wollok.interpreter.core.WollokObject | ||
import wollok.lang.WCollection | ||
import wollok.lang.WDictionary | ||
|
||
import static extension org.uqbar.project.wollok.utils.WollokObjectUtils.* | ||
|
||
/** | ||
* Special value for wollok collection. | ||
* Shows its content as children | ||
* | ||
* @author jfernandes | ||
*/ | ||
abstract class XWollokCollectionDebugValue extends XDebugValue { | ||
|
||
new(WollokObject collection, String concreteNativeType, String collectionType) { | ||
super(collectionType, System.identityHashCode(collection)) | ||
var i = 0 | ||
val result = newArrayList | ||
val elements = collection.getElements(concreteNativeType) | ||
for (e : elements) { | ||
result.add(new XDebugStackFrameVariable(new WVariable(i.getVariableName(collection, concreteNativeType), System.identityHashCode(e), false), e)) | ||
i++ | ||
} | ||
variables = newArrayList(result) | ||
} | ||
|
||
def getElements(WollokObject collection, String concreteNativeType) { | ||
val native = collection.getNativeObject(concreteNativeType) as WCollection<Collection<WollokObject>> | ||
if (native.wrapped === null) Collections.EMPTY_LIST else native.wrapped | ||
} | ||
|
||
def String getVariableName(int i, WollokObject collection, String concreteNativeType) | ||
} | ||
|
||
class XWollokListDebugValue extends XWollokCollectionDebugValue { | ||
|
||
new(WollokObject collection, String concreteNativeType) { | ||
super(collection, concreteNativeType, "List") | ||
} | ||
|
||
override getVariableName(int i, WollokObject collection, String concreteNativeType) { | ||
String.valueOf(i) | ||
} | ||
|
||
} | ||
|
||
class XWollokSetDebugValue extends XWollokCollectionDebugValue { | ||
|
||
new(WollokObject collection, String concreteNativeType) { | ||
super(collection, concreteNativeType, "Set") | ||
} | ||
|
||
override getVariableName(int i, WollokObject collection, String concreteNativeType) { | ||
"" | ||
} | ||
|
||
} | ||
|
||
class XWollokDictionaryDebugValue extends XWollokCollectionDebugValue { | ||
|
||
new(WollokObject collection, String concreteNativeType) { | ||
super(collection, concreteNativeType, "Dictionary") | ||
} | ||
|
||
override getVariableName(int i, WollokObject collection, String concreteNativeType) { | ||
val wrapped = collection.getNativeObject(concreteNativeType) as WDictionary | ||
wrapped.keys.get(i).asString | ||
} | ||
|
||
override def getElements(WollokObject collection, String concreteNativeType) { | ||
val wrapped = collection.getNativeObject(concreteNativeType) as WDictionary | ||
if (wrapped === null) Collections.EMPTY_LIST else wrapped.values | ||
} | ||
|
||
} |
34 changes: 0 additions & 34 deletions
34
...ollok.launch/src/org/uqbar/project/wollok/debugger/server/rmi/XWollokListDebugValue.xtend
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.