Lines 68-75
Link Here
|
68 |
case IJavaElement.JAVA_MODEL: |
68 |
case IJavaElement.JAVA_MODEL: |
69 |
return this.modelInfo; |
69 |
return this.modelInfo; |
70 |
case IJavaElement.JAVA_PROJECT: |
70 |
case IJavaElement.JAVA_PROJECT: |
71 |
case IJavaElement.PACKAGE_FRAGMENT_ROOT: |
|
|
72 |
return this.projectAndRootCache.get(element); |
71 |
return this.projectAndRootCache.get(element); |
|
|
72 |
case IJavaElement.PACKAGE_FRAGMENT_ROOT: |
73 |
return this.projectAndRootCache.get(element.getPath()); |
73 |
case IJavaElement.PACKAGE_FRAGMENT: |
74 |
case IJavaElement.PACKAGE_FRAGMENT: |
74 |
return this.pkgCache.get(element); |
75 |
return this.pkgCache.get(element); |
75 |
case IJavaElement.COMPILATION_UNIT: |
76 |
case IJavaElement.COMPILATION_UNIT: |
Lines 89-96
Link Here
|
89 |
case IJavaElement.JAVA_MODEL: |
90 |
case IJavaElement.JAVA_MODEL: |
90 |
return this.modelInfo; |
91 |
return this.modelInfo; |
91 |
case IJavaElement.JAVA_PROJECT: |
92 |
case IJavaElement.JAVA_PROJECT: |
92 |
case IJavaElement.PACKAGE_FRAGMENT_ROOT: |
|
|
93 |
return this.projectAndRootCache.get(element); |
93 |
return this.projectAndRootCache.get(element); |
|
|
94 |
case IJavaElement.PACKAGE_FRAGMENT_ROOT: |
95 |
return this.projectAndRootCache.get(element.getPath()); |
94 |
case IJavaElement.PACKAGE_FRAGMENT: |
96 |
case IJavaElement.PACKAGE_FRAGMENT: |
95 |
return this.pkgCache.get(element); |
97 |
return this.pkgCache.get(element); |
96 |
case IJavaElement.COMPILATION_UNIT: |
98 |
case IJavaElement.COMPILATION_UNIT: |
Lines 110-118
Link Here
|
110 |
this.modelInfo = (JavaModelInfo) info; |
112 |
this.modelInfo = (JavaModelInfo) info; |
111 |
break; |
113 |
break; |
112 |
case IJavaElement.JAVA_PROJECT: |
114 |
case IJavaElement.JAVA_PROJECT: |
113 |
case IJavaElement.PACKAGE_FRAGMENT_ROOT: |
|
|
114 |
this.projectAndRootCache.put(element, info); |
115 |
this.projectAndRootCache.put(element, info); |
115 |
break; |
116 |
break; |
|
|
117 |
case IJavaElement.PACKAGE_FRAGMENT_ROOT: |
118 |
this.projectAndRootCache.put(element.getPath(), info); |
119 |
break; |
116 |
case IJavaElement.PACKAGE_FRAGMENT: |
120 |
case IJavaElement.PACKAGE_FRAGMENT: |
117 |
this.pkgCache.put(element, info); |
121 |
this.pkgCache.put(element, info); |
118 |
break; |
122 |
break; |
Lines 133-140
Link Here
|
133 |
this.modelInfo = null; |
137 |
this.modelInfo = null; |
134 |
break; |
138 |
break; |
135 |
case IJavaElement.JAVA_PROJECT: |
139 |
case IJavaElement.JAVA_PROJECT: |
136 |
case IJavaElement.PACKAGE_FRAGMENT_ROOT: |
|
|
137 |
this.projectAndRootCache.remove(element); |
140 |
this.projectAndRootCache.remove(element); |
|
|
141 |
break; |
142 |
case IJavaElement.PACKAGE_FRAGMENT_ROOT: |
143 |
this.projectAndRootCache.remove(element.getPath()); |
138 |
break; |
144 |
break; |
139 |
case IJavaElement.PACKAGE_FRAGMENT: |
145 |
case IJavaElement.PACKAGE_FRAGMENT: |
140 |
this.pkgCache.remove(element); |
146 |
this.pkgCache.remove(element); |