Bug 31998 - we will have to disable renaming of linked packages (and cus)
Summary: we will have to disable renaming of linked packages (and cus)
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P1 normal (vote)
Target Milestone: 2.1 RC1   Edit
Assignee: Adam Kiezun CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-02-17 08:00 EST by Adam Kiezun CLA
Modified: 2003-02-18 09:17 EST (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 2003-02-17 08:00:04 EST
20030214
because it looks like  bug 31456
will remain unfixed
we will have to disable renaming of:
- linked package
- linked cus
- main types in linked cus
Comment 1 Adam Kiezun CLA 2003-02-17 08:07:17 EST
we might have to disable other stuff too
maybe everything that possibly calls any of:

ISourceManipulation:copy
ISourceManipulation:move
ISourceManipulation:rename 
ISourceManipulation:delete

on anything that can be linked
Comment 2 Dirk Baeumer CLA 2003-02-17 08:13:25 EST
Adam, please check with Java/Core which actions we have to disable. 

I would prefer a solution where the action is still enabled but a dialog pops 
up telling the user that the action isn't available on linked resources. 
Otherwise it will be hard for users to find out why the action is disabled.
Comment 3 Adam Kiezun CLA 2003-02-18 06:09:07 EST
done so far:
- ICompilationUnit
   - delete - no action necessary, because IResource delete is ok
   - rename, move, copy - using resource code if cu is linked

- IPackageFragment
   - delete - big dialog saying package will be unlinked and subpackages gone 
from workspace (only unlinks stuff)
   - rename, move, copy - disabled 

still need to have a look at 
IPackageFragmentRoots in the case of nested source folders with the top one 
being linked
Comment 4 Adam Kiezun CLA 2003-02-18 06:36:03 EST
nope, jcore throws JME on all linked folders
need to disable:
 - copy, move of linked source folders

need to decide what to do with:
- rename (can either disable or revert to my own code that worked just fine)
- delete (can either disable or revert to my own code that worked just fine)

Comment 5 Adam Kiezun CLA 2003-02-18 06:50:19 EST
for  delete i will use my old code
Comment 6 Adam Kiezun CLA 2003-02-18 09:17:02 EST
rename is disabled on linked source folders
disabling delete would be too brutal - using our old code in the case where 
source folder is linked

this works, except for 1 case: linked source folder has a nested source folder
them both are unlinked but the nested one is not removed from the classpath
(all nested source folders of a source folder are always unlinked)

worked-around, not fixed
jcore will fix after 2.1