Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [imp-dev] move method refactoring problem...kindly help urgently..

And actually my problem is to extend the refactoring that i also support refactoring in unit test.
For example
there is class A and another class B, the method of class A is moved to class B.This can be done through existing plugin.
but if see its unit tests, then class A must have unit test and in A test we will call a.method(), but when do refactoring this method should be moved to class be and its reference should be updated.I am really in great trouble as i have just started using eclipse and my project deadline is so close.

Any help from the people who are expert in this area. Kindly respond as soon as possible.

Regards
Lehmia kiran 

On Thu, Feb 25, 2010 at 9:58 AM, lehmia kiran <lehmia@xxxxxxxxx> wrote:
Hi,
 
Actually to be precise; i am confused in two things first is how to pass the parameters, the places where i have passed null is because i am unable to get how to initialize these parameters..
 
Secondly, i want to call moveMethod refactoring programmatically.I have seen the link that u have reffered but i am not confirmed whether its move Method or moving anyother thing like(class, package or project).
 
Many thanx for your time and help.
 
Regards
Lehmia kiran
 
 
On Thu, Feb 25, 2010 at 3:02 AM, Robert M. Fuhrer <rfuhrer@xxxxxxxxxxxxxx> wrote:
Hi there,

This question is probably better asked on one of the eclipse.org newsgroups (e.g. eclipse.tools.jdt).

And honestly, I'd like to be more helpful, but it's a bit hard to say what's going wrong in your code, given that you're passing null in various places for things that obviously need proper values. Also, you're using several JDT internal classes in your code, which is definitely not the right way to go.

Finally, I'm not entirely sure what you're intending to do:

 - Are you trying to implement a new refactoring? If so, see here for a good article that should get you started: http://www.eclipse.org/articles/article.php?file=Article-Unleashing-the-Power-of-Refactoring/index.html .

 - Are you trying to implement support for the Move refactoring for a new language? I honestly haven't looked into this myself much, but the Move refactoring as implemented by the LTK supports "refactoring participants". See the class MoveParticipant for more info.

 - Are you simply trying to invoke a Move refactoring programmatically? If the latter, look in the archives of the eclipse.tools.jdt newsgroup for a response by Martin Aeschlimann dated 8 Oct 2007 and titled "Re: Move refactoring via descriptors". There's a code snippet in there that has been deemed by the JDT team to be the appropriate way to initiate Move refactorings.

On Feb 24, 2010, at 7:45 AM, lehmia kiran wrote:
Hi,

i want to do move method refactoring, below is the code that i am using to move method
////////////////////////////////***************************************///////////////////////////////////////////////////////////
<snip>

Actually this code is giving me runtime exception.also m not confirmed whether am doing refactoring correctly or not...


any help please, reply as soon as possible, as m in really in trouble, and my project is not proceeding furthure.

Regards
lehmia kiran

--
Cheers,
  - Bob
-------------------------------------------------
Robert M. Fuhrer
Research Staff Member
Programming Technologies Dept.
IBM T.J. Watson Research Center

IMP Project Lead (http://www.eclipse.org/imp)
X10: Productivity for High-Performance Parallel Programming (http://x10-lang.org)


_______________________________________________
imp-dev mailing list
imp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/imp-dev




Back to the top