/* * Instanciate a method pattern with signatures for generics search */ public MethodPattern( boolean findDeclarations, boolean findReferences, char[] selector, char[] declaringQualification, char[] declaringSimpleName, IMethod method, int matchRule, IDLTKLanguageToolkit toolkit) { this( findDeclarations, findReferences, selector, declaringQualification, declaringSimpleName, method == null ? null : method.getDeclaringType(), matchRule, toolkit); // Get unique key for parameterized constructors // String genericDeclaringTypeSignature = null; // String genericSignature = null; // String key; methodParameters = true; // Store type signature and arguments for declaring type // if (genericDeclaringTypeSignature != null) { // this.typeSignatures = // Util.splitTypeLevelsSignature(genericDeclaringTypeSignature); // // setTypeArguments(Util.getAllTypeArguments(this.typeSignatures)); // } else { // storeTypeSignaturesAndArguments(declaringType); // } // Store type signatures and arguments for method methodArguments = extractMethodArguments(method); }
public static boolean isRenameAvailable(final IMethod method) throws CoreException { if (method == null) return false; if (!Checks.isAvailable(method)) return false; if (method.isConstructor()) return false; return true; }
public static boolean isReplaceInvocationsAvailable(IMethod method) throws ModelException { if (method == null) return false; if (!method.exists()) return false; if (method.isConstructor()) return false; return true; }