Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
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 Go to next message
Dwight Naylor is currently offline Dwight NaylorFriend
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:
index.php/fa/18209/0/

Where I want it:
index.php/fa/18210/0/

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 Go to previous messageGo to next message
Felix Dorner is currently offline Felix DornerFriend
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
Re: Embedding an editor in a view [message #1385162 is a reply to message #1385157] Wed, 04 June 2014 16:59 Go to previous message
Dwight Naylor is currently offline Dwight NaylorFriend
Messages: 23
Registered: June 2012
Junior Member
Felix,

I think that gives me enough to work with; thanks for your speedy and immensely helpful reply!

-Dwight
Previous Topic:How to download the text editor source code of java IDE in eclipse?
Next Topic:How do I change the "Show List" font size?
Goto Forum:
  


Current Time: Fri Apr 26 12:20:16 GMT 2024

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

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

Back to the top