Skip to content

Commit

Permalink
Removal of rename and move refactorings (#10323)
Browse files Browse the repository at this point in the history
Signed-off-by: jpinkney <[email protected]>
  • Loading branch information
JPinkney authored and tsmaeder committed Sep 20, 2018
1 parent 2ef5cca commit b1be5c2
Show file tree
Hide file tree
Showing 20 changed files with 32 additions and 2,152 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,30 +25,38 @@ public class CheRefactoringContributions {
private static final Map<String, String> refactoringContributions = new HashMap<>();

static {
refactoringContributions.put(
"org.eclipse.jdt.ui.rename.compilationunit",
"org.eclipse.jdt.internal.corext.refactoring.scripting.RenameCompilationUnitRefactoringContribution");
refactoringContributions.put(
"org.eclipse.jdt.ui.rename.enum.constant",
"org.eclipse.jdt.internal.corext.refactoring.scripting.RenameEnumConstRefactoringContribution");
refactoringContributions.put(
"org.eclipse.jdt.ui.rename.field",
"org.eclipse.jdt.internal.corext.refactoring.scripting.RenameFieldRefactoringContribution");
refactoringContributions.put(
"org.eclipse.jdt.ui.rename.local.variable",
"org.eclipse.jdt.internal.corext.refactoring.scripting.RenameLocalVariableRefactoringContribution");
refactoringContributions.put(
"org.eclipse.jdt.ui.rename.method",
"org.eclipse.jdt.internal.corext.refactoring.scripting.RenameMethodRefactoringContribution");
refactoringContributions.put(
"org.eclipse.jdt.ui.rename.package",
"org.eclipse.jdt.internal.corext.refactoring.scripting.RenamePackageRefactoringContribution");
refactoringContributions.put(
"org.eclipse.jdt.ui.rename.type.parameter",
"org.eclipse.jdt.internal.corext.refactoring.scripting.RenameTypeParameterRefactoringContribution");
refactoringContributions.put(
"org.eclipse.jdt.ui.rename.type",
"org.eclipse.jdt.internal.corext.refactoring.scripting.RenameTypeRefactoringContribution");
// refactoringContributions.put(
// "org.eclipse.jdt.ui.rename.compilationunit",
//
// "org.eclipse.jdt.internal.corext.refactoring.scripting.RenameCompilationUnitRefactoringContribution");
// refactoringContributions.put(
// "org.eclipse.jdt.ui.rename.enum.constant",
//
// "org.eclipse.jdt.internal.corext.refactoring.scripting.RenameEnumConstRefactoringContribution");
// refactoringContributions.put(
// "org.eclipse.jdt.ui.rename.field",
//
// "org.eclipse.jdt.internal.corext.refactoring.scripting.RenameFieldRefactoringContribution");
// refactoringContributions.put(
// "org.eclipse.jdt.ui.rename.local.variable",
//
// "org.eclipse.jdt.internal.corext.refactoring.scripting.RenameLocalVariableRefactoringContribution");
// refactoringContributions.put(
// "org.eclipse.jdt.ui.rename.method",
//
// "org.eclipse.jdt.internal.corext.refactoring.scripting.RenameMethodRefactoringContribution");
// refactoringContributions.put(
// "org.eclipse.jdt.ui.rename.package",
//
// "org.eclipse.jdt.internal.corext.refactoring.scripting.RenamePackageRefactoringContribution");
// refactoringContributions.put(
// "org.eclipse.jdt.ui.rename.type.parameter",
//
// "org.eclipse.jdt.internal.corext.refactoring.scripting.RenameTypeParameterRefactoringContribution");
// refactoringContributions.put(
// "org.eclipse.jdt.ui.rename.type",
//
// "org.eclipse.jdt.internal.corext.refactoring.scripting.RenameTypeRefactoringContribution");
// TODO :
/*
<contribution
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -27,130 +27,6 @@ private ParticipantManager() {
// no instance
}

// ---- Rename participants ----------------------------------------------------------------

private static final String RENAME_PARTICIPANT_EXT_POINT = "renameParticipants"; // $NON-NLS-1$
private static ParticipantExtensionPoint fgRenameInstance =
new ParticipantExtensionPoint(
RefactoringCorePlugin.getPluginId(),
RENAME_PARTICIPANT_EXT_POINT,
RenameParticipant.class);

/**
* Loads the rename participants for the given element.
*
* @param status a refactoring status to report status if problems occurred while loading the
* participants
* @param processor the processor that will own the participants
* @param element the element to be renamed
* @param arguments the rename arguments describing the rename
* @param affectedNatures an array of project natures affected by the refactoring
* @param shared a list of shared participants
* @return an array of rename participants
*/
public static RenameParticipant[] loadRenameParticipants(
RefactoringStatus status,
RefactoringProcessor processor,
Object element,
RenameArguments arguments,
String[] affectedNatures,
SharableParticipants shared) {
return loadRenameParticipants(
status, processor, element, arguments, null, affectedNatures, shared);
}

/**
* Loads the rename participants for the given element.
*
* @param status a refactoring status to report status if problems occurred while loading the
* participants
* @param processor the processor that will own the participants
* @param element the element to be renamed
* @param arguments the rename arguments describing the rename
* @param filter a participant filter to exclude certain participants, or <code>null</code> if no
* filtering is desired
* @param affectedNatures an array of project natures affected by the refactoring
* @param shared a list of shared participants
* @return an array of rename participants
* @since 3.2
*/
public static RenameParticipant[] loadRenameParticipants(
RefactoringStatus status,
RefactoringProcessor processor,
Object element,
RenameArguments arguments,
IParticipantDescriptorFilter filter,
String[] affectedNatures,
SharableParticipants shared) {
RefactoringParticipant[] participants =
fgRenameInstance.getParticipants(
status, processor, element, arguments, filter, affectedNatures, shared);
RenameParticipant[] result = new RenameParticipant[participants.length];
System.arraycopy(participants, 0, result, 0, participants.length);
return result;
}

// ---- Move participants ----------------------------------------------------------------

private static final String MOVE_PARTICIPANT_EXT_POINT = "moveParticipants"; // $NON-NLS-1$
private static ParticipantExtensionPoint fgMoveExtensions =
new ParticipantExtensionPoint(
RefactoringCorePlugin.getPluginId(), MOVE_PARTICIPANT_EXT_POINT, MoveParticipant.class);

/**
* Loads the move participants for the given element.
*
* @param status a refactoring status to report status if problems occurred while loading the
* participants
* @param processor the processor that will own the participants
* @param element the element to be moved
* @param arguments the move arguments describing the move
* @param affectedNatures an array of project natures affected by the refactoring
* @param shared a list of shared participants
* @return an array of move participants
*/
public static MoveParticipant[] loadMoveParticipants(
RefactoringStatus status,
RefactoringProcessor processor,
Object element,
MoveArguments arguments,
String[] affectedNatures,
SharableParticipants shared) {
return loadMoveParticipants(
status, processor, element, arguments, null, affectedNatures, shared);
}

/**
* Loads the move participants for the given element.
*
* @param status a refactoring status to report status if problems occurred while loading the
* participants
* @param processor the processor that will own the participants
* @param element the element to be moved
* @param arguments the move arguments describing the move
* @param filter a participant filter to exclude certain participants, or <code>null</code> if no
* filtering is desired
* @param affectedNatures an array of project natures affected by the refactoring
* @param shared a list of shared participants
* @return an array of move participants
* @since 3.2
*/
public static MoveParticipant[] loadMoveParticipants(
RefactoringStatus status,
RefactoringProcessor processor,
Object element,
MoveArguments arguments,
IParticipantDescriptorFilter filter,
String[] affectedNatures,
SharableParticipants shared) {
RefactoringParticipant[] participants =
fgMoveExtensions.getParticipants(
status, processor, element, arguments, filter, affectedNatures, shared);
MoveParticipant[] result = new MoveParticipant[participants.length];
System.arraycopy(participants, 0, result, 0, participants.length);
return result;
}

// ---- Delete participants ----------------------------------------------------------------

private static final String DELETE_PARTICIPANT_EXT_POINT = "deleteParticipants"; // $NON-NLS-1$
Expand Down
Loading

0 comments on commit b1be5c2

Please sign in to comment.