A massive organize imports and formatting of the sources using default Eclipse code...
[phpeclipse.git] / net.sourceforge.phpeclipse.core / src / net / sourceforge / phpeclipse / core / model / SourceReference.java
index ece105c..72b5c82 100644 (file)
@@ -8,7 +8,7 @@
  * Contributors:
  *     Christopher Lenz - initial API and implementation
  * 
- * $Id: SourceReference.java,v 1.1 2004-09-02 18:05:21 jsurfer Exp $
+ * $Id: SourceReference.java,v 1.2 2006-10-21 23:14:29 pombredanne Exp $
  */
 
 package net.sourceforge.phpeclipse.core.model;
@@ -19,8 +19,7 @@ import org.eclipse.jface.text.IRegion;
 import org.eclipse.jface.text.Region;
 
 /**
- * Default implementation of {@link ISourceReference} based on
- * {@link IDocument}.
+ * Default implementation of {@link ISourceReference} based on {@link IDocument}.
  */
 public class SourceReference implements ISourceReference {
 
@@ -37,7 +36,8 @@ public class SourceReference implements ISourceReference {
        /**
         * Constructor.
         * 
-        * @param document The document that contains the source reference
+        * @param document
+        *            The document that contains the source reference
         */
        public SourceReference(IDocument document) {
                this(document, 0, 0);
@@ -46,7 +46,8 @@ public class SourceReference implements ISourceReference {
        /**
         * Constructor.
         * 
-        * @param document The document that contains the source reference
+        * @param document
+        *            The document that contains the source reference
         */
        public SourceReference(IDocument document, int offset) {
                this(document, offset, 0);
@@ -55,7 +56,8 @@ public class SourceReference implements ISourceReference {
        /**
         * Constructor.
         * 
-        * @param document The document that contains the source reference
+        * @param document
+        *            The document that contains the source reference
         */
        public SourceReference(IDocument document, int offset, int length) {
                this.document = document;
@@ -69,11 +71,11 @@ public class SourceReference implements ISourceReference {
         */
        public String getSource() {
                try {
-                       return document.get(sourceRegion.getOffset(),
-                               sourceRegion.getLength());
+                       return document.get(sourceRegion.getOffset(), sourceRegion
+                                       .getLength());
                } catch (BadLocationException e) {
                        throw new IllegalStateException(
-                               "Model not synchronized with document"); //$NON-NLS-1$
+                                       "Model not synchronized with document"); //$NON-NLS-1$
                }
        }
 
@@ -89,8 +91,10 @@ public class SourceReference implements ISourceReference {
        /**
         * Sets the source region covered by the element.
         * 
-        * @param offset the offset of the region
-        * @param length the length of the region
+        * @param offset
+        *            the offset of the region
+        * @param length
+        *            the length of the region
         */
        public final void setSourceRegion(int offset, int length) {
                sourceRegion = new Region(offset, length);
@@ -99,7 +103,8 @@ public class SourceReference implements ISourceReference {
        /**
         * Sets the source region covered by the element.
         * 
-        * @param region the source region to set
+        * @param region
+        *            the source region to set
         */
        public final void setSourceRegion(IRegion region) {
                setSourceRegion(region.getOffset(), region.getLength());