com.joanju.cg.plugin
Class CgUtils

java.lang.Object
  extended by com.joanju.cg.plugin.CgUtils

public class CgUtils
extends java.lang.Object


Constructor Summary
CgUtils()
           
 
Method Summary
static ParseUnit createParseUnit(java.io.File file)
          This variant finds the IFile in the current ProRefactor project.
static ParseUnit createParseUnit(java.io.File file, IFile ifile)
          Temporary workaround for the linked resources problem.
static IFile findAnIFile(java.lang.String fullPath)
          Attempt to find an appropriate IFile for a file fullpath.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CgUtils

public CgUtils()
Method Detail

createParseUnit

public static ParseUnit createParseUnit(java.io.File file)
This variant finds the IFile in the current ProRefactor project.

See Also:
createParseUnit(File, IFile)

createParseUnit

public static ParseUnit createParseUnit(java.io.File file,
                                        IFile ifile)
Temporary workaround for the linked resources problem.

The current implementation of ParseUnit doesn't make it very easy to get it and its PUB all set up with the PUB file in the proper project relative directory.

Note: The current ProRefactor project is the project for the PUB file.


findAnIFile

public static IFile findAnIFile(java.lang.String fullPath)
Attempt to find an appropriate IFile for a file fullpath. Since more than one linked resource can point at any one file on the OS filesystem, any number of IFile matches are possible. This attempts to find an IFile, in the following order: 1. Unique "simple" (not linked) IFile in the workspace. 2. First in current ProRefactor project. 3. First in workspace.

Returns:
null if there is no IFile representation.


Copyright © 2008 Joanju Software. All Rights Reserved.