Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » UI Content Assist Issue(Problem with Methods in Content Assist)
UI Content Assist Issue [message #1779586] Wed, 10 January 2018 00:29 Go to next message
Amit Yadav is currently offline Amit YadavFriend
Messages: 28
Registered: June 2017
Junior Member
Hello,

I am using XBlockExpression in my DSL. I have a strange problem in by UI (I developed an Idea Plugin).

e.g
val String result = new String("abcd");
result.

when I type '.' after result the content assist menu pops up but it only shows a few options such as ''as", "do", "if" , "for", "instanceof" etc...

However, none of the methods which can be called on that object or members of that object are visible.

My question is which component are responsible for adding methods and member to the content assist menu? Is it something scoping and indexing should automagically take care ?

Thank You,

Amit
Re: UI Content Assist Issue [message #1779666 is a reply to message #1779586] Thu, 11 January 2018 02:26 Go to previous messageGo to next message
Amit Yadav is currently offline Amit YadavFriend
Messages: 28
Registered: June 2017
Junior Member
More Information:

The DSL:

grammar org.xtext.example.mydsl.MyDsl with org.eclipse.xtext.xbase.Xbase

generate myDsl "http://www.xtext.org/example/mydsl/MyDsl"

Model:
package=PackageDeclaration
importSection=XImportSection?
greetings+=Greeting*;

PackageDeclaration:
"package" name=QualifiedName ';' ;

Greeting:
'Hello' name=ID body=XBlockExpression ';' ;



Sample application of the DSL:

import io.netty.util.AttributeMap
import io.netty.util.DefaultAttributeMap

Hello First {
val AttributeMap map = new DefaultAttributeMap();
map.
};

Hello Second {

};

https://imgur.com/a/wBKFM
Re: UI Content Assist Issue [message #1779677 is a reply to message #1779666] Thu, 11 January 2018 05:49 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
do you use lsp or the old impl?
usually its both the Scoping (which should work automatically in xbase if you do the inferrer right) and the proposal provider
(XbaseIdeContentProposalProvider in lsp and XbaseCompletionContributor in idea interation)
are you sure you have added yourdsl (and maybe java) facets to your sample project.

unfortuantely i dont know anything about the old idea integration to give you any further hints.
i dont even know if this works at all or ever did


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:@Traced generate method returning string instead of a IGeneratorNode
Next Topic:Test Suite for xtest unit tests
Goto Forum:
  


Current Time: Thu Apr 25 11:23:50 GMT 2024

Powered by FUDForum. Page generated in 0.02942 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top