Home » Eclipse Projects » Eclipse Platform » Embedding an editor in a view
Embedding an editor in a view [message #1385148] |
Wed, 04 June 2014 15:24 |
Dwight Naylor Messages: 23 Registered: June 2012 |
Junior Member |
|
|
Hi There,
I don't think I've been able to find a viable answer for this question, but let me know if I'm re-inventing the wheel (or if I'm just in the wrong section!)
I'm currently developing a plugin. I'm using Xtext to do some parsing, auto-complete, and error-checking to some code the user can enter, but I want the xtext editor to be embedded within its own view, without being linked to a file, but with all the built-in features of the editor:
What I have:
Where I want it:
The last trace of accomplishment I can find on this frontier is this post from 2005:
http://www.eclipse.org/forums/index.php/t/92893/
Unfortunately, all of the classes he uses have since been removed.
There are (somewhat) similar posts here, without resolutions though:
https://www.eclipse.org/forums/index.php/m/304012/?srch=embed#msg_304012
https://www.eclipse.org/forums/index.php/m/289605/?srch=embed#msg_289605
I've gotten as far as accessing the editor I want; within my views' createPartControl method I have an instance of an xtextEditor created, but I don't know how to put it into the view.
Could anybody give me pointers on where to start doing this now? Any help is greatly appreciated.
Thanks,
-Dwight Naylor
[Updated on: Wed, 04 June 2014 15:36] Report message to a moderator
|
|
|
Re: Embedding an editor in a view [message #1385157 is a reply to message #1385148] |
Wed, 04 June 2014 16:06 |
Felix Dorner Messages: 295 Registered: March 2012 |
Senior Member |
|
|
On 04/06/2014 17:24, Dwight Naylor wrote:
> Hi There,
>
> I don't think I've been able to find a viable answer for this question, but let me know if I'm re-inventing the wheel (or just in the wrong section!)
>
> I'm currently developing a plugin. I'm using Xtext to do some parsing, auto-complete, and error-checking to some code the user can enter, but I want the xtext editor to be embedded within its own view, without being linked to a file, but with all the built-in features of the editor:
> What I have:
>
>
> Where I want it:
>
>
> The last trace of accomplishment I can find on this frontier is this post from 2005:
> http://www.eclipse.org/forums/index.php/t/92893/
> Unfortunately, all of the classes he uses have since been removed.
>
> There are (somewhat) similar posts here, without resolutions though:
> https://www.eclipse.org/forums/index.php/m/304012/?srch=embed#msg_304012
> https://www.eclipse.org/forums/index.php/m/289605/?srch=embed#msg_289605
>
> I've gotten as far as accessing the editor I want; within my views' createPartControl method I have an instance of an xtextEditor created, but I don't know how to put it into the view.
>
> Could anybody give me pointers on where to start doing this now? Any help is greatly appreciated.
Better ask Xtext questions on the TMF newsgroup next time.
You can look at how it's done in OCL, they have an EmbeddedXtextEditor,
no files involved.
here, for example:
https://eclipse.googlesource.com/ocl/org.eclipse.ocl/+/master/examples/org.eclipse.ocl.examples.xtext.console/src/org/eclipse/ocl/examples/xtext/console/xtfo/EmbeddedXtextEditor.java
Felix
|
|
| |
Goto Forum:
Current Time: Fri Apr 26 12:20:16 GMT 2024
Powered by FUDForum. Page generated in 0.03242 seconds
|