Summary: | need a way to create a type hierarchy that considers working copies | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Adam Kiezun <akiezun> |
Component: | Core | Assignee: | Jerome Lanneluc <jerome_lanneluc> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | ||
Version: | 2.0 | ||
Target Milestone: | 2.0 M6 | ||
Hardware: | PC | ||
OS: | Windows 2000 | ||
Whiteboard: | |||
Bug Depends on: | |||
Bug Blocks: | 15323 |
Description
Adam Kiezun
2002-05-06 10:45:00 EDT
Adam, just for my edification, given that we save changes before a refactoring, why do you need type hierarchies on working copies? to do the precondition analysis i perform all the changes in memory (on fresh working copies). in RenameMethod, i first collect all methods along 'the ripple', find all references to them, perform the changes in memory, and find all references to the 'new' methods (and do some analysis then.) i mean - i'd like to do that but i'm stopped because i cannot collect all the methods that were renamed. normally, to collect methods, i walk the hierarchy up and down .... But if the hierarchy is build on the saved state of things and the methods exist only in working copies, then it is not possible. Jerome - how far are we from this ? The search for potential types involved in hierarchy is ok. Do we need more ? Maybe an API to encapsulate this... Adam, which API do you currently use? There are at least 5 newTypeHierarchy* flavors and we want to augment as few as possible. if you have jdt ui loaded - please see class RippleMethodFinder it uses the following: IType::newTypeHierarchy(IProgressMonitor monitor) IType::newSupertypeHierarchy(IProgressMonitor monitor) btw, i see only 3 flavors of that method (the remaining one takes an IJavaProject additionally) Thanks. There are 2 other ones on IJavaProject that take a region. ok. nope - i never used those Added IType.newSuperTypeHierarchy(IWorkingCopy[], IProgressMonitor) and IType.newTypeHierarchy(IWorkingCopy[], IProgressMonitor) |