Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jdt-ui-dev] Re: OOPSLA *2001* "Implementing Refactoring Support..." paper/article request

jdt-ui-dev@xxxxxxxxxxx schrieb am 12.11.02 11:27:07:
> ...
> ...
> there's an important difference between external API and internal api -
> best described in:
> http://www.eclipse.org/articles/Article-API%20use/eclipse-api-usage-rules.html
> 
> as of now, the only external API that refactoring provides are actions
> (that you can use to perform a given refactoring)
> 
> that said, you can use a lot of the same infrastructure that we use:
> - SearchEngine (from the jdt.core plugin) to efficiently and accurately
> find references and declaration of things
> - ASTs (same jdt.core plugin) to analyze and transform programs
> (these are official APIs)
> 
> our internal infrastucture, like the text manipulation, AST rewriting or
> refactoring wizard 'mini-framework'
> is, as said, internal but has been stable for months now (AST rewriting is
> new but reliable and stable so far)
> So, for research purposes you can use any of these.
> 
> Apart from the above-mentined external APIs you may want to look at the
> following internal classes (and their hierarchies):
>  - TextEdit
> - Refactoring
>  - IChange
> - RefactoringStatus
> - RefactoringWizard
> - ASTRewrite
> 
> (all of them are quite stable)
>
> >So how is all the actual Refactoring support inside Eclipse then setup?
> The
> >OOPSLA 2001 paper somehow suggerated to me a sort of existing API, even
> the
> >term API hasn't been used inside that paper.
> >It would be nice if you could provide me at least with some more details
> >about the actual build in Refactoring scheme of Eclipse, so I can write
> >something down for my presentation and for our team discussion.
> 
> the overal design is a bit similar to Don Roberts' smalltalk refactoring
> browser.
> the scheme is:
> - collect the info from the user
> - check preconditions
> - create a change object to represent the modifications
> - perform the changes
> 
> >BTW, where you say there isn't any API actually, how can we then reuse the
> >Eclipse refactoring infrastructure for own enhancements or refactoring
> >addons? That's what I usually want to do for Eclipse during our University
> >project.
> 
> I'd start by looking at how the already existing refactorings are
> implemented - for simple examples look at:
> SelfEncapsulateField or PromoteTempToField
> 
> don't  hesitate to ask if you have  more questions
> a.
> 

First of all thank's for the hints and short overview so far.  

It seems I have to dig deeper into the class level structure, in order to be able to somehow reproduce, *which parts* of Eclipse are generally involved for refactorings and *how all these parts* may play together. - However, it might be a general problem for people new to Eclipse, like me, to get an deeper overview of the refactoring architecture, due to the lack of concrete overviews and documentation.

AFAI can actually see, most of the internal classes, which are involved for the main individual refactoring tasks, aren't documented at all (no real javadocs inside those classes?). - For the future I would generally like to see some documentation "towards an possibly implemented refactoring API" here. Further, it would IMO make sense, to publish some more detailed  articles about the Eclipse refactoring architecture internals, at least for those parts which are known to not be changed. Also some examples of it's usage (for some of the refactorings...) would not be bad too.

BTW, the lack of detailed API documentations for other Java IDEs, often shows the result, that third party plugin developers then tend to include instead their own parser and refactoring engines. Even that is somehow a sort of reinventing the wheel here for those specific IDEs, it's mostly due to the lack of information and thus not knowing how the tearget IDEs internally work here.


-Valentino






________________________________________________________________
Viren? Wir wissen nicht was Ihr Arzt empfiehlt. Wir empfehlen den
Virencheck für Dateianhänge! http://freemail.web.de/features/?mc=021159




Back to the top