diff options
Diffstat (limited to 'bundles/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/core/SourceMethod.java')
-rw-r--r-- | bundles/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/core/SourceMethod.java | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/bundles/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/core/SourceMethod.java b/bundles/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/core/SourceMethod.java index 4d6dafc4..d48a89f9 100644 --- a/bundles/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/core/SourceMethod.java +++ b/bundles/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/core/SourceMethod.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2009 IBM Corporation and others. + * Copyright (c) 2000, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -153,10 +153,6 @@ public int hashCode() { * @see IFunction */ public boolean isConstructor() throws JavaScriptModelException { - if (!this.getElementName().equals(this.parent.getElementName())) { - // faster than reaching the info - return false; - } SourceMethodElementInfo info = (SourceMethodElementInfo) getElementInfo(); return info.isConstructor(); } @@ -274,4 +270,11 @@ public IFunction getFunction(String selector, String[] parameterTypeSignatures) } +public String getDisplayName() { + String displayName = super.getDisplayName(); + if (displayName.equals("___anonymous")) //$NON-NLS-1$ + displayName = ""; //$NON-NLS-1$ + return displayName; +} + } |