Bug 15322 - need a way to create a type hierarchy that considers working copies
Summary: need a way to create a type hierarchy that considers working copies
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.0 M6   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 15323
  Show dependency tree
 
Reported: 2002-05-06 10:45 EDT by Adam Kiezun CLA
Modified: 2002-05-14 07:30 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Kiezun CLA 2002-05-06 10:45:00 EDT
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
Comment 1 Erich Gamma CLA 2002-05-06 17:04:40 EDT
Adam, just for my edification, given that we save changes before a refactoring, 
why do you need type hierarchies on working copies?
Comment 2 Adam Kiezun CLA 2002-05-07 04:25:46 EDT
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. 
Comment 3 Philipe Mulet CLA 2002-05-07 04:47:22 EDT
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...
Comment 4 Jerome Lanneluc CLA 2002-05-14 05:51:14 EDT
Adam, which API do you currently use? There are at least 5 newTypeHierarchy* 
flavors and we want to augment as few as possible.
Comment 5 Adam Kiezun CLA 2002-05-14 06:01:29 EDT
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)
Comment 6 Jerome Lanneluc CLA 2002-05-14 06:10:21 EDT
Thanks. There are 2 other ones on IJavaProject that take a region.
Comment 7 Adam Kiezun CLA 2002-05-14 06:17:57 EDT
ok.
nope - i never used those
Comment 8 Jerome Lanneluc CLA 2002-05-14 07:30:24 EDT
Added IType.newSuperTypeHierarchy(IWorkingCopy[], IProgressMonitor) and 
IType.newTypeHierarchy(IWorkingCopy[], IProgressMonitor)