Skip to main content



      Home
Home » Modeling » TMF (Xtext) » import of namespace in Xtext editor(import of namespace in Xtext editor)
icon5.gif  import of namespace in Xtext editor [message #1647406] Tue, 03 March 2015 07:07 Go to next message
Eclipse UserFriend
Hi All,

I have a grammar in which I have "import of namespace" concept.
Similar to java i.e. writing import statements at the top.

As we have seen in java, the import statements will be automatically added when we try to access some class etc.

Can we do the same in xtext ?

I mean to say: when I refer to an EObject , the import statement for its namespace should be automatically added.


Thanks for any help! Smile
Re: import of namespace in Xtext editor [message #1647459 is a reply to message #1647406] Tue, 03 March 2015 07:43 Go to previous message
Eclipse UserFriend
Have a look how Xbase/Xtend is doing this.
- org.eclipse.xtext.common.types.xtext.ui.JdtTypesProposalProvider.createTypeProposal(String, int, boolean, ICompletionProposalFactory, ContentAssistContext, ICompletionProposalAcceptor, IJvmTypeProvider, IValueConverter<String>)
- org.eclipse.xtext.xbase.ui.contentassist.ImportingTypesProposalProvider$FQNImporter
- org.eclipse.xtext.xbase.ui.contentassist.ImportingTypesProposalProvider.createTextApplier(ContentAssistContext, IScope, IQualifiedNameConverter, IValueConverter<String>)

[Updated on: Tue, 03 March 2015 07:56] by Moderator

Previous Topic:Xbase: Add own EMF-classes to the model
Next Topic:Supporting unquoted string with spaces
Goto Forum:
  


Current Time: Wed Jul 02 18:20:19 EDT 2025

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

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

Back to the top