// Need the class to get its full name
ppFinder.configure(model.eResource());
List<IEObjectDescription> descs = ppFinder.findHostClasses(resourceBody, className, null).getAdjusted();
if(descs.size() < 1)
return; // can't find class, no proposals
IEObjectDescription desc = descs.get(0); // pick first if ambiguous
// which attribute(s) are we trying to find.
String prefix = context.getPrefix();
QualifiedName fqn = desc.getQualifiedName().append(prefix);
for(IEObjectDescription d : ppFinder.findAttributesWithPrefix(resourceBody, fqn).getAdjusted())
acceptor.accept(createCompletionProposal(d.getName().getLastSegment(), context));
}
else if(resourceType == RESOURCE_IS_OVERRIDE) {
// do nothing (too complicated due to the query being able to match all sorts of things)
}
else {
// Normal Resource
ppFinder.configure(model.eResource());
// Either a default setting Type { } or instance type { }, in both cases propose all properties and parameters
// including meta
IEObjectDescription desc = (IEObjectDescription) adapter.getTargetObjectDescription();
if(desc != null) {
// the type is known
// which attribute(s) are we trying to find.
String prefix = context.getPrefix();
QualifiedName fqn = desc.getQualifiedName().append(prefix);
for(IEObjectDescription d : ppFinder.findAttributesWithPrefix(resourceBody, fqn).getAdjusted())
acceptor.accept(createCompletionProposal(d.getName().getLastSegment(), context));
}