DESCRIPTION

Bug 447737 - Move command is disabled for projects in Project Explorer.

Change-Id: Ic32f8128531e6223339b49c7a0697308068f2c02
Signed-off-by: Melody Cooke xxx@xxx.xxx

COMMENTS

author: Melody Cooke
date: 2015-07-08 17:15:37.000000000

Uploaded patch set 2.

-------------------------------------
author: Melody Cooke
date: 2015-07-08 17:19:02.000000000

Patch Set 2:

I had to make MoveResourceAction2 compose MoveResourceAction too, because API restrictions don't let me extend MoveResourceAction.
But maybe "MoveResourceAction2" should be in same plugin as MoveResourceAction ?

-------------------------------------
author: Melody Cooke
date: 2015-08-11 12:58:06.000000000

Patch Set 2:

Indeed. Perhaps a solution like Patch Set 1? I was re-reading your original concerns with regards to that PS, and I have this to say:

"First, ResourceNavigatorMoveAction extends MoveResourceAction and so now we would have two instances of MoveProjectAction as a delegate. "
True, but this can be fixed by removing said MoveProjectAction instance from ResourceNavigatorMoveAction, as it's no longer necessary. It's used in the exact same way in the new MoveResourceAction  parent.


" Second, it also means the other *ResourceAction implementations in org.eclipse.ui.actions are a bit different as only MoveResourceAction handles projects transparently. "
From a cursory look, it seems the other *ResourceAction that should handle projects, already do so. Only MoveResourceAction and CopyResourceAction don't. But even if other *ResourceAction don't handle projects, that shouldn't be an impediment for having MoveResourceAction fixed. (and CopyResourceAction doesn't seem to be used anywhere on its own)


" Third, it would also be a change of API since MoveResourceAction previously didn't handle IProjects, and there may be code relying on that (similar to how ResourceNavigatorMoveAction cascaded through MoveProjectAction to its super implementation)."

True, I guess. It seems unlikely this would cause a problem (since it's an widening API change). Most likely the other code that uses MoveResourceAction overrides the project handling mechanism to do it themselves (again, like ResourceNavigatorMoveAction), so no problems. But yes, if MoveProjectAction is used in some convoluted way instead, it is possible there is some breakage - even if it's an unlikely scenario. But then, if such API change is not acceptable, the only proper solution will be to create a new MoveResourceAction class (and deprecating the current one).

-------------------------------------
