From: incastrix Date: Tue, 13 Oct 2009 22:30:49 +0000 (+0000) Subject: Refactory: remove unused classes, imports, fields and methods. X-Git-Url: http://git.phpeclipse.com?hp=8d0dbb92e69ca98891f35a755cf814da70212273 Refactory: remove unused classes, imports, fields and methods. --- 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 e1c82fb..69e236a 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 @@ -35,14 +35,14 @@ public class NLSElement { private Region fTagPosition; /** Index of the Element in an NLSLine */ - private int fIndex; + //private int fIndex; /** * 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; + //fIndex = index; Assert.isNotNull(fValue); fPosition = new Region(start, length); } @@ -52,9 +52,9 @@ public class NLSElement { * * @return Returns the position of the string to be NLSed */ - public Region getPosition() { - return fPosition; - } +// public Region getPosition() { +// return fPosition; +// } /** * Returns the actual string value. @@ -75,18 +75,18 @@ public class NLSElement { /** * Sets the tag position if one is associated with the NLS element. */ - public void setTagPosition(int start, int length) { - fTagPosition = new Region(start, length); - } +// public void setTagPosition(int start, int 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. */ - public Region getTagPosition() { - return fTagPosition; - } +// public Region getTagPosition() { +// return fTagPosition; +// } /** * Returns true if the NLS element has an assicated @@ -96,13 +96,13 @@ public class NLSElement { return fTagPosition != null && fTagPosition.getLength() > 0; } - public static String createTagText(int index) { - return TAG_PREFIX + index + TAG_POSTFIX; - } +// public static String createTagText(int index) { +// return TAG_PREFIX + index + TAG_POSTFIX; +// } - public String getTagText() { - return TAG_PREFIX + (fIndex + 1) + TAG_POSTFIX; - } +// public String getTagText() { +// return TAG_PREFIX + (fIndex + 1) + TAG_POSTFIX; +// } /* * (Non-Javadoc) Method declared in Object. only for debugging diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/corext/refactoring/nls/NLSLine.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/corext/refactoring/nls/NLSLine.java deleted file mode 100644 index 3845e8e..0000000 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/corext/refactoring/nls/NLSLine.java +++ /dev/null @@ -1,77 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 2003 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Common Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/cpl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package net.sourceforge.phpdt.corext.refactoring.nls; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -//incastrix -//import org.eclipse.jface.text.Assert; -import org.eclipse.core.runtime.Assert; - -public class NLSLine { - - private int fLineNumber; - - private List fElements; - - public NLSLine(int lineNumber) { - fLineNumber = lineNumber; - Assert.isTrue(fLineNumber >= 0); - fElements = new ArrayList(); - } - - public int getLineNumber() { - return fLineNumber; - } - - /** - * Adds a NLS element to this line. - */ - public void add(NLSElement element) { - Assert.isNotNull(element); - fElements.add(element); - } - - public NLSElement[] getElements() { - return (NLSElement[]) fElements - .toArray(new NLSElement[fElements.size()]); - } - - public NLSElement get(int index) { - return (NLSElement) fElements.get(index); - } - - public boolean exists(int index) { - return index >= 0 && index < fElements.size(); - } - - public int size() { - return fElements.size(); - } - - /* - * non javaDoc only for debugging - * - * @see Object#toString() - */ - public String toString() { - StringBuffer result = new StringBuffer(); - result.append("Line: " + fLineNumber + "\n"); //$NON-NLS-2$ //$NON-NLS-1$ - for (Iterator iter = fElements.iterator(); iter.hasNext();) { - result.append("\t"); //$NON-NLS-1$ - result.append(iter.next().toString()); - result.append("\n"); //$NON-NLS-1$ - } - return result.toString(); - } -}