Modelers

org.topcased.core.refactoring
Class RenameModelFileInfo

java.lang.Object
  extended by org.topcased.core.refactoring.RenameModelFileInfo

public class RenameModelFileInfo
extends java.lang.Object

An info object that holds the information that is passed from the user to the refactoring. Creation 10 janv. 07


Field Summary
static int ALL_PROJECTS
          Indicate that the refactoring should also update references into other files in all the projects of the workspace
static int NONE
          Indicate that the refactoring should update any references into other files
static int ONLY_CURRENT_PROJECT
          Indicate that the refactoring should also update references into other files of the same project
 
Constructor Summary
RenameModelFileInfo()
           
 
Method Summary
 java.util.List<org.eclipse.core.resources.IFile> getFilesToRename()
          Get the list of File (the selected file and optionally some participants) that should be renamed
 java.util.List<org.eclipse.core.resources.IFile> getInvolvedFiles()
          Get the list of files that have references to the files that will be renamed.
 java.lang.String getNewName()
          Get the new name of the file(s)
 java.lang.String getOldName()
          Get the intial name of the file(s) that will be renamed
 int getReferencesTypeUpdate()
          Get the type of range/deep the rename refactoring should use.
 ResourceSet getResourceSet()
          Get the ResourceSet used to load the files before the renaming
 void setFilesToRename(java.util.List<org.eclipse.core.resources.IFile> filesToRename)
          Set the list of files that should be renamed.
 void setInvolvedFiles(java.util.List<org.eclipse.core.resources.IFile> involvedFiles)
          Set the list of files that have references to the files that will be renamed.
 void setNewName(java.lang.String newName)
          Set the new name of the file(s) to rename
 void setOldName(java.lang.String oldName)
          Set the initial name of the file(s) that will be renamed
 void setReferencesTypeUpdate(int referencesTypeUpdate)
          Store the type of range/deep the rename refactoring should use.
 void setResourceSet(ResourceSet resourceSet)
          Set the ResourceSet to use in the rename refactoring
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NONE

public static final int NONE
Indicate that the refactoring should update any references into other files

See Also:
Constant Field Values

ONLY_CURRENT_PROJECT

public static final int ONLY_CURRENT_PROJECT
Indicate that the refactoring should also update references into other files of the same project

See Also:
Constant Field Values

ALL_PROJECTS

public static final int ALL_PROJECTS
Indicate that the refactoring should also update references into other files in all the projects of the workspace

See Also:
Constant Field Values
Constructor Detail

RenameModelFileInfo

public RenameModelFileInfo()
Method Detail

getNewName

public java.lang.String getNewName()
Get the new name of the file(s)

Returns:
String

setNewName

public void setNewName(java.lang.String newName)
Set the new name of the file(s) to rename

Parameters:
newName - String the new file(s) name

getOldName

public java.lang.String getOldName()
Get the intial name of the file(s) that will be renamed

Returns:
String

setOldName

public void setOldName(java.lang.String oldName)
Set the initial name of the file(s) that will be renamed

Parameters:
oldName - String the old file(s) name

getFilesToRename

public java.util.List<org.eclipse.core.resources.IFile> getFilesToRename()
Get the list of File (the selected file and optionally some participants) that should be renamed

Returns:
List all the files that should be renamed

setFilesToRename

public void setFilesToRename(java.util.List<org.eclipse.core.resources.IFile> filesToRename)
Set the list of files that should be renamed. Generally this is the selected file and optionally additional files that should participate to the refactoring

Parameters:
filesToRename - the list of file that should be renamed

getInvolvedFiles

public java.util.List<org.eclipse.core.resources.IFile> getInvolvedFiles()
Get the list of files that have references to the files that will be renamed. Their content should be updated too.

Returns:
List a list of files that have at least one reference to the file(s) that will be renamed

setInvolvedFiles

public void setInvolvedFiles(java.util.List<org.eclipse.core.resources.IFile> involvedFiles)
Set the list of files that have references to the files that will be renamed. Their content should be updated too.

Parameters:
involvedFiles - a list of files that have at least one reference to the file(s) that will be renamed

getResourceSet

public ResourceSet getResourceSet()
Get the ResourceSet used to load the files before the renaming

Returns:
ResourceSet the resourceSet used in the rename refactoring

setResourceSet

public void setResourceSet(ResourceSet resourceSet)
Set the ResourceSet to use in the rename refactoring

Parameters:
resourceSet - the resourceSet used in the rename refactoring

getReferencesTypeUpdate

public int getReferencesTypeUpdate()
Get the type of range/deep the rename refactoring should use.

Returns:
int the value of the range/deep the rename refactoring should use.
See Also:
NONE, ONLY_CURRENT_PROJECT, ALL_PROJECTS

setReferencesTypeUpdate

public void setReferencesTypeUpdate(int referencesTypeUpdate)
Store the type of range/deep the rename refactoring should use.

Parameters:
referencesTypeUpdate - the range/deep the rename refactoring should use.
See Also:
NONE, ONLY_CURRENT_PROJECT, ALL_PROJECTS

Modelers

Copyright (c) 2005 TOPCASED Contributors 2005 - 2007. All rights reserved.