aboutsummaryrefslogtreecommitdiffstats
path: root/docs/teaching
diff options
context:
space:
mode:
authorehilsdal <ehilsdal>2003-08-27 20:13:05 +0000
committerehilsdal <ehilsdal>2003-08-27 20:13:05 +0000
commit910f2658b1342cd4a3b22169895c71fa8b48279c (patch)
tree9a1b7d32e315012600d5cd4bb6a7720a8e1d85e4 /docs/teaching
parent3fa486456c61e332341ccfb634a72920b6467c50 (diff)
downloadaspectj-910f2658b1342cd4a3b22169895c71fa8b48279c.tar.gz
aspectj-910f2658b1342cd4a3b22169895c71fa8b48279c.zip
untabified
Diffstat (limited to 'docs/teaching')
-rw-r--r--docs/teaching/exercises/answers/Answer1a.java20
-rw-r--r--docs/teaching/exercises/answers/Answer1b.java16
-rw-r--r--docs/teaching/exercises/answers/Answer1c.java16
-rw-r--r--docs/teaching/exercises/answers/Answer1d.java18
-rw-r--r--docs/teaching/exercises/answers/Answer2a.java16
-rw-r--r--docs/teaching/exercises/answers/Answer2b.java18
-rw-r--r--docs/teaching/exercises/answers/Answer2c.java20
-rw-r--r--docs/teaching/exercises/answers/Answer2d.java24
-rw-r--r--docs/teaching/exercises/answers/Answer2e.java16
-rw-r--r--docs/teaching/exercises/answers/Answer2f.java16
-rw-r--r--docs/teaching/exercises/answers/Answer2g.java16
-rw-r--r--docs/teaching/exercises/answers/Answer2h.java16
-rw-r--r--docs/teaching/exercises/answers/Answer3a.java16
-rw-r--r--docs/teaching/exercises/answers/Answer3b.java18
-rw-r--r--docs/teaching/exercises/answers/Answer3c.java24
-rw-r--r--docs/teaching/exercises/answers/Answer4a.java18
-rw-r--r--docs/teaching/exercises/answers/Answer4b.java24
-rw-r--r--docs/teaching/exercises/answers/Answer4c.java26
-rw-r--r--docs/teaching/exercises/answers/Answer4d.java34
-rw-r--r--docs/teaching/exercises/answers/Answer4e.java38
-rw-r--r--docs/teaching/exercises/figures/Box.java16
-rw-r--r--docs/teaching/exercises/figures/FigureElement.java16
-rw-r--r--docs/teaching/exercises/figures/Group.java16
-rw-r--r--docs/teaching/exercises/figures/Line.java18
-rw-r--r--docs/teaching/exercises/figures/Point.java18
-rw-r--r--docs/teaching/exercises/figures/ShapeFigureElement.java16
-rw-r--r--docs/teaching/exercises/figures/SlothfulPoint.java20
-rw-r--r--docs/teaching/exercises/figures/gui/FigurePanel.java16
-rw-r--r--docs/teaching/exercises/figures/gui/LogAdapter.java16
-rw-r--r--docs/teaching/exercises/figures/gui/Main.java16
30 files changed, 289 insertions, 289 deletions
diff --git a/docs/teaching/exercises/answers/Answer1a.java b/docs/teaching/exercises/answers/Answer1a.java
index 94d4522c4..680e33e25 100644
--- a/docs/teaching/exercises/answers/Answer1a.java
+++ b/docs/teaching/exercises/answers/Answer1a.java
@@ -1,13 +1,13 @@
/* *******************************************************************
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
- * All rights reserved.
- * This program and the accompanying materials are made available
- * under the terms of the Common Public License v1.0
- * which accompanies this distribution and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * PARC initial implementation
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Common Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * PARC initial implementation
* ******************************************************************/
package answers;
@@ -16,7 +16,7 @@ import figures.*;
aspect Answer1a {
declare error
- : get(java.io.PrintStream System.out)
+ : get(java.io.PrintStream System.out)
&& within(figures..*)
- : "illegal access to System.out";
+ : "illegal access to System.out";
}
diff --git a/docs/teaching/exercises/answers/Answer1b.java b/docs/teaching/exercises/answers/Answer1b.java
index ef634a974..224476f51 100644
--- a/docs/teaching/exercises/answers/Answer1b.java
+++ b/docs/teaching/exercises/answers/Answer1b.java
@@ -1,13 +1,13 @@
/* *******************************************************************
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
- * All rights reserved.
- * This program and the accompanying materials are made available
- * under the terms of the Common Public License v1.0
- * which accompanies this distribution and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * PARC initial implementation
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Common Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * PARC initial implementation
* ******************************************************************/
package answers;
diff --git a/docs/teaching/exercises/answers/Answer1c.java b/docs/teaching/exercises/answers/Answer1c.java
index ff31b6378..466aa61b9 100644
--- a/docs/teaching/exercises/answers/Answer1c.java
+++ b/docs/teaching/exercises/answers/Answer1c.java
@@ -1,13 +1,13 @@
/* *******************************************************************
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
- * All rights reserved.
- * This program and the accompanying materials are made available
- * under the terms of the Common Public License v1.0
- * which accompanies this distribution and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * PARC initial implementation
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Common Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * PARC initial implementation
* ******************************************************************/
package answers;
diff --git a/docs/teaching/exercises/answers/Answer1d.java b/docs/teaching/exercises/answers/Answer1d.java
index 9fb32390b..1aa74e79b 100644
--- a/docs/teaching/exercises/answers/Answer1d.java
+++ b/docs/teaching/exercises/answers/Answer1d.java
@@ -1,13 +1,13 @@
/* *******************************************************************
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
- * All rights reserved.
- * This program and the accompanying materials are made available
- * under the terms of the Common Public License v1.0
- * which accompanies this distribution and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * PARC initial implementation
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Common Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * PARC initial implementation
* ******************************************************************/
package answers;
@@ -18,6 +18,6 @@ aspect Answer1c {
&& !(withincode(* set*(..))
|| withincode(new(..))
|| withincode(void figures.Point.move(int, int)))
- && within(figures.*)
+ && within(figures.*)
: "bad field set";
}
diff --git a/docs/teaching/exercises/answers/Answer2a.java b/docs/teaching/exercises/answers/Answer2a.java
index b874f06eb..12d00d976 100644
--- a/docs/teaching/exercises/answers/Answer2a.java
+++ b/docs/teaching/exercises/answers/Answer2a.java
@@ -1,13 +1,13 @@
/* *******************************************************************
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
- * All rights reserved.
- * This program and the accompanying materials are made available
- * under the terms of the Common Public License v1.0
- * which accompanies this distribution and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * PARC initial implementation
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Common Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * PARC initial implementation
* ******************************************************************/
package answers;
diff --git a/docs/teaching/exercises/answers/Answer2b.java b/docs/teaching/exercises/answers/Answer2b.java
index fc45ad265..82786dba6 100644
--- a/docs/teaching/exercises/answers/Answer2b.java
+++ b/docs/teaching/exercises/answers/Answer2b.java
@@ -1,13 +1,13 @@
/* *******************************************************************
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
- * All rights reserved.
- * This program and the accompanying materials are made available
- * under the terms of the Common Public License v1.0
- * which accompanies this distribution and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * PARC initial implementation
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Common Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * PARC initial implementation
* ******************************************************************/
package answers;
@@ -19,7 +19,7 @@ public aspect Answer2b {
before(FigureElement newValue):
call(void Group.add(FigureElement))
&& args(newValue) {
- if (newValue == null) {
+ if (newValue == null) {
throw new IllegalArgumentException("null not allowed");
}
}
diff --git a/docs/teaching/exercises/answers/Answer2c.java b/docs/teaching/exercises/answers/Answer2c.java
index 6dbd7fa90..27fa744b1 100644
--- a/docs/teaching/exercises/answers/Answer2c.java
+++ b/docs/teaching/exercises/answers/Answer2c.java
@@ -1,13 +1,13 @@
/* *******************************************************************
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
- * All rights reserved.
- * This program and the accompanying materials are made available
- * under the terms of the Common Public License v1.0
- * which accompanies this distribution and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * PARC initial implementation
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Common Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * PARC initial implementation
* ******************************************************************/
package answers;
@@ -20,10 +20,10 @@ public aspect Answer2c {
call(void Group.add(FigureElement))
&& args(newValue)
&& target(g) {
- if (newValue == null) {
+ if (newValue == null) {
throw new IllegalArgumentException("null not allowed");
}
- if (newValue == g) {
+ if (newValue == g) {
throw new IllegalArgumentException("self not allowed");
}
diff --git a/docs/teaching/exercises/answers/Answer2d.java b/docs/teaching/exercises/answers/Answer2d.java
index 75937ca86..3d131ad6b 100644
--- a/docs/teaching/exercises/answers/Answer2d.java
+++ b/docs/teaching/exercises/answers/Answer2d.java
@@ -1,13 +1,13 @@
/* *******************************************************************
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
- * All rights reserved.
- * This program and the accompanying materials are made available
- * under the terms of the Common Public License v1.0
- * which accompanies this distribution and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * PARC initial implementation
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Common Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * PARC initial implementation
* ******************************************************************/
package answers;
@@ -16,9 +16,9 @@ import figures.SlothfulPoint;
aspect Answer2d {
after(int newValue, SlothfulPoint p) returning:
- call(void setX(int)) && args(newValue) && target(p) {
- if (newValue != p.getX()) {
- throw new RuntimeException("setter didn't set");
- }
+ call(void setX(int)) && args(newValue) && target(p) {
+ if (newValue != p.getX()) {
+ throw new RuntimeException("setter didn't set");
+ }
}
}
diff --git a/docs/teaching/exercises/answers/Answer2e.java b/docs/teaching/exercises/answers/Answer2e.java
index a0500bc6b..53245b4d0 100644
--- a/docs/teaching/exercises/answers/Answer2e.java
+++ b/docs/teaching/exercises/answers/Answer2e.java
@@ -1,13 +1,13 @@
/* *******************************************************************
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
- * All rights reserved.
- * This program and the accompanying materials are made available
- * under the terms of the Common Public License v1.0
- * which accompanies this distribution and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * PARC initial implementation
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Common Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * PARC initial implementation
* ******************************************************************/
package answers;
diff --git a/docs/teaching/exercises/answers/Answer2f.java b/docs/teaching/exercises/answers/Answer2f.java
index aad64f4e2..5e78dabfc 100644
--- a/docs/teaching/exercises/answers/Answer2f.java
+++ b/docs/teaching/exercises/answers/Answer2f.java
@@ -1,13 +1,13 @@
/* *******************************************************************
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
- * All rights reserved.
- * This program and the accompanying materials are made available
- * under the terms of the Common Public License v1.0
- * which accompanies this distribution and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * PARC initial implementation
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Common Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * PARC initial implementation
* ******************************************************************/
package answers;
diff --git a/docs/teaching/exercises/answers/Answer2g.java b/docs/teaching/exercises/answers/Answer2g.java
index 9bc9a521c..edf87c3db 100644
--- a/docs/teaching/exercises/answers/Answer2g.java
+++ b/docs/teaching/exercises/answers/Answer2g.java
@@ -1,13 +1,13 @@
/* *******************************************************************
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
- * All rights reserved.
- * This program and the accompanying materials are made available
- * under the terms of the Common Public License v1.0
- * which accompanies this distribution and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * PARC initial implementation
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Common Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * PARC initial implementation
* ******************************************************************/
package answers;
diff --git a/docs/teaching/exercises/answers/Answer2h.java b/docs/teaching/exercises/answers/Answer2h.java
index 3dcc47bef..ae58fa6c0 100644
--- a/docs/teaching/exercises/answers/Answer2h.java
+++ b/docs/teaching/exercises/answers/Answer2h.java
@@ -1,13 +1,13 @@
/* *******************************************************************
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
- * All rights reserved.
- * This program and the accompanying materials are made available
- * under the terms of the Common Public License v1.0
- * which accompanies this distribution and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * PARC initial implementation
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Common Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * PARC initial implementation
* ******************************************************************/
package answers;
diff --git a/docs/teaching/exercises/answers/Answer3a.java b/docs/teaching/exercises/answers/Answer3a.java
index 7d9c91f0e..fc5e1d3f7 100644
--- a/docs/teaching/exercises/answers/Answer3a.java
+++ b/docs/teaching/exercises/answers/Answer3a.java
@@ -1,13 +1,13 @@
/* *******************************************************************
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
- * All rights reserved.
- * This program and the accompanying materials are made available
- * under the terms of the Common Public License v1.0
- * which accompanies this distribution and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * PARC initial implementation
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Common Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * PARC initial implementation
* ******************************************************************/
package answers;
diff --git a/docs/teaching/exercises/answers/Answer3b.java b/docs/teaching/exercises/answers/Answer3b.java
index b978f1a5e..0328fe164 100644
--- a/docs/teaching/exercises/answers/Answer3b.java
+++ b/docs/teaching/exercises/answers/Answer3b.java
@@ -1,13 +1,13 @@
/* *******************************************************************
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
- * All rights reserved.
- * This program and the accompanying materials are made available
- * under the terms of the Common Public License v1.0
- * which accompanies this distribution and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * PARC initial implementation
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Common Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * PARC initial implementation
* ******************************************************************/
package answers;
@@ -20,7 +20,7 @@ import figures.FigureElement;
aspect Answer3b {
before():
- execution(void Group.add(FigureElement)) && args(Point) {
+ execution(void Group.add(FigureElement)) && args(Point) {
Log.log("adding Point");
}
}
diff --git a/docs/teaching/exercises/answers/Answer3c.java b/docs/teaching/exercises/answers/Answer3c.java
index 68797b9e0..576694e68 100644
--- a/docs/teaching/exercises/answers/Answer3c.java
+++ b/docs/teaching/exercises/answers/Answer3c.java
@@ -1,13 +1,13 @@
/* *******************************************************************
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
- * All rights reserved.
- * This program and the accompanying materials are made available
- * under the terms of the Common Public License v1.0
- * which accompanies this distribution and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * PARC initial implementation
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Common Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * PARC initial implementation
* ******************************************************************/
package answers;
@@ -22,13 +22,13 @@ aspect Answer3c {
private Group Point.enclosingGroup = null;
before(Point p, Group g):
- execution(void add(FigureElement)) && args(p) && target(g) {
- p.enclosingGroup = g;
+ execution(void add(FigureElement)) && args(p) && target(g) {
+ p.enclosingGroup = g;
}
before(Point p):
- call(void move(int, int)) && target(p) {
- Log.log("moving as a part of " + p.enclosingGroup);
+ call(void move(int, int)) && target(p) {
+ Log.log("moving as a part of " + p.enclosingGroup);
}
}
diff --git a/docs/teaching/exercises/answers/Answer4a.java b/docs/teaching/exercises/answers/Answer4a.java
index 2f3956aea..fd0e2e684 100644
--- a/docs/teaching/exercises/answers/Answer4a.java
+++ b/docs/teaching/exercises/answers/Answer4a.java
@@ -1,13 +1,13 @@
/* *******************************************************************
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
- * All rights reserved.
- * This program and the accompanying materials are made available
- * under the terms of the Common Public License v1.0
- * which accompanies this distribution and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * PARC initial implementation
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Common Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * PARC initial implementation
* ******************************************************************/
package answers;
@@ -23,6 +23,6 @@ aspect Answer4a {
FigureElement.MAX_VALUE - FigureElement.MIN_VALUE);
Rectangle around(): execution(Rectangle Group.getBounds()) {
- return wholeCanvas;
+ return wholeCanvas;
}
}
diff --git a/docs/teaching/exercises/answers/Answer4b.java b/docs/teaching/exercises/answers/Answer4b.java
index d0292b14f..4fd5354c1 100644
--- a/docs/teaching/exercises/answers/Answer4b.java
+++ b/docs/teaching/exercises/answers/Answer4b.java
@@ -1,13 +1,13 @@
/* *******************************************************************
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
- * All rights reserved.
- * This program and the accompanying materials are made available
- * under the terms of the Common Public License v1.0
- * which accompanies this distribution and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * PARC initial implementation
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Common Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * PARC initial implementation
* ******************************************************************/
package answers;
@@ -21,9 +21,9 @@ aspect Answer4b {
Rectangle around(Group g):
execution(Rectangle Group.getBounds()) && this(g) {
- if (g.cache == null) {
- g.cache = proceed(g);
- }
- return g.cache;
+ if (g.cache == null) {
+ g.cache = proceed(g);
+ }
+ return g.cache;
}
}
diff --git a/docs/teaching/exercises/answers/Answer4c.java b/docs/teaching/exercises/answers/Answer4c.java
index 54107cf8f..35f4b90af 100644
--- a/docs/teaching/exercises/answers/Answer4c.java
+++ b/docs/teaching/exercises/answers/Answer4c.java
@@ -1,13 +1,13 @@
/* *******************************************************************
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
- * All rights reserved.
- * This program and the accompanying materials are made available
- * under the terms of the Common Public License v1.0
- * which accompanies this distribution and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * PARC initial implementation
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Common Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * PARC initial implementation
* ******************************************************************/
package answers;
@@ -21,13 +21,13 @@ aspect Answer4c {
Rectangle around(Group g):
execution(Rectangle Group.getBounds()) && this(g) {
- if (g.cache == null) {
- g.cache = proceed(g);
- }
- return g.cache;
+ if (g.cache == null) {
+ g.cache = proceed(g);
+ }
+ return g.cache;
}
before(Group g): call(void move(int, int)) && target(g) {
- g.cache = null;
+ g.cache = null;
}
}
diff --git a/docs/teaching/exercises/answers/Answer4d.java b/docs/teaching/exercises/answers/Answer4d.java
index 10d90f6dd..f2127836a 100644
--- a/docs/teaching/exercises/answers/Answer4d.java
+++ b/docs/teaching/exercises/answers/Answer4d.java
@@ -1,13 +1,13 @@
/* *******************************************************************
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
- * All rights reserved.
- * This program and the accompanying materials are made available
- * under the terms of the Common Public License v1.0
- * which accompanies this distribution and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * PARC initial implementation
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Common Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * PARC initial implementation
* ******************************************************************/
package answers;
@@ -22,21 +22,21 @@ aspect Answer4d {
private Group Point.enclosingGroup = null;
before(Point p, Group g):
- execution(void add(FigureElement)) && args(p) && target(g) {
- p.enclosingGroup = g;
+ execution(void add(FigureElement)) && args(p) && target(g) {
+ p.enclosingGroup = g;
}
Rectangle around(Group g):
execution(Rectangle Group.getBounds()) && this(g) {
- if (g.cache == null) {
- g.cache = proceed(g);
- }
- return g.cache;
+ if (g.cache == null) {
+ g.cache = proceed(g);
+ }
+ return g.cache;
}
before(Point p): set(* Point.*) && target(p) {
- if (p.enclosingGroup != null) {
- p.enclosingGroup.cache = null;
- }
+ if (p.enclosingGroup != null) {
+ p.enclosingGroup.cache = null;
+ }
}
}
diff --git a/docs/teaching/exercises/answers/Answer4e.java b/docs/teaching/exercises/answers/Answer4e.java
index 20f98909a..bab9e2afd 100644
--- a/docs/teaching/exercises/answers/Answer4e.java
+++ b/docs/teaching/exercises/answers/Answer4e.java
@@ -1,13 +1,13 @@
/* *******************************************************************
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
- * All rights reserved.
- * This program and the accompanying materials are made available
- * under the terms of the Common Public License v1.0
- * which accompanies this distribution and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * PARC initial implementation
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Common Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * PARC initial implementation
* ******************************************************************/
package answers;
@@ -22,23 +22,23 @@ aspect Answer4e {
private Group FigureElement.enclosingGroup = null;
before(FigureElement p, Group g):
- execution(void add(FigureElement)) && args(p) && target(g) {
- p.enclosingGroup = g;
+ execution(void add(FigureElement)) && args(p) && target(g) {
+ p.enclosingGroup = g;
}
Rectangle around(Group g):
execution(Rectangle Group.getBounds()) && this(g) {
- if (g.cache == null) {
- g.cache = proceed(g);
- }
- return g.cache;
+ if (g.cache == null) {
+ g.cache = proceed(g);
+ }
+ return g.cache;
}
before(Point p): set(* Point.*) && target(p) {
- FigureElement fe = p;
- while (fe.enclosingGroup != null) {
- fe.enclosingGroup.cache = null;
- fe = fe.enclosingGroup;
- }
+ FigureElement fe = p;
+ while (fe.enclosingGroup != null) {
+ fe.enclosingGroup.cache = null;
+ fe = fe.enclosingGroup;
+ }
}
}
diff --git a/docs/teaching/exercises/figures/Box.java b/docs/teaching/exercises/figures/Box.java
index b10faa612..b792e0de9 100644
--- a/docs/teaching/exercises/figures/Box.java
+++ b/docs/teaching/exercises/figures/Box.java
@@ -1,13 +1,13 @@
/* *******************************************************************
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
- * All rights reserved.
- * This program and the accompanying materials are made available
- * under the terms of the Common Public License v1.0
- * which accompanies this distribution and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * PARC initial implementation
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Common Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * PARC initial implementation
* ******************************************************************/
diff --git a/docs/teaching/exercises/figures/FigureElement.java b/docs/teaching/exercises/figures/FigureElement.java
index d6d5c261c..22bb579a9 100644
--- a/docs/teaching/exercises/figures/FigureElement.java
+++ b/docs/teaching/exercises/figures/FigureElement.java
@@ -1,13 +1,13 @@
/* *******************************************************************
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
- * All rights reserved.
- * This program and the accompanying materials are made available
- * under the terms of the Common Public License v1.0
- * which accompanies this distribution and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * PARC initial implementation
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Common Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * PARC initial implementation
* ******************************************************************/
diff --git a/docs/teaching/exercises/figures/Group.java b/docs/teaching/exercises/figures/Group.java
index ad2f224c6..ff9bb8529 100644
--- a/docs/teaching/exercises/figures/Group.java
+++ b/docs/teaching/exercises/figures/Group.java
@@ -1,13 +1,13 @@
/* *******************************************************************
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
- * All rights reserved.
- * This program and the accompanying materials are made available
- * under the terms of the Common Public License v1.0
- * which accompanies this distribution and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * PARC initial implementation
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Common Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * PARC initial implementation
* ******************************************************************/
diff --git a/docs/teaching/exercises/figures/Line.java b/docs/teaching/exercises/figures/Line.java
index f21c1eff1..a26c4ee42 100644
--- a/docs/teaching/exercises/figures/Line.java
+++ b/docs/teaching/exercises/figures/Line.java
@@ -1,13 +1,13 @@
/* *******************************************************************
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
- * All rights reserved.
- * This program and the accompanying materials are made available
- * under the terms of the Common Public License v1.0
- * which accompanies this distribution and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * PARC initial implementation
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Common Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * PARC initial implementation
* ******************************************************************/
@@ -51,7 +51,7 @@ public class Line extends ShapeFigureElement {
}
private Line2D getLine2D() {
- return new Line2D.Float((float)getP1().getX(),
+ return new Line2D.Float((float)getP1().getX(),
(float)getP1().getY(),
(float)getP2().getX(),
(float)getP2().getY());
diff --git a/docs/teaching/exercises/figures/Point.java b/docs/teaching/exercises/figures/Point.java
index 63126d96f..616e1afbd 100644
--- a/docs/teaching/exercises/figures/Point.java
+++ b/docs/teaching/exercises/figures/Point.java
@@ -1,13 +1,13 @@
/* *******************************************************************
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
- * All rights reserved.
- * This program and the accompanying materials are made available
- * under the terms of the Common Public License v1.0
- * which accompanies this distribution and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * PARC initial implementation
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Common Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * PARC initial implementation
* ******************************************************************/
@@ -49,7 +49,7 @@ public class Point extends ShapeFigureElement {
private final static int WIDTH = Point.HEIGHT;
public Shape getShape() {
- return new Ellipse2D.Float((float)getX()-Point.WIDTH/2,
+ return new Ellipse2D.Float((float)getX()-Point.WIDTH/2,
(float)getY()-Point.HEIGHT/2,
(float)Point.HEIGHT,
(float)Point.WIDTH);
diff --git a/docs/teaching/exercises/figures/ShapeFigureElement.java b/docs/teaching/exercises/figures/ShapeFigureElement.java
index b09bad10e..7a98867c3 100644
--- a/docs/teaching/exercises/figures/ShapeFigureElement.java
+++ b/docs/teaching/exercises/figures/ShapeFigureElement.java
@@ -1,13 +1,13 @@
/* *******************************************************************
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
- * All rights reserved.
- * This program and the accompanying materials are made available
- * under the terms of the Common Public License v1.0
- * which accompanies this distribution and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * PARC initial implementation
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Common Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * PARC initial implementation
* ******************************************************************/
diff --git a/docs/teaching/exercises/figures/SlothfulPoint.java b/docs/teaching/exercises/figures/SlothfulPoint.java
index ede073b24..8bdfbee82 100644
--- a/docs/teaching/exercises/figures/SlothfulPoint.java
+++ b/docs/teaching/exercises/figures/SlothfulPoint.java
@@ -1,13 +1,13 @@
/* *******************************************************************
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
- * All rights reserved.
- * This program and the accompanying materials are made available
- * under the terms of the Common Public License v1.0
- * which accompanies this distribution and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * PARC initial implementation
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Common Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * PARC initial implementation
* ******************************************************************/
@@ -35,7 +35,7 @@ public class SlothfulPoint extends ShapeFigureElement {
public void setY(int y) { }
public void move(int dx, int dy) {
- System.out.println("Slothful moving");
+ System.out.println("Slothful moving");
}
public String toString() {
@@ -43,7 +43,7 @@ public class SlothfulPoint extends ShapeFigureElement {
}
public Shape getShape() {
- return new Ellipse2D.Float((float)_x,
+ return new Ellipse2D.Float((float)_x,
(float)_y, 1.0f, 1.0f);
}
}
diff --git a/docs/teaching/exercises/figures/gui/FigurePanel.java b/docs/teaching/exercises/figures/gui/FigurePanel.java
index 4746bc057..669cb83ed 100644
--- a/docs/teaching/exercises/figures/gui/FigurePanel.java
+++ b/docs/teaching/exercises/figures/gui/FigurePanel.java
@@ -1,13 +1,13 @@
/* *******************************************************************
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
- * All rights reserved.
- * This program and the accompanying materials are made available
- * under the terms of the Common Public License v1.0
- * which accompanies this distribution and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * PARC initial implementation
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Common Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * PARC initial implementation
* ******************************************************************/
diff --git a/docs/teaching/exercises/figures/gui/LogAdapter.java b/docs/teaching/exercises/figures/gui/LogAdapter.java
index 9d7d7d94d..d7cd2ef6d 100644
--- a/docs/teaching/exercises/figures/gui/LogAdapter.java
+++ b/docs/teaching/exercises/figures/gui/LogAdapter.java
@@ -1,13 +1,13 @@
/* *******************************************************************
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
- * All rights reserved.
- * This program and the accompanying materials are made available
- * under the terms of the Common Public License v1.0
- * which accompanies this distribution and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * PARC initial implementation
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Common Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * PARC initial implementation
* ******************************************************************/
diff --git a/docs/teaching/exercises/figures/gui/Main.java b/docs/teaching/exercises/figures/gui/Main.java
index c2d41c3b0..a3456c921 100644
--- a/docs/teaching/exercises/figures/gui/Main.java
+++ b/docs/teaching/exercises/figures/gui/Main.java
@@ -1,13 +1,13 @@
/* *******************************************************************
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
- * All rights reserved.
- * This program and the accompanying materials are made available
- * under the terms of the Common Public License v1.0
- * which accompanies this distribution and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * PARC initial implementation
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Common Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * PARC initial implementation
* ******************************************************************/