[Soot-list] unwind a line code?

Eric Bodden eric.bodden at mail.mcgill.ca
Tue Apr 17 08:48:01 EDT 2007


Well, I agree that this *sometimes* makes sense and that's why IDEs
like Eclipse support it. But I do not see how this would make sense
all over the place and hence I don't see why Soot would even be the
right tool for that.

Eric

On 17/04/07, Chris Pickett <chris.pickett at mail.mcgill.ca> wrote:
> I do this kind of refactoring all the time so as to make code not only
> more readable but also somewhat more modular; below, i1 and t1 can be
> reused elsewhere.  I guess I generally don't like passing arguments that
> aren't fully evaluated.  Failing that, I try at least not to let
> arguments have side effects, which the rewriting below accomplishes if
> you trust methods to do what their names say.
>
> Using Dava might do it, but the rest of the code will suffer.  More than
> likely there are some Eclipse refactoring plugins that do
> source-to-source transformations like this for you.  Again though Peng,
> if you tell us what you want to do it might help.
>
> Chris
>
> Eric Bodden wrote:
> > No, Soot does not have anything like this. Why would anybody want to
> > do this anyway? What are you trying to do?
> >
> > If you really want to do this (which I kind of doubt), you have to
> > rewrite the AST, which means you actually have to use polyglot, the
> > frontend in Soot.
> >
> > Eric
> >
> > On 16/04/07, Peng Li <lipeng360 at gmail.com> wrote:
> >> HI
> >> I have the following java code,
> >> main_pane.add(new JLabel( new ImageIcon(
> >> getClass().getClassLoader().getResource(
> >> "at/bestsolution/drawswf/images/logo.png" ) ) ), BorderLayout.NORTH);
> >>
> >> I would like to use soot to rewrite(unwind) it to the folllowing java
> >> lines,
> >>
> >> ImageIcon i1 = new ImageIcon( getClass().getClassLoader().getResource(
> >> "at/bestsolution/drawswf/images/logo.png" ) ) ;
> >> JLabel t1 = new JLabel(i1);
> >> main_pane.add(t1, BorderLayout.NORTH);
> >>
> >> I am wondering if soot has implemented this funtion(I found Jimple has
> >> actually done that)? If not, would you please reply me a method
> >> related to this function? I would like to do the implementation.
> >>
> >> Cheers
> >> Peng
> >> _______________________________________________
> >> Soot-list mailing list
> >> Soot-list at sable.mcgill.ca
> >> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
> >>
> >
> >
>


-- 
Eric Bodden
Sable Research Group
McGill University, Montréal, Canada


More information about the Soot-list mailing list