Fixed bug 382606: [javadoc] constructor used in javadoc not getting
resolved for secondary types.
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocBugsTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocBugsTest.java
index 899041f..9d9cf1d 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocBugsTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocBugsTest.java
@@ -44,7 +44,7 @@
 // All specified tests which does not belong to the class are skipped...
 static {
 //		TESTS_PREFIX = "testBug96237";
-//		TESTS_NAMES = new String[] { "testBug68017javadocWarning2" };
+//		TESTS_NAMES = new String[] { "testBug382606" };
 //		TESTS_NUMBERS = new int[] { 129241 };
 //		TESTS_RANGE = new int[] { 21, 50 };
 }
@@ -8856,5 +8856,29 @@
 		}
 	);
 }
+
+public void testBug382606() {
+	runConformTest(
+			new String[] {
+				"pack/A.java",
+				"package pack;\n" +
+				"/**\n"+
+				"* @see A\n" +
+				"*/\n" +
+				"public interface A {\n"+
+				"}\n"+
+				"/**\n"+
+				"* @see #B()\n"+
+				"*/\n"+
+				"class B {\n"+
+				" B() {}\n"+
+				"\n"+
+				" public void foo(){\n"+ 
+				"     new B();\n"+
+				" }\n"+
+				"}\n"
+			}
+		);
+}
 }
 
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocMessageSend.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocMessageSend.java
index 2df5abf..5d90545 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocMessageSend.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocMessageSend.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 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
@@ -104,6 +104,9 @@
 				// Try to search a constructor instead
 				enclosingTypeBinding = this.actualReceiverType;
 				MethodBinding contructorBinding = this.binding;
+				if (!contructorBinding.isValidBinding() && CharOperation.equals(this.selector, enclosingTypeBinding.shortReadableName())) {
+					contructorBinding = scope.getConstructor((ReferenceBinding)enclosingTypeBinding, argumentTypes, this);
+				}
 				while (!contructorBinding.isValidBinding() && (enclosingTypeBinding.isMemberType() || enclosingTypeBinding.isLocalType())) {
 					enclosingTypeBinding = enclosingTypeBinding.enclosingType();
 					if (CharOperation.equals(this.selector, enclosingTypeBinding.shortReadableName())) {