Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsXtext editor in a component
https://www.eclipse.org/forums/index.php/mv/msg/205698/658343/#msg_658343
Xtext generates a very nice editor. Is it possible in any way to put that editor into a regular JFace/SWT component? This way the editor could be embedded in a view or a wizard.
Thanks,
Balint]]>Balint Torok2011-03-08T01:01:55-00:00Re: Xtext editor in a component
https://www.eclipse.org/forums/index.php/mv/msg/205698/658389/#msg_658389
Xtext editor in a Text widget, but it has not been extracted for easy
reuse yet.
Am 08.03.11 02:01, schrieb Balint Torok:
> Hello,
>
> Xtext generates a very nice editor. Is it possible in any way to put
> that editor into a regular JFace/SWT component? This way the editor
> could be embedded in a view or a wizard.
>
> Thanks,
> Balint
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com]]>Jan Koehnlein2011-03-08T09:33:43-00:00Re: Xtext editor in a component
https://www.eclipse.org/forums/index.php/mv/msg/205698/775682/#msg_775682
I'm really interested in doing that too.
Is there any chance of getting a tutorial or sample code for including an editor in a SWT component?
Cheers,
Tobi]]>Tobias Böhm2012-01-06T14:10:27-00:00Re: Xtext editor in a component
https://www.eclipse.org/forums/index.php/mv/msg/205698/776130/#msg_776130
check this http://code.google.com/a/eclipselabs.org/p/xtext-forms-integration/,
It's based on version 1.0, but I successfully use it in 2.0. It formed the base to embed xtext in various ways,
like in Dialog, forms etc... (See screenshot).
You will need to adapt a few things according to your needs, but I recall it wasn't too hard. (sorry this was 6 months ago).
I also saw, xtext 2.2 has embedded editor part of the release.
Cheers Christophe]]>Christophe Bouhier2012-01-07T15:26:08-00:00Re: Xtext editor in a component
https://www.eclipse.org/forums/index.php/mv/msg/205698/776251/#msg_776251
I was very exited when I read the release notes saying that 2.2 ships with an editor but unfortunately thats the only thing I actually found. I would really benefit from a tutorial but I can't find one.
And I always read that it is only possible to do form based Xtext editors. Can someone tell me why that is? Can't I have a simple editor of my dsl inside a IViewPart?
Thanks,
Tobi ]]>Tobias Böhm2012-01-08T00:20:23-00:00Re: Xtext editor in a component
https://www.eclipse.org/forums/index.php/mv/msg/205698/776385/#msg_776385
I can't comment on the 2.2 release and documentation, I am sure someone will blog about it eventually.
]]>Christophe Bouhier2012-01-08T08:14:22-00:00Re: Xtext editor in a component
https://www.eclipse.org/forums/index.php/mv/msg/205698/776444/#msg_776444
I will have a deeper look at the example on googlecode.
Can someone tell me if there is some documentation about the "Embedded editor" in the pipeline? (Or even already available somewhere)
Cheers,
Tobi
]]>Tobias Böhm2012-01-08T12:13:42-00:00Re: Xtext editor in a component
https://www.eclipse.org/forums/index.php/mv/msg/205698/776512/#msg_776512
documentation is in the pipeline.
Have a look at the EmbeddedEditorFactory (since 2.2)
@Override
protected SourceViewer createViewer(Composite parent) {
IEditedResourceProvider resourceProvider = new IEditedResourceProvider() {
.. anonymous class with createResource()
};
EmbeddedEditor handle =
embeddedEditorFactory.newEditor(resourceProvider).withParent(parent);
// access to the content of the editor
EmbeddedEditorModelAccess partialEditor = handle.createPartialEditor(true);
// keep the partialEditor as instance var to read / write the edited text
...
// return the source viewer
return handle.getViewer();
}
Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
Am 08.01.12 13:13, schrieb Tobias Böhm:
> Thanks again for that information. I must have misunderstood that part.
> I will have a deeper look at the example on googlecode.
>
> Can someone tell me if there is some documentation about the "Embedded
> editor" in the pipeline? (Or even already available somewhere)
>
> Cheers,
> Tobi
>]]>Sebastian Zarnekow2012-01-08T16:35:37-00:00Re: Xtext editor in a component
https://www.eclipse.org/forums/index.php/mv/msg/205698/781418/#msg_781418
]]>Marcel Bruch2012-01-21T07:03:27-00:00Re: Xtext editor in a component
https://www.eclipse.org/forums/index.php/mv/msg/205698/894548/#msg_894548
Thanks.]]>Maxime D2012-07-09T14:58:41-00:00Re: Xtext editor in a component
https://www.eclipse.org/forums/index.php/mv/msg/205698/894963/#msg_894963
> Any news for this documentation ?
>
> Thanks.
Unfortunately not. I'm afraid you'll have to stay tuned :-(
Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com]]>Sebastian Zarnekow2012-07-11T09:01:04-00:00Re: Xtext editor in a component
https://www.eclipse.org/forums/index.php/mv/msg/205698/894968/#msg_894968
By the way, I tried to implement what you write above, but I got a warning using the EmbeddedEditorFactory object.
It seems pretty bad, it says :
Discouraged access: The type EmbeddedEditorFactory is not accessible due to restriction on required library D:\eclipse\plugins\org.eclipse.xtext.ui_2.3.0.v201206120633.jar
]]>Maxime D2012-07-11T09:27:59-00:00Re: Xtext editor in a component
https://www.eclipse.org/forums/index.php/mv/msg/205698/894989/#msg_894989
of OSGi. That's where the warning comes from. However, it's pretty safe
to use it and suppress the warning.
Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
Am 11.07.12 11:28, schrieb Maxime D:
> Thanks for your response Sebastian.
>
> By the way, I tried to implement what you write above, but I got a
> warning using the EmbeddedEditorFactory object.
> It seems pretty bad, it says :
> Discouraged access: The type EmbeddedEditorFactory is not accessible due
> to restriction on required library
> D:\eclipse\plugins\org.eclipse.xtext.ui_2.3.0.v201206120633.jar]]>Sebastian Zarnekow2012-07-11T10:53:03-00:00Re: Xtext editor in a component
https://www.eclipse.org/forums/index.php/mv/msg/205698/1248432/#msg_1248432
I have installed Xtext 2.5.2.
org.eclipse.xtext.ui.editor.embedded package is still internal and I get the warnings about discouraged access.
EmbeddedEditor has been recommended several times in this forum.
Can we use it without the danger that it's api gets changed or deleted?
Thanks you.
Marcus
]]>Marcus Höpfner2014-02-17T08:51:46-00:00Re: Xtext editor in a component
https://www.eclipse.org/forums/index.php/mv/msg/205698/1248934/#msg_1248934
Christian Dietrich2014-02-17T20:23:44-00:00