Skip to main content



      Home
Home » Modeling » TMF (Xtext) » Integrate Xtext editor in a multipageEditor
Integrate Xtext editor in a multipageEditor [message #685909] Mon, 20 June 2011 12:57 Go to next message
Eclipse UserFriend
Hi,

Actually,im facing a problem integrating teh editor Xtext in an other mutipage editor,

		 void createXtextEditor()  {
			 // Create diagram viewer page
			 IEditorSite editorSite = diagramEditor.getEditorSite();
			 try {
				 xtextInjector = new SourceDslStandaloneSetupGenerated().createInjectorAndDoEMFRegistration();
				 xtextEditor = xtextInjector.getInstance(XtextEditor.class);
				xtextEditor.init(editorSite, getEditorInput());
	
			  int pageIndex = addPage(diagramEditor, getEditorInput());
			   setPageText(pageIndex, "Diagram");
				} catch (PartInitException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
		}

but i get the following exception :
Quote:

com.google.inject.ConfigurationException: Guice configuration errors:

1) No implementation for org.eclipse.xtext.ui.editor.syntaxcoloring.IHighlightingHelper was bound.
while locating org.eclipse.xtext.ui.editor.syntaxcoloring.IHighlightingHelper
for field at org.eclipse.xtext.ui.editor.XtextEditor.highlightingHelper(XtextEditor.java:83)
while locating org.eclipse.xtext.ui.editor.XtextEditor

2) No implementation for org.eclipse.xtext.ui.editor.contentassist.IContentAssistantFactory was bound.
while locating org.eclipse.xtext.ui.editor.contentassist.IContentAssistantFactory
for field at org.eclipse.xtext.ui.editor.XtextSourceViewerConfiguration.contentAssistantFactory(XtextSourceViewerConfiguration.java:42)
while locating org.eclipse.xtext.ui.editor.XtextSourceViewerConfiguration
for field at org.eclipse.xtext.ui.editor.XtextEditor.sourceViewerConfiguration(XtextEditor.java:83)
while locating org.eclipse.xtext.ui.editor.XtextEditor

3) No implementation for org.eclipse.jface.text.hyperlink.IHyperlinkDetector was bound.
while locating org.eclipse.jface.text.hyperlink.IHyperlinkDetector
for field at org.eclipse.xtext.ui.editor.XtextSourceViewerConfiguration.detector(XtextSourceViewerConfiguration.java:42)
while locating org.eclipse.xtext.ui.editor.XtextSourceViewerConfiguration
for field at org.eclipse.xtext.ui.editor.XtextEditor.sourceViewerConfiguration(XtextEditor.java:83)
while locating org.eclipse.xtext.ui.editor.XtextEditor

4) No implementation for org.eclipse.jface.text.reconciler.IReconciler was bound.
while locating com.google.inject.Provider<org.eclipse.jface.text.reconciler.IReconciler>
for field at org.eclipse.xtext.ui.editor.XtextSourceViewerConfiguration.reconcilerProvider(XtextSourceViewerConfiguration.java:42)
while locating org.eclipse.xtext.ui.editor.XtextSourceViewerConfiguration
for field at org.eclipse.xtext.ui.editor.XtextEditor.sourceViewerConfiguration(XtextEditor.java:83)
while locating org.eclipse.xtext.ui.editor.XtextEditor

5) No implementation for org.eclipse.xtext.formatting.IIndentationInformation was bound.
while locating org.eclipse.xtext.formatting.IIndentationInformation
for field at org.eclipse.xtext.ui.editor.autoedit.MultiLineTerminalsEditStrategy.indentationInformation(MultiLineTerminalsEditStrategy.java:23)
while locating com.google.inject.Provider<org.eclipse.xtext.ui.editor.autoedit.MultiLineTerminalsEditStrategy>
for parameter 2 at org.eclipse.xtext.ui.editor.autoedit.DefaultAutoEditStrategy.initialize(DefaultAutoEditStrategy.java:59)
at org.eclipse.xtext.ui.editor.autoedit.DefaultAutoEditStrategy.initialize(DefaultAutoEditStrategy.java:59)
while locating org.eclipse.xtext.ui.editor.autoedit.DefaultAutoEditStrategy
for field at org.eclipse.xtext.ui.editor.XtextSourceViewerConfiguration.defaultEditStrategy(XtextSourceViewerConfiguration.java:42)
while locating org.eclipse.xtext.ui.editor.XtextSourceViewerConfiguration
for field at org.eclipse.xtext.ui.editor.XtextEditor.sourceViewerConfiguration(XtextEditor.java:83)
while locating org.eclipse.xtext.ui.editor.XtextEditor

6) No implementation for org.eclipse.xtext.ui.editor.quickfix.IssueResolutionProvider was bound.
while locating org.eclipse.xtext.ui.editor.quickfix.IssueResolutionProvider
for field at org.eclipse.xtext.ui.editor.model.XtextDocumentProvider.issueResolutionProvider(XtextDocumentProvider.java:1)
while locating com.google.inject.Provider<org.eclipse.xtext.ui.editor.model.XtextDocumentProvider>
for field at org.eclipse.xtext.ui.editor.XtextEditor.documentProvider(XtextEditor.java:83)
while locating org.eclipse.xtext.ui.editor.XtextEditor

7) No implementation for org.eclipse.xtext.ui.editor.model.IResourceForEditorInputFactory was bound.
while locating org.eclipse.xtext.ui.editor.model.IResourceForEditorInputFactory
for field at org.eclipse.xtext.ui.editor.model.XtextDocumentProvider.resourceForEditorInputFactory(XtextDocumentProvider.java:199)
while locating com.google.inject.Provider<org.eclipse.xtext.ui.editor.model.XtextDocumentProvider>
for field at org.eclipse.xtext.ui.editor.XtextEditor.documentProvider(XtextEditor.java:83)
while locating org.eclipse.xtext.ui.editor.XtextEditor

Cool No implementation for org.eclipse.xtext.ui.resource.IStorage2UriMapper was bound.
while locating org.eclipse.xtext.ui.resource.IStorage2UriMapper
for field at org.eclipse.xtext.ui.editor.model.XtextDocumentProvider.storage2UriMapper(XtextDocumentProvider.java:1)
while locating com.google.inject.Provider<org.eclipse.xtext.ui.editor.model.XtextDocumentProvider>
for field at org.eclipse.xtext.ui.editor.XtextEditor.documentProvider(XtextEditor.java:83)
while locating org.eclipse.xtext.ui.editor.XtextEditor

9) No implementation for org.eclipse.xtext.ui.editor.quickfix.IssueResolutionProvider was bound.
while locating org.eclipse.xtext.ui.editor.quickfix.IssueResolutionProvider
for field at org.eclipse.xtext.ui.editor.quickfix.AbstractIssueResolutionProviderAdapter.resolutionProvider(AbstractIssueResolutionProviderAdapter.java:23)
while locating org.eclipse.xtext.ui.editor.quickfix.XtextQuickAssistProcessor
for parameter 0 at org.eclipse.xtext.ui.editor.quickfix.XtextQuickAssistAssistant.<init>(XtextQuickAssistAssistant.java:37)
while locating com.google.inject.Provider<org.eclipse.xtext.ui.editor.quickfix.XtextQuickAssistAssistant>
for field at org.eclipse.xtext.ui.editor.XtextSourceViewerConfiguration.quickAssistAssistentProvider(XtextSourceViewerConfiguration.java:42)
while locating org.eclipse.xtext.ui.editor.XtextSourceViewerConfiguration
for field at org.eclipse.xtext.ui.editor.XtextEditor.sourceViewerConfiguration(XtextEditor.java:83)
while locating org.eclipse.xtext.ui.editor.XtextEditor


Any ideas?
Thanks
Re: Integrate Xtext editor in a multipageEditor [message #685927 is a reply to message #685909] Mon, 20 June 2011 15:28 Go to previous messageGo to next message
Eclipse UserFriend
hi, just 2 hints

first you should never call the standalone setup from the eclipse application. it has its name of reason.
second you should use the injector from the ui plugin to get the ui stuff bound too.

=> Find the Editor browing the extension point or use the Activator of your dsl to get the editor or use yourdslsexecutableextensionfactory to inject something to your editor class.

e.g. something like http://dev.eclipse.org/viewcvs/viewvc.cgi/org.eclipse.tmf/org.eclipse.xtext/tests/org.eclipse.xtext.ui.tests/src/org/eclipse/xtext/ui/tests/editor/mpe/MultiPageEditor.java?root=Modeling_Project&view=co

~Christian

[Updated on: Mon, 20 June 2011 15:48] by Moderator

Re: Integrate Xtext editor in a multipageEditor [message #685996 is a reply to message #685927] Tue, 21 June 2011 06:36 Go to previous message
Eclipse UserFriend
Hi Christian,

I used the activator of my dsl and its working fine.
Thanks for your help
Previous Topic:xbase2 - overloading 'this' operator
Next Topic:data type rule - list
Goto Forum:
  


Current Time: Tue Jul 01 00:55:57 EDT 2025

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

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

Back to the top