Composite Refactoring
v1.0

compositeRefactoring.resources
Class GetResources

java.lang.Object
  |
  +--compositeRefactoring.resources.GetResources

public class GetResources
extends Object

GetResources provides some getter methods for fetching resource files of a Eclipse project.


Constructor Summary
GetResources()
          creates a new GetResources object.
 
Method Summary
 IFile getFile(IFolder folder, String name)
          gets a file from a folder.
 IFile getFile(IProject folder, String name)
          gets a file from an Eclipse project (top-level folder).
 IFolder getFolder(IFolder folder, String name)
          gets a folder in a folder of an Eclipse project.
 IFolder getFolder(IProject proj, String name)
          gets a folder in an Eclipse project.
 IProject getProject(String name)
          gets an Eclipse project by name.
 IWorkspaceRoot getWsRoot()
          gets the WorkspaceRoot of the Eclipse project.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GetResources

public GetResources()
creates a new GetResources object.
Method Detail

getWsRoot

public IWorkspaceRoot getWsRoot()
gets the WorkspaceRoot of the Eclipse project.
Returns:
the WorkspaceRoot of the Eclipse project.

getProject

public IProject getProject(String name)
gets an Eclipse project by name.
Parameters:
name - the project's name.
Returns:
the Eclipse project.

getFolder

public IFolder getFolder(IProject proj,
                         String name)
gets a folder in an Eclipse project.
Parameters:
proj - the Eclipse project.
name - the foldername.
Returns:
the folder with the corresponding name.

getFolder

public IFolder getFolder(IFolder folder,
                         String name)
gets a folder in a folder of an Eclipse project.
Parameters:
folder - the folder in which the folder is located in the filesystem.
name - the name of the folder.
Returns:
the folder with the corresponding name.

getFile

public IFile getFile(IFolder folder,
                     String name)
gets a file from a folder.
Parameters:
folder - the folder in which the file is located.
name - the file's name.
Returns:
the file with the corresponding name.

getFile

public IFile getFile(IProject folder,
                     String name)
gets a file from an Eclipse project (top-level folder).
Parameters:
folder - the project in which the file is located.
name - the file's name.
Returns:
the file with the corresponding name.

Composite Refactoring
v1.0