private List<IEObjectDescription> exportedPatternVariables;
private void buildExportedObjectsIndex(IResourceDescription descr, IResourceDescriptions descriptionIndex) {
// The current (possibly dirty) exported resources
IResourceDescription dirty = resourceServiceProvider.getResourceDescriptionManager().getResourceDescription(
resource);
String pathToCurrent = resource.getURI().path();
Multimap<String, IEObjectDescription> map = ArrayListMultimap.create();
List<IEObjectDescription> patternedVariables = Lists.newArrayList();
// add all (possibly dirty in global index)
// check for empty qualified names which may be present in case of syntax errors / while editing etc.
// empty names are simply skipped (they can not be found anyway).
//
for(IEObjectDescription d : dirty.getExportedObjects())
if(d.getQualifiedName().getSegmentCount() >= 1)
map.put(d.getQualifiedName().getLastSegment(), d);
// add all from global index, except those for current resource
for(IEObjectDescription d : getExportedObjects(descr, descriptionIndex))
if(!d.getEObjectURI().path().equals(pathToCurrent) && d.getQualifiedName().getSegmentCount() >= 1) {