Commit 10e1c82
committed
Use IQualifiedNameProvider if possible
If possible, do not look for the qualified names in the resource
descriptor, asking the IQualifiedNameProvider for the values is much
faster, as the lookup involve very expensive operations (specially the
second one):
- Create a collection with all the resource descriptions of the
referenced resource (only first lookup).
- Iterate through the list every time and compare the fragments.
Asking the IQualifiedNameProvider has the extra advantage that it can
return a name even the target object has not yet been exported, this
happens in the second phase when:
- a resource is loaded on demand
- liking to an inferred object which was not inferred in the pre-linking
phase is done.
- the resource loaded on demand has not yet been processed in the second
phase
under this circumstances the
IResourceDescriptions.getExportedObjectsByObject will not find the
element we have linked right before.1 parent fc7b271 commit 10e1c82
File tree
1 file changed
+17
-6
lines changed- com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/linking
1 file changed
+17
-6
lines changedLines changed: 17 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| 24 | + | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
| |||
82 | 84 | | |
83 | 85 | | |
84 | 86 | | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
91 | 93 | | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
92 | 103 | | |
93 | 104 | | |
94 | 105 | | |
| |||
0 commit comments