[xtext] question on scoping / content assist [message #718555] |
Wed, 24 August 2011 12:47  |
Eclipse User |
|
|
|
hi all
first a snippet of my grammar...
BehaviorNodeRule:
(component = [uml::Component] | componentLiteral = STRING)
node = Node
("/" relation += Relation)*
;
Node:
...
;
Relation:
...
;
...and of the corresponding method within the scope provider...
// returns a scope that contains all components contained in the model
public IScope scope_BehaviorNodeRule_component(BehaviorNodeRule bnr, EReference ref){
return scopeWithAllComponents();
}
i created an editor from that grammar (for use within papyrus), and while the editor is working fine, the content assist is not really doing what i expected it to do. i guess it has something to do with either the scope provider or the way the grammar is constructed.
the problem i have is that, if you open the editor and "Ctrl+SPACE" without any input, only "componentLiteral - STRING" is shown as an option, but no components (the scoping method is not called).
i first have to type at least one letter that matches an existing component in order to trigger a call to the scoping method when i open the content assist.
so what i'm looking for is a way to 'force' the content assist to show all possibilities right from the start.
i guess there's an easy solution to this, so it would be very appreciated if someone could point me the way.
cheers
marco
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.13942 seconds