Eclipse Platform
Release 3.2

org.eclipse.ltk.core.refactoring
Class RefactoringContribution

java.lang.Object
  extended byorg.eclipse.ltk.core.refactoring.RefactoringContribution

public abstract class RefactoringContribution
extends Object

Partial implementation of refactoring contribution objects which are capable of creating a specific refactoring instance and associated refactoring descriptors or arguments. Refactoring contributions are stateless objects. They are instantiated on demand by the refactoring framework. It is not guaranteed that the same refactoring contribution object will be used to create the arguments for a refactoring and to create the refactoring itself.

Since:
3.2

Constructor Summary
RefactoringContribution()
           
 
Method Summary
abstract  RefactoringDescriptor createDescriptor(String id, String project, String description, String comment, Map arguments, int flags)
          Creates a new refactoring descriptor.
 Map retrieveArgumentMap(RefactoringDescriptor descriptor)
          Retrieves the argument map of the specified refactoring descriptor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RefactoringContribution

public RefactoringContribution()
Method Detail

createDescriptor

public abstract RefactoringDescriptor createDescriptor(String id,
                                                       String project,
                                                       String description,
                                                       String comment,
                                                       Map arguments,
                                                       int flags)
Creates a new refactoring descriptor.

This method is used by the refactoring framework to create a language-specific refactoring descriptor representing the refactoring instance corresponding to the argument map. Implementations of this method must never return null.

Parameters:
id - the unique id of the refactoring
project - the non-empty name of the project associated with this refactoring, or null for a workspace refactoring
description - a non-empty human-readable description of the particular refactoring instance
comment - the comment associated with the refactoring, or null for no comment
arguments - the argument map (element type: <String, String>). The keys of the arguments are required to be non-empty strings which must not contain spaces. The values must be non-empty strings
flags - the flags of the refactoring descriptor
Returns:
the refactoring descriptor
See Also:
retrieveArgumentMap(RefactoringDescriptor)

retrieveArgumentMap

public Map retrieveArgumentMap(RefactoringDescriptor descriptor)
Retrieves the argument map of the specified refactoring descriptor.

This method is used by the refactoring framework to obtain refactoring-specific arguments provided by the refactoring descriptor. These are the arguments which are specific to certain refactoring instances, and correspond to the argument map which has been passed to createDescriptor(String, String, String, String, Map, int) upon creation of the refactoring descriptor.

The returned argument map (element type: <String, String>) must satisfy the following conditions:

Subclasses must extend this method to provide more specific implementation in order to let the refactoring framework retrieve the argument map from language-specific refactoring descriptors. Implementations of this method must never return null.

Parameters:
descriptor - the refactoring descriptor to retrieve its argument map
Returns:
the argument map of the specified refactoring descriptor
See Also:
createDescriptor(String, String, String, String, Map, int)

Eclipse Platform
Release 3.2

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.