Add copy refactoring infrastructure to LTK#4047
Conversation
|
I see no tests, please add them. |
|
This pull request changes some projects for the first time in this development cycle. An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch. Git patchFurther information are available in Common Build Issues - Missing version increments. |
| * SPDX-License-Identifier: EPL-2.0 | ||
| * | ||
| * Contributors: | ||
| * IBM Corporation - initial API and implementation |
There was a problem hiding this comment.
| * IBM Corporation - initial API and implementation |
I assume the header is copied from somewhere. I did you put IBM in here by intention?
There was a problem hiding this comment.
This class needed to be very similar to the DeleteResourcesDescriptor, so I copied the file and made the necessary changes. I kept the original header to show that this was not all my creation. The same principle also applies to CopyResourcesHandler & CopyResourcesRefactoringContribution.
I can change the headers if this was incorrect or if there is a better way to do it.
There was a problem hiding this comment.
That’s okay. Increase the upper year to the current year.
| import org.eclipse.ltk.internal.core.refactoring.BasicElementLabels; | ||
| import org.eclipse.ltk.internal.core.refactoring.RefactoringCoreMessages; | ||
|
|
||
| public class CopyResourceChange extends ResourceChange { |
There was a problem hiding this comment.
If this is supposed to be a public API, you must bump bundle version to 3.16.0 and add since 3.16 javadoc tags on every new API type
There was a problem hiding this comment.
Thanks for the heads-up, done.
Everything that was made public was done to align in with how the move/delete classes do it, a discussion about this was also had here #2262 (comment).
There was a problem hiding this comment.
API tooling complains, and I see now the package is not exported as API. Is this intentional?
5ff2c9e to
4f761c0
Compare
LTK is missing infrastructure for copy refactoring, e.g., a
CopyResourcesProcessor. Eclipse RCP developers can define their own copy participants (similar to move/delete/rename participants), but they are never called.This PR adds copy refactoring to LTK based on the existing implementation of move/delete refactoring, the existing refactoring for copying projects, and the copy processor implementation of JDT.
The changes were tested in Eclipse 4diac, where we could now perform refactoring operations (via participants) during copying of resources.