Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.ltk.core.refactoring.resource
Class MoveResourcesDescriptor


java.lang.Object
  extended by 

org.eclipse.ltk.core.refactoring.RefactoringDescriptor
      extended by 
org.eclipse.ltk.core.refactoring.resource.MoveResourcesDescriptor
All Implemented Interfaces:
Comparable

public final class MoveResourcesDescriptor
extends RefactoringDescriptor

Refactoring descriptor for the move resource refactoring.

An instance of this refactoring descriptor may be obtained by calling RefactoringContribution.createDescriptor() on a refactoring contribution requested by invoking RefactoringCore.getRefactoringContribution(String) with the refactoring id ( ID).

Note: this class is not intended to be subclassed or instantiated by clients.

Since:
3.4
Restriction:
This class is not intended to be instantiated by clients.

Field Summary
static  String ID
          Refactoring id of the 'Move Resources Resource' refactoring (value: org.eclipse.ltk.core.refactoring.rename.resources).
 
Fields inherited from class org.eclipse.ltk.core.refactoring. RefactoringDescriptor
BREAKING_CHANGE, ID_UNKNOWN, MULTI_CHANGE, NONE, STRUCTURAL_CHANGE, USER_CHANGE
 
Constructor Summary
MoveResourcesDescriptor ()
          Creates a new refactoring descriptor.
 
Method Summary
  Refactoring createRefactoring ( RefactoringStatus status)
          Creates the a new refactoring instance for this refactoring descriptor.
  IPath getDestinationPath ()
          Returns the destination container to move the resources in.
  IPath[] getResourcePathsToMove ()
          Returns the resource to move.
 boolean isUpdateReferences ()
          Returns if move will also update references
 void setDestination ( IContainer container)
          Sets the destination container to move the resources in.
 void setDestinationPath ( IPath path)
          Sets the path of the destination container to move the resources in.
 void setResourcePathsToMove ( IPath[] resourcePaths)
          Sets the paths of the resources to move.
 void setResourcesToMove ( IResource[] resources)
          Sets the resources to move.
 void setUpdateReferences (boolean updateReferences)
          If set to true, move will also update references.
 
Methods inherited from class org.eclipse.ltk.core.refactoring. RefactoringDescriptor
compareTo, equals, getComment, getDescription, getFlags, getID, getProject, getTimeStamp, hashCode, setComment, setDescription, setFlags, setProject, setTimeStamp, toString
 
Methods inherited from class java.lang. Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ID

public static final 
String ID
Refactoring id of the 'Move Resources Resource' refactoring (value: org.eclipse.ltk.core.refactoring.rename.resources).

Clients may safely cast the obtained refactoring descriptor to MoveResourcesDescriptor.

See Also:
Constant Field Values
Constructor Detail

MoveResourcesDescriptor

public MoveResourcesDescriptor()
Creates a new refactoring descriptor.

Clients should not instantiated this class but use RefactoringCore.getRefactoringContribution(String) with ID to get the contribution that can create the descriptor.

Method Detail

setDestination

public void setDestination(
IContainer container)
Sets the destination container to move the resources in.

Parameters:
container - the destination

setDestinationPath

public void setDestinationPath(
IPath path)
Sets the path of the destination container to move the resources in.

Parameters:
path - the destination path

getDestinationPath

public 
IPath getDestinationPath()
Returns the destination container to move the resources in.

Returns:
the destination container to move the resource in

setResourcePathsToMove

public void setResourcePathsToMove(
IPath[] resourcePaths)
Sets the paths of the resources to move. The resources must be of type IFile or IFolder.

Parameters:
resourcePaths - the paths of the resource to move

setResourcesToMove

public void setResourcesToMove(
IResource[] resources)
Sets the resources to move. The resources must be of type IFile or IFolder.

Parameters:
resources - the resource to move

getResourcePathsToMove

public 
IPath[] getResourcePathsToMove()
Returns the resource to move.

Returns:
the resource to move

setUpdateReferences

public void setUpdateReferences(boolean updateReferences)
If set to true, move will also update references. The default is to update references.

Parameters:
updateReferences - true if this move will update references

isUpdateReferences

public boolean isUpdateReferences()
Returns if move will also update references

Returns:
returns true if this move will update references

createRefactoring

public 
Refactoring createRefactoring(
RefactoringStatus status)
                              throws 
CoreException
Description copied from class: RefactoringDescriptor
Creates the a new refactoring instance for this refactoring descriptor.

This method is used by the refactoring framework to instantiate a refactoring from a refactoring descriptor, in order to apply it later on a local or remote workspace.

The returned refactoring must be in an initialized state, i.e. ready to be executed via PerformRefactoringOperation.

Specified by:
createRefactoring in class RefactoringDescriptor
Parameters:
status - a refactoring status used to describe the outcome of the initialization
Returns:
the refactoring, or null if this refactoring descriptor represents the unknown refactoring, or if no refactoring contribution is available for this refactoring descriptor which is capable to create a refactoring
Throws:
CoreException - if an error occurs while creating the refactoring instance

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire