|
|
|
|
|
|
|
Re: Filter JvmType content assist for inferred type from specific source type from the dsl [message #1072922 is a reply to message #1072911] |
Tue, 23 July 2013 19:26 |
|
maybe something like
@Inject
private ReferenceProposalCreator crossReferenceProposalCreator;
@Override
public void completeJvmParameterizedTypeReference_Type(EObject model, Assignment assignment,
ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
System.out.println(model);
if (model instanceof Entity) {
System.out.println("lulu");
EReference eref = EcoreFactory.eINSTANCE.createEReference();
eref.setEType(DomainmodelPackage.Literals.ENTITY);
crossReferenceProposalCreator.lookupCrossReference(model, eref, acceptor, Predicates.<IEObjectDescription> alwaysTrue(), getProposalFactory("QualifiedName", context));
} else {
super.completeJvmParameterizedTypeReference_Type(model, assignment, context, acceptor);
}
}
can help
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
|
|
|
|
|
Re: Filter JvmType content assist for inferred type from specific source type from the dsl [message #1072973 is a reply to message #1072925] |
Tue, 23 July 2013 21:23 |
Victor Noël Messages: 112 Registered: June 2010 |
Senior Member |
|
|
Ok, so, your solution works quite well actually, I thought I would need to do more changes to it, but since the qualified names of the source element and of the jvm element are the same, it works out of the box, I just need a validation rule.
Concerning imports, as you say, I don't get them automatically when completing, but organize import works as it should
That's not so bad for now for me, thank you!
|
|
|
Powered by
FUDForum. Page generated in 0.05163 seconds