Community
Participate
Working Groups
20020502 i badly need a way to create a type hiearchy with a set of working copies that would be looked at before the saved compilation units currently it only considers saved state
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)