• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

please help.. using eclipse refactoring

 
Rahul Kakkar
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello,

i am developing an SWT application and i want to give the user the option to refactor code using my application. can someone please direct me to a tutorial or something where i can learn how to use the refactoring api of eclipse in my application?
 
Richard Green
Ranch Hand
Posts: 536
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what do you mean by this?


and i want to give the user the option to refactor code using my application.


Refactoring in Eclipse is simple. You just need to right click on a file in package explorer and select Refactor. Eclipse will display a wizard and its self-explanatory from there-on.
 
Rahul Kakkar
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what i mean is that my application is a standalone application and not running through eclipse. So I want to use the eclipse API to allow refactoring but the dialogs and would have to be mine since my application is a standalone application
 
Richard Green
Ranch Hand
Posts: 536
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what i mean is that my application is a standalone application and not running through eclipse. So I want to use the eclipse API to allow refactoring but the dialogs and would have to be mine since my application is a standalone application

I think you have misunderstood few things. Eclipse is just an IDE, just an editor (like your notepad / wordpad except that it has lots of features to make your life easy).

You can include any java file / standalone application into eclipse using the File > Create New Project. Eclipse just adds two files .project and .classpath to your source folder. Thats it.

So now, I dont understand what difficulties you have in importing your standalone application into eclipse and do all your refactoring. Ofcourse, when it comes to deploying your standalone application, you will just give the jar / classes only (you wont include the two files generated by eclipse - .eclipse and . classpath).

There is one thing i am not sure about your question. Refactoring is a process of modifying one or more pieces of source codes. This is done by the software developer as part of the software development. What I dont understand is that you keep telling that "you want to allow your user to refactor" and "dialogues should be mine"... which gives me the impression that you want the users of your deployed application to modify the source code? Why?? If I have misunderstood the question, please correct me. Or could you be more clearer with your question, so that I can be of more assistance?
 
Rahul Kakkar
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
okay.. lets try this.. i'm creating an IDE with a java editor built in.. its based on eclipse.. so basically how eclise gives you the option to refactor source that is opened in it.. i want to give the same options in my IDE using eclipse's refactoring APIs/dialogs. hope this clears things out.. if not please let me know..
 
Mr. C Lamont Gilbert
Ranch Hand
Posts: 1170
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would ask in the eclipse forums. Its a pretty internal thing on the Eclipse IDE. The IDE is a special project of eclipse and I think it has its own newsgroup.
 
Richard Green
Ranch Hand
Posts: 536
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sorry. i did not realize that you are creating a new IDE. I thought you are creating just some normal standalone application. In that case, as Gilbert pointed out you should try the eclipse forums.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic