A massive organize imports and formatting of the sources using default Eclipse code...
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / core / builder / SourceFile.java
index cac68c2..9299455 100644 (file)
@@ -30,7 +30,8 @@ public class SourceFile implements ICompilationUnit {
 
        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();
@@ -44,20 +45,24 @@ public class SourceFile implements ICompilationUnit {
                        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();
 
@@ -82,14 +87,16 @@ public class SourceFile implements ICompilationUnit {
                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() {