X-Git-Url: http://git.phpeclipse.com diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/corext/refactoring/nls/NLSElement.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/corext/refactoring/nls/NLSElement.java index 11bbf94..992ce02 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/corext/refactoring/nls/NLSElement.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/corext/refactoring/nls/NLSElement.java @@ -15,13 +15,17 @@ import org.eclipse.jface.util.Assert; public class NLSElement { - public static final String TAG_PREFIX= "//$NON-NLS-"; //$NON-NLS-1$ - public static final int TAG_PREFIX_LENGTH= TAG_PREFIX.length(); - public static final String TAG_POSTFIX= "$"; //$NON-NLS-1$ - public static final int TAG_POSTFIX_LENGTH= TAG_POSTFIX.length(); + public static final String TAG_PREFIX = "//$NON-NLS-"; //$NON-NLS-1$ + + public static final int TAG_PREFIX_LENGTH = TAG_PREFIX.length(); + + public static final String TAG_POSTFIX = "$"; //$NON-NLS-1$ + + public static final int TAG_POSTFIX_LENGTH = TAG_POSTFIX.length(); /** The original string denoted by the position */ private String fValue; + /** The position of the original string */ private Region fPosition; @@ -35,14 +39,15 @@ public class NLSElement { * Creates a new NLS element for the given string and position. */ public NLSElement(String value, int start, int length, int index) { - fValue= value; - fIndex= index; + fValue = value; + fIndex = index; Assert.isNotNull(fValue); - fPosition= new Region(start, length); + fPosition = new Region(start, length); } /** * Returns the position of the string to be NLSed. + * * @return Returns the position of the string to be NLSed */ public Region getPosition() { @@ -51,6 +56,7 @@ public class NLSElement { /** * Returns the actual string value. + * * @return the actual string value */ public String getValue() { @@ -61,27 +67,28 @@ public class NLSElement { * Sets the actual string value. */ public void setValue(String value) { - fValue= value; + fValue = value; } /** * Sets the tag position if one is associated with the NLS element. */ public void setTagPosition(int start, int length) { - fTagPosition= new Region(start, length); + fTagPosition = new Region(start, length); } /** - * Returns the tag position for this element. The method can return null. - * In this case no tag has been found for this NLS element. + * Returns the tag position for this element. The method can return + * null. In this case no tag has been found for this NLS + * element. */ public Region getTagPosition() { return fTagPosition; } /** - * Returns true if the NLS element has an assicated $NON-NLS-*$ tag. - * Otherwise false is returned. + * Returns true if the NLS element has an assicated + * $NON-NLS-*$ tag. Otherwise false is returned. */ public boolean hasTag() { return fTagPosition != null && fTagPosition.getLength() > 0; @@ -95,13 +102,11 @@ public class NLSElement { return TAG_PREFIX + (fIndex + 1) + TAG_POSTFIX; } - /* (Non-Javadoc) - * Method declared in Object. - * only for debugging + /* + * (Non-Javadoc) Method declared in Object. only for debugging */ public String toString() { return fPosition + ": " + fValue + " Tag position: " + //$NON-NLS-2$ //$NON-NLS-1$ (hasTag() ? fTagPosition.toString() : "no tag found"); //$NON-NLS-1$ } } -