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 147364 Details for
Bug 288621
[1.5][compiler] Creating type hierarchy failed when pressing F4
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed patch
patch.txt (text/plain), 3.95 KB, created by
Kent Johnson
on 2009-09-16 14:50:02 EDT
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Kent Johnson
Created:
2009-09-16 14:50:02 EDT
Size:
3.95 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java,v >retrieving revision 1.103 >diff -u -r1.103 LookupEnvironment.java >--- compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java 31 Jul 2009 17:32:45 -0000 1.103 >+++ compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java 16 Sep 2009 18:51:41 -0000 >@@ -256,6 +256,39 @@ > parsedUnit.scope.buildFieldsAndMethods(); > this.unitBeingCompleted = null; > } >+ >+/* >+* Used by other compiler tools which do not start by calling completeTypeBindings() >+* and have more than 1 unit to complete. >+* >+* 1. Connect the type hierarchy for the type bindings created for parsedUnits. >+* 2. Create the field bindings >+* 3. Create the method bindings >+*/ >+public void completeTypeBindings(CompilationUnitDeclaration[] parsedUnits, boolean[] buildFieldsAndMethods, int unitCount) { >+ for (int i = 0; i < unitCount; i++) { >+ CompilationUnitDeclaration parsedUnit = parsedUnits[i]; >+ if (parsedUnit.scope != null) >+ (this.unitBeingCompleted = parsedUnit).scope.checkAndSetImports(); >+ } >+ >+ for (int i = 0; i < unitCount; i++) { >+ CompilationUnitDeclaration parsedUnit = parsedUnits[i]; >+ if (parsedUnit.scope != null) >+ (this.unitBeingCompleted = parsedUnit).scope.connectTypeHierarchy(); >+ } >+ >+ for (int i = 0; i < unitCount; i++) { >+ CompilationUnitDeclaration parsedUnit = parsedUnits[i]; >+ if (parsedUnit.scope != null) { >+ (this.unitBeingCompleted = parsedUnit).scope.checkParameterizedTypes(); >+ if (buildFieldsAndMethods[i]) >+ parsedUnit.scope.buildFieldsAndMethods(); >+ } >+ } >+ >+ this.unitBeingCompleted = null; >+} > public MethodBinding computeArrayClone(MethodBinding objectClone) { > if (this.arrayClone == null) { > this.arrayClone = new MethodBinding( >Index: model/org/eclipse/jdt/internal/core/hierarchy/HierarchyResolver.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/hierarchy/HierarchyResolver.java,v >retrieving revision 1.90 >diff -u -r1.90 HierarchyResolver.java >--- model/org/eclipse/jdt/internal/core/hierarchy/HierarchyResolver.java 17 Aug 2009 18:56:17 -0000 1.90 >+++ model/org/eclipse/jdt/internal/core/hierarchy/HierarchyResolver.java 16 Sep 2009 18:51:41 -0000 >@@ -756,21 +756,23 @@ > CompilationUnitDeclaration parsedUnit = parsedUnits[i]; > if (parsedUnit != null) { > try { >- boolean containsLocalType = hasLocalType[i]; >- if (containsLocalType) { // NB: no-op if method bodies have been already parsed >+ if (hasLocalType[i]) // NB: no-op if method bodies have been already parsed > parser.getMethodBodies(parsedUnit); >- } >- // complete type bindings and build fields and methods only for local types >- // (in this case the constructor is needed when resolving local types) >- // (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=145333) >- this.lookupEnvironment.completeTypeBindings(parsedUnit, containsLocalType); > } catch (AbortCompilation e) { > // classpath problem for this type: don't try to resolve (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=49809) > hasLocalType[i] = false; > } > } >- worked(monitor, 1); > } >+ // complete type bindings and build fields and methods only for local types >+ // (in this case the constructor is needed when resolving local types) >+ // (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=145333) >+ try { >+ this.lookupEnvironment.completeTypeBindings(parsedUnits, hasLocalType, unitsIndex); >+ } catch (AbortCompilation e) { >+ // skip it silently >+ } >+ worked(monitor, 1); > > // remember type bindings > for (int i = 0; i < unitsIndex; i++) {
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 288621
:
146488
| 147364