Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 25662 Details for
Bug 36032
[plan] JavaProject.findType() fails to find second type in source file
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch to fix this issue
v00.txt (text/plain), 4.49 KB, created by
Frederic Fusier
on 2005-08-04 07:59:44 EDT
(
hide
)
Description:
Patch to fix this issue
Filename:
MIME Type:
Creator:
Frederic Fusier
Created:
2005-08-04 07:59:44 EDT
Size:
4.49 KB
patch
obsolete
>Index: model/org/eclipse/jdt/core/IJavaProject.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IJavaProject.java,v >retrieving revision 1.75 >diff -u -r1.75 IJavaProject.java >--- model/org/eclipse/jdt/core/IJavaProject.java 23 May 2005 09:57:38 -0000 1.75 >+++ model/org/eclipse/jdt/core/IJavaProject.java 4 Aug 2005 11:54:58 -0000 >@@ -165,11 +165,7 @@ > * a class B defined as a member type of a class A in package x.y should have a > * the fully qualified name "x.y.A.B". > * >- * Note that in order to be found, a type name (or its toplevel enclosing >- * type name) must match its corresponding compilation unit name. As a >- * consequence, secondary types cannot be found using this functionality. >- * Secondary types can however be explicitely accessed through their enclosing >- * unit or found by the <code>SearchEngine</code>. >+ * Secondary types can be found using this functionality. > * > * @param fullyQualifiedName the given fully qualified name > * @exception JavaModelException if this project does not exist or if an >@@ -189,11 +185,7 @@ > * If the returned type is part of a compilation unit, its owner is the given > * owner. > * >- * Note that in order to be found, a type name (or its toplevel enclosing >- * type name) must match its corresponding compilation unit name. As a >- * consequence, secondary types cannot be found using this functionality. >- * Secondary types can however be explicitely accessed through their enclosing >- * unit or found by the <code>SearchEngine</code>. >+ * Secondary types can be found using this functionality. > * > * @param fullyQualifiedName the given fully qualified name > * @param owner the owner of the returned type's compilation unit >@@ -214,11 +206,7 @@ > * a class B defined as a member type of a class A should have the > * type qualified name "A.B". > * >- * Note that in order to be found, a type name (or its toplevel enclosing >- * type name) must match its corresponding compilation unit name. As a >- * consequence, secondary types cannot be found using this functionality. >- * Secondary types can however be explicitely accessed through their enclosing >- * unit or found by the <code>SearchEngine</code>. >+ * Secondary types can be found using this functionality. > * > * @param packageName the given package name > * @param typeQualifiedName the given type qualified name >@@ -242,11 +230,7 @@ > * If the returned type is part of a compilation unit, its owner is the given > * owner. > * >- * Note that in order to be found, a type name (or its toplevel enclosing >- * type name) must match its corresponding compilation unit name. As a >- * consequence, secondary types cannot be found using this functionality. >- * Secondary types can however be explicitely accessed through their enclosing >- * unit or found by the <code>SearchEngine</code>. >+ * Secondary types can be found using this functionality. > * > * @param packageName the given package name > * @param typeQualifiedName the given type qualified name >Index: model/org/eclipse/jdt/internal/core/NameLookup.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/NameLookup.java,v >retrieving revision 1.89 >diff -u -r1.89 NameLookup.java >--- model/org/eclipse/jdt/internal/core/NameLookup.java 22 Jun 2005 14:45:03 -0000 1.89 >+++ model/org/eclipse/jdt/internal/core/NameLookup.java 4 Aug 2005 11:54:59 -0000 >@@ -541,12 +541,12 @@ > SingleTypeRequestor typeRequestor = new SingleTypeRequestor(); > seekTypes(name, pkg, partialMatch, acceptFlags, typeRequestor); > IType type = typeRequestor.getType(); >-// if (type == null) >-// type = findSecondaryType(name, pkg, partialMatch, acceptFlags); >+ if (type == null) { >+ type = findSecondaryType(name, pkg, partialMatch, acceptFlags); >+ } > return type; > } > >- // TODO (kent) enable once index support is in > IType findSecondaryType(String typeName, IPackageFragment pkg, boolean partialMatch, final int acceptFlags) { > try { > final ArrayList paths = new ArrayList(); >@@ -582,7 +582,7 @@ > IJavaSearchConstants.TYPE, > SearchEngine.createJavaSearchScope(new IJavaElement[] {pkg}, false), > nameRequestor, >- IJavaSearchConstants.CANCEL_IF_NOT_READY_TO_SEARCH, >+ IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, > null); > > if (!paths.isEmpty()) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 36032
:
25662
|
25663
|
25676
|
25752
|
30620