Access parent object in ProposalProvider even if parent is broken reference [message #1801515] |
Mon, 21 January 2019 09:40  |
Eclipse User |
|
|
|
Hi all,
I would like to implement a ProposalProvider to show object specific content assist.
My DSL objects looks like this:
StepCall :
'call' stepname=[Step]
'{'
steps+=(Params | Membercalls)*
'}'
;
Step:
'step' name=ValidID
;
In the editor I wanted to build something like
step myStep {
//get Content assist - specific members
}
Therefore I want to implement a DSLProposalProvider and there the method
override completeStepcall_Steps(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
}
As the name of myStep points to Excel files I wanted to read specific content from those Excel files and show it.
So the content assistant should show different content for "step myStep" and "step secondStep".
I need to get the value of "step", e.g. "myStep", in the method "completeStepcall_Steps" to show the specifics steps for the "step" object.
But, if I use [] to build the reference in my xtext file, I don't get the text in the ProposalProvider.
If I don't use [Step] , so just Step, then I get the name in the method of the ProposalProvider, but then my DiagnosticLinkProvider to check the existence of the links to the Excel file isn't called.
So, how to get the value of that node in the content assist without taking care about a broken link?
I know there is an alternative approach using a ResourceServiceProvider, but I didn't get how to implement this, so I would like to keep that simple approach.
Thanks in advance!
|
|
|
|
Powered by
FUDForum. Page generated in 0.03632 seconds