Bug 215957 - [ltk] Missing API to access changes/participants being in progress [LTK]
Summary: [ltk] Missing API to access changes/participants being in progress [LTK]
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3.1   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-21 05:07 EST by Tamas Kis CLA
Modified: 2016-05-13 02:46 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tamas Kis CLA 2008-01-21 05:07:41 EST
Build ID: M20060921-0945

Steps To Reproduce:
CopyParticipant-s () in LTK are not notified when destination of a refactoring must have been changed (in case of a name conflict).

Such case: 
- copy an element (IPackageFragement, IResource)
- paste it on e.g. itself (or its direct parent)
-> now new name will be querried by a dialog, but external CopyParticipants will neither be notified, nor have access to changed destination name.

This functionality is realised by INewNameQuery.
Referred e.g. in org.eclipse.jdt.internal.ui.refactoring.reorg.NewNameQueries

Unfortunatelly (Java-)CopyProcessor does not provide API to reach new/changed destination name.

e.g. in MonitoringNewNameQueries it is implemented using
  "private ReorgExecutionLog fExecutionLog;"

BUT this log not accessible externally by CopyContributor-s either.

It would be nice if a CopyParticipant could access the ReorgExecutionLog instance (e.g. through an adapter)

Thx. in advance!






More information:
for some reasons i must use 3.2.x now, but i looked in source of 3.3 and impl. seems to be the same.
Comment 1 Tamas Kis CLA 2008-01-22 03:51:02 EST
hello, 

you are right - it is an enhancement. ExecutionLog is available in CopyParticipant. Though some problems are still there:

a, no way to query which participants are already registered/in progress (for a given resource)

b, impossible to contribute to wizards (e.g. contribute name validators, etc.)

c, +1: i wanted to specify a resource as destination for a copyRefactoring, but it  finally takes only the first folder of it, so that e.g. you can not copy files within the same folder without name conflict.


Thanks for any enhancements here!
Thomas