From 120386a707075b28def6378bcf361ebeef13885c Mon Sep 17 00:00:00 2001 From: Anders Nilsson <anders.nilsson@cs.lth.se> Date: Sun, 1 Apr 2007 21:24:44 +0200 Subject: [PATCH] Synching --- siaras/SkillserverInterface.jrag | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/siaras/SkillserverInterface.jrag b/siaras/SkillserverInterface.jrag index ca23da7..93afcdf 100644 --- a/siaras/SkillserverInterface.jrag +++ b/siaras/SkillserverInterface.jrag @@ -8,10 +8,22 @@ aspect SkillserverInterface { public Thing ASTNode.getIndividual(String id) { - System.out.println("foo"); + System.out.println("foo: "+this); for (int i=0; i<getNumChild(); i++) { Thing t = getChild(i).getIndividual(id); if (t!=null) { + System.out.println("Found: "+t); + return t; + } + } + return null; + } + + public Thing Start.getIndividual(String id) { + for (int i=0; i<getNumElement(); i++) { + Thing t = getElement(i).getIndividual(id); + if (t!=null) { + System.out.println("Found: "+t); return t; } } @@ -27,3 +39,10 @@ aspect SkillserverInterface { } } } + +aspect PrettyPrinter { + public void Start.prettyPrint() { + System.out.println("PrettyPrinting"); + prettyPrint("",System.out); + } +} -- GitLab