*/
package net.sourceforge.phpdt.internal.corext.codemanipulation;
-import java.util.Arrays;
-import java.util.Comparator;
-import java.util.List;
+//import java.util.Arrays;
+//import java.util.Comparator;
+//import java.util.List;
import java.util.StringTokenizer;
import net.sourceforge.phpdt.core.Flags;
import net.sourceforge.phpdt.internal.corext.util.JavaModelUtil;
import net.sourceforge.phpdt.internal.corext.util.Strings;
import net.sourceforge.phpdt.internal.corext.util.PHPUIStatus;
-import net.sourceforge.phpeclipse.PHPeclipsePlugin;
+//import net.sourceforge.phpeclipse.PHPeclipsePlugin;
import net.sourceforge.phpeclipse.ui.WebUI;
import org.eclipse.core.runtime.CoreException;
}
- private static final String[] EMPTY = new String[0];
+ //private static final String[] EMPTY = new String[0];
/**
* Generates a method stub including the method comment. Given a template
// return result;
// }
- private static String getSeeTag(String declaringClassQualifiedName,
- String methodName, String[] parameterTypesQualifiedNames) {
- StringBuffer buf = new StringBuffer();
- buf.append("@see "); //$NON-NLS-1$
- buf.append(declaringClassQualifiedName);
- buf.append('#');
- buf.append(methodName);
- buf.append('(');
- for (int i = 0; i < parameterTypesQualifiedNames.length; i++) {
- if (i > 0) {
- buf.append(", "); //$NON-NLS-1$
- }
- buf.append(parameterTypesQualifiedNames[i]);
- }
- buf.append(')');
- return buf.toString();
- }
+// private static String getSeeTag(String declaringClassQualifiedName,
+// String methodName, String[] parameterTypesQualifiedNames) {
+// StringBuffer buf = new StringBuffer();
+// buf.append("@see "); //$NON-NLS-1$
+// buf.append(declaringClassQualifiedName);
+// buf.append('#');
+// buf.append(methodName);
+// buf.append('(');
+// for (int i = 0; i < parameterTypesQualifiedNames.length; i++) {
+// if (i > 0) {
+// buf.append(", "); //$NON-NLS-1$
+// }
+// buf.append(parameterTypesQualifiedNames[i]);
+// }
+// buf.append(')');
+// return buf.toString();
+// }
private static String getSeeTag(IMethod overridden)
throws JavaModelException {
*
* @return The found method or null, if nothing found
*/
- private static IMethod findMethod(IMethod method, List allMethods)
- throws JavaModelException {
- String name = method.getElementName();
- String[] paramTypes = method.getParameterTypes();
- boolean isConstructor = method.isConstructor();
-
- for (int i = allMethods.size() - 1; i >= 0; i--) {
- IMethod curr = (IMethod) allMethods.get(i);
- if (JavaModelUtil.isSameMethodSignature(name, paramTypes,
- isConstructor, curr)) {
- return curr;
- }
- }
- return null;
- }
+// private static IMethod findMethod(IMethod method, List allMethods)
+// throws JavaModelException {
+// String name = method.getElementName();
+// String[] paramTypes = method.getParameterTypes();
+// boolean isConstructor = method.isConstructor();
+//
+// for (int i = allMethods.size() - 1; i >= 0; i--) {
+// IMethod curr = (IMethod) allMethods.get(i);
+// if (JavaModelUtil.isSameMethodSignature(name, paramTypes,
+// isConstructor, curr)) {
+// return curr;
+// }
+// }
+// return null;
+// }
/**
* Creates needed constructors for a type.
// name, dimensions, excluded); //$NON-NLS-1$
// return sortByLength(res); // longest first
// }
- private static String[] sortByLength(String[] proposals) {
- Arrays.sort(proposals, new Comparator() {
- public int compare(Object o1, Object o2) {
- return ((String) o2).length() - ((String) o1).length();
- }
- });
- return proposals;
- }
-
- private static String workaround38111(String baseName) {
+// private static String[] sortByLength(String[] proposals) {
+// Arrays.sort(proposals, new Comparator() {
+// public int compare(Object o1, Object o2) {
+// return ((String) o2).length() - ((String) o1).length();
+// }
+// });
+// return proposals;
+// }
+
+/* private static String workaround38111(String baseName) {
if (BASE_TYPES.contains(baseName))
return baseName;
return Character.toUpperCase(baseName.charAt(0))
+ baseName.substring(1);
}
-
- private static final List BASE_TYPES = Arrays
- .asList(new String[] {
- "boolean", "byte", "char", "double", "float", "int", "long", "short" }); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$
+*/
+// private static final List BASE_TYPES = Arrays
+// .asList(new String[] {
+// "boolean", "byte", "char", "double", "float", "int", "long", "short" }); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$
public static String suggestArgumentName(IJavaProject project,
String baseName, String[] excluded) {