Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 100470

Summary: Refactor out a set of packages into a new plug-in
Product: [Eclipse Project] PDE Reporter: Xavier Méhaut <xavier.mehaut>
Component: UIAssignee: PDE-UI-Inbox <pde-ui-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: enhancement    
Priority: P3 CC: caniszczyk, curtis.windatt.public, davymeers, jeffmcaffer, martinae, mn, wassim.melhem
Version: 3.1Keywords: helpwanted
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard: stalebug

Description Xavier Méhaut CLA 2005-06-16 16:16:10 EDT
hello,
I would like to suggest the following refactoring  feature on PDE/JDT...
The idea is for instance to select some packgaes or folders in a project and to
choose the menu option "move to new project..."...
Once selected, the folder/packages chosen will be placed into a new PDE project
created at this occasion... 
This feature will help grandly the refactoring of a project into smaller parts
for instance...
regards
Xavier
Comment 1 Olivier Thomann CLA 2006-10-06 15:43:48 EDT
Moving to JDT/UI
Comment 2 Chris Aniszczyk CLA 2006-11-06 20:41:21 EST
I think we can add something like a refactor action, "Componentize" (or something as cheesy).

Encouraging people to further componetize their plug-ins is a good thing (tm).

Thoughts?
Comment 3 Jeff McAffer CLA 2006-11-06 20:47:05 EST
Does JDT already have a "take this stuff and put it in a different project" refactoring?  Seems like this would be related except the destination would be a (potentially new) plugin project.

overall this feels like an interesting item
Comment 4 Wassim Melhem CLA 2006-11-06 23:04:54 EST
Martin, seeing that JDT is a platform and all, can we plug into whatever you already have?
Comment 5 Martin Aeschlimann CLA 2006-11-07 04:11:12 EST
That would be 'move package' or 'move CU' which we already have, but only by user interaction.

For 3.3 we want to add new API so that all refactorings can also be used programatically. 
org.eclipse.jdt.core.refactoring.descriptors.MoveDescriptor is already there as stub, but it's not yet implemented. Planed for M5.
Comment 6 Jeff McAffer CLA 2006-11-07 16:29:37 EST
seems like this is might be requesting moving the packages into a NEW plugin project no?
Comment 7 Chris Aniszczyk CLA 2007-09-05 17:41:00 EDT
(In reply to comment #5)

Martin, did the API make it in for M5?
Comment 8 Martin Aeschlimann CLA 2007-09-06 03:45:48 EDT
Yes, have a look at org.eclipse.jdt.core.refactoring.descriptors.MoveDescriptor in  jdt.core.manipulation.

- Create and configure the descriptor.
- Get the refactoring from the descriptor
- execute the refactoring to get the change
- execute the change

see org.eclipse.jdt.ui.tests.refactoring.RefactoringTest.performRefactoring(RefactoringDescriptor, boolean)
(in jdt.ui.tests.refactoring)
Comment 9 Lars Vogel CLA 2019-11-14 03:21:15 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

If the bug is still relevant, please remove the "stalebug" whiteboard tag.