You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
(1) |
Aug
(3) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
|
|---|
|
From: Sven L. <Sve...@we...> - 2003-11-17 23:09:26
|
Hello (especially Thomas),
=20
now you can weave source code before and after access paths.
I will give a short example to explain the new feature:
(The example is contained in the new test suite with the name
flatAttrBefore.)
=20
The source code looks like this:
=20
package flat;
import java.awt.*;
=20
public class A {
public B b =3D new B();
public C c =3D new C();
A(){
}
public static void main(String args[]){
A a =3D new A();
B b =3D new B();
int i =3D a.b.m().x;
}
}
=20
class B {
A a =3D new A();
int x =3D 4;
B m(){
return new B();
}
}
class C {
int m(){
return 2;
}
}
=20
and the script code looks like this:
=20
script rollout {
foreach c in class('*.*') do {
foreach attr in c.attributes do {
foreach a in attr.referencingAccesses do{
a.after(${
System.out.println("after access
Attribute");
}$);
}
}
foreach attr in c.attributes do {
foreach a in attr.referencingAccesses do{
a.before(${
System.out.println("before access
Attribute");
}$);
}
}
}
}
=20
The result looks like this:
=20
package flat;
import java.awt.*;
public class A {
public B b =3D new B();
public C c =3D new C();
A() {}
public static void main(String args[]) {
A a =3D new A();
B b =3D new B();
;//------------------------------ INJECTJ FLAT TRANSFORMER START
FLAT ACCESSPATH
;//------------------------------ INJECTJ FLAT TRANSFORMER START
FLAT ACCESSPATH
;//------------------------------ INJECTJ FLAT TRANSFORMER START
FLAT ACCESSPATH
A ijtmp2 =3D a;
;//------------------------------ INJECTJ FLAT TRANSFORMER END
FLAT ACCESSPATH
;//------------------------------ INJECTJ FLAT TRANSFORMER START
FLAT ACCESSPATH
A ijtmp4 =3D ijtmp2;
;//------------------------------ INJECTJ FLAT TRANSFORMER END
FLAT ACCESSPATH
;//------------------------------ INJECTJ FLAT TRANSFORMER START
FLAT ACCESSPATH
A ijtmp5 =3D ijtmp4;
;//------------------------------ INJECTJ FLAT TRANSFORMER END
FLAT ACCESSPATH
;//------------------------------ INJECTJ FLAT TRANSFORMER START
FLAT INSERT
System.out.println("before access Attribute");
;//------------------------------ INJECTJ FLAT TRANSFORMER END
FLAT INSERT
B ijtmp1 =3D ijtmp5.b;
;//------------------------------ INJECTJ FLAT TRANSFORMER START
FLAT INSERT
System.out.println("after access Attribute");
;//------------------------------ INJECTJ FLAT TRANSFORMER END
FLAT INSERT
;//------------------------------ INJECTJ FLAT TRANSFORMER END
FLAT ACCESSPATH
B ijtmp0 =3D ijtmp1.m();
;//------------------------------ INJECTJ FLAT TRANSFORMER END
FLAT ACCESSPATH
;//------------------------------ INJECTJ FLAT TRANSFORMER START
FLAT ACCESSPATH
B ijtmp3 =3D ijtmp0;
;//------------------------------ INJECTJ FLAT TRANSFORMER END
FLAT ACCESSPATH
;//------------------------------ INJECTJ FLAT TRANSFORMER START
FLAT INSERT
System.out.println("before access Attribute");
;//------------------------------ INJECTJ FLAT TRANSFORMER END
FLAT INSERT
int i =3D ijtmp3.x;
;//------------------------------ INJECTJ FLAT TRANSFORMER START
FLAT INSERT
System.out.println("after access Attribute");
;//------------------------------ INJECTJ FLAT TRANSFORMER END
FLAT INSERT
}
}
=20
class B {
A a =3D new A();
int x =3D 4;
B m() {
return new B();
}
}
class C {
int m() {
return 2;
}
}
=20
=20
Mit freundlichem Gru=DF
=20
Sven Luzar
Wasserstra=DFe 23
48565 Steinfurt
=20
Tel: +49 (2551) 862250
Fax: +49 (89) 2443 68746
Email: Sve...@we...
=20
|
|
From: Thomas G. <Tho...@fz...> - 2003-10-13 16:11:36
|
Hi Sven, one first comment: looks nice !! However, I think I found the first bug: Try the project accessibility.ijp (current CVS, NewTestSuite\project) and step into the call refactorings.pullUpAttribute(attToMove, trg); in script accessibility.ij and step over the statements in the lib function. As soon as the function terminates, the debugger windows disappears and the script runs to the end (i.e., Inject/J terminates normally). The expected behavior is, however, to jump back right after the invocation of the lib function in accessibility.ij. Cheers, Thomas Sven Luzar wrote: > Hello, > > > > at the end of the final panel of the Swing Front-end you can find a new > button called „debug“. With this button you can start the new script > debugger. The debugger supports a view for the variables and a mechanism > for breakpoints, next step into and next step over calls. The debugger > frame looks like the following example: > > > > > > Have fun with the new feature. J > > > > Regards, > > > > Sven Luzar > > Wasserstraße 23 > > 48565 Steinfurt > > > > Tel: +49 (2551) 862250 > > Fax: +49 (89) 2443 68746 > > Email: Sve...@we... > > > -- Thomas Genssler (Tho...@fz...) Tel./Fax: +49-721-9654-602/-603 Forschungszentrum Informatik - Research Center for Information Technologies Programmstrukturen - Program Structures (http://www.fzi.de/prost) Haid-und-Neu-Strasse 10-14 76131 Karlsruhe GERMANY |
|
From: Sven L. <Sve...@we...> - 2003-08-18 22:16:25
|
Hello, I have added a source info object for the script model objects. This makes a better output on errors or exceptions. - Sven |
|
From: Sven L. <Sve...@we...> - 2003-08-02 20:49:13
|
Hello
The script supports the break and continue statement, now.
You can use this statements at the for each and at the while loop.
The statement only breaks or continues the last loop.
You can not declare labels or something like this.
You can find the following example at the NewTestSuite:
foreach c in class('flat.*') do {
if (c.fullName.equals("flat.A") ){
continue;
}
console("Found class " + c.fullName);
}
foreach c in class('flat.*') do {
if (c.fullName.equals("flat.A") ){
break;
}
console("Found class " + c.fullName);
}
Regards
Sven
|
|
From: Sven L. <Sve...@we...> - 2003-08-02 14:34:43
|
Hello,
first of all we have got a new abstract Method at the AbstractWeavepoint.
The method is called getMopObject and returns the corresponding object
concerning the Weave point.
Furthermore we have got four new functions at the MethodWeavepoint.
Now you can specify from respectively to whether or not
the transformation should start.
At this point an example should be given:
script rollout {
foreach c in class('flat.B') do {
foreach m in c.methods do {
m.beforeEntryFrom(class('flat.A'), ${
System.out.println("Entering method...");
}$);
}
}
}
The first parameter is a list with methods, classes and packages.
Regards
Sven
|
|
From: Sven L. <Sve...@we...> - 2003-07-19 11:22:39
|
Hello,
FYI:
The flat transformation is run able now. You can use the properties
beforeEntry, afterReturn, afterFailure and afterExit at the method
weave point. Each property needs one parameter. The parameter is a java
source code string with the special left bracket ${ and the special
right bracket }$.
At this point an example should be given:
script rollout {
foreach c in class('flat.B') do {
foreach m in c.methods do {
m.beforeEntry(${
System.out.println("Entering method...");
}$);
}
}
}
Furthermore I have added an example for each command. You can find the
examples in the CVS\injectj\NewTestSuite\project folder.
Regards,
Sven Luzar
|
|
From: Sven L. <Sve...@we...> - 2003-04-11 18:45:06
|
Hello Inject/J Fans,
=20
the grammar elements after return, after failure and after exit have
implemented.
=20
For more details you can take a look at the flat example project.
=20
=20
At this time some short examples should be given:
=20
foreach class 'flat.B' <=3Dc> do {
foreach method '*(*)' <=3Dm> do {
after return m ${
System.out.println("after return method...");
}$;
}
}
foreach class 'flat.B' <=3Dc> do {
foreach method '*(*)' <=3Dm> do {
after failure m ${
System.out.println("after failure method...");
}$;
}
}
=20
foreach class 'flat.B' <=3Dc> do {
foreach method '*(*)' <=3Dm> do {
after exit m ${
System.out.println("after exit method...");
}$;
}
}
=20
=20
Mit freundlichem Gru=DF
=20
Sven Luzar
Wasserstra=DFe 23
48565 Steinfurt
=20
Tel: +49 (2551) 862250
Fax: +49 (89) 2443 68746
Email: Sve...@we...
=20
|
|
From: Sven L. <Sve...@we...> - 2003-04-11 10:07:19
|
Hello Inject/J Fans,
=20
we have got a new mailing list:
=20
inj...@li...
=20
I think we should use this mailing list like a change log for the CVS
Tree.
The CVS descriptions (while committing) are only good solutions for a
part of files.
For an overview it=92s useful to have a change log with a small =
abstract.
=20
Mit freundlichem Gru=DF
=20
Sven Luzar
Wasserstra=DFe 23
48565 Steinfurt
=20
Tel: +49 (2551) 862250
Fax: +49 (89) 2443 68746
Email: Sve...@we...
=20
|