private boolean matches(ITypeBinding exception) { if (exception == null) return false; while (exception != null) { if (Bindings.equals(fException, exception)) return true; exception = exception.getSuperclass(); } return false; }
private Type getConstantType() throws JavaScriptModelException { if (fConstantTypeCache == null) { IExpressionFragment fragment = getSelectedExpression(); ITypeBinding typeBinding = fragment.getAssociatedExpression().resolveTypeBinding(); AST ast = fCuRewrite.getAST(); typeBinding = Bindings.normalizeForDeclarationUse(typeBinding, ast); fConstantTypeCache = fCuRewrite.getImportRewrite().addImport(typeBinding, ast); } return fConstantTypeCache; }