String encoding;
- public SourceFile(IFile resource, ClasspathMultiDirectory sourceLocation, String encoding) {
+ public SourceFile(IFile resource, ClasspathMultiDirectory sourceLocation,
+ String encoding) {
this.resource = resource;
this.sourceLocation = sourceLocation;
this.initialTypeName = extractTypeName();
return false;
SourceFile f = (SourceFile) o;
- return sourceLocation == f.sourceLocation && resource.getFullPath().equals(f.resource.getFullPath());
+ return sourceLocation == f.sourceLocation
+ && resource.getFullPath().equals(f.resource.getFullPath());
}
String extractTypeName() {
- // answer a String with the qualified type name for the source file in the
+ // answer a String with the qualified type name for the source file in
+ // the
// form: 'p1/p2/A'
IPath fullPath = resource.getFullPath();
int resourceSegmentCount = fullPath.segmentCount();
- int sourceFolderSegmentCount = sourceLocation.sourceFolder.getFullPath().segmentCount();
+ int sourceFolderSegmentCount = sourceLocation.sourceFolder
+ .getFullPath().segmentCount();
String extension = fullPath.getFileExtension();
int ext_length = extension == null ? 0 : extension.length() + 1;
- int charCount = (resourceSegmentCount - sourceFolderSegmentCount - 1) - ext_length; // length
- // of
- // ".php"
+ int charCount = (resourceSegmentCount - sourceFolderSegmentCount - 1)
+ - ext_length; // length
+ // of
+ // ".php"
for (int i = sourceFolderSegmentCount; i < resourceSegmentCount; i++)
charCount += fullPath.segment(i).length();
try {
return Util.getResourceContentsAsCharArray(resource, this.encoding);
} catch (CoreException e) {
- throw new AbortCompilation(true, new MissingSourceFileException(resource.getFullPath().toString()));
+ throw new AbortCompilation(true, new MissingSourceFileException(
+ resource.getFullPath().toString()));
}
}
public char[] getFileName() {
- return resource.getFullPath().toString().toCharArray(); // do not know what
- // you want to
- // return here
+ return resource.getFullPath().toString().toCharArray(); // do not know
+ // what
+ // you want to
+ // return here
}
public char[] getMainTypeName() {