Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Integrate content assistance in properties view of GMF editor (XtextSourceViewer)
Integrate content assistance in properties view of GMF editor (XtextSourceViewer) [message #529242] Fri, 23 April 2010 14:37 Go to next message
matt is currently offline mattFriend
Messages: 2
Registered: July 2009
Junior Member
Hi

I managed to integrate the Xtext parser and serializer for my DSL into an XtextSourceViewer I use within the Properties view of my GMF editor. My attempts to integrate content assistance failed so far:

org.eclipse.xtext.common.TerminalsStandaloneSetup.doSetup();
Injector injector = Guice.createInjector(new MyDslUiModule());

XtextSourceViewerConfiguration config = new XtextSourceViewerConfiguration();
injector.injectMembers(config);

XtextSourceViewer sourceViewer = new XtextSourceViewer(...);
sourceViewer.configure(conf);


Guice.createInjector(new MyDslUiModule()) produces a com.google.inject.CreationException:
Guice configuration errors:
org.eclipse.xtext.ui.common.editor.templates.XtextTemplateSt ore. <init>(XtextTemplateStore.java:41):
Binding to org.eclipse.jface.preference.IPreferenceStore not found. No bindings to that type were found.


Does anybody have an idea how to integrate Xtext content assistance in (Xtext)SourceViewers?


Thanks in advance and best regards,
Matt
Re: Integrate content assistance in properties view of GMF editor (XtextSourceViewer) [message #529257 is a reply to message #529242] Fri, 23 April 2010 15:38 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
Hi Matt,

you should never call the standalone setup in an OSGI environment.
That's why it's called StandaloneSetup. The setup is likely to corrupt
your EPackage.Registry.eINSTANCE and many other EMF singletons that are
initialized from extension points.
Use Activator.getInjector(languageName) instead.

Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com

Am 23.04.10 16:37, schrieb matt:
> Hi
>
> I managed to integrate the Xtext parser and serializer for my DSL into
> an XtextSourceViewer I use within the Properties view of my GMF editor.
> My attempts to integrate content assistance failed so far:
>
> org.eclipse.xtext.common.TerminalsStandaloneSetup.doSetup();
> Injector injector = Guice.createInjector(new MyDslUiModule());
>
> XtextSourceViewerConfiguration config = new
> XtextSourceViewerConfiguration();
> injector.injectMembers(config);
>
> XtextSourceViewer sourceViewer = new XtextSourceViewer(...);
> sourceViewer.configure(conf);
>
>
> Guice.createInjector(new MyDslUiModule()) produces a
> com.google.inject.CreationException:
> Guice configuration errors:
> org.eclipse.xtext.ui.common.editor.templates.XtextTemplateSt ore.
> <init>(XtextTemplateStore.java:41):
> Binding to org.eclipse.jface.preference.IPreferenceStore not found. No
> bindings to that type were found.
>
>
> Does anybody have an idea how to integrate Xtext content assistance in
> (Xtext)SourceViewers?
>
>
> Thanks in advance and best regards,
> Matt
Re: Integrate content assistance in properties view of GMF editor (XtextSourceViewer) [message #530141 is a reply to message #529257] Wed, 28 April 2010 16:00 Go to previous messageGo to next message
matt is currently offline mattFriend
Messages: 2
Registered: July 2009
Junior Member
Thanks for your help. I got it up running.
Re: Integrate content assistance in properties view of GMF editor (XtextSourceViewer) [message #985908 is a reply to message #529242] Fri, 16 November 2012 16:02 Go to previous message
Gideon Weber is currently offline Gideon WeberFriend
Messages: 26
Registered: May 2012
Junior Member
Hi,

i'm currently trying to integrate xtext in my properties view too, but i don't know how. could you please provide me with some imformation where to start and what to do?

regards,
gideon
Previous Topic:EclipseCon Boston - Submission Deadline is Monday!
Next Topic:importing native java source code
Goto Forum:
  


Current Time: Fri Apr 19 20:34:28 GMT 2024

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

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

Back to the top