X-Git-Url: http://git.phpeclipse.com diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/core/jdom/CompilationUnit.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/core/jdom/CompilationUnit.java index 4f85502..c3a3d86 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/core/jdom/CompilationUnit.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/core/jdom/CompilationUnit.java @@ -10,10 +10,10 @@ *******************************************************************************/ package net.sourceforge.phpdt.internal.core.jdom; -import org.eclipse.core.resources.IResource; - import net.sourceforge.phpdt.internal.compiler.env.ICompilationUnit; +import org.eclipse.core.resources.IResource; + /** * Implements a very simple version of the ICompilationUnit. * @@ -22,54 +22,54 @@ import net.sourceforge.phpdt.internal.compiler.env.ICompilationUnit; *

*/ public class CompilationUnit implements ICompilationUnit { - protected char[] fContents; + protected char[] fContents; - protected char[] fFileName; + protected char[] fFileName; - protected char[] fMainTypeName; + protected char[] fMainTypeName; - public CompilationUnit(char[] contents, char[] filename) { - fContents = contents; - fFileName = filename; + public CompilationUnit(char[] contents, char[] filename) { + fContents = contents; + fFileName = filename; - String file = new String(filename); - int start = file.lastIndexOf("/") + 1; //$NON-NLS-1$ - if (start == 0 || start < file.lastIndexOf("\\")) //$NON-NLS-1$ - start = file.lastIndexOf("\\") + 1; //$NON-NLS-1$ + String file = new String(filename); + int start = file.lastIndexOf("/") + 1; //$NON-NLS-1$ + if (start == 0 || start < file.lastIndexOf("\\")) //$NON-NLS-1$ + start = file.lastIndexOf("\\") + 1; //$NON-NLS-1$ - int end = file.lastIndexOf("."); //$NON-NLS-1$ - if (end == -1) - end = file.length(); + int end = file.lastIndexOf("."); //$NON-NLS-1$ + if (end == -1) + end = file.length(); - fMainTypeName = file.substring(start, end).toCharArray(); - } + fMainTypeName = file.substring(start, end).toCharArray(); + } - public char[] getContents() { - return fContents; - } + public char[] getContents() { + return fContents; + } - public char[] getFileName() { - return fFileName; - } + public char[] getFileName() { + return fFileName; + } - public char[] getMainTypeName() { - return fMainTypeName; - } + public char[] getMainTypeName() { + return fMainTypeName; + } - public char[][] getPackageName() { - return null; - } + public char[][] getPackageName() { + return null; + } - public String toString() { - return "CompilationUnit[" + new String(fFileName) + "]"; //$NON-NLS-2$ //$NON-NLS-1$ - } + public String toString() { + return "CompilationUnit[" + new String(fFileName) + "]"; //$NON-NLS-2$ //$NON-NLS-1$ + } - /* - * (non-Javadoc) - * - * @see net.sourceforge.phpdt.internal.compiler.env.ICompilationUnit#getResource() - */ - public IResource getResource() { - return null; - } + /* + * (non-Javadoc) + * + * @see net.sourceforge.phpdt.internal.compiler.env.ICompilationUnit#getResource() + */ + public IResource getResource() { + return null; + } } \ No newline at end of file