Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring')
-rw-r--r--bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/IJavaScriptElementMapper.java44
-rw-r--r--bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/IJavaScriptRefactorings.java412
-rw-r--r--bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/RenameTypeArguments.java86
-rw-r--r--bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/ChangeMethodSignatureDescriptor.java42
-rw-r--r--bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/ConvertAnonymousDescriptor.java41
-rw-r--r--bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/ConvertLocalVariableDescriptor.java41
-rw-r--r--bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/ConvertMemberTypeDescriptor.java41
-rw-r--r--bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/CopyDescriptor.java41
-rw-r--r--bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/DeleteDescriptor.java41
-rw-r--r--bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/EncapsulateFieldDescriptor.java40
-rw-r--r--bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/ExtractConstantDescriptor.java41
-rw-r--r--bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/ExtractInterfaceDescriptor.java41
-rw-r--r--bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/ExtractLocalDescriptor.java40
-rw-r--r--bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/ExtractMethodDescriptor.java41
-rw-r--r--bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/ExtractSuperclassDescriptor.java41
-rw-r--r--bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/GeneralizeTypeDescriptor.java41
-rw-r--r--bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/InferTypeArgumentsDescriptor.java41
-rw-r--r--bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/InlineConstantDescriptor.java41
-rw-r--r--bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/InlineLocalVariableDescriptor.java41
-rw-r--r--bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/InlineMethodDescriptor.java41
-rw-r--r--bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/IntroduceFactoryDescriptor.java41
-rw-r--r--bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/IntroduceIndirectionDescriptor.java41
-rw-r--r--bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/IntroduceParameterDescriptor.java41
-rw-r--r--bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/JavaScriptRefactoringContribution.java43
-rw-r--r--bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/JavaScriptRefactoringDescriptor.java464
-rw-r--r--bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/MoveDescriptor.java348
-rw-r--r--bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/MoveMethodDescriptor.java41
-rw-r--r--bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/MoveStaticMembersDescriptor.java142
-rw-r--r--bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/PullUpDescriptor.java41
-rw-r--r--bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/PushDownDescriptor.java41
-rw-r--r--bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/RenameJavaScriptElementDescriptor.java566
-rw-r--r--bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/RenameLocalVariableDescriptor.java132
-rw-r--r--bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/RenameResourceDescriptor.java122
-rw-r--r--bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/UseSupertypeDescriptor.java124
34 files changed, 0 insertions, 3425 deletions
diff --git a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/IJavaScriptElementMapper.java b/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/IJavaScriptElementMapper.java
deleted file mode 100644
index 6e97a9b2..00000000
--- a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/IJavaScriptElementMapper.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.refactoring;
-
-import org.eclipse.wst.jsdt.core.IJavaScriptElement;
-
-/**
- * An <code>IJavaScriptElementMapper</code> provides methods to map an original
- * elements to its refactored counterparts.
- * <p>
- * An <code>IJavaScriptElementMapper</code> can be obtained via
- * {@link org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor#getAdapter(Class)}.
- * </p>
- *
- * Provisional API: This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- */
-public interface IJavaScriptElementMapper {
-
- /**
- * Returns the refactored Java element for the given element.
- * The returned Java element might not yet exist when the method
- * is called.
- * </p>
- * Note that local variables <strong>cannot</strong> be mapped
- * using this method.
- * <p>
- *
- * @param element the element to be refactored
- *
- * @return the refactored element for the given element
- */
- IJavaScriptElement getRefactoredJavaScriptElement(IJavaScriptElement element);
-}
diff --git a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/IJavaScriptRefactorings.java b/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/IJavaScriptRefactorings.java
deleted file mode 100644
index 55d282b3..00000000
--- a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/IJavaScriptRefactorings.java
+++ /dev/null
@@ -1,412 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.refactoring;
-
-
-/**
- * Interface for refactoring ids offered by the JDT tooling.
- * <p>
- * This interface provides refactoring ids for refactorings offered by the JDT
- * tooling. Refactoring instances corresponding to such an id may be
- * instantiated by the refactoring framework using
- * {@link org.eclipse.ltk.core.refactoring.RefactoringCore#getRefactoringContribution(String)}. The resulting
- * refactoring instance may be executed on the workspace with a
- * {@link org.eclipse.ltk.core.refactoring.PerformRefactoringOperation}.
- * <p>
- * Clients may obtain customizable refactoring descriptors for a certain
- * refactoring by calling
- * {@link org.eclipse.ltk.core.refactoring.RefactoringCore#getRefactoringContribution(String)} with the
- * appropriate refactoring id and then calling
- * {@link org.eclipse.ltk.core.refactoring.RefactoringContribution#createDescriptor()} to obtain a customizable
- * refactoring descriptor. The concrete subtype of refactoring descriptors is
- * dependent from the <code>id</code> argument.
- * </p>
- * <p>
- * Note: this interface is not intended to be implemented by clients.
- * </p>
- *
- * Provisional API: This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- */
-public interface IJavaScriptRefactorings {
-
- /**
- * Refactoring id of the 'Change Method Signature' refactoring (value:
- * <code>org.eclipse.wst.jsdt.ui.change.method.signature</code>).
- * <p>
- * Clients may safely cast the obtained refactoring descriptor to
- * {@link org.eclipse.wst.jsdt.core.refactoring.descriptors.ChangeMethodSignatureDescriptor}.
- * </p>
- */
- public static final String CHANGE_METHOD_SIGNATURE= "org.eclipse.wst.jsdt.ui.change.method.signature"; //$NON-NLS-1$
-
- /**
- * Refactoring id of the 'Convert Anonymous To Nested' refactoring (value:
- * <code>org.eclipse.wst.jsdt.ui.convert.anonymous</code>).
- * <p>
- * Clients may safely cast the obtained refactoring descriptor to
- * {@link org.eclipse.wst.jsdt.core.refactoring.descriptors.ConvertAnonymousDescriptor}.
- * </p>
- */
- public static final String CONVERT_ANONYMOUS= "org.eclipse.wst.jsdt.ui.convert.anonymous"; //$NON-NLS-1$
-
- /**
- * Refactoring id of the 'Convert Local Variable to Field' refactoring
- * (value: <code>org.eclipse.wst.jsdt.ui.promote.temp</code>).
- * <p>
- * Clients may safely cast the obtained refactoring descriptor to
- * {@link org.eclipse.wst.jsdt.core.refactoring.descriptors.ConvertLocalVariableDescriptor}.
- * </p>
- */
- public static final String CONVERT_LOCAL_VARIABLE= "org.eclipse.wst.jsdt.ui.promote.temp"; //$NON-NLS-1$
-
- /**
- * Refactoring id of the 'Convert Member Type to Top Level' refactoring
- * (value: <code>org.eclipse.wst.jsdt.ui.move.inner</code>).
- * <p>
- * Clients may safely cast the obtained refactoring descriptor to
- * {@link org.eclipse.wst.jsdt.core.refactoring.descriptors.ConvertMemberTypeDescriptor}.
- * </p>
- */
- public static final String CONVERT_MEMBER_TYPE= "org.eclipse.wst.jsdt.ui.move.inner"; //$NON-NLS-1$
-
- /**
- * Refactoring id of the 'Copy' refactoring (value:
- * <code>org.eclipse.wst.jsdt.ui.copy</code>).
- * <p>
- * Clients may safely cast the obtained refactoring descriptor to
- * {@link org.eclipse.wst.jsdt.core.refactoring.descriptors.CopyDescriptor}.
- * </p>
- */
- public static final String COPY= "org.eclipse.wst.jsdt.ui.copy"; //$NON-NLS-1$
-
- /**
- * Refactoring id of the 'Delete' refactoring (value:
- * <code>org.eclipse.wst.jsdt.ui.delete</code>).
- * <p>
- * Clients may safely cast the obtained refactoring descriptor to
- * {@link org.eclipse.wst.jsdt.core.refactoring.descriptors.DeleteDescriptor}.
- * </p>
- */
- public static final String DELETE= "org.eclipse.wst.jsdt.ui.delete"; //$NON-NLS-1$
-
- /**
- * Refactoring id of the 'Encapsulate Field' refactoring (value:
- * <code>org.eclipse.wst.jsdt.ui.self.encapsulate</code>).
- * <p>
- * Clients may safely cast the obtained refactoring descriptor to
- * {@link org.eclipse.wst.jsdt.core.refactoring.descriptors.EncapsulateFieldDescriptor}.
- * </p>
- */
- public static final String ENCAPSULATE_FIELD= "org.eclipse.wst.jsdt.ui.self.encapsulate"; //$NON-NLS-1$
-
- /**
- * Refactoring id of the 'Extract Constant' refactoring (value:
- * <code>org.eclipse.wst.jsdt.ui.extract.constant</code>).
- * <p>
- * Clients may safely cast the obtained refactoring descriptor to
- * {@link org.eclipse.wst.jsdt.core.refactoring.descriptors.ExtractConstantDescriptor}.
- * </p>
- */
- public static final String EXTRACT_CONSTANT= "org.eclipse.wst.jsdt.ui.extract.constant"; //$NON-NLS-1$
-
- /**
- * Refactoring id of the 'Extract Interface' refactoring (value:
- * <code>org.eclipse.wst.jsdt.ui.extract.interface</code>).
- * <p>
- * Clients may safely cast the obtained refactoring descriptor to
- * {@link org.eclipse.wst.jsdt.core.refactoring.descriptors.ExtractInterfaceDescriptor}.
- * </p>
- */
- public static final String EXTRACT_INTERFACE= "org.eclipse.wst.jsdt.ui.extract.interface"; //$NON-NLS-1$
-
- /**
- * Refactoring id of the 'Extract Local Variable' refactoring (value:
- * <code>org.eclipse.wst.jsdt.ui.extract.temp</code>).
- * <p>
- * Clients may safely cast the obtained refactoring descriptor to
- * {@link org.eclipse.wst.jsdt.core.refactoring.descriptors.ExtractLocalDescriptor}.
- * </p>
- */
- public static final String EXTRACT_LOCAL_VARIABLE= "org.eclipse.wst.jsdt.ui.extract.temp"; //$NON-NLS-1$
-
- /**
- * Refactoring id of the 'Extract Method' refactoring (value:
- * <code>org.eclipse.wst.jsdt.ui.extract.method</code>).
- * <p>
- * Clients may safely cast the obtained refactoring descriptor to
- * {@link org.eclipse.wst.jsdt.core.refactoring.descriptors.ExtractMethodDescriptor}.
- * </p>
- */
- public static final String EXTRACT_METHOD= "org.eclipse.wst.jsdt.ui.extract.method"; //$NON-NLS-1$
-
- /**
- * Refactoring id of the 'Extract Superclass' refactoring (value:
- * <code>org.eclipse.wst.jsdt.ui.extract.superclass</code>).
- * <p>
- * Clients may safely cast the obtained refactoring descriptor to
- * {@link org.eclipse.wst.jsdt.core.refactoring.descriptors.ExtractSuperclassDescriptor}.
- * </p>
- */
- public static final String EXTRACT_SUPERCLASS= "org.eclipse.wst.jsdt.ui.extract.superclass"; //$NON-NLS-1$
-
- /**
- * Refactoring id of the 'Generalize Declared Type' refactoring (value:
- * <code>org.eclipse.wst.jsdt.ui.change.type</code>).
- * <p>
- * Clients may safely cast the obtained refactoring descriptor to
- * {@link org.eclipse.wst.jsdt.core.refactoring.descriptors.GeneralizeTypeDescriptor}.
- * </p>
- */
- public static final String GENERALIZE_TYPE= "org.eclipse.wst.jsdt.ui.change.type"; //$NON-NLS-1$
-
- /**
- * Refactoring id of the 'Infer Type Arguments' refactoring (value:
- * <code>org.eclipse.wst.jsdt.ui.infer.typearguments</code>).
- * <p>
- * Clients may safely cast the obtained refactoring descriptor to
- * {@link org.eclipse.wst.jsdt.core.refactoring.descriptors.InferTypeArgumentsDescriptor}.
- * </p>
- */
- public static final String INFER_TYPE_ARGUMENTS= "org.eclipse.wst.jsdt.ui.infer.typearguments"; //$NON-NLS-1$
-
- /**
- * Refactoring id of the 'Inline Constant' refactoring (value:
- * <code>org.eclipse.wst.jsdt.ui.inline.constant</code>).
- * <p>
- * Clients may safely cast the obtained refactoring descriptor to
- * {@link org.eclipse.wst.jsdt.core.refactoring.descriptors.InlineConstantDescriptor}.
- * </p>
- */
- public static final String INLINE_CONSTANT= "org.eclipse.wst.jsdt.ui.inline.constant"; //$NON-NLS-1$
-
- /**
- * Refactoring id of the 'Inline Local Variable' refactoring (value:
- * <code>org.eclipse.wst.jsdt.ui.inline.temp</code>).
- * <p>
- * Clients may safely cast the obtained refactoring descriptor to
- * {@link org.eclipse.wst.jsdt.core.refactoring.descriptors.InlineLocalVariableDescriptor}.
- * </p>
- */
- public static final String INLINE_LOCAL_VARIABLE= "org.eclipse.wst.jsdt.ui.inline.temp"; //$NON-NLS-1$
-
- /**
- * Refactoring id of the 'Inline Method' refactoring (value:
- * <code>org.eclipse.wst.jsdt.ui.inline.method</code>).
- * <p>
- * Clients may safely cast the obtained refactoring descriptor to
- * {@link org.eclipse.wst.jsdt.core.refactoring.descriptors.InlineMethodDescriptor}.
- * </p>
- */
- public static final String INLINE_METHOD= "org.eclipse.wst.jsdt.ui.inline.method"; //$NON-NLS-1$
-
- /**
- * Refactoring id of the 'Introduce Factory' refactoring (value:
- * <code>org.eclipse.wst.jsdt.ui.introduce.factory</code>).
- * <p>
- * Clients may safely cast the obtained refactoring descriptor to
- * {@link Iorg.eclipse.wst.jsdt.core.refactoring.descriptors.ntroduceFactoryDescriptor}.
- * </p>
- */
- public static final String INTRODUCE_FACTORY= "org.eclipse.wst.jsdt.ui.introduce.factory"; //$NON-NLS-1$
-
- /**
- * Refactoring id of the 'Introduce Indirection' refactoring (value:
- * <code>org.eclipse.wst.jsdt.ui.introduce.indirection</code>).
- * <p>
- * Clients may safely cast the obtained refactoring descriptor to
- * {@link org.eclipse.wst.jsdt.core.refactoring.descriptors.IntroduceIndirectionDescriptor}.
- * </p>
- */
- public static final String INTRODUCE_INDIRECTION= "org.eclipse.wst.jsdt.ui.introduce.indirection"; //$NON-NLS-1$
-
- /**
- * Refactoring id of the 'Introduce Parameter' refactoring (value:
- * <code>org.eclipse.wst.jsdt.ui.introduce.parameter</code>).
- * <p>
- * Clients may safely cast the obtained refactoring descriptor to
- * {@link org.eclipse.wst.jsdt.core.refactoring.descriptors.IntroduceParameterDescriptor}.
- * </p>
- */
- public static final String INTRODUCE_PARAMETER= "org.eclipse.wst.jsdt.ui.introduce.parameter"; //$NON-NLS-1$
-
- /**
- * Refactoring id of the 'Move' refactoring (value:
- * <code>org.eclipse.wst.jsdt.ui.move</code>).
- * <p>
- * Clients may safely cast the obtained refactoring descriptor to
- * {@link org.eclipse.wst.jsdt.core.refactoring.descriptors.MoveDescriptor}.
- * </p>
- */
- public static final String MOVE= "org.eclipse.wst.jsdt.ui.move"; //$NON-NLS-1$
-
- /**
- * Refactoring id of the 'Move Method' refactoring (value:
- * <code>org.eclipse.wst.jsdt.ui.move.method</code>).
- * <p>
- * Clients may safely cast the obtained refactoring descriptor to
- * {@link org.eclipse.wst.jsdt.core.refactoring.descriptors.MoveMethodDescriptor}.
- * </p>
- */
- public static final String MOVE_METHOD= "org.eclipse.wst.jsdt.ui.move.method"; //$NON-NLS-1$
-
- /**
- * Refactoring id of the 'Move Static Members' refactoring (value:
- * <code>org.eclipse.wst.jsdt.ui.move.static</code>).
- * <p>
- * Clients may safely cast the obtained refactoring descriptor to
- * {@link org.eclipse.wst.jsdt.core.refactoring.descriptors.MoveStaticMembersDescriptor}.
- * </p>
- */
- public static final String MOVE_STATIC_MEMBERS= "org.eclipse.wst.jsdt.ui.move.static"; //$NON-NLS-1$
-
- /**
- * Refactoring id of the 'Pull Up' refactoring (value:
- * <code>org.eclipse.wst.jsdt.ui.pull.up</code>).
- * <p>
- * Clients may safely cast the obtained refactoring descriptor to
- * {@link org.eclipse.wst.jsdt.core.refactoring.descriptors.PullUpDescriptor}.
- * </p>
- */
- public static final String PULL_UP= "org.eclipse.wst.jsdt.ui.pull.up"; //$NON-NLS-1$
-
- /**
- * Refactoring id of the 'Push Down' refactoring (value:
- * <code>org.eclipse.wst.jsdt.ui.push.down</code>).
- * <p>
- * Clients may safely cast the obtained refactoring descriptor to
- * {@link org.eclipse.wst.jsdt.core.refactoring.descriptors.PushDownDescriptor}.
- * </p>
- */
- public static final String PUSH_DOWN= "org.eclipse.wst.jsdt.ui.push.down"; //$NON-NLS-1$
-
- /**
- * Refactoring id of the 'Rename Compilation Unit' refactoring (value:
- * <code>org.eclipse.wst.jsdt.ui.rename.compilationunit</code>).
- * <p>
- * Clients may safely cast the obtained refactoring descriptor to
- * {@link org.eclipse.wst.jsdt.core.refactoring.descriptors.RenameJavaScriptElementDescriptor}.
- * </p>
- */
- public static final String RENAME_JAVASCRIPT_UNIT= "org.eclipse.wst.jsdt.ui.rename.compilationunit"; //$NON-NLS-1$
-
- /**
- * Refactoring id of the 'Rename Enum Constant' refactoring (value:
- * <code>org.eclipse.wst.jsdt.ui.rename.enum.constant</code>).
- * <p>
- * Clients may safely cast the obtained refactoring descriptor to
- * {@link org.eclipse.wst.jsdt.core.refactoring.descriptors.RenameJavaScriptElementDescriptor}.
- * </p>
- */
- public static final String RENAME_ENUM_CONSTANT= "org.eclipse.wst.jsdt.ui.rename.enum.constant"; //$NON-NLS-1$
-
- /**
- * Refactoring id of the 'Rename Field' refactoring (value:
- * <code>org.eclipse.wst.jsdt.ui.rename.field</code>).
- * <p>
- * Clients may safely cast the obtained refactoring descriptor to
- * {@link org.eclipse.wst.jsdt.core.refactoring.descriptors.RenameJavaScriptElementDescriptor}.
- * </p>
- */
- public static final String RENAME_FIELD= "org.eclipse.wst.jsdt.ui.rename.field"; //$NON-NLS-1$
-
- /**
- * Refactoring id of the 'Rename Java Project' refactoring (value:
- * <code>org.eclipse.wst.jsdt.ui.rename.java.project</code>).
- * <p>
- * Clients may safely cast the obtained refactoring descriptor to
- * {@link org.eclipse.wst.jsdt.core.refactoring.descriptors.RenameJavaScriptElementDescriptor}.
- * </p>
- */
- public static final String RENAME_JAVA_PROJECT= "org.eclipse.wst.jsdt.ui.rename.java.project"; //$NON-NLS-1$
-
- /**
- * Refactoring id of the 'Rename Local Variable' refactoring (value:
- * <code>org.eclipse.wst.jsdt.ui.rename.local.variable</code>).
- * <p>
- * Clients may safely cast the obtained refactoring descriptor to
- * {@link org.eclipse.wst.jsdt.core.refactoring.descriptors.RenameJavaScriptElementDescriptor}.
- * </p>
- */
- public static final String RENAME_LOCAL_VARIABLE= "org.eclipse.wst.jsdt.ui.rename.local.variable"; //$NON-NLS-1$
-
- /**
- * Refactoring id of the 'Rename Method' refactoring (value:
- * <code>org.eclipse.wst.jsdt.ui.rename.method</code>).
- * <p>
- * Clients may safely cast the obtained refactoring descriptor to
- * {@link org.eclipse.wst.jsdt.core.refactoring.descriptors.RenameJavaScriptElementDescriptor}.
- * </p>
- */
- public static final String RENAME_METHOD= "org.eclipse.wst.jsdt.ui.rename.method"; //$NON-NLS-1$
-
- /**
- * Refactoring id of the 'Rename Package' refactoring (value:
- * <code>org.eclipse.wst.jsdt.ui.rename.package</code>).
- * <p>
- * Clients may safely cast the obtained refactoring descriptor to
- * {@link org.eclipse.wst.jsdt.core.refactoring.descriptors.RenameJavaScriptElementDescriptor}.
- * </p>
- */
- public static final String RENAME_PACKAGE= "org.eclipse.wst.jsdt.ui.rename.package"; //$NON-NLS-1$
-
- /**
- * Refactoring id of the 'Rename Resource' refactoring (value:
- * <code>org.eclipse.wst.jsdt.ui.rename.resource</code>).
- * <p>
- * Clients may safely cast the obtained refactoring descriptor to
- * {@link org.eclipse.wst.jsdt.core.refactoring.descriptors.RenameResourceDescriptor}.
- * </p>
- */
- public static final String RENAME_RESOURCE= "org.eclipse.wst.jsdt.ui.rename.resource"; //$NON-NLS-1$
-
- /**
- * Refactoring id of the 'Rename Source Folder' refactoring (value:
- * <code>org.eclipse.wst.jsdt.ui.rename.source.folder</code>).
- * <p>
- * Clients may safely cast the obtained refactoring descriptor to
- * {@link org.eclipse.wst.jsdt.core.refactoring.descriptors.RenameJavaScriptElementDescriptor}.
- * </p>
- */
- public static final String RENAME_SOURCE_FOLDER= "org.eclipse.wst.jsdt.ui.rename.source.folder"; //$NON-NLS-1$
-
- /**
- * Refactoring id of the 'Rename Type' refactoring (value:
- * <code>org.eclipse.wst.jsdt.ui.rename.type</code>).
- * <p>
- * Clients may safely cast the obtained refactoring descriptor to
- * {@link org.eclipse.wst.jsdt.core.refactoring.descriptors.RenameJavaScriptElementDescriptor}.
- * </p>
- */
- public static final String RENAME_TYPE= "org.eclipse.wst.jsdt.ui.rename.type"; //$NON-NLS-1$
-
- /**
- * Refactoring id of the 'Rename Type Parameter' refactoring (value:
- * <code>org.eclipse.wst.jsdt.ui.rename.type.parameter</code>).
- * <p>
- * Clients may safely cast the obtained refactoring descriptor to
- * {@link org.eclipse.wst.jsdt.core.refactoring.descriptors.RenameJavaScriptElementDescriptor}.
- * </p>
- */
- public static final String RENAME_TYPE_PARAMETER= "org.eclipse.wst.jsdt.ui.rename.type.parameter"; //$NON-NLS-1$
-
- /**
- * Refactoring id of the 'Use Supertype Where Possible' refactoring (value:
- * <code>org.eclipse.wst.jsdt.ui.use.supertype</code>).
- * <p>
- * Clients may safely cast the obtained refactoring descriptor to
- * {@link org.eclipse.wst.jsdt.core.refactoring.descriptors.UseSupertypeDescriptor}.
- * </p>
- */
- public static final String USE_SUPER_TYPE= "org.eclipse.wst.jsdt.ui.use.supertype"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/RenameTypeArguments.java b/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/RenameTypeArguments.java
deleted file mode 100644
index f2a624ee..00000000
--- a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/RenameTypeArguments.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.refactoring;
-
-import org.eclipse.core.runtime.Assert;
-
-import org.eclipse.ltk.core.refactoring.participants.RenameArguments;
-
-import org.eclipse.wst.jsdt.core.IJavaScriptElement;
-
-/**
- * Rename type arguments describe the data that a rename type processor
- * provides to its rename type participants.
- * <p>
- * This class is not intended to be subclassed by clients.
- * </p>
- *
- * Provisional API: This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- */
-public class RenameTypeArguments extends RenameArguments {
-
- private boolean updateSimilarDeclarations;
- private IJavaScriptElement[] similarDeclarations;
-
- /**
- * Creates new rename type arguments.
- *
- * @param newName the new name of the element to be renamed
- * @param updateReferences <code>true</code> if reference
- * updating is requested; <code>false</code> otherwise
- * @param updateSimilarDeclarations <code>true</code> if similar
- * declaration updating is requested; <code>false</code> otherwise
- * @param similarDeclarations the similar declarations that will be
- * updated or <code>null</code> if similar declaration updating is
- * not requested
- */
- public RenameTypeArguments(String newName, boolean updateReferences, boolean updateSimilarDeclarations,
- IJavaScriptElement[] similarDeclarations) {
- super(newName, updateReferences);
- if (updateSimilarDeclarations) {
- Assert.isNotNull(similarDeclarations);
- }
- this.updateSimilarDeclarations= updateSimilarDeclarations;
- this.similarDeclarations= similarDeclarations;
- }
-
- /**
- * Returns whether similar declaration updating is requested or not.
- *
- * @return returns <code>true</code> if similar declaration
- * updating is requested; <code>false</code> otherwise
- */
- public boolean getUpdateSimilarDeclarations() {
- return updateSimilarDeclarations;
- }
-
- /**
- * Returns the similar declarations that get updated. Returns
- * <code>null</code> if similar declaration updating is not
- * requested.
- *
- * @return the similar elements that get updated
- */
- public IJavaScriptElement[] getSimilarDeclarations() {
- return similarDeclarations;
- }
-
- /* (non-Javadoc)
- * @see RefactoringArguments#toString()
- */
- public String toString() {
- return super.toString()
- + (updateSimilarDeclarations ? " (update derived elements)" : " (don't update derived elements)"); //$NON-NLS-1$//$NON-NLS-2$
- }
-}
diff --git a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/ChangeMethodSignatureDescriptor.java b/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/ChangeMethodSignatureDescriptor.java
deleted file mode 100644
index 2e66409d..00000000
--- a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/ChangeMethodSignatureDescriptor.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.refactoring.descriptors;
-
-import org.eclipse.wst.jsdt.core.refactoring.IJavaScriptRefactorings;
-
-/**
- * Refactoring descriptor for the change method signature refactoring.
- * <p>
- * An instance of this refactoring descriptor may be obtained by calling
- * {@link org.eclipse.ltk.core.refactoring.RefactoringContribution#createDescriptor()} on a refactoring
- * contribution requested by invoking
- * {@link org.eclipse.ltk.core.refactoring.RefactoringCore#getRefactoringContribution(String)} with the
- * appropriate refactoring id.
- * </p>
- * <p>
- * Note: this class is not intended to be instantiated by clients.
- * </p>
- *
- *
- * Provisional API: This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- */
-public final class ChangeMethodSignatureDescriptor extends JavaScriptRefactoringDescriptor {
-
- /**
- * Creates a new refactoring descriptor.
- */
- public ChangeMethodSignatureDescriptor() {
- super(IJavaScriptRefactorings.CHANGE_METHOD_SIGNATURE);
- }
-}
diff --git a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/ConvertAnonymousDescriptor.java b/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/ConvertAnonymousDescriptor.java
deleted file mode 100644
index 91e09f61..00000000
--- a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/ConvertAnonymousDescriptor.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.refactoring.descriptors;
-
-import org.eclipse.wst.jsdt.core.refactoring.IJavaScriptRefactorings;
-
-/**
- * Refactoring descriptor for the convert anonymous to nested refactoring.
- * <p>
- * An instance of this refactoring descriptor may be obtained by calling
- * {@link org.eclipse.ltk.core.refactoring.RefactoringContribution#createDescriptor()} on a refactoring
- * contribution requested by invoking
- * {@link org.eclipse.ltk.core.refactoring.RefactoringCore#getRefactoringContribution(String)} with the
- * appropriate refactoring id.
- * </p>
- * <p>
- * Note: this class is not intended to be instantiated by clients.
- * </p>
- *
- * Provisional API: This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- */
-public final class ConvertAnonymousDescriptor extends JavaScriptRefactoringDescriptor {
-
- /**
- * Creates a new refactoring descriptor.
- */
- public ConvertAnonymousDescriptor() {
- super(IJavaScriptRefactorings.CONVERT_ANONYMOUS);
- }
-}
diff --git a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/ConvertLocalVariableDescriptor.java b/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/ConvertLocalVariableDescriptor.java
deleted file mode 100644
index 4cf48a21..00000000
--- a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/ConvertLocalVariableDescriptor.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.refactoring.descriptors;
-
-import org.eclipse.wst.jsdt.core.refactoring.IJavaScriptRefactorings;
-
-/**
- * Refactoring descriptor for the convert local variable refactoring.
- * <p>
- * An instance of this refactoring descriptor may be obtained by calling
- * {@link org.eclipse.ltk.core.refactoring.RefactoringContribution#createDescriptor()} on a refactoring
- * contribution requested by invoking
- * {@link org.eclipse.ltk.core.refactoring.RefactoringCore#getRefactoringContribution(String)} with the
- * appropriate refactoring id.
- * </p>
- * <p>
- * Note: this class is not intended to be instantiated by clients.
- * </p>
- *
- * Provisional API: This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- */
-public final class ConvertLocalVariableDescriptor extends JavaScriptRefactoringDescriptor {
-
- /**
- * Creates a new refactoring descriptor.
- */
- public ConvertLocalVariableDescriptor() {
- super(IJavaScriptRefactorings.CONVERT_LOCAL_VARIABLE);
- }
-}
diff --git a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/ConvertMemberTypeDescriptor.java b/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/ConvertMemberTypeDescriptor.java
deleted file mode 100644
index e6befcb4..00000000
--- a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/ConvertMemberTypeDescriptor.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.refactoring.descriptors;
-
-import org.eclipse.wst.jsdt.core.refactoring.IJavaScriptRefactorings;
-
-/**
- * Refactoring descriptor for the convert member type refactoring.
- * <p>
- * An instance of this refactoring descriptor may be obtained by calling
- * {@link org.eclipse.ltk.core.refactoring.RefactoringContribution#createDescriptor()} on a refactoring
- * contribution requested by invoking
- * {@link org.eclipse.ltk.core.refactoring.RefactoringCore#getRefactoringContribution(String)} with the
- * appropriate refactoring id.
- * </p>
- * <p>
- * Note: this class is not intended to be instantiated by clients.
- * </p>
- *
- * Provisional API: This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- */
-public final class ConvertMemberTypeDescriptor extends JavaScriptRefactoringDescriptor {
-
- /**
- * Creates a new refactoring descriptor.
- */
- public ConvertMemberTypeDescriptor() {
- super(IJavaScriptRefactorings.CONVERT_MEMBER_TYPE);
- }
-}
diff --git a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/CopyDescriptor.java b/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/CopyDescriptor.java
deleted file mode 100644
index 2dcff584..00000000
--- a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/CopyDescriptor.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.refactoring.descriptors;
-
-import org.eclipse.wst.jsdt.core.refactoring.IJavaScriptRefactorings;
-
-/**
- * Refactoring descriptor for the copy refactoring.
- * <p>
- * An instance of this refactoring descriptor may be obtained by calling
- * {@link org.eclipse.ltk.core.refactoring.RefactoringContribution#createDescriptor()} on a refactoring
- * contribution requested by invoking
- * {@link org.eclipse.ltk.core.refactoring.RefactoringCore#getRefactoringContribution(String)} with the
- * appropriate refactoring id.
- * </p>
- * <p>
- * Note: this class is not intended to be instantiated by clients.
- * </p>
- *
- * Provisional API: This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- */
-public final class CopyDescriptor extends JavaScriptRefactoringDescriptor {
-
- /**
- * Creates a new refactoring descriptor.
- */
- public CopyDescriptor() {
- super(IJavaScriptRefactorings.COPY);
- }
-}
diff --git a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/DeleteDescriptor.java b/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/DeleteDescriptor.java
deleted file mode 100644
index b7cac550..00000000
--- a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/DeleteDescriptor.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.refactoring.descriptors;
-
-import org.eclipse.wst.jsdt.core.refactoring.IJavaScriptRefactorings;
-
-/**
- * Refactoring descriptor for the delete refactoring.
- * <p>
- * An instance of this refactoring descriptor may be obtained by calling
- * {@link org.eclipse.ltk.core.refactoring.RefactoringContribution#createDescriptor()} on a refactoring
- * contribution requested by invoking
- * {@link org.eclipse.ltk.core.refactoring.RefactoringCore#getRefactoringContribution(String)} with the
- * appropriate refactoring id.
- * </p>
- * <p>
- * Note: this class is not intended to be instantiated by clients.
- * </p>
- *
- * Provisional API: This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- */
-public final class DeleteDescriptor extends JavaScriptRefactoringDescriptor {
-
- /**
- * Creates a new refactoring descriptor.
- */
- public DeleteDescriptor() {
- super(IJavaScriptRefactorings.DELETE);
- }
-}
diff --git a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/EncapsulateFieldDescriptor.java b/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/EncapsulateFieldDescriptor.java
deleted file mode 100644
index b752bad9..00000000
--- a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/EncapsulateFieldDescriptor.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.refactoring.descriptors;
-
-import org.eclipse.wst.jsdt.core.refactoring.IJavaScriptRefactorings;
-
-/**
- * Refactoring descriptor for the encapsulate field refactoring.
- * <p>
- * An instance of this refactoring descriptor may be obtained by calling
- * {@link org.eclipse.ltk.core.refactoring.RefactoringContribution#createDescriptor()} on a refactoring
- * contribution requested by invoking
- * {@link org.eclipse.ltk.core.refactoring.RefactoringCore#getRefactoringContribution(String)} with the
- * appropriate refactoring id.
- * </p>
- * <p>
- * </p>
- *
- * Provisional API: This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- */
-public final class EncapsulateFieldDescriptor extends JavaScriptRefactoringDescriptor {
-
- /**
- * Creates a new refactoring descriptor.
- */
- public EncapsulateFieldDescriptor() {
- super(IJavaScriptRefactorings.ENCAPSULATE_FIELD);
- }
-}
diff --git a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/ExtractConstantDescriptor.java b/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/ExtractConstantDescriptor.java
deleted file mode 100644
index 4b6c3699..00000000
--- a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/ExtractConstantDescriptor.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.refactoring.descriptors;
-
-import org.eclipse.wst.jsdt.core.refactoring.IJavaScriptRefactorings;
-
-/**
- * Refactoring descriptor for the extract constant refactoring.
- * <p>
- * An instance of this refactoring descriptor may be obtained by calling
- * {@link org.eclipse.ltk.core.refactoring.RefactoringContribution#createDescriptor()} on a refactoring
- * contribution requested by invoking
- * {@link org.eclipse.ltk.core.refactoring.RefactoringCore#getRefactoringContribution(String)} with the
- * appropriate refactoring id.
- * </p>
- * <p>
- * Note: this class is not intended to be instantiated by clients.
- * </p>
- *
- * Provisional API: This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- */
-public final class ExtractConstantDescriptor extends JavaScriptRefactoringDescriptor {
-
- /**
- * Creates a new refactoring descriptor.
- */
- public ExtractConstantDescriptor() {
- super(IJavaScriptRefactorings.EXTRACT_CONSTANT);
- }
-}
diff --git a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/ExtractInterfaceDescriptor.java b/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/ExtractInterfaceDescriptor.java
deleted file mode 100644
index b43e7402..00000000
--- a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/ExtractInterfaceDescriptor.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.refactoring.descriptors;
-
-import org.eclipse.wst.jsdt.core.refactoring.IJavaScriptRefactorings;
-
-/**
- * Refactoring descriptor for the extract interface refactoring.
- * <p>
- * An instance of this refactoring descriptor may be obtained by calling
- * {@link org.eclipse.ltk.core.refactoring.RefactoringContribution#createDescriptor()} on a refactoring
- * contribution requested by invoking
- * {@link org.eclipse.ltk.core.refactoring.RefactoringCore#getRefactoringContribution(String)} with the
- * appropriate refactoring id.
- * </p>
- * <p>
- * Note: this class is not intended to be instantiated by clients.
- * </p>
- *
- * Provisional API: This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- */
-public final class ExtractInterfaceDescriptor extends JavaScriptRefactoringDescriptor {
-
- /**
- * Creates a new refactoring descriptor.
- */
- public ExtractInterfaceDescriptor() {
- super(IJavaScriptRefactorings.EXTRACT_INTERFACE);
- }
-}
diff --git a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/ExtractLocalDescriptor.java b/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/ExtractLocalDescriptor.java
deleted file mode 100644
index 385d76c1..00000000
--- a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/ExtractLocalDescriptor.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.refactoring.descriptors;
-
-import org.eclipse.wst.jsdt.core.refactoring.IJavaScriptRefactorings;
-
-/**
- * Refactoring descriptor for the extract local variable refactoring.
- * <p>
- * An instance of this refactoring descriptor may be obtained by calling
- * contribution requested by invoking
- * {@link org.eclipse.ltk.core.refactoring.RefactoringCore#getRefactoringContribution(String)} with the
- * appropriate refactoring id.
- * </p>
- * <p>
- * Note: this class is not intended to be instantiated by clients.
- * </p>
- *
- * Provisional API: This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- */
-public final class ExtractLocalDescriptor extends JavaScriptRefactoringDescriptor {
-
- /**
- * Creates a new refactoring descriptor.
- */
- public ExtractLocalDescriptor() {
- super(IJavaScriptRefactorings.EXTRACT_LOCAL_VARIABLE);
- }
-}
diff --git a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/ExtractMethodDescriptor.java b/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/ExtractMethodDescriptor.java
deleted file mode 100644
index c33f7a73..00000000
--- a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/ExtractMethodDescriptor.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.refactoring.descriptors;
-
-import org.eclipse.wst.jsdt.core.refactoring.IJavaScriptRefactorings;
-
-/**
- * Refactoring descriptor for the extract method refactoring.
- * <p>
- * An instance of this refactoring descriptor may be obtained by calling
- * {@link org.eclipse.ltk.core.refactoring.RefactoringContribution#createDescriptor()} on a refactoring
- * contribution requested by invoking
- * {@link org.eclipse.ltk.core.refactoring.RefactoringCore#getRefactoringContribution(String)} with the
- * appropriate refactoring id.
- * </p>
- * <p>
- * Note: this class is not intended to be instantiated by clients.
- * </p>
- *
- * Provisional API: This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- */
-public final class ExtractMethodDescriptor extends JavaScriptRefactoringDescriptor {
-
- /**
- * Creates a new refactoring descriptor.
- */
- public ExtractMethodDescriptor() {
- super(IJavaScriptRefactorings.EXTRACT_METHOD);
- }
-}
diff --git a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/ExtractSuperclassDescriptor.java b/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/ExtractSuperclassDescriptor.java
deleted file mode 100644
index 6ff7246b..00000000
--- a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/ExtractSuperclassDescriptor.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.refactoring.descriptors;
-
-import org.eclipse.wst.jsdt.core.refactoring.IJavaScriptRefactorings;
-
-/**
- * Refactoring descriptor for the extract superclass refactoring.
- * <p>
- * An instance of this refactoring descriptor may be obtained by calling
- * {@link org.eclipse.ltk.core.refactoring.RefactoringContribution#createDescriptor()} on a refactoring
- * contribution requested by invoking
- * {@link org.eclipse.ltk.core.refactoring.RefactoringCore#getRefactoringContribution(String)} with the
- * appropriate refactoring id.
- * </p>
- * <p>
- * Note: this class is not intended to be instantiated by clients.
- * </p>
- *
- * Provisional API: This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- */
-public final class ExtractSuperclassDescriptor extends JavaScriptRefactoringDescriptor {
-
- /**
- * Creates a new refactoring descriptor.
- */
- public ExtractSuperclassDescriptor() {
- super(IJavaScriptRefactorings.EXTRACT_SUPERCLASS);
- }
-}
diff --git a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/GeneralizeTypeDescriptor.java b/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/GeneralizeTypeDescriptor.java
deleted file mode 100644
index eaabc62e..00000000
--- a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/GeneralizeTypeDescriptor.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.refactoring.descriptors;
-
-import org.eclipse.wst.jsdt.core.refactoring.IJavaScriptRefactorings;
-
-/**
- * Refactoring descriptor for the generalize declared type refactoring.
- * <p>
- * An instance of this refactoring descriptor may be obtained by calling
- * {@link org.eclipse.ltk.core.refactoring.RefactoringContribution#createDescriptor()} on a refactoring
- * contribution requested by invoking
- * {@link org.eclipse.ltk.core.refactoring.RefactoringCore#getRefactoringContribution(String)} with the
- * appropriate refactoring id.
- * </p>
- * <p>
- * Note: this class is not intended to be instantiated by clients.
- * </p>
- *
- * Provisional API: This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- */
-public final class GeneralizeTypeDescriptor extends JavaScriptRefactoringDescriptor {
-
- /**
- * Creates a new refactoring descriptor.
- */
- public GeneralizeTypeDescriptor() {
- super(IJavaScriptRefactorings.GENERALIZE_TYPE);
- }
-}
diff --git a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/InferTypeArgumentsDescriptor.java b/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/InferTypeArgumentsDescriptor.java
deleted file mode 100644
index 367cf0d0..00000000
--- a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/InferTypeArgumentsDescriptor.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.refactoring.descriptors;
-
-import org.eclipse.wst.jsdt.core.refactoring.IJavaScriptRefactorings;
-
-/**
- * Refactoring descriptor for the infer type arguments refactoring.
- * <p>
- * An instance of this refactoring descriptor may be obtained by calling
- * {@link org.eclipse.ltk.core.refactoring.RefactoringContribution#createDescriptor()} on a refactoring
- * contribution requested by invoking
- * {@link org.eclipse.ltk.core.refactoring.RefactoringCore#getRefactoringContribution(String)} with the
- * appropriate refactoring id.
- * </p>
- * <p>
- * Note: this class is not intended to be instantiated by clients.
- * </p>
- *
- * Provisional API: This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- */
-public final class InferTypeArgumentsDescriptor extends JavaScriptRefactoringDescriptor {
-
- /**
- * Creates a new refactoring descriptor.
- */
- public InferTypeArgumentsDescriptor() {
- super(IJavaScriptRefactorings.INFER_TYPE_ARGUMENTS);
- }
-}
diff --git a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/InlineConstantDescriptor.java b/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/InlineConstantDescriptor.java
deleted file mode 100644
index b24ce20e..00000000
--- a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/InlineConstantDescriptor.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.refactoring.descriptors;
-
-import org.eclipse.wst.jsdt.core.refactoring.IJavaScriptRefactorings;
-
-/**
- * Refactoring descriptor for the inline constant refactoring.
- * <p>
- * An instance of this refactoring descriptor may be obtained by calling
- * {@link org.eclipse.ltk.core.refactoring.RefactoringContribution#createDescriptor()} on a refactoring
- * contribution requested by invoking
- * {@link org.eclipse.ltk.core.refactoring.RefactoringCore#getRefactoringContribution(String)} with the
- * appropriate refactoring id.
- * </p>
- * <p>
- * Note: this class is not intended to be instantiated by clients.
- * </p>
- *
- * Provisional API: This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- */
-public final class InlineConstantDescriptor extends JavaScriptRefactoringDescriptor {
-
- /**
- * Creates a new refactoring descriptor.
- */
- public InlineConstantDescriptor() {
- super(IJavaScriptRefactorings.INLINE_CONSTANT);
- }
-}
diff --git a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/InlineLocalVariableDescriptor.java b/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/InlineLocalVariableDescriptor.java
deleted file mode 100644
index f6e4eb79..00000000
--- a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/InlineLocalVariableDescriptor.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.refactoring.descriptors;
-
-import org.eclipse.wst.jsdt.core.refactoring.IJavaScriptRefactorings;
-
-/**
- * Refactoring descriptor for the inline local variable refactoring.
- * <p>
- * An instance of this refactoring descriptor may be obtained by calling
- * {@link org.eclipse.ltk.core.refactoring.RefactoringContribution#createDescriptor()} on a refactoring
- * contribution requested by invoking
- * {@link org.eclipse.ltk.core.refactoring.RefactoringCore#getRefactoringContribution(String)} with the
- * appropriate refactoring id.
- * </p>
- * <p>
- * Note: this class is not intended to be instantiated by clients.
- * </p>
- *
- * Provisional API: This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- */
-public final class InlineLocalVariableDescriptor extends JavaScriptRefactoringDescriptor {
-
- /**
- * Creates a new refactoring descriptor.
- */
- public InlineLocalVariableDescriptor() {
- super(IJavaScriptRefactorings.INLINE_LOCAL_VARIABLE);
- }
-}
diff --git a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/InlineMethodDescriptor.java b/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/InlineMethodDescriptor.java
deleted file mode 100644
index 34ce398d..00000000
--- a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/InlineMethodDescriptor.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.refactoring.descriptors;
-
-import org.eclipse.wst.jsdt.core.refactoring.IJavaScriptRefactorings;
-
-/**
- * Refactoring descriptor for the inline method refactoring.
- * <p>
- * An instance of this refactoring descriptor may be obtained by calling
- * {@link org.eclipse.ltk.core.refactoring.RefactoringContribution#createDescriptor()} on a refactoring
- * contribution requested by invoking
- * {@link org.eclipse.ltk.core.refactoring.RefactoringCore#getRefactoringContribution(String)} with the
- * appropriate refactoring id.
- * </p>
- * <p>
- * Note: this class is not intended to be instantiated by clients.
- * </p>
- *
- * Provisional API: This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- */
-public final class InlineMethodDescriptor extends JavaScriptRefactoringDescriptor {
-
- /**
- * Creates a new refactoring descriptor.
- */
- public InlineMethodDescriptor() {
- super(IJavaScriptRefactorings.INLINE_METHOD);
- }
-}
diff --git a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/IntroduceFactoryDescriptor.java b/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/IntroduceFactoryDescriptor.java
deleted file mode 100644
index 86d91bdb..00000000
--- a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/IntroduceFactoryDescriptor.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.refactoring.descriptors;
-
-import org.eclipse.wst.jsdt.core.refactoring.IJavaScriptRefactorings;
-
-/**
- * Refactoring descriptor for the introduce factory refactoring.
- * <p>
- * An instance of this refactoring descriptor may be obtained by calling
- * {@link org.eclipse.ltk.core.refactoring.RefactoringContribution#createDescriptor()} on a refactoring
- * contribution requested by invoking
- * {@link org.eclipse.ltk.core.refactoring.RefactoringCore#getRefactoringContribution(String)} with the
- * appropriate refactoring id.
- * </p>
- * <p>
- * Note: this class is not intended to be instantiated by clients.
- * </p>
- *
- * Provisional API: This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- */
-public final class IntroduceFactoryDescriptor extends JavaScriptRefactoringDescriptor {
-
- /**
- * Creates a new refactoring descriptor.
- */
- public IntroduceFactoryDescriptor() {
- super(IJavaScriptRefactorings.INTRODUCE_FACTORY);
- }
-}
diff --git a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/IntroduceIndirectionDescriptor.java b/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/IntroduceIndirectionDescriptor.java
deleted file mode 100644
index a67f4023..00000000
--- a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/IntroduceIndirectionDescriptor.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.refactoring.descriptors;
-
-import org.eclipse.wst.jsdt.core.refactoring.IJavaScriptRefactorings;
-
-/**
- * Refactoring descriptor for the introduce indirection refactoring.
- * <p>
- * An instance of this refactoring descriptor may be obtained by calling
- * {@link org.eclipse.ltk.core.refactoring.RefactoringContribution#createDescriptor()} on a refactoring
- * contribution requested by invoking
- * {@link org.eclipse.ltk.core.refactoring.RefactoringCore#getRefactoringContribution(String)} with the
- * appropriate refactoring id.
- * </p>
- * <p>
- * Note: this class is not intended to be instantiated by clients.
- * </p>
- *
- * Provisional API: This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- */
-public final class IntroduceIndirectionDescriptor extends JavaScriptRefactoringDescriptor {
-
- /**
- * Creates a new refactoring descriptor.
- */
- public IntroduceIndirectionDescriptor() {
- super(IJavaScriptRefactorings.INTRODUCE_INDIRECTION);
- }
-}
diff --git a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/IntroduceParameterDescriptor.java b/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/IntroduceParameterDescriptor.java
deleted file mode 100644
index 71153642..00000000
--- a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/IntroduceParameterDescriptor.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.refactoring.descriptors;
-
-import org.eclipse.wst.jsdt.core.refactoring.IJavaScriptRefactorings;
-
-/**
- * Refactoring descriptor for the introduce parameter refactoring.
- * <p>
- * An instance of this refactoring descriptor may be obtained by calling
- * {@link org.eclipse.ltk.core.refactoring.org.eclipse.ltk.core.refactoring.RefactoringContribution#createDescriptor()} on a refactoring
- * contribution requested by invoking
- * {@link org.eclipse.ltk.core.refactoring.RefactoringCore#getRefactoringContribution(String)} with the
- * appropriate refactoring id.
- * </p>
- * <p>
- * Note: this class is not intended to be instantiated by clients.
- * </p>
- *
- * Provisional API: This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- */
-public final class IntroduceParameterDescriptor extends JavaScriptRefactoringDescriptor {
-
- /**
- * Creates a new refactoring descriptor.
- */
- public IntroduceParameterDescriptor() {
- super(IJavaScriptRefactorings.INTRODUCE_PARAMETER);
- }
-}
diff --git a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/JavaScriptRefactoringContribution.java b/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/JavaScriptRefactoringContribution.java
deleted file mode 100644
index 942e72b6..00000000
--- a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/JavaScriptRefactoringContribution.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.refactoring.descriptors;
-
-import java.util.Map;
-
-import org.eclipse.core.runtime.Assert;
-
-import org.eclipse.ltk.core.refactoring.RefactoringContribution;
-import org.eclipse.ltk.core.refactoring.RefactoringDescriptor;
-
-/**
- * Partial implementation of a Java refactoring contribution.
- * <p>
- * Note: this class is not intended to be extended outside the refactoring
- * framework.
- * </p>
- *
- * Provisional API: This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- */
-public abstract class JavaScriptRefactoringContribution extends RefactoringContribution {
-
- /**
- * {@inheritDoc}
- */
- public final Map retrieveArgumentMap(final RefactoringDescriptor descriptor) {
- Assert.isNotNull(descriptor);
- if (descriptor instanceof JavaScriptRefactoringDescriptor)
- return ((JavaScriptRefactoringDescriptor) descriptor).getArguments();
- return super.retrieveArgumentMap(descriptor);
- }
-}
diff --git a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/JavaScriptRefactoringDescriptor.java b/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/JavaScriptRefactoringDescriptor.java
deleted file mode 100644
index b5607650..00000000
--- a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/JavaScriptRefactoringDescriptor.java
+++ /dev/null
@@ -1,464 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.refactoring.descriptors;
-
-import java.text.MessageFormat;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-
-import org.eclipse.ltk.core.refactoring.Refactoring;
-import org.eclipse.ltk.core.refactoring.RefactoringContribution;
-import org.eclipse.ltk.core.refactoring.RefactoringCore;
-import org.eclipse.ltk.core.refactoring.RefactoringDescriptor;
-import org.eclipse.ltk.core.refactoring.RefactoringStatus;
-
-import org.eclipse.wst.jsdt.core.IJavaScriptElement;
-import org.eclipse.wst.jsdt.core.IJavaScriptProject;
-import org.eclipse.wst.jsdt.core.IFunction;
-import org.eclipse.wst.jsdt.core.JavaScriptCore;
-import org.eclipse.wst.jsdt.core.WorkingCopyOwner;
-
-import org.eclipse.wst.jsdt.internal.core.manipulation.JavaManipulationPlugin;
-import org.eclipse.wst.jsdt.internal.core.refactoring.descriptors.DescriptorMessages;
-
-/**
- * Partial implementation of a java refactoring descriptor.
- * <p>
- * This class provides features common to all Java refactorings.
- * </p>
- * <p>
- * Note: this class is not intended to be extended outside the refactoring
- * framework.
- * </p>
- *
- * Provisional API: This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- */
-public abstract class JavaScriptRefactoringDescriptor extends RefactoringDescriptor {
-
- /**
- * Predefined argument called <code>element&lt;Number&gt;</code>.
- * <p>
- * This argument should be used to describe the elements being refactored.
- * The value of this argument does not necessarily have to uniquely identify
- * the elements. However, it must be possible to uniquely identify the
- * elements using the value of this argument in conjunction with the values
- * of the other user-defined attributes.
- * </p>
- * <p>
- * The element arguments are simply distinguished by appending a number to
- * the argument name, e.g. element1. The indices of this argument are one-based.
- * </p>
- */
- protected static final String ATTRIBUTE_ELEMENT= "element"; //$NON-NLS-1$
-
- /**
- * Predefined argument called <code>input</code>.
- * <p>
- * This argument should be used to describe the element being refactored.
- * The value of this argument does not necessarily have to uniquely identify
- * the input element. However, it must be possible to uniquely identify the
- * input element using the value of this argument in conjunction with the
- * values of the other user-defined attributes.
- * </p>
- */
- protected static final String ATTRIBUTE_INPUT= "input"; //$NON-NLS-1$
-
- /**
- * Predefined argument called <code>name</code>.
- * <p>
- * This argument should be used to name the element being refactored. The
- * value of this argument may be shown in the user interface.
- * </p>
- */
- protected static final String ATTRIBUTE_NAME= "name"; //$NON-NLS-1$
-
- /**
- * Predefined argument called <code>references</code>.
- * <p>
- * This argument should be used to describe whether references to the
- * elements being refactored should be updated as well. The value of this
- * argument is either <code>"true"</code> or <code>"false"</code>.
- * </p>
- */
- protected static final String ATTRIBUTE_REFERENCES= "references"; //$NON-NLS-1$
-
- /**
- * Predefined argument called <code>selection</code>.
- * <p>
- * This argument should be used to describe user input selections within a
- * text file. The value of this argument has the format "offset length".
- * </p>
- */
- protected static final String ATTRIBUTE_SELECTION= "selection"; //$NON-NLS-1$
-
- /** The version attribute */
- protected static final String ATTRIBUTE_VERSION= "version"; //$NON-NLS-1$
-
- /**
- * Constant describing the jar migration flag (value: <code>65536</code>).
- * <p>
- * Clients should set this flag to indicate that the refactoring can be
- * stored to a JAR file in order to be accessible to the Migrate JAR File
- * refactoring, regardless whether there is a source attachment to the JAR
- * file or not. If this flag is set, <code>JAR_REFACTORING</code> should
- * be set as well.
- * </p>
- *
- * @see #JAR_REFACTORING
- */
- public static final int JAR_MIGRATION= 1 << 16;
-
- /**
- * Constant describing the jar refactoring flag (value: <code>524288</code>).
- * <p>
- * Clients should set this flag to indicate that the refactoring in
- * principle can be performed on binary elements originating from a JAR
- * file. Refactorings which are able to run on binary elements, but require
- * a correctly configured source attachment to work must set the
- * <code>JAR_SOURCE_ATTACHMENT</code> flag as well.
- * </p>
- *
- * @see #JAR_SOURCE_ATTACHMENT
- */
- public static final int JAR_REFACTORING= 1 << 19;
-
- /**
- * Constant describing the jar source attachment flag (value:
- * <code>262144</code>).
- * <p>
- * Clients should set this flag to indicate that the refactoring can be
- * performed on binary elements originating from a JAR file if and only if
- * it has a correctly configured source attachment.
- * </p>
- *
- * @see #JAR_REFACTORING
- */
- public static final int JAR_SOURCE_ATTACHMENT= 1 << 18;
-
- /** The version value <code>1.0</code> */
- protected static final String VALUE_VERSION_1_0= "1.0"; //$NON-NLS-1$
-
- /**
- * Converts the specified element to an input handle.
- *
- * @param project
- * the project, or <code>null</code> for the workspace
- * @param element
- * the element
- * @return a corresponding input handle
- */
- protected static String elementToHandle(final String project, final IJavaScriptElement element) {
- final String handle= element.getHandleIdentifier();
- if (project != null && !(element instanceof IJavaScriptProject)) {
- final String id= element.getJavaScriptProject().getHandleIdentifier();
- return handle.substring(id.length());
- }
- return handle;
- }
-
- /**
- * Converts an input handle back to the corresponding java element.
- *
- * @param project
- * the project, or <code>null</code> for the workspace
- * @param handle
- * the input handle
- * @return the corresponding java element, or <code>null</code> if no such
- * element exists
- */
- protected static IJavaScriptElement handleToElement(final String project, final String handle) {
- return handleToElement(project, handle, true);
- }
-
- /**
- * Converts an input handle back to the corresponding java element.
- *
- * @param project
- * the project, or <code>null</code> for the workspace
- * @param handle
- * the input handle
- * @param check
- * <code>true</code> to check for existence of the element,
- * <code>false</code> otherwise
- * @return the corresponding java element, or <code>null</code> if no such
- * element exists
- */
- protected static IJavaScriptElement handleToElement(final String project, final String handle, final boolean check) {
- return handleToElement(null, project, handle, check);
- }
-
- /**
- * Converts an input handle back to the corresponding java element.
- *
- * @param owner
- * the working copy owner
- * @param project
- * the project, or <code>null</code> for the workspace
- * @param handle
- * the input handle
- * @param check
- * <code>true</code> to check for existence of the element,
- * <code>false</code> otherwise
- * @return the corresponding java element, or <code>null</code> if no such
- * element exists
- */
- protected static IJavaScriptElement handleToElement(final WorkingCopyOwner owner, final String project, final String handle, final boolean check) {
- IJavaScriptElement element= null;
- if (owner != null)
- element= JavaScriptCore.create(handle, owner);
- else
- element= JavaScriptCore.create(handle);
- if (element == null && project != null) {
- final IJavaScriptProject javaProject= JavaScriptCore.create(ResourcesPlugin.getWorkspace().getRoot()).getJavaScriptProject(project);
- final String identifier= javaProject.getHandleIdentifier();
- if (owner != null)
- element= JavaScriptCore.create(identifier + handle, owner);
- else
- element= JavaScriptCore.create(identifier + handle);
- }
- if (check && element instanceof IFunction) {
- final IFunction method= (IFunction) element;
- final IFunction[] methods= (method.getDeclaringType()!=null) ? method.getDeclaringType().findMethods(method)
- : new IFunction[]{ method.getJavaScriptUnit().getFunction(method.getElementName(), method.getParameterTypes())};
- if (methods != null && methods.length > 0)
- element= methods[0];
- }
- if (element != null && (!check || element.exists()))
- return element;
- return null;
- }
-
- /**
- * Converts an input handle with the given prefix back to the corresponding
- * resource.
- *
- * @param project
- * the project, or <code>null</code> for the workspace
- * @param handle
- * the input handle
- *
- * @return the corresponding resource, or <code>null</code> if no such
- * resource exists
- */
- protected static IResource handleToResource(final String project, final String handle) {
- final IWorkspaceRoot root= ResourcesPlugin.getWorkspace().getRoot();
- if ("".equals(handle)) //$NON-NLS-1$
- return null;
- final IPath path= Path.fromPortableString(handle);
- if (path == null)
- return null;
- if (project != null && !"".equals(project)) //$NON-NLS-1$
- return root.getProject(project).findMember(path);
- return root.findMember(path);
- }
-
- /**
- * Converts the specified resource to an input handle.
- *
- * @param project
- * the project, or <code>null</code> for the workspace
- * @param resource
- * the resource
- *
- * @return the input handle
- */
- protected static String resourceToHandle(final String project, final IResource resource) {
- if (project != null && !"".equals(project)) //$NON-NLS-1$
- return resource.getProjectRelativePath().toPortableString();
- return resource.getFullPath().toPortableString();
- }
-
- /** The argument map */
- protected final Map fArguments;
-
- /**
- * Creates a new java refactoring descriptor.
- *
- * @param id
- * the unique id of the refactoring
- */
- protected JavaScriptRefactoringDescriptor(final String id) {
- this(id, new HashMap());
- }
-
- /**
- * Creates a new java refactoring descriptor.
- *
- * @param id
- * the unique id of the refactoring
- * @param arguments
- * the argument map to use
- */
- protected JavaScriptRefactoringDescriptor(final String id, final Map arguments) {
- super(id, null, DescriptorMessages.JavaRefactoringDescriptor_not_available, null, RefactoringDescriptor.STRUCTURAL_CHANGE | RefactoringDescriptor.MULTI_CHANGE);
- fArguments= arguments;
- fArguments.put(ATTRIBUTE_VERSION, VALUE_VERSION_1_0);
- }
-
- /**
- * {@inheritDoc}
- */
- public Refactoring createRefactoring(final RefactoringStatus status) throws CoreException {
- populateArgumentMap();
- Refactoring refactoring= null;
- final String id= getID();
- final RefactoringContribution contribution= RefactoringCore.getRefactoringContribution(id);
- if (contribution != null) {
- final RefactoringDescriptor descriptor= contribution.createDescriptor(id, getProject(), getDescription(), getComment(), fArguments, getFlags());
- if (descriptor != null) {
- refactoring= descriptor.createRefactoring(status);
- } else
- JavaManipulationPlugin.log(new Status(IStatus.ERROR, JavaManipulationPlugin.getPluginId(), 0, MessageFormat.format(DescriptorMessages.JavaRefactoringDescriptor_no_resulting_descriptor, new Object[] { id}), null));
- }
- return refactoring;
- }
-
- /**
- * Returns the argument map of this refactoring descriptor.
- * <p>
- * The returned map is a copy of the argument map. Modifying the result does
- * not change the refactoring descriptor itself.
- * </p>
- * <p>
- * Note: This API must not be extended or reimplemented and should not be
- * called from outside the refactoring framework.
- * </p>
- *
- * @return the argument map
- */
- protected Map getArguments() {
- populateArgumentMap();
- return new HashMap(fArguments);
- }
-
- /**
- * Populates the refactoring descriptor argument map based on the specified
- * arguments.
- */
- protected void populateArgumentMap() {
- Assert.isTrue(!validateDescriptor().hasFatalError(), "Validation returns a fatal error status."); //$NON-NLS-1$
- }
-
- /**
- * Sets the details comment of this refactoring.
- * <p>
- * This information is used in the user interface to show additional details
- * about the performed refactoring. The default is to use no details
- * comment.
- * </p>
- *
- * @param comment
- * the details comment to set, or <code>null</code> to set no
- * details comment
- *
- * @see #getComment()
- */
- public void setComment(final String comment) {
- super.setComment(comment);
- }
-
- /**
- * Sets the description of this refactoring.
- * <p>
- * This information is used to label a refactoring in the user interface.
- * The default is an unspecified, but legal description.
- * </p>
- *
- * @param description
- * the non-empty description of the refactoring to set
- *
- * @see #getDescription()
- */
- public void setDescription(final String description) {
- super.setDescription(description);
- }
-
- /**
- * Sets the flags of this refactoring.
- * <p>
- * The default is
- * <code>RefactoringDescriptor.STRUCTURAL_CHANGE | RefactoringDescriptor.MULTI_CHANGE</code>,
- * unless overridden by a concrete subclass. Clients may use refactoring
- * flags to indicate special capabilities of Java refactorings.
- * </p>
- *
- * @param flags
- * the flags to set, or <code>RefactoringDescriptor.NONE</code>
- * to clear the flags
- *
- * @see #getFlags()
- *
- * @see RefactoringDescriptor#NONE
- * @see RefactoringDescriptor#STRUCTURAL_CHANGE
- * @see RefactoringDescriptor#BREAKING_CHANGE
- * @see RefactoringDescriptor#MULTI_CHANGE
- *
- * @see #JAR_MIGRATION
- * @see #JAR_REFACTORING
- * @see #JAR_SOURCE_ATTACHMENT
- */
- public void setFlags(final int flags) {
- super.setFlags(flags);
- }
-
- /**
- * Sets the project name of this refactoring.
- * <p>
- * The default is to associate the refactoring with the workspace.
- * Subclasses should call this method with the project name associated with
- * the refactoring's input elements, if available.
- * </p>
- *
- * @param project
- * the non-empty project name to set, or <code>null</code> for
- * the workspace
- *
- * @see #getProject()
- */
- public void setProject(final String project) {
- super.setProject(project);
- }
-
- /**
- * Validates the refactoring descriptor with respect to the constraints
- * imposed by the represented refactoring.
- * <p>
- * Clients must call this method to verify that all arguments have been
- * correctly set and that they satisfy the constraints imposed by specific
- * refactorings. Returning a refactoring status of severity
- * {@link RefactoringStatus#FATAL} indicates that the refactoring descriptor
- * cannot be used to create a refactoring instance.
- * </p>
- *
- * @return a refactoring status describing the outcome of the validation
- */
- public RefactoringStatus validateDescriptor() {
- RefactoringStatus status= new RefactoringStatus();
- String description= getDescription();
- if (description == null || "".equals(description)) //$NON-NLS-1$
- status.merge(RefactoringStatus.createFatalErrorStatus(DescriptorMessages.JavaRefactoringDescriptor_no_description));
- return status;
- }
-}
diff --git a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/MoveDescriptor.java b/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/MoveDescriptor.java
deleted file mode 100644
index af4c528c..00000000
--- a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/MoveDescriptor.java
+++ /dev/null
@@ -1,348 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.refactoring.descriptors;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.ltk.core.refactoring.RefactoringStatus;
-import org.eclipse.wst.jsdt.core.IJavaScriptUnit;
-import org.eclipse.wst.jsdt.core.IJavaScriptElement;
-import org.eclipse.wst.jsdt.core.IMember;
-import org.eclipse.wst.jsdt.core.IPackageFragment;
-import org.eclipse.wst.jsdt.core.IPackageFragmentRoot;
-import org.eclipse.wst.jsdt.core.refactoring.IJavaScriptRefactorings;
-import org.eclipse.wst.jsdt.internal.core.refactoring.descriptors.DescriptorMessages;
-
-/**
- * Refactoring descriptor for the move refactoring.
- * <p>
- * An instance of this refactoring descriptor may be obtained by calling
- * {@link org.eclipse.ltk.core.refactoring.RefactoringContribution#createDescriptor()} on a refactoring
- * contribution requested by invoking
- * {@link org.eclipse.ltk.core.refactoring.RefactoringCore#getRefactoringContribution(String)} with the
- * appropriate refactoring id.
- * </p>
- * <p>
- * Note: this class is not intended to be instantiated by clients.
- * </p>
- *
- * Provisional API: This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- */
-public final class MoveDescriptor extends JavaScriptRefactoringDescriptor {
-
- /** The destination attribute */
- private static final String ATTRIBUTE_DESTINATION= "destination"; //$NON-NLS-1$
-
- /** The files attribute */
- private static final String ATTRIBUTE_FILES= "files"; //$NON-NLS-1$
-
- /** The folders attribute */
- private static final String ATTRIBUTE_FOLDERS= "folders"; //$NON-NLS-1$
-
- /** The fragments attribute */
- private static final String ATTRIBUTE_FRAGMENTS= "fragments"; //$NON-NLS-1$
-
- /** The members attribute */
- private static final String ATTRIBUTE_MEMBERS= "members"; //$NON-NLS-1$
-
- /** The patterns attribute */
- private static final String ATTRIBUTE_PATTERNS= "patterns"; //$NON-NLS-1$
-
- /** The policy attribute */
- private static final String ATTRIBUTE_POLICY= "policy"; //$NON-NLS-1$
-
- /** The qualified attribute */
- private static final String ATTRIBUTE_QUALIFIED= "qualified"; //$NON-NLS-1$
-
- /** The roots attribute */
- private static final String ATTRIBUTE_ROOTS= "roots"; //$NON-NLS-1$
-
- /** The target attribute */
- private static final String ATTRIBUTE_TARGET= "target"; //$NON-NLS-1$
-
- /** The units attribute */
- private static final String ATTRIBUTE_UNITS= "units"; //$NON-NLS-1$
-
- /** The move members policy */
- private static final String POLICY_MOVE_MEMBERS= "org.eclipse.wst.jsdt.ui.moveMembers"; //$NON-NLS-1$
-
- /** The move packages policy */
- private static final String POLICY_MOVE_PACKAGES= "org.eclipse.wst.jsdt.ui.movePackages"; //$NON-NLS-1$
-
- /** The move resources policy */
- private static final String POLICY_MOVE_RESOURCES= "org.eclipse.wst.jsdt.ui.moveResources"; //$NON-NLS-1$
-
- /** The move package fragment roots policy */
- private static final String POLICY_MOVE_ROOTS= "org.eclipse.wst.jsdt.ui.moveRoots"; //$NON-NLS-1$
-
- /** The destination */
- private Object fDestination;
-
- /** The files */
- private IFile[] fFiles;
-
- /** The folders */
- private IFolder[] fFolders;
-
- /** The package fragments */
- private IPackageFragment[] fFragments;
-
- /** The members */
- private IMember[] fMembers;
-
- /** The move policy */
- private String fMovePolicy= null;
-
- /** The patterns attribute */
- private String fPatterns= null;
-
- /** The qualified attribute */
- private boolean fQualified= false;
-
- /** The references attribute */
- private boolean fReferences= false;
-
- /** The package fragment roots */
- private IPackageFragmentRoot[] fRoots;
-
- /** The compilation units */
- private IJavaScriptUnit[] fUnits;
-
- /**
- * Creates a new refactoring descriptor.
- */
- public MoveDescriptor() {
- super(IJavaScriptRefactorings.MOVE);
- }
-
- /**
- * {@inheritDoc}
- */
- protected void populateArgumentMap() {
- super.populateArgumentMap();
- fArguments.put(ATTRIBUTE_POLICY, fMovePolicy);
- final String project= getProject();
- if (fDestination instanceof IJavaScriptElement)
- fArguments.put(ATTRIBUTE_DESTINATION, JavaScriptRefactoringDescriptor.elementToHandle(project, (IJavaScriptElement) fDestination));
- else if (fDestination instanceof IResource)
- fArguments.put(ATTRIBUTE_TARGET, JavaScriptRefactoringDescriptor.resourceToHandle(null, (IResource) fDestination));
- if (POLICY_MOVE_RESOURCES.equals(fMovePolicy)) {
- fArguments.put(JavaScriptRefactoringDescriptor.ATTRIBUTE_REFERENCES, Boolean.toString(fReferences));
- fArguments.put(ATTRIBUTE_QUALIFIED, Boolean.toString(fQualified));
- if (fPatterns != null && !"".equals(fPatterns)) //$NON-NLS-1$
- fArguments.put(ATTRIBUTE_PATTERNS, fPatterns);
- fArguments.put(ATTRIBUTE_FILES, new Integer(fFiles.length).toString());
- for (int offset= 0; offset < fFiles.length; offset++)
- fArguments.put(JavaScriptRefactoringDescriptor.ATTRIBUTE_ELEMENT + (offset + 1), JavaScriptRefactoringDescriptor.resourceToHandle(project, fFiles[offset]));
- fArguments.put(ATTRIBUTE_FOLDERS, new Integer(fFolders.length).toString());
- for (int offset= 0; offset < fFolders.length; offset++)
- fArguments.put(JavaScriptRefactoringDescriptor.ATTRIBUTE_ELEMENT + (offset + fFiles.length + 1), JavaScriptRefactoringDescriptor.resourceToHandle(project, fFolders[offset]));
- fArguments.put(ATTRIBUTE_UNITS, new Integer(fUnits.length).toString());
- for (int offset= 0; offset < fUnits.length; offset++)
- fArguments.put(JavaScriptRefactoringDescriptor.ATTRIBUTE_ELEMENT + (offset + fFolders.length + fFiles.length + 1), JavaScriptRefactoringDescriptor.elementToHandle(project, fUnits[offset]));
- } else if (POLICY_MOVE_ROOTS.equals(fMovePolicy)) {
- fArguments.put(ATTRIBUTE_ROOTS, new Integer(fRoots.length).toString());
- for (int offset= 0; offset < fRoots.length; offset++)
- fArguments.put(JavaScriptRefactoringDescriptor.ATTRIBUTE_ELEMENT + (offset + 1), JavaScriptRefactoringDescriptor.elementToHandle(project, fRoots[offset]));
- } else if (POLICY_MOVE_PACKAGES.equals(fMovePolicy)) {
- fArguments.put(ATTRIBUTE_FRAGMENTS, new Integer(fFragments.length).toString());
- for (int offset= 0; offset < fFragments.length; offset++)
- fArguments.put(JavaScriptRefactoringDescriptor.ATTRIBUTE_ELEMENT + (offset + 1), JavaScriptRefactoringDescriptor.elementToHandle(project, fFragments[offset]));
- } else if (POLICY_MOVE_MEMBERS.equals(fMovePolicy)) {
- fArguments.put(ATTRIBUTE_MEMBERS, new Integer(fMembers.length).toString());
- for (int offset= 0; offset < fMembers.length; offset++)
- fArguments.put(JavaScriptRefactoringDescriptor.ATTRIBUTE_ELEMENT + (offset + 1), JavaScriptRefactoringDescriptor.elementToHandle(project, fMembers[offset]));
- }
- }
-
- /**
- * Sets the destination of the move.
- * <p>
- * Note: Clients may call only one of the <code>setDestination</code>
- * methods.
- * </p>
- *
- * @param element
- * the java element
- */
- public void setDestination(IJavaScriptElement element) {
- Assert.isNotNull(element);
- fDestination= element;
- }
-
- /**
- * Sets the destination of the move.
- * <p>
- * Note: Clients may call only one of the <code>setDestination</code>
- * methods.
- * </p>
- *
- * @param resource
- * the resource
- */
- public void setDestination(IResource resource) {
- Assert.isNotNull(resource);
- fDestination= resource;
- }
-
- /**
- * Sets the file name patterns to use during qualified name updating.
- * <p>
- * The syntax of the file name patterns is a sequence of individual name
- * patterns, separated by comma. Additionally, wildcard characters '*' (any
- * string) and '?' (any character) may be used.
- * </p>
- * <p>
- * Note: If file name patterns are set, qualified name updating must be
- * enabled by calling {@link #setUpdateQualifiedNames(boolean)}.
- * </p>
- * <p>
- * Note: Qualified name updating is currently applicable to files, folders
- * and compilation units. The default is to not update qualified names.
- * </p>
- *
- * @param patterns
- * the non-empty file name patterns string
- */
- public void setFileNamePatterns(final String patterns) {
- Assert.isNotNull(patterns);
- Assert.isLegal(!"".equals(patterns), "Pattern must not be empty"); //$NON-NLS-1$ //$NON-NLS-2$
- fPatterns= patterns;
- }
-
- /**
- * Sets the members to move.
- * <p>
- * Note: Clients must only call one of the <code>setMoveXXX</code>
- * methods.
- * </p>
- *
- * @param members
- * the members to move
- */
- public void setMoveMembers(final IMember[] members) {
- Assert.isNotNull(members);
- Assert.isTrue(fMovePolicy == null, "Clients must only call one of the 'setMoveXXX' methods."); //$NON-NLS-1$
- fMembers= members;
- fMovePolicy= POLICY_MOVE_MEMBERS;
- }
-
- /**
- * Sets the package fragment roots to move.
- * <p>
- * Note: Clients must only call one of the <code>setMoveXXX</code>
- * methods.
- * </p>
- *
- * @param roots
- * the package fragment roots to move
- */
- public void setMovePackageFragmentRoots(final IPackageFragmentRoot[] roots) {
- Assert.isNotNull(roots);
- Assert.isTrue(fMovePolicy == null, "Clients must only call one of the 'setMoveXXX' methods."); //$NON-NLS-1$
- fRoots= roots;
- fMovePolicy= POLICY_MOVE_ROOTS;
- }
-
- /**
- * Sets the package fragments to move.
- * <p>
- * Note: Clients must only call one of the <code>setMoveXXX</code>
- * methods.
- * </p>
- *
- * @param fragments
- * the package fragments to move
- */
- public void setMovePackages(final IPackageFragment[] fragments) {
- Assert.isNotNull(fragments);
- Assert.isTrue(fMovePolicy == null, "Clients must only call one of the 'setMoveXXX' methods."); //$NON-NLS-1$
- fFragments= fragments;
- fMovePolicy= POLICY_MOVE_PACKAGES;
- }
-
- /**
- * Sets the resources and compilation units to move.
- * <p>
- * Note: Clients must only call one of the <code>setMoveXXX</code>
- * methods.
- * </p>
- *
- * @param files
- * the files to move
- * @param folders
- * the folders to move
- * @param units
- * the compilation units to move
- */
- public void setMoveResources(final IFile[] files, final IFolder[] folders, final IJavaScriptUnit[] units) {
- Assert.isNotNull(files);
- Assert.isNotNull(folders);
- Assert.isNotNull(units);
- Assert.isTrue(fMovePolicy == null, "Clients must only call one of the 'setMoveXXX' methods."); //$NON-NLS-1$
- fFiles= files;
- fFolders= folders;
- fUnits= units;
- fMovePolicy= POLICY_MOVE_RESOURCES;
- }
-
- /**
- * Determines whether qualified names of the Java element should be renamed.
- * <p>
- * Qualified name updating adapts fully qualified names of the Java element
- * to be renamed in non-Java text files. Clients may specify file name
- * patterns by calling {@link #setFileNamePatterns(String)} to constrain the
- * set of text files to be processed.
- * </p>
- * <p>
- * Note: Qualified name updating is currently applicable to files, folders
- * and compilation units. The default is to use no file name patterns
- * (meaning that all files are processed).
- * </p>
- *
- * @param update
- * <code>true</code> to update qualified names,
- * <code>false</code> otherwise
- */
- public void setUpdateQualifiedNames(final boolean update) {
- fQualified= update;
- }
-
- /**
- * Determines whether references to the Java element should be renamed.
- *
- * @param update
- * <code>true</code> to update references, <code>false</code>
- * otherwise
- */
- public void setUpdateReferences(final boolean update) {
- fReferences= update;
- }
-
- /**
- * {@inheritDoc}
- */
- public RefactoringStatus validateDescriptor() {
- RefactoringStatus status= super.validateDescriptor();
- if (!status.hasFatalError()) {
- if (fMovePolicy == null)
- status.merge(RefactoringStatus.createFatalErrorStatus(DescriptorMessages.MoveDescriptor_no_elements_set));
- if (fDestination == null)
- status.merge(RefactoringStatus.createFatalErrorStatus(DescriptorMessages.MoveDescriptor_no_destination_set));
- }
- return status;
- }
-}
diff --git a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/MoveMethodDescriptor.java b/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/MoveMethodDescriptor.java
deleted file mode 100644
index 6c95698e..00000000
--- a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/MoveMethodDescriptor.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.refactoring.descriptors;
-
-import org.eclipse.wst.jsdt.core.refactoring.IJavaScriptRefactorings;
-
-/**
- * Refactoring descriptor for the move method refactoring.
- * <p>
- * An instance of this refactoring descriptor may be obtained by calling
- * {@link org.eclipse.ltk.core.refactoring.RefactoringContribution#createDescriptor()} on a refactoring
- * contribution requested by invoking
- * {@link org.eclipse.ltk.core.refactoring.RefactoringCore#getRefactoringContribution(String)} with the
- * appropriate refactoring id.
- * </p>
- * <p>
- * Note: this class is not intended to be instantiated by clients.
- * </p>
- *
- * Provisional API: This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- */
-public final class MoveMethodDescriptor extends JavaScriptRefactoringDescriptor {
-
- /**
- * Creates a new refactoring descriptor.
- */
- public MoveMethodDescriptor() {
- super(IJavaScriptRefactorings.MOVE_METHOD);
- }
-}
diff --git a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/MoveStaticMembersDescriptor.java b/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/MoveStaticMembersDescriptor.java
deleted file mode 100644
index c6e08e18..00000000
--- a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/MoveStaticMembersDescriptor.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.refactoring.descriptors;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.ltk.core.refactoring.RefactoringStatus;
-import org.eclipse.wst.jsdt.core.IMember;
-import org.eclipse.wst.jsdt.core.IType;
-import org.eclipse.wst.jsdt.core.refactoring.IJavaScriptRefactorings;
-import org.eclipse.wst.jsdt.internal.core.refactoring.descriptors.DescriptorMessages;
-
-/**
- * Refactoring descriptor for the move static members refactoring.
- * <p>
- * An instance of this refactoring descriptor may be obtained by calling
- * {@link org.eclipse.ltk.core.refactoring.RefactoringContribution#createDescriptor()} on a refactoring
- * contribution requested by invoking
- * {@link org.eclipse.ltk.core.refactoring.RefactoringCore#getRefactoringContribution(String)} with the
- * appropriate refactoring id.
- * </p>
- * <p>
- * Note: this class is not intended to be instantiated by clients.
- * </p>
- *
- * Provisional API: This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- */
-public final class MoveStaticMembersDescriptor extends JavaScriptRefactoringDescriptor {
-
- /** The delegate attribute */
- private static final String ATTRIBUTE_DELEGATE= "delegate"; //$NON-NLS-1$
-
- /** The deprecate attribute */
- private static final String ATTRIBUTE_DEPRECATE= "deprecate"; //$NON-NLS-1$
-
- /** The delegate attribute */
- private boolean fDelegate= false;
-
- /** The deprecate attribute */
- private boolean fDeprecate= false;
-
- /** The members attribute */
- private IMember[] fMembers;
-
- /** The type attribute */
- private IType fType= null;
-
- /**
- * Creates a new refactoring descriptor.
- */
- public MoveStaticMembersDescriptor() {
- super(IJavaScriptRefactorings.MOVE_STATIC_MEMBERS);
- }
-
- /**
- * {@inheritDoc}
- */
- protected void populateArgumentMap() {
- super.populateArgumentMap();
- fArguments.put(JavaScriptRefactoringDescriptor.ATTRIBUTE_INPUT, elementToHandle(getProject(), fType));
- fArguments.put(ATTRIBUTE_DELEGATE, Boolean.valueOf(fDelegate).toString());
- fArguments.put(ATTRIBUTE_DEPRECATE, Boolean.valueOf(fDeprecate).toString());
- for (int index= 0; index < fMembers.length; index++)
- fArguments.put(JavaScriptRefactoringDescriptor.ATTRIBUTE_ELEMENT + (index + 1), elementToHandle(getProject(), fMembers[index]));
- }
-
- /**
- * Determines whether the delegate for a member should be declared as
- * deprecated.
- *
- * @param deprecate
- * <code>true</code> to deprecate the delegate,
- * <code>false</code> otherwise
- */
- public void setDeprecateDelegate(final boolean deprecate) {
- fDeprecate= deprecate;
- }
-
- /**
- * Sets the destination type of the move operation.
- *
- * @param type
- * the destination type
- */
- public void setDestinationType(final IType type) {
- Assert.isNotNull(type);
- fType= type;
- }
-
- /**
- * Determines whether the the original members should be kept as delegates
- * to the moved ones.
- *
- * @param delegate
- * <code>true</code> to keep the originals, <code>false</code>
- * otherwise
- */
- public void setKeepOriginal(final boolean delegate) {
- fDelegate= delegate;
- }
-
- /**
- * Sets the static members to move.
- *
- * @param members
- * the members to move
- */
- public void setMembers(final IMember[] members) {
- Assert.isNotNull(members);
- fMembers= members;
- }
-
- /**
- * {@inheritDoc}
- */
- public RefactoringStatus validateDescriptor() {
- final RefactoringStatus status= super.validateDescriptor();
- if (fType == null)
- status.merge(RefactoringStatus.createFatalErrorStatus(DescriptorMessages.MoveStaticMembersDescriptor_no_type));
- if (fMembers == null)
- status.merge(RefactoringStatus.createFatalErrorStatus(DescriptorMessages.MoveStaticMembersDescriptor_no_members));
- else {
- for (int index= 0; index < fMembers.length; index++) {
- if (fMembers[index] == null) {
- status.merge(RefactoringStatus.createFatalErrorStatus(DescriptorMessages.MoveStaticMembersDescriptor_invalid_members));
- break;
- }
- }
- }
- return status;
- }
-}
diff --git a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/PullUpDescriptor.java b/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/PullUpDescriptor.java
deleted file mode 100644
index 4f7d2d03..00000000
--- a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/PullUpDescriptor.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.refactoring.descriptors;
-
-import org.eclipse.wst.jsdt.core.refactoring.IJavaScriptRefactorings;
-
-/**
- * Refactoring descriptor for the pull up refactoring.
- * <p>
- * An instance of this refactoring descriptor may be obtained by calling
- * {@link org.eclipse.ltk.core.refactoring.RefactoringContribution#createDescriptor()} on a refactoring
- * contribution requested by invoking
- * {@link org.eclipse.ltk.core.refactoring.RefactoringCore#getRefactoringContribution(String)} with the
- * appropriate refactoring id.
- * </p>
- * <p>
- * Note: this class is not intended to be instantiated by clients.
- * </p>
- *
- * Provisional API: This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- */
-public final class PullUpDescriptor extends JavaScriptRefactoringDescriptor {
-
- /**
- * Creates a new refactoring descriptor.
- */
- public PullUpDescriptor() {
- super(IJavaScriptRefactorings.PULL_UP);
- }
-}
diff --git a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/PushDownDescriptor.java b/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/PushDownDescriptor.java
deleted file mode 100644
index 831fe3c1..00000000
--- a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/PushDownDescriptor.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.refactoring.descriptors;
-
-import org.eclipse.wst.jsdt.core.refactoring.IJavaScriptRefactorings;
-
-/**
- * Refactoring descriptor for the push down refactoring.
- * <p>
- * An instance of this refactoring descriptor may be obtained by calling
- * {@link org.eclipse.ltk.core.refactoring.RefactoringContribution#createDescriptor()} on a refactoring
- * contribution requested by invoking
- * {@link org.eclipse.ltk.core.refactoring.RefactoringCore#getRefactoringContribution(String)} with the
- * appropriate refactoring id.
- * </p>
- * <p>
- * Note: this class is not intended to be instantiated by clients.
- * </p>
- *
- * Provisional API: This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- */
-public final class PushDownDescriptor extends JavaScriptRefactoringDescriptor {
-
- /**
- * Creates a new refactoring descriptor.
- */
- public PushDownDescriptor() {
- super(IJavaScriptRefactorings.PUSH_DOWN);
- }
-}
diff --git a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/RenameJavaScriptElementDescriptor.java b/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/RenameJavaScriptElementDescriptor.java
deleted file mode 100644
index ba48de76..00000000
--- a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/RenameJavaScriptElementDescriptor.java
+++ /dev/null
@@ -1,566 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.refactoring.descriptors;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.ltk.core.refactoring.RefactoringStatus;
-import org.eclipse.wst.jsdt.core.IJavaScriptElement;
-import org.eclipse.wst.jsdt.core.refactoring.IJavaScriptRefactorings;
-import org.eclipse.wst.jsdt.internal.core.refactoring.descriptors.DescriptorMessages;
-
-/**
- * Refactoring descriptor for the rename java element refactoring.
- * <p>
- * An instance of this refactoring descriptor may be obtained by calling
- * {@link org.eclipse.ltk.core.refactoring.RefactoringContribution#createDescriptor()} on a refactoring
- * contribution requested by invoking
- * {@link org.eclipse.ltk.core.refactoring.RefactoringCore#getRefactoringContribution(String)} with the
- * appropriate refactoring id.
- * </p>
- * <p>
- * Note: this class is not intended to be instantiated by clients.
- * </p>
- *
- * Provisional API: This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- */
-public final class RenameJavaScriptElementDescriptor extends JavaScriptRefactoringDescriptor {
-
- /** The delegate attribute */
- private static final String ATTRIBUTE_DELEGATE= "delegate"; //$NON-NLS-1$
-
- /** The deprecate attribute */
- private static final String ATTRIBUTE_DEPRECATE= "deprecate"; //$NON-NLS-1$
-
- /** The hierarchical attribute */
- private static final String ATTRIBUTE_HIERARCHICAL= "hierarchical"; //$NON-NLS-1$
-
- /** The match strategy attribute */
- private static final String ATTRIBUTE_MATCH_STRATEGY= "matchStrategy"; //$NON-NLS-1$
-
- /** The parameter attribute */
- private static final String ATTRIBUTE_PARAMETER= "parameter"; //$NON-NLS-1$
-
- /** The patterns attribute */
- private static final String ATTRIBUTE_PATTERNS= "patterns"; //$NON-NLS-1$
-
- /** The qualified attribute */
- private static final String ATTRIBUTE_QUALIFIED= "qualified"; //$NON-NLS-1$
-
- /** The rename getter attribute */
- private static final String ATTRIBUTE_RENAME_GETTER= "getter"; //$NON-NLS-1$
-
- /** The rename setter attribute */
- private static final String ATTRIBUTE_RENAME_SETTER= "setter"; //$NON-NLS-1$
-
- /** The similar declarations attribute */
- private static final String ATTRIBUTE_SIMILAR_DECLARATIONS= "similarDeclarations"; //$NON-NLS-1$
-
- /** The textual matches attribute */
- private static final String ATTRIBUTE_TEXTUAL_MATCHES= "textual"; //$NON-NLS-1$
-
- /**
- * Similar declaration updating strategy which finds exact names and
- * embedded names as well (value: <code>2</code>).
- */
- public static final int STRATEGY_EMBEDDED= 2;
-
- /**
- * Similar declaration updating strategy which finds exact names only
- * (value: <code>1</code>).
- */
- public static final int STRATEGY_EXACT= 1;
-
- /**
- * Similar declaration updating strategy which finds exact names, embedded
- * names and name suffixes (value: <code>3</code>).
- */
- public static final int STRATEGY_SUFFIX= 3;
-
- /** The delegate attribute */
- private boolean fDelegate= false;
-
- /** The deprecate attribute */
- private boolean fDeprecate= false;
-
- /** The hierarchical attribute */
- private boolean fHierarchical= false;
-
- /** The java element attribute */
- private IJavaScriptElement fJavaElement= null;
-
- /** The match strategy */
- private int fMatchStrategy= STRATEGY_EXACT;
-
- /** The name attribute */
- private String fName= null;
-
- /** The patterns attribute */
- private String fPatterns= null;
-
- /** The qualified attribute */
- private boolean fQualified= false;
-
- /** The references attribute */
- private boolean fReferences= false;
-
- /** The rename getter attribute */
- private boolean fRenameGetter= false;
-
- /** The rename setter attribute */
- private boolean fRenameSetter= false;
-
- /** The similar declarations attribute */
- private boolean fSimilarDeclarations= false;
-
- /** The textual attribute */
- private boolean fTextual= false;
-
- /**
- * Creates a new refactoring descriptor.
- *
- * @param id
- * the unique id of the rename refactoring
- * @see IJavaScriptRefactorings
- */
- public RenameJavaScriptElementDescriptor(final String id) {
- super(id);
- Assert.isLegal(checkId(id), "Refactoring id is not a rename refactoring id"); //$NON-NLS-1$
- }
-
- /**
- * Checks whether the refactoring id is valid.
- *
- * @param id
- * the refactoring id
- * @return the outcome of the validation
- */
- private boolean checkId(final String id) {
- Assert.isNotNull(id);
- if (id.equals(IJavaScriptRefactorings.RENAME_JAVASCRIPT_UNIT))
- return true;
- else if (id.equals(IJavaScriptRefactorings.RENAME_ENUM_CONSTANT))
- return true;
- else if (id.equals(IJavaScriptRefactorings.RENAME_FIELD))
- return true;
- else if (id.equals(IJavaScriptRefactorings.RENAME_JAVA_PROJECT))
- return true;
- else if (id.equals(IJavaScriptRefactorings.RENAME_LOCAL_VARIABLE))
- return true;
- else if (id.equals(IJavaScriptRefactorings.RENAME_METHOD))
- return true;
- else if (id.equals(IJavaScriptRefactorings.RENAME_PACKAGE))
- return true;
- else if (id.equals(IJavaScriptRefactorings.RENAME_RESOURCE))
- return true;
- else if (id.equals(IJavaScriptRefactorings.RENAME_SOURCE_FOLDER))
- return true;
- else if (id.equals(IJavaScriptRefactorings.RENAME_TYPE))
- return true;
- else if (id.equals(IJavaScriptRefactorings.RENAME_TYPE_PARAMETER))
- return true;
- return false;
- }
-
- /**
- * {@inheritDoc}
- */
- protected void populateArgumentMap() {
- super.populateArgumentMap();
- fArguments.put(JavaScriptRefactoringDescriptor.ATTRIBUTE_NAME, fName);
- if (getID().equals(IJavaScriptRefactorings.RENAME_TYPE_PARAMETER)) {
- fArguments.put(JavaScriptRefactoringDescriptor.ATTRIBUTE_INPUT, elementToHandle(getProject(), null));
- fArguments.put(ATTRIBUTE_PARAMETER, null);
- } else
- fArguments.put(JavaScriptRefactoringDescriptor.ATTRIBUTE_INPUT, elementToHandle(getProject(), fJavaElement));
- final int type= fJavaElement.getElementType();
- if (type != IJavaScriptElement.PACKAGE_FRAGMENT_ROOT)
- fArguments.put(JavaScriptRefactoringDescriptor.ATTRIBUTE_REFERENCES, Boolean.toString(fReferences));
- if (type == IJavaScriptElement.FIELD) {
- fArguments.put(ATTRIBUTE_RENAME_GETTER, Boolean.toString(fRenameGetter));
- fArguments.put(ATTRIBUTE_RENAME_SETTER, Boolean.toString(fRenameSetter));
- }
- switch (type) {
- case IJavaScriptElement.PACKAGE_FRAGMENT:
- case IJavaScriptElement.TYPE:
- case IJavaScriptElement.FIELD:
- fArguments.put(ATTRIBUTE_TEXTUAL_MATCHES, Boolean.toString(fTextual));
- break;
- default:
- break;
- }
- switch (type) {
- case IJavaScriptElement.METHOD:
- case IJavaScriptElement.FIELD:
- fArguments.put(ATTRIBUTE_DEPRECATE, Boolean.toString(fDeprecate));
- fArguments.put(ATTRIBUTE_DELEGATE, Boolean.toString(fDelegate));
- break;
- default:
- break;
- }
- switch (type) {
- case IJavaScriptElement.PACKAGE_FRAGMENT:
- case IJavaScriptElement.TYPE:
- fArguments.put(ATTRIBUTE_QUALIFIED, Boolean.toString(fQualified));
- if (fPatterns != null && !"".equals(fPatterns)) //$NON-NLS-1$
- fArguments.put(ATTRIBUTE_PATTERNS, fPatterns);
- break;
- default:
- break;
- }
- switch (type) {
- case IJavaScriptElement.TYPE:
- fArguments.put(ATTRIBUTE_SIMILAR_DECLARATIONS, Boolean.toString(fSimilarDeclarations));
- fArguments.put(ATTRIBUTE_MATCH_STRATEGY, Integer.toString(fMatchStrategy));
- break;
- default:
- break;
- }
- switch (type) {
- case IJavaScriptElement.PACKAGE_FRAGMENT:
- fArguments.put(ATTRIBUTE_HIERARCHICAL, Boolean.toString(fHierarchical));
- break;
- default:
- break;
- }
- }
-
- /**
- * Determines whether the delegate for a Java element should be declared as
- * deprecated.
- * <p>
- * Note: Deprecation of the delegate is currently applicable to the Java elements
- * {@link org.eclipse.wst.jsdt.core.IFunction} and {@link org.eclipse.wst.jsdt.core.IField}. The default is to not deprecate the
- * delegate.
- * </p>
- *
- * @param deprecate
- * <code>true</code> to deprecate the delegate,
- * <code>false</code> otherwise
- */
- public void setDeprecateDelegate(final boolean deprecate) {
- fDeprecate= deprecate;
- }
-
- /**
- * Sets the file name patterns to use during qualified name updating.
- * <p>
- * The syntax of the file name patterns is a sequence of individual name
- * patterns, separated by comma. Additionally, wildcard characters '*' (any
- * string) and '?' (any character) may be used.
- * </p>
- * <p>
- * Note: If file name patterns are set, qualified name updating must be
- * enabled by calling {@link #setUpdateQualifiedNames(boolean)}.
- * </p>
- * <p>
- * Note: Qualified name updating is currently applicable to the Java elements
- * {@link org.eclipse.wst.jsdt.core.IPackageFragment} and {@link org.eclipse.wst.jsdt.core.IType}. The default is to use no
- * file name patterns (meaning that all files are processed).
- * </p>
- *
- * @param patterns
- * the non-empty file name patterns string
- */
- public void setFileNamePatterns(final String patterns) {
- Assert.isNotNull(patterns);
- Assert.isLegal(!"".equals(patterns), "Pattern must not be empty"); //$NON-NLS-1$ //$NON-NLS-2$
- fPatterns= patterns;
- }
-
- /**
- * Sets the Java element to be renamed.
- * <p>
- * Note: If the Java element to be renamed is of type
- * {@link IJavaScriptElement#JAVASCRIPT_PROJECT}, clients are required to to set the
- * project name to <code>null</code>.
- * </p>
- *
- * @param element
- * the Java element to be renamed
- */
- public void setJavaElement(final IJavaScriptElement element) {
- Assert.isNotNull(element);
- fJavaElement= element;
- }
-
- /**
- * Determines whether the the original Java element should be kept as
- * delegate to the renamed one.
- * <p>
- * Note: Keeping of original elements as delegates is currently applicable to the Java
- * elements {@link org.eclipse.wst.jsdt.core.IFunction} and {@link org.eclipse.wst.jsdt.core.IField}. The default is to not keep
- * the original as delegate.
- * </p>
- *
- * @param delegate
- * <code>true</code> to keep the original, <code>false</code>
- * otherwise
- */
- public void setKeepOriginal(final boolean delegate) {
- fDelegate= delegate;
- }
-
- /**
- * Determines which strategy should be used during similar declaration
- * updating.
- * <p>
- * Valid arguments are {@link #STRATEGY_EXACT}, {@link #STRATEGY_EMBEDDED}
- * or {@link #STRATEGY_SUFFIX}.
- * </p>
- * <p>
- * Note: Similar declaration updating is currently applicable to Java elements of type
- * {@link org.eclipse.wst.jsdt.core.IType}. The default is to use the {@link #STRATEGY_EXACT} match
- * strategy.
- * </p>
- *
- * @param strategy
- * the match strategy to use
- */
- public void setMatchStrategy(final int strategy) {
- Assert.isLegal(strategy == STRATEGY_EXACT || strategy == STRATEGY_EMBEDDED || strategy == STRATEGY_SUFFIX, "Wrong match strategy argument"); //$NON-NLS-1$
- fMatchStrategy= strategy;
- }
-
- /**
- * Sets the new name to rename the Java element to.
- *
- * @param name
- * the non-empty new name to set
- */
- public void setNewName(final String name) {
- Assert.isNotNull(name);
- Assert.isLegal(!"".equals(name), "Name must not be empty"); //$NON-NLS-1$//$NON-NLS-2$
- fName= name;
- }
-
- /**
- * Sets the project name of this refactoring.
- * <p>
- * Note: If the Java element to be renamed is of type
- * {@link IJavaScriptElement#JAVASCRIPT_PROJECT}, clients are required to to set the
- * project name to <code>null</code>.
- * </p>
- * <p>
- * The default is to associate the refactoring with the workspace.
- * </p>
- *
- * @param project
- * the non-empty project name to set, or <code>null</code> for
- * the workspace
- *
- * @see #getProject()
- */
- public void setProject(final String project) {
- super.setProject(project);
- }
-
- /**
- * Determines whether getter methods for the Java element should be renamed.
- * <p>
- * Note: Renaming of getter methods is applicable for {@link org.eclipse.wst.jsdt.core.IField}
- * elements which do not represent enum constants only. The default is to
- * not rename any getter methods.
- * </p>
- *
- * @param rename
- * <code>true</code> to rename getter methods,
- * <code>false</code> otherwise
- */
- public void setRenameGetters(final boolean rename) {
- fRenameGetter= rename;
- }
-
- /**
- * Determines whether setter methods for the Java element should be renamed.
- * <p>
- * Note: Renaming of setter methods is applicable for {@link org.eclipse.wst.jsdt.core.IField}
- * elements which do not represent enum constants only. The default is to
- * not rename any setter methods.
- * </p>
- *
- * @param rename
- * <code>true</code> to rename setter methods,
- * <code>false</code> otherwise
- */
- public void setRenameSetters(final boolean rename) {
- fRenameSetter= rename;
- }
-
- /**
- * Determines whether other Java elements in the hierarchy of the input
- * element should be renamed as well.
- * <p>
- * Note: Hierarchical updating is currently applicable for Java elements of
- * type {@link org.eclipse.wst.jsdt.core.IPackageFragment}. The default is to not update Java
- * elements hierarchically.
- * </p>
- *
- * @param update
- * <code>true</code> to update hierarchically,
- * <code>false</code> otherwise
- */
- public void setUpdateHierarchy(final boolean update) {
- fHierarchical= update;
- }
-
- /**
- * Determines whether qualified names of the Java element should be renamed.
- * <p>
- * Qualified name updating adapts fully qualified names of the Java element
- * to be renamed in non-Java text files. Clients may specify file name
- * patterns by calling {@link #setFileNamePatterns(String)} to constrain the
- * set of text files to be processed.
- * </p>
- * <p>
- * Note: Qualified name updating is currently applicable to the Java elements
- * {@link org.eclipse.wst.jsdt.core.IPackageFragment} and {@link org.eclipse.wst.jsdt.core.IType}. The default is to not rename
- * qualified names.
- * </p>
- *
- * @param update
- * <code>true</code> to update qualified names,
- * <code>false</code> otherwise
- */
- public void setUpdateQualifiedNames(final boolean update) {
- fQualified= update;
- }
-
- /**
- * Determines whether references to the Java element should be renamed.
- * <p>
- * Note: Reference updating is currently applicable to all Java element types except
- * {@link org.eclipse.wst.jsdt.core.IPackageFragmentRoot}. The default is to not update references.
- * </p>
- *
- * @param update
- * <code>true</code> to update references, <code>false</code>
- * otherwise
- */
- public void setUpdateReferences(final boolean update) {
- fReferences= update;
- }
-
- /**
- * Determines whether similar declarations of the Java element should be
- * updated.
- * <p>
- * Note: Similar declaration updating is currently applicable to Java elements of type
- * {@link org.eclipse.wst.jsdt.core.IType}. The default is to not update similar declarations.
- * </p>
- *
- * @param update
- * <code>true</code> to update similar declarations,
- * <code>false</code> otherwise
- */
- public void setUpdateSimilarDeclarations(final boolean update) {
- fSimilarDeclarations= update;
- }
-
- /**
- * Determines whether textual occurrences of the Java element should be
- * renamed.
- * <p>
- * Textual occurrence updating adapts textual occurrences of the Java
- * element to be renamed in Java comments and Java strings.
- * </p>
- * <p>
- * Note: Textual occurrence updating is currently applicable to the Java elements
- * {@link org.eclipse.wst.jsdt.core.IPackageFragment}, {@link org.eclipse.wst.jsdt.core.IType} and {@link org.eclipse.wst.jsdt.core.IField}. The default
- * is to not rename textual occurrences.
- * </p>
- *
- * @param update
- * <code>true</code> to update occurrences, <code>false</code>
- * otherwise
- */
- public void setUpdateTextualOccurrences(final boolean update) {
- fTextual= update;
- }
-
- /**
- * {@inheritDoc}
- */
- public RefactoringStatus validateDescriptor() {
- RefactoringStatus status= super.validateDescriptor();
- if (fName == null || "".equals(fName)) //$NON-NLS-1$
- status.merge(RefactoringStatus.createFatalErrorStatus(DescriptorMessages.RenameResourceDescriptor_no_new_name));
- if (fJavaElement == null)
- status.merge(RefactoringStatus.createFatalErrorStatus(DescriptorMessages.RenameJavaElementDescriptor_no_java_element));
- else {
- final int type= fJavaElement.getElementType();
- if (type == IJavaScriptElement.JAVASCRIPT_PROJECT && getProject() != null)
- status.merge(RefactoringStatus.createFatalErrorStatus(DescriptorMessages.RenameJavaElementDescriptor_project_constraint));
- if (type == IJavaScriptElement.PACKAGE_FRAGMENT_ROOT && fReferences)
- status.merge(RefactoringStatus.createFatalErrorStatus(DescriptorMessages.RenameJavaElementDescriptor_reference_constraint));
- if (fTextual) {
- switch (type) {
- case IJavaScriptElement.PACKAGE_FRAGMENT:
- case IJavaScriptElement.TYPE:
- case IJavaScriptElement.FIELD:
- break;
- default:
- status.merge(RefactoringStatus.createFatalErrorStatus(DescriptorMessages.RenameJavaElementDescriptor_textual_constraint));
- }
- }
- if (fDeprecate) {
- switch (type) {
- case IJavaScriptElement.METHOD:
- case IJavaScriptElement.FIELD:
- break;
- default:
- status.merge(RefactoringStatus.createFatalErrorStatus(DescriptorMessages.RenameJavaElementDescriptor_deprecation_constraint));
- }
- }
- if (fDelegate) {
- switch (type) {
- case IJavaScriptElement.METHOD:
- case IJavaScriptElement.FIELD:
- break;
- default:
- status.merge(RefactoringStatus.createFatalErrorStatus(DescriptorMessages.RenameJavaElementDescriptor_delegate_constraint));
- }
- }
- if (fRenameGetter || fRenameSetter) {
- if (type != IJavaScriptElement.FIELD)
- status.merge(RefactoringStatus.createFatalErrorStatus(DescriptorMessages.RenameJavaElementDescriptor_accessor_constraint));
- }
- if (fQualified) {
- switch (type) {
- case IJavaScriptElement.PACKAGE_FRAGMENT:
- case IJavaScriptElement.TYPE:
- break;
- default:
- status.merge(RefactoringStatus.createFatalErrorStatus(DescriptorMessages.RenameJavaElementDescriptor_qualified_constraint));
- }
- }
- if (fSimilarDeclarations) {
- switch (type) {
- case IJavaScriptElement.TYPE:
- break;
- default:
- status.merge(RefactoringStatus.createFatalErrorStatus(DescriptorMessages.RenameJavaElementDescriptor_similar_constraint));
- }
- }
- if (fHierarchical) {
- switch (type) {
- case IJavaScriptElement.PACKAGE_FRAGMENT:
- break;
- default:
- status.merge(RefactoringStatus.createFatalErrorStatus(DescriptorMessages.RenameJavaElementDescriptor_hierarchical_constraint));
- }
- }
- }
- return status;
- }
-}
diff --git a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/RenameLocalVariableDescriptor.java b/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/RenameLocalVariableDescriptor.java
deleted file mode 100644
index c4492d4c..00000000
--- a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/RenameLocalVariableDescriptor.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.refactoring.descriptors;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.ltk.core.refactoring.RefactoringStatus;
-import org.eclipse.wst.jsdt.core.IJavaScriptUnit;
-import org.eclipse.wst.jsdt.core.ISourceRange;
-import org.eclipse.wst.jsdt.core.refactoring.IJavaScriptRefactorings;
-import org.eclipse.wst.jsdt.internal.core.refactoring.descriptors.DescriptorMessages;
-
-/**
- * Refactoring descriptor for the rename local variable refactoring.
- * <p>
- * An instance of this refactoring descriptor may be obtained by calling
- * {@link org.eclipse.ltk.core.refactoring.RefactoringContribution#createDescriptor()} on a refactoring
- * contribution requested by invoking
- * {@link org.eclipse.ltk.core.refactoring.RefactoringCore#getRefactoringContribution(String)} with the
- * appropriate refactoring id.
- * </p>
- * <p>
- * Note: this class is not intended to be instantiated by clients.
- * </p>
- *
- * Provisional API: This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- */
-public final class RenameLocalVariableDescriptor extends JavaScriptRefactoringDescriptor {
-
- /** The name attribute */
- private String fName= null;
-
- /** The references attribute */
- private boolean fReferences= false;
-
- /** The selection attribute */
- private ISourceRange fSelection= null;
-
- /** The compilation unit attribute */
- private IJavaScriptUnit fUnit= null;
-
- /**
- * Creates a new refactoring descriptor.
- */
- public RenameLocalVariableDescriptor() {
- super(IJavaScriptRefactorings.RENAME_LOCAL_VARIABLE);
- }
-
- /**
- * {@inheritDoc}
- */
- protected void populateArgumentMap() {
- super.populateArgumentMap();
- fArguments.put(JavaScriptRefactoringDescriptor.ATTRIBUTE_NAME, fName);
- fArguments.put(JavaScriptRefactoringDescriptor.ATTRIBUTE_INPUT, elementToHandle(getProject(), fUnit));
- fArguments.put(JavaScriptRefactoringDescriptor.ATTRIBUTE_SELECTION, new Integer(fSelection.getOffset()).toString() + " " + new Integer(fSelection.getLength()).toString()); //$NON-NLS-1$
- fArguments.put(JavaScriptRefactoringDescriptor.ATTRIBUTE_REFERENCES, Boolean.toString(fReferences));
- }
-
- /**
- * Sets the compilation unit which contains the local variable.
- *
- * @param unit
- * the compilation unit to set
- */
- public void setCompilationUnit(final IJavaScriptUnit unit) {
- Assert.isNotNull(unit);
- fUnit= unit;
- }
-
- /**
- * Sets the new name to rename the local variable to.
- *
- * @param name
- * the non-empty new name to set
- */
- public void setNewName(final String name) {
- Assert.isNotNull(name);
- Assert.isLegal(!"".equals(name), "Name must not be empty"); //$NON-NLS-1$//$NON-NLS-2$
- fName= name;
- }
-
- /**
- * Sets the selection within the compilation unit which references the local
- * variable to rename.
- *
- * @param selection
- * the selection to set
- */
- public void setSelection(final ISourceRange selection) {
- Assert.isNotNull(selection);
- fSelection= selection;
- }
-
- /**
- * Determines whether references to the local variable should be renamed.
- * <p>
- * The default is to not update references.
- * </p>
- *
- * @param update
- * <code>true</code> to update references, <code>false</code>
- * otherwise
- */
- public void setUpdateReferences(final boolean update) {
- fReferences= update;
- }
-
- /**
- * {@inheritDoc}
- */
- public RefactoringStatus validateDescriptor() {
- RefactoringStatus status= super.validateDescriptor();
- if (fName == null || "".equals(fName)) //$NON-NLS-1$
- status.merge(RefactoringStatus.createFatalErrorStatus(DescriptorMessages.RenameResourceDescriptor_no_new_name));
- if (fUnit == null)
- status.merge(RefactoringStatus.createFatalErrorStatus(DescriptorMessages.RenameLocalVariableDescriptor_no_compilation_unit));
- if (fSelection == null)
- status.merge(RefactoringStatus.createFatalErrorStatus(DescriptorMessages.RenameLocalVariableDescriptor_no_selection));
- return status;
- }
-}
diff --git a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/RenameResourceDescriptor.java b/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/RenameResourceDescriptor.java
deleted file mode 100644
index f662ad36..00000000
--- a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/RenameResourceDescriptor.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.refactoring.descriptors;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.ltk.core.refactoring.RefactoringStatus;
-import org.eclipse.wst.jsdt.core.refactoring.IJavaScriptRefactorings;
-import org.eclipse.wst.jsdt.internal.core.refactoring.descriptors.DescriptorMessages;
-
-/**
- * Refactoring descriptor for the rename resource refactoring.
- * <p>
- * An instance of this refactoring descriptor may be obtained by calling
- * {@link org.eclipse.ltk.core.refactoring.RefactoringContribution#createDescriptor()} on a refactoring
- * contribution requested by invoking
- * {@link org.eclipse.ltk.core.refactoring.RefactoringCore#getRefactoringContribution(String)} with the
- * appropriate refactoring id.
- * </p>
- * <p>
- * Note: this class is not intended to be instantiated by clients.
- * </p>
- *
- * Provisional API: This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- */
-public final class RenameResourceDescriptor extends JavaScriptRefactoringDescriptor {
-
- /** The name attribute */
- private String fName= null;
-
- /** The resource attribute */
- private IResource fResource= null;
-
- /**
- * Creates a new refactoring descriptor.
- */
- public RenameResourceDescriptor() {
- super(IJavaScriptRefactorings.RENAME_RESOURCE);
- }
-
- /**
- * {@inheritDoc}
- */
- protected void populateArgumentMap() {
- super.populateArgumentMap();
- fArguments.put(JavaScriptRefactoringDescriptor.ATTRIBUTE_INPUT, resourceToHandle(getProject(), fResource));
- fArguments.put(JavaScriptRefactoringDescriptor.ATTRIBUTE_NAME, fName);
- }
-
- /**
- * Sets the new name to rename the resource to.
- *
- * @param name
- * the non-empty new name to set
- */
- public void setNewName(final String name) {
- Assert.isNotNull(name);
- Assert.isLegal(!"".equals(name), "Name must not be empty"); //$NON-NLS-1$//$NON-NLS-2$
- fName= name;
- }
-
- /**
- * Sets the project name of this refactoring.
- * <p>
- * Note: If the resource to be renamed is of type {@link IResource#PROJECT},
- * clients are required to to set the project name to <code>null</code>.
- * </p>
- * <p>
- * The default is to associate the refactoring with the workspace.
- * </p>
- *
- * @param project
- * the non-empty project name to set, or <code>null</code> for
- * the workspace
- *
- * @see #getProject()
- */
- public void setProject(final String project) {
- super.setProject(project);
- }
-
- /**
- * Sets the resource to be renamed.
- * <p>
- * Note: If the resource to be renamed is of type {@link IResource#PROJECT},
- * clients are required to to set the project name to <code>null</code>.
- * </p>
- *
- * @param resource
- * the resource to be renamed
- */
- public void setResource(final IResource resource) {
- Assert.isNotNull(resource);
- fResource= resource;
- }
-
- /**
- * {@inheritDoc}
- */
- public RefactoringStatus validateDescriptor() {
- RefactoringStatus status= super.validateDescriptor();
- if (fResource == null)
- status.merge(RefactoringStatus.createFatalErrorStatus(DescriptorMessages.RenameResourceDescriptor_no_resource));
- if (fName == null || "".equals(fName)) //$NON-NLS-1$
- status.merge(RefactoringStatus.createFatalErrorStatus(DescriptorMessages.RenameResourceDescriptor_no_new_name));
- if (fResource instanceof IProject && getProject() != null)
- status.merge(RefactoringStatus.createFatalErrorStatus(DescriptorMessages.RenameResourceDescriptor_project_constraint));
- return status;
- }
-}
diff --git a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/UseSupertypeDescriptor.java b/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/UseSupertypeDescriptor.java
deleted file mode 100644
index bfd286fa..00000000
--- a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/UseSupertypeDescriptor.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.refactoring.descriptors;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.ltk.core.refactoring.RefactoringStatus;
-import org.eclipse.wst.jsdt.core.IType;
-import org.eclipse.wst.jsdt.core.refactoring.IJavaScriptRefactorings;
-import org.eclipse.wst.jsdt.internal.core.refactoring.descriptors.DescriptorMessages;
-
-/**
- * Refactoring descriptor for the use supertype refactoring.
- * <p>
- * An instance of this refactoring descriptor may be obtained by calling
- * {@link org.eclipse.ltk.core.refactoring.RefactoringContribution#createDescriptor()} on a refactoring
- * contribution requested by invoking
- * {@link org.eclipse.ltk.core.refactoring.RefactoringCore#getRefactoringContribution(String)} with the
- * appropriate refactoring id.
- * </p>
- * <p>
- * Note: this class is not intended to be instantiated by clients.
- * </p>
- *
- * Provisional API: This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- */
-public final class UseSupertypeDescriptor extends JavaScriptRefactoringDescriptor {
-
- /** The instanceof attribute */
- private static final String ATTRIBUTE_INSTANCEOF= "instanceof"; //$NON-NLS-1$
-
- /** The instanceof attribute */
- private boolean fInstanceof= false;
-
- /** The subtype attribute */
- private IType fSubType= null;
-
- /** The supertype attribute */
- private IType fSupertype= null;
-
- /**
- * Creates a new refactoring descriptor.
- */
- public UseSupertypeDescriptor() {
- super(IJavaScriptRefactorings.USE_SUPER_TYPE);
- }
-
- /**
- * {@inheritDoc}
- */
- protected void populateArgumentMap() {
- super.populateArgumentMap();
- fArguments.put(ATTRIBUTE_INSTANCEOF, Boolean.valueOf(fInstanceof).toString());
- fArguments.put(JavaScriptRefactoringDescriptor.ATTRIBUTE_INPUT, elementToHandle(getProject(), fSubType));
- fArguments.put(JavaScriptRefactoringDescriptor.ATTRIBUTE_ELEMENT + 1, elementToHandle(getProject(), fSupertype));
- }
-
- /**
- * Determines whether 'instanceof' statements are considered as candidates
- * to replace the subtype occurrence by one of its supertypes.
- * <p>
- * The default is to not replace the subtype occurrence.
- * </p>
- *
- * @param replace
- * <code>true</code> to replace subtype occurrences in
- * 'instanceof' statements, <code>false</code> otherwise
- */
- public void setReplaceInstanceof(final boolean replace) {
- fInstanceof= replace;
- }
-
- /**
- * Sets the subtype of the refactoring.
- * <p>
- * Occurrences of the subtype are replaced by the supertype set by
- * {@link #setSupertype(IType)} where possible.
- * </p>
- *
- * @param type
- * the subtype to set
- */
- public void setSubtype(final IType type) {
- Assert.isNotNull(type);
- fSubType= type;
- }
-
- /**
- * Sets the supertype of the refactoring.
- * <p>
- * Occurrences of the subtype set by {@link #setSubtype(IType)} are replaced
- * by the supertype where possible.
- * </p>
- *
- * @param type
- * the supertype to set
- */
- public void setSupertype(final IType type) {
- Assert.isNotNull(type);
- fSupertype= type;
- }
-
- /**
- * {@inheritDoc}
- */
- public RefactoringStatus validateDescriptor() {
- RefactoringStatus status= super.validateDescriptor();
- if (fSubType == null)
- status.merge(RefactoringStatus.createFatalErrorStatus(DescriptorMessages.UseSupertypeDescriptor_no_subtype));
- if (fSupertype == null)
- status.merge(RefactoringStatus.createFatalErrorStatus(DescriptorMessages.UseSupertypeDescriptor_no_supertype));
- return status;
- }
-}

Back to the top