< Hi Jens,
thanks a lot for extending SEF. Currently
I am in the process of extending the change infrastructure so it is
hard for me to look at your code. But I will
do it until the end of the week. Regarding your questions: >
no
problem, thank you that you answer
my questions
< -
to get all parents simply add the following method to ParentProvider. I will
do the same in our code. The
method was simply missing ;-).
public AstNode[] getParents() {
if (fTracker == null)
return
new AstNode[0];
List result= fTracker.getParents();
return (AstNode[])
result.toArray(new
AstNode[result.size()]);
} >
ok
i'll do that
< -
regarding your transformation: also we proposed something similar in the
arcticle I am not convienced anymore that
transforming a prefix or postfix into
setField(getField() + 1),.... is the right thing to do. Have you thought about
adding
methods like
public int incField(boolean
prefix) {
if (prefix) {
return ++field;
} else {
int result= field;
field++;
return result;
}
}
to the class. This would simplify transforing prefix
and postfix _expression_. If we are really smart then the incField method
only
returns a value if we have code
like int i= field++; >
sounds like a good idea, I'll give it a
try...
< -
you should be able to debug with the eclipse launcher. Have you started the
target via the "debug" button ?
I use the Eclipse launcher too and it works >
it says at start time:
Java HotSpot(TM) Client VM warning: Setting of property "java.compiler" is
ignored
and it doesn't stop at my break
points...
Hope that helps
Dirk
greetings
Jens
| "Jens Lukowski"
<jens.lukowski@xxxxxx> Sent by: jdt-ui-dev-admin@xxxxxxxxxxx
04.12.2001 17:58 Please respond to jdt-ui-dev
| To:
"Jdt-Ui-Dev@Eclipse. Org"
<jdt-ui-dev@xxxxxxxxxxx> cc:
Subject: [jdt-ui-dev] changed SEF
refactoring |
Hi
I've made a few changes to
the SEF refactoring, so it can handle
simple Postfix- and
PrefixExpressions.
It converts:
field++
and ++field to setField(getField() + 1)
field-- and --field to
setField(getField() - 1)
please feel free
to comment...
For deeper analysis of the
write access there should be a way
to track more than one parent of a ast
node.
I couldn't see how to do this right now...
and it seems with the Eclipse launcher you cannot debug it
is
this right ?
greetings
Jens Lukowski