diff options
Diffstat (limited to 'bundles/org.eclipse.wst.jsdt.manipulation')
55 files changed, 0 insertions, 4134 deletions
diff --git a/bundles/org.eclipse.wst.jsdt.manipulation/.classpath b/bundles/org.eclipse.wst.jsdt.manipulation/.classpath deleted file mode 100644 index ce739334..00000000 --- a/bundles/org.eclipse.wst.jsdt.manipulation/.classpath +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <classpathentry kind="src" path="src"/> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/> - <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> - <classpathentry kind="output" path="bin"/> -</classpath> diff --git a/bundles/org.eclipse.wst.jsdt.manipulation/.project b/bundles/org.eclipse.wst.jsdt.manipulation/.project deleted file mode 100644 index 17b16576..00000000 --- a/bundles/org.eclipse.wst.jsdt.manipulation/.project +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>org.eclipse.wst.jsdt.core.manipulation</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - <buildCommand> - <name>org.eclipse.jdt.core.javabuilder</name> - <arguments> - </arguments> - </buildCommand> - <buildCommand> - <name>org.eclipse.pde.ManifestBuilder</name> - <arguments> - </arguments> - </buildCommand> - <buildCommand> - <name>org.eclipse.pde.SchemaBuilder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>org.eclipse.pde.PluginNature</nature> - <nature>org.eclipse.jdt.core.javanature</nature> - </natures> -</projectDescription> diff --git a/bundles/org.eclipse.wst.jsdt.manipulation/.settings/org.eclipse.core.resources.prefs b/bundles/org.eclipse.wst.jsdt.manipulation/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index afa5c913..00000000 --- a/bundles/org.eclipse.wst.jsdt.manipulation/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,3 +0,0 @@ -#Tue Apr 04 03:36:32 EDT 2006 -eclipse.preferences.version=1 -encoding/<project>=ISO-8859-1 diff --git a/bundles/org.eclipse.wst.jsdt.manipulation/.settings/org.eclipse.core.runtime.prefs b/bundles/org.eclipse.wst.jsdt.manipulation/.settings/org.eclipse.core.runtime.prefs deleted file mode 100644 index 7ec57502..00000000 --- a/bundles/org.eclipse.wst.jsdt.manipulation/.settings/org.eclipse.core.runtime.prefs +++ /dev/null @@ -1,3 +0,0 @@ -#Mon Apr 17 01:48:39 EDT 2006 -eclipse.preferences.version=1 -line.separator=\r\n diff --git a/bundles/org.eclipse.wst.jsdt.manipulation/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.wst.jsdt.manipulation/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 91537393..00000000 --- a/bundles/org.eclipse.wst.jsdt.manipulation/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,80 +0,0 @@ -#Sat Mar 24 11:23:54 EDT 2007 -eclipse.preferences.version=1 -org.eclipse.jdt.core.builder.cleanOutputFolder=clean -org.eclipse.jdt.core.builder.duplicateResourceTask=warning -org.eclipse.jdt.core.builder.invalidClasspath=ignore -org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch -org.eclipse.jdt.core.circularClasspath=error -org.eclipse.jdt.core.classpath.exclusionPatterns=enabled -org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.4 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.doc.comment.support=enabled -org.eclipse.jdt.core.compiler.maxProblemPerUnit=100 -org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning -org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning -org.eclipse.jdt.core.compiler.problem.autoboxing=ignore -org.eclipse.jdt.core.compiler.problem.deprecation=ignore -org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled -org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled -org.eclipse.jdt.core.compiler.problem.discouragedReference=warning -org.eclipse.jdt.core.compiler.problem.emptyStatement=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning -org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning -org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore -org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore -org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error -org.eclipse.jdt.core.compiler.problem.forbiddenReference=error -org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning -org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning -org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore -org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error -org.eclipse.jdt.core.compiler.problem.invalidJavadoc=ignore -org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled -org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled -org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private -org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore -org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error -org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore -org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore -org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled -org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public -org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore -org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled -org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private -org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore -org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error -org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error -org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning -org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore -org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning -org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error -org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=enabled -org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error -org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled -org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore -org.eclipse.jdt.core.compiler.problem.typeParameterHiding=ignore -org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning -org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore -org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning -org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore -org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error -org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled -org.eclipse.jdt.core.compiler.problem.unusedImport=error -org.eclipse.jdt.core.compiler.problem.unusedLabel=error -org.eclipse.jdt.core.compiler.problem.unusedLocal=error -org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore -org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled -org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled -org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error -org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning -org.eclipse.jdt.core.compiler.source=1.3 -org.eclipse.jdt.core.incompatibleJDKLevel=ignore -org.eclipse.jdt.core.incompleteClasspath=error diff --git a/bundles/org.eclipse.wst.jsdt.manipulation/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.wst.jsdt.manipulation/.settings/org.eclipse.jdt.ui.prefs deleted file mode 100644 index 301c7add..00000000 --- a/bundles/org.eclipse.wst.jsdt.manipulation/.settings/org.eclipse.jdt.ui.prefs +++ /dev/null @@ -1,4 +0,0 @@ -#Mon Apr 17 01:48:39 EDT 2006 -eclipse.preferences.version=1 -internal.default.compliance=default -org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?>\r\n<templates/> diff --git a/bundles/org.eclipse.wst.jsdt.manipulation/.settings/org.eclipse.ltk.core.refactoring.prefs b/bundles/org.eclipse.wst.jsdt.manipulation/.settings/org.eclipse.ltk.core.refactoring.prefs deleted file mode 100644 index c59368c5..00000000 --- a/bundles/org.eclipse.wst.jsdt.manipulation/.settings/org.eclipse.ltk.core.refactoring.prefs +++ /dev/null @@ -1,3 +0,0 @@ -#Tue Apr 04 03:36:32 EDT 2006 -eclipse.preferences.version=1 -org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false diff --git a/bundles/org.eclipse.wst.jsdt.manipulation/.settings/org.eclipse.pde.prefs b/bundles/org.eclipse.wst.jsdt.manipulation/.settings/org.eclipse.pde.prefs deleted file mode 100644 index fc522bba..00000000 --- a/bundles/org.eclipse.wst.jsdt.manipulation/.settings/org.eclipse.pde.prefs +++ /dev/null @@ -1,16 +0,0 @@ -#Mon Apr 17 02:01:33 EDT 2006 -compilers.incompatible-environment=0 -compilers.p.build=0 -compilers.p.deprecated=1 -compilers.p.illegal-att-value=0 -compilers.p.no-required-att=0 -compilers.p.not-externalized-att=0 -compilers.p.unknown-attribute=0 -compilers.p.unknown-class=0 -compilers.p.unknown-element=0 -compilers.p.unknown-resource=0 -compilers.p.unresolved-ex-points=0 -compilers.p.unresolved-import=0 -compilers.p.unused-element-or-attribute=0 -compilers.use-project=true -eclipse.preferences.version=1 diff --git a/bundles/org.eclipse.wst.jsdt.manipulation/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.jsdt.manipulation/META-INF/MANIFEST.MF deleted file mode 100644 index 8831bcb6..00000000 --- a/bundles/org.eclipse.wst.jsdt.manipulation/META-INF/MANIFEST.MF +++ /dev/null @@ -1,22 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Version: 1.0.1.qualifier -Export-Package: org.eclipse.wst.jsdt.core.manipulation, - org.eclipse.wst.jsdt.core.refactoring, - org.eclipse.wst.jsdt.core.refactoring.descriptors, - org.eclipse.wst.jsdt.internal.core.manipulation;x-internal:=true, - org.eclipse.wst.jsdt.internal.core.refactoring.descriptors;x-internal:=true -Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)", - org.eclipse.core.resources;bundle-version="[3.4.0,4.0.0)", - org.eclipse.ltk.core.refactoring;bundle-version="[3.4.0,4.0.0)", - org.eclipse.wst.jsdt.core;bundle-version="[1.0.0,2.0.0)", - org.eclipse.core.expressions;bundle-version="[3.4.0,4.0.0)" -Bundle-Activator: org.eclipse.wst.jsdt.internal.core.manipulation.JavaManipulationPlugin -Eclipse-LazyStart: true -Bundle-SymbolicName: org.eclipse.wst.jsdt.manipulation;singleton:=true -Bundle-Name: %pluginName -Bundle-RequiredExecutionEnvironment: J2SE-1.4 -Bundle-Localization: plugin -Bundle-Vendor: %providerName -Bundle-ActivationPolicy: lazy - diff --git a/bundles/org.eclipse.wst.jsdt.manipulation/about.html b/bundles/org.eclipse.wst.jsdt.manipulation/about.html deleted file mode 100644 index 46023304..00000000 --- a/bundles/org.eclipse.wst.jsdt.manipulation/about.html +++ /dev/null @@ -1,28 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml"> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> -<title>About</title> -</head> -<body lang="EN-US"> -<h2>About This Content</h2> - -<p>June 2, 2006</p> -<h3>License</h3> - -<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise -indicated below, the Content is provided to you under the terms and conditions of the -Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available -at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>. -For purposes of the EPL, "Program" will mean the Content.</p> - -<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is -being redistributed by another party ("Redistributor") and different terms and conditions may -apply to your use of any object code in the Content. Check the Redistributor's license that was -provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise -indicated below, the terms and conditions of the EPL still apply to any source code in the Content -and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p> - -</body> -</html>
\ No newline at end of file diff --git a/bundles/org.eclipse.wst.jsdt.manipulation/build.properties b/bundles/org.eclipse.wst.jsdt.manipulation/build.properties deleted file mode 100644 index a294efc8..00000000 --- a/bundles/org.eclipse.wst.jsdt.manipulation/build.properties +++ /dev/null @@ -1,17 +0,0 @@ -############################################################################### -# Copyright (c) 2005, 2007 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 -############################################################################### -source.. = src/ -output.. = bin/ -bin.includes = META-INF/,\ - .,\ - plugin.properties,\ - plugin.xml,\ - about.html diff --git a/bundles/org.eclipse.wst.jsdt.manipulation/plugin.properties b/bundles/org.eclipse.wst.jsdt.manipulation/plugin.properties deleted file mode 100644 index d3faa226..00000000 --- a/bundles/org.eclipse.wst.jsdt.manipulation/plugin.properties +++ /dev/null @@ -1,13 +0,0 @@ -############################################################################### -# Copyright (c) 2000, 2007 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 -############################################################################### - -pluginName= JavaScript Code Manipulation Functionality -providerName= Eclipse.org diff --git a/bundles/org.eclipse.wst.jsdt.manipulation/plugin.xml b/bundles/org.eclipse.wst.jsdt.manipulation/plugin.xml deleted file mode 100644 index 3f99aead..00000000 --- a/bundles/org.eclipse.wst.jsdt.manipulation/plugin.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<?eclipse version="3.0"?> -<!-- ====================================================================== --> -<!-- Copyright (c) 2000, 2006 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 --> -<!-- ====================================================================== --> -<plugin> - - <extension point="org.eclipse.core.expressions.propertyTesters"> - <propertyTester - id="org.eclipse.wst.jsdt.core.javaElementPropertyTester" - class="org.eclipse.wst.jsdt.internal.core.manipulation.JavaElementPropertyTester" - namespace="org.eclipse.wst.jsdt.core" - properties="name,isInJavaProject,isOnClasspath,hasTypeOnClasspath,inSourceFolder,inArchive,inExternalArchive,projectOption" - type="org.eclipse.wst.jsdt.core.IJavaScriptElement"/> - </extension> - -</plugin> diff --git a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/manipulation/JavaScriptManipulation.java b/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/manipulation/JavaScriptManipulation.java deleted file mode 100644 index bbbbcc58..00000000 --- a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/manipulation/JavaScriptManipulation.java +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 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.manipulation; - -/** - * Central access point for the Java Manipulation plug-in (id <code>"org.eclipse.wst.jsdt.manipulation"</code>). - * - * 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 JavaScriptManipulation { - - /** - * The id of the Java Manipulation plug-in (value <code>"org.eclipse.wst.jsdt.manipulation"</code>). - */ - public static final String ID_PLUGIN= "org.eclipse.wst.jsdt.manipulation"; //$NON-NLS-1$ -} 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<Number></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 bc87c91f..00000000 --- a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/core/refactoring/descriptors/RenameJavaScriptElementDescriptor.java +++ /dev/null @@ -1,568 +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.IJavaScriptElement; -import org.eclipse.wst.jsdt.core.ITypeParameter; -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)) { - final ITypeParameter parameter= (ITypeParameter) fJavaElement; - fArguments.put(JavaScriptRefactoringDescriptor.ATTRIBUTE_INPUT, elementToHandle(getProject(), parameter.getDeclaringMember())); - fArguments.put(ATTRIBUTE_PARAMETER, parameter.getElementName()); - } 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; - } -} diff --git a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/internal/core/manipulation/IStatusConstants.java b/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/internal/core/manipulation/IStatusConstants.java deleted file mode 100644 index 3139c665..00000000 --- a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/internal/core/manipulation/IStatusConstants.java +++ /dev/null @@ -1,23 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 2007 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.internal.core.manipulation; - -/** - * Defines status codes relevant to the Java Manipulation plug-in. - */ -public interface IStatusConstants { - - // Java Manipulation status constants start at 10000 to make sure that we don't - // collide with resource and java model constants. - - public static final int INTERNAL_ERROR= 10001; - - } diff --git a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/internal/core/manipulation/JavaElementPropertyTester.java b/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/internal/core/manipulation/JavaElementPropertyTester.java deleted file mode 100644 index d4364265..00000000 --- a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/internal/core/manipulation/JavaElementPropertyTester.java +++ /dev/null @@ -1,167 +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.internal.core.manipulation; - -import java.util.regex.Pattern; - -import org.eclipse.core.runtime.CoreException; - -import org.eclipse.core.expressions.PropertyTester; - -import org.eclipse.wst.jsdt.core.IJavaScriptElement; -import org.eclipse.wst.jsdt.core.IJavaScriptProject; -import org.eclipse.wst.jsdt.core.IPackageFragmentRoot; -import org.eclipse.wst.jsdt.core.JavaScriptModelException; - -/** - * A property tester for various properties of IJavaElements. - * Might be moved down to jdt.core. See bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=127085 - * - * @since 3.3 - */ -public class JavaElementPropertyTester extends PropertyTester { - - /** - * A property indicating the file name (value <code>"name"</code>). Regular expressions are supported. - */ - public static final String NAME = "name"; //$NON-NLS-1$ - - /** - * A property indicating if the element is in a open and existing Java project (value <code>"isInJavaProject"</code>). - */ - public static final String IS_IN_JAVA_PROJECT = "isInJavaProject"; //$NON-NLS-1$ - - /** - * A property indicating if the element is in a open and existing Java project that also implements the given nature (value <code>"isInJavaProjectWithNature"</code>). - */ - public static final String IS_IN_JAVA_PROJECT_WITH_NATURE = "isInJavaProjectWithNature"; //$NON-NLS-1$ - - /** - * A property indicating if the element is on the classpath (value <code>"isOnClasspath"</code>). - */ - public static final String IS_ON_CLASSPATH = "isOnClasspath"; //$NON-NLS-1$ - - /** - * A property indicating if the a type of the given qualified name is on the classpath (value <code>"hasTypeOnClasspath"</code>). - */ - public static final String HAS_TYPE_ON_CLASSPATH = "hasTypeOnClasspath"; //$NON-NLS-1$ - - /** - * A property indicating if the element is a source folder or is inside a source folder. (value <code>"inSourceFolder"</code>). - * <code>false</code> is returned if the element does not exist. - */ - public static final String IN_SOURCE_FOLDER = "inSourceFolder"; //$NON-NLS-1$ - - /** - * A property indicating if the element is an archive or is inside an archive. (value <code>"inArchive"</code>). - * <code>false</code> is returned if the element does not exist. - */ - public static final String IN_ARCHIVE = "inArchive"; //$NON-NLS-1$ - - /** - * A property indicating if the element is an archive (value <code>"inExternalArchive"</code>). - * <code>false</code> is returned if the element does not exist. - */ - public static final String IN_EXTERNAL_ARCHIVE = "inExternalArchive"; //$NON-NLS-1$ - - /** - * A property indicating a option in the Java project of the selected element - * (value <code>"projectOption"</code>). If two arguments are given, - * this treats the first as the option name, and the second as the option - * property value. If only one argument (or just the expected value) is - * given, this treats it as the property name, and simply tests if the option is - * avaiable in the project specific options. - */ - public static final String PROJECT_OPTION = "projectOption"; //$NON-NLS-1$ - - - /* (non-Javadoc) - * @see org.eclipse.core.expressions.IPropertyTester#test(java.lang.Object, java.lang.String, java.lang.Object[], java.lang.Object) - */ - public boolean test(Object receiver, String method, Object[] args, Object expectedValue) { - if (!(receiver instanceof IJavaScriptElement)) { - return false; - } - IJavaScriptElement res = (IJavaScriptElement) receiver; - if (method.equals(NAME)) { - return Pattern.matches(toString(expectedValue), res.getElementName()); - } else if (method.equals(IS_IN_JAVA_PROJECT)) { - IJavaScriptProject javaProject= res.getJavaScriptProject(); - return javaProject != null && javaProject.exists() && javaProject.getProject().isOpen(); - } else if (method.equals(IS_IN_JAVA_PROJECT_WITH_NATURE)) { - IJavaScriptProject javaProject= res.getJavaScriptProject(); - if (javaProject != null && javaProject.exists() && javaProject.getProject().isOpen() ) { - if (expectedValue != null) { - try { - return javaProject.getProject().hasNature(toString(expectedValue)); - } catch (CoreException e) { - return false; - } - } - } - return false; - } else if (method.equals(IS_ON_CLASSPATH)) { - IJavaScriptProject javaProject= res.getJavaScriptProject(); - if (javaProject != null && javaProject.exists()) { - return javaProject.isOnIncludepath(res); - } - return false; - } else if (method.equals(IN_SOURCE_FOLDER)) { - IJavaScriptElement root= res.getAncestor(IJavaScriptElement.PACKAGE_FRAGMENT_ROOT); - if (root != null) { - try { - return ((IPackageFragmentRoot) root).getKind() == IPackageFragmentRoot.K_SOURCE; - } catch (JavaScriptModelException e) { - // ignore - } - } - return false; - } else if (method.equals(IN_ARCHIVE)) { - IJavaScriptElement root= res.getAncestor(IJavaScriptElement.PACKAGE_FRAGMENT_ROOT); - if (root != null) { - return ((IPackageFragmentRoot) root).isArchive(); - } - return false; - } else if (method.equals(IN_EXTERNAL_ARCHIVE)) { - IJavaScriptElement root= res.getAncestor(IJavaScriptElement.PACKAGE_FRAGMENT_ROOT); - if (root != null) { - return ((IPackageFragmentRoot) root).isExternal(); - } - return false; - } else if (method.equals(PROJECT_OPTION)) { - IJavaScriptProject project= res.getJavaScriptProject(); - if (project != null) { - if (args.length == 2) { - String current= project.getOption(toString(args[0]), true); - return current != null && current.equals(args[1]); - } else if (args.length == 1) { - return project.getOption(toString(args[0]), false) != null; - } - } - return false; - } else if (method.equals(HAS_TYPE_ON_CLASSPATH)) { - IJavaScriptProject javaProject= res.getJavaScriptProject(); - if (javaProject != null && javaProject.exists()) { - try { - return javaProject.findType(toString(expectedValue)) != null; - } catch (JavaScriptModelException e) { - return false; - } - } - } - return false; - } - - private String toString(Object expectedValue) { - return expectedValue == null ? "" : expectedValue.toString(); //$NON-NLS-1$ - } -} diff --git a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/internal/core/manipulation/JavaManipulationMessages.java b/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/internal/core/manipulation/JavaManipulationMessages.java deleted file mode 100644 index 955e42db..00000000 --- a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/internal/core/manipulation/JavaManipulationMessages.java +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 2007 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.internal.core.manipulation; - -import org.eclipse.osgi.util.NLS; - -public class JavaManipulationMessages extends NLS { - - private static final String BUNDLE_NAME= "org.eclipse.wst.jsdt.internal.core.manipulation.JavaManipulationMessages"; //$NON-NLS-1$ - - private JavaManipulationMessages() { - } - - static { - // initialize resource bundle - NLS.initializeMessages(BUNDLE_NAME, JavaManipulationMessages.class); - } - - public static String JavaManipulationMessages_internalError; -} diff --git a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/internal/core/manipulation/JavaManipulationMessages.properties b/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/internal/core/manipulation/JavaManipulationMessages.properties deleted file mode 100644 index 04d8614e..00000000 --- a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/internal/core/manipulation/JavaManipulationMessages.properties +++ /dev/null @@ -1,11 +0,0 @@ -############################################################################### -# Copyright (c) 2000, 2007 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 -############################################################################### -JavaManipulationMessages_internalError=Internal Error diff --git a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/internal/core/manipulation/JavaManipulationPlugin.java b/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/internal/core/manipulation/JavaManipulationPlugin.java deleted file mode 100644 index 917d356c..00000000 --- a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/internal/core/manipulation/JavaManipulationPlugin.java +++ /dev/null @@ -1,86 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 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.internal.core.manipulation; - -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.MultiStatus; -import org.eclipse.core.runtime.Plugin; -import org.eclipse.core.runtime.Status; - -import org.eclipse.wst.jsdt.core.manipulation.JavaScriptManipulation; - -import org.osgi.framework.BundleContext; - -/** - * The main plug-in class to be used in the workbench. - */ -public class JavaManipulationPlugin extends Plugin { - - //The shared instance. - private static JavaManipulationPlugin fgDefault; - - /** - * The constructor. - */ - public JavaManipulationPlugin() { - fgDefault = this; - } - - /** - * This method is called upon plug-in activation - */ - public void start(BundleContext context) throws Exception { - super.start(context); - } - - /** - * This method is called when the plug-in is stopped - */ - public void stop(BundleContext context) throws Exception { - super.stop(context); - fgDefault = null; - } - - /** - * Returns the shared instance. - * - * @return the shared instance. - */ - public static JavaManipulationPlugin getDefault() { - return fgDefault; - } - - public static String getPluginId() { - return JavaScriptManipulation.ID_PLUGIN; - } - - public static void log(IStatus status) { - getDefault().getLog().log(status); - } - - public static void logErrorMessage(String message) { - log(new Status(IStatus.ERROR, getPluginId(), IStatusConstants.INTERNAL_ERROR, message, null)); - } - - public static void logErrorStatus(String message, IStatus status) { - if (status == null) { - logErrorMessage(message); - return; - } - MultiStatus multi= new MultiStatus(getPluginId(), IStatusConstants.INTERNAL_ERROR, message, null); - multi.add(status); - log(multi); - } - - public static void log(Throwable e) { - log(new Status(IStatus.ERROR, getPluginId(), IStatusConstants.INTERNAL_ERROR, JavaManipulationMessages.JavaManipulationMessages_internalError, e)); - } -} diff --git a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/internal/core/refactoring/descriptors/DescriptorMessages.java b/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/internal/core/refactoring/descriptors/DescriptorMessages.java deleted file mode 100644 index 3ecc8b2e..00000000 --- a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/internal/core/refactoring/descriptors/DescriptorMessages.java +++ /dev/null @@ -1,80 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007 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.internal.core.refactoring.descriptors; - -import org.eclipse.osgi.util.NLS; - -public class DescriptorMessages extends NLS { - - private static final String BUNDLE_NAME= "org.eclipse.wst.jsdt.internal.core.refactoring.descriptors.DescriptorMessages"; //$NON-NLS-1$ - - public static String JavaRefactoringDescriptor_no_description; - - public static String JavaRefactoringDescriptor_no_resulting_descriptor; - - public static String JavaRefactoringDescriptor_not_available; - - public static String MoveDescriptor_no_destination_set; - - public static String MoveDescriptor_no_elements_set; - - public static String MoveStaticMembersDescriptor_invalid_members; - - public static String MoveStaticMembersDescriptor_no_members; - - public static String MoveStaticMembersDescriptor_no_type; - - public static String RenameJavaElementDescriptor_accessor_constraint; - - public static String RenameJavaElementDescriptor_delegate_constraint; - - public static String RenameJavaElementDescriptor_deprecation_constraint; - - public static String RenameJavaElementDescriptor_hierarchical_constraint; - - public static String RenameJavaElementDescriptor_no_java_element; - - public static String RenameJavaElementDescriptor_patterns_constraint; - - public static String RenameJavaElementDescriptor_patterns_qualified_constraint; - - public static String RenameJavaElementDescriptor_project_constraint; - - public static String RenameJavaElementDescriptor_qualified_constraint; - - public static String RenameJavaElementDescriptor_reference_constraint; - - public static String RenameJavaElementDescriptor_similar_constraint; - - public static String RenameJavaElementDescriptor_textual_constraint; - - public static String RenameLocalVariableDescriptor_no_compilation_unit; - - public static String RenameLocalVariableDescriptor_no_selection; - - public static String RenameResourceDescriptor_no_new_name; - - public static String RenameResourceDescriptor_no_resource; - - public static String RenameResourceDescriptor_project_constraint; - - public static String UseSupertypeDescriptor_no_subtype; - - public static String UseSupertypeDescriptor_no_supertype; - - static { - // initialize resource bundle - NLS.initializeMessages(BUNDLE_NAME, DescriptorMessages.class); - } - - private DescriptorMessages() { - } -}
\ No newline at end of file diff --git a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/internal/core/refactoring/descriptors/DescriptorMessages.properties b/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/internal/core/refactoring/descriptors/DescriptorMessages.properties deleted file mode 100644 index 7fa60a91..00000000 --- a/bundles/org.eclipse.wst.jsdt.manipulation/src/org/eclipse/wst/jsdt/internal/core/refactoring/descriptors/DescriptorMessages.properties +++ /dev/null @@ -1,37 +0,0 @@ -############################################################################### -# Copyright (c) 2007 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 -############################################################################### -JavaRefactoringDescriptor_not_available=N/A -JavaRefactoringDescriptor_no_description=Description has not been set. -JavaRefactoringDescriptor_no_resulting_descriptor=Refactoring contribution registered for id ''{0}'' returned null as result of createDescriptor(String, String, String, String, Map, int) -UseSupertypeDescriptor_no_subtype=Subtype has not been set. -UseSupertypeDescriptor_no_supertype=Supertype has not been set. -RenameResourceDescriptor_no_resource=Resource has not been set. -RenameResourceDescriptor_no_new_name=New name has not been set. -RenameResourceDescriptor_project_constraint=Project must be null for resources of type 'IProject'. -RenameJavaElementDescriptor_no_java_element=JavaScript element has not been set. -RenameJavaElementDescriptor_reference_constraint=Reference updating is not available for package fragment roots. -RenameJavaElementDescriptor_qualified_constraint=Qualified name updating is only available for packages and types. -RenameJavaElementDescriptor_deprecation_constraint=Deprecation of delegates is only available for functions and vars. -RenameJavaElementDescriptor_hierarchical_constraint=Hierarchical renaming is only applicable to packages. -RenameJavaElementDescriptor_patterns_qualified_constraint=Qualified name updating enabled implies a non-empty patterns string. -RenameLocalVariableDescriptor_no_compilation_unit=Compilation unit has not been set. -RenameLocalVariableDescriptor_no_selection=Selection has not been set. -RenameJavaElementDescriptor_textual_constraint=Textual occurrence updating is only available for packages, types and vars. -RenameJavaElementDescriptor_project_constraint=Project must be null for JavaScript elements of type 'IJavaProject'. -RenameJavaElementDescriptor_similar_constraint=Similar declaration updating is only available for types. -RenameJavaElementDescriptor_delegate_constraint=Keeping delegates is only available for functions and vars. -RenameJavaElementDescriptor_accessor_constraint=Renaming of accessor methods is only available for vars. -RenameJavaElementDescriptor_patterns_constraint=Patterns must be a non-empty string. -MoveStaticMembersDescriptor_no_type=Destination type has not been set. -MoveDescriptor_no_destination_set=Destination has not been set. -MoveStaticMembersDescriptor_no_members=Members have not been set. -MoveStaticMembersDescriptor_invalid_members=Members array contains an invalid member -MoveDescriptor_no_elements_set=Elements to be moved have not been set. |