[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
| 
Re: AW: [jdt-ui-dev] changed SEF refactoring
 | 
Hi Jens,
I looked at your code and the changes are done the right way. As already suggested in my last mail,
I would try to convert postfix and prefix operation into corresponding methods. I think it makes the
transformation easier since you don't have to introduce temporary variables. Another issue Adam
brought up is: do we have to treat compound assignments (e.g field+= 10) in a special way. May be
you can spend some thoughts on that one too.
I also added a SEF Test suite to our test cases. So as soon as we make our test cases available you
have a starting point to add your own test cases.
Do you still have the problems with debugging. If so, what JDK are you using as a target VM ? 
I am looking forward seeing some more contributions
Dirk
| 
 | "Jens Lukowski" <jens.lukowski@xxxxxx>
 Sent by: jdt-ui-dev-admin@xxxxxxxxxxx
06.12.2001 15:54
 Please respond to jdt-ui-dev
 
  |         
         To:        <jdt-ui-dev@xxxxxxxxxxx>
         cc:        
         Subject:        AW: [jdt-ui-dev] changed SEF refactoring | 
 
-----Ursprüngliche Nachricht-----
Von: jdt-ui-dev-admin@xxxxxxxxxxx [mailto:jdt-ui-dev-admin@xxxxxxxxxxx]Im Auftrag von Dirk_Baeumer@xxxxxxx
Gesendet: Mittwoch, 5. Dezember 2001 18:45
An: jdt-ui-dev@xxxxxxxxxxx
Betreff: Re: [jdt-ui-dev] changed SEF refactoring
 < 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