Refactory
[phpeclipse.git] / net.sourceforge.phpeclipse.ui / src / net / sourceforge / phpdt / internal / corext / codemanipulation / StubUtility.java
index 8b8c9f4..e7731df 100644 (file)
@@ -4,9 +4,9 @@
  */
 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;
@@ -62,7 +62,7 @@ public class StubUtility {
 
        }
 
-       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
@@ -467,23 +467,23 @@ public class StubUtility {
        // 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 {
@@ -915,21 +915,21 @@ public class StubUtility {
         * 
         * @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.
@@ -1335,25 +1335,25 @@ public class StubUtility {
        // 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) {