Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Including external Resources in XtextResourceSet
Including external Resources in XtextResourceSet [message #630498] Sun, 03 October 2010 11:31 Go to next message
Ovidio Mallo is currently offline Ovidio MalloFriend
Messages: 35
Registered: July 2009
Member
Hi all,

I'm currently learning Xtext by trying to implement a simple PL/SQL
editor for Eclipse. What is already working out-of-the-box are cross
references among different PL/SQL files within the same project. What I
would like to do now is including external PL/SQL code which is not in a
project file but rather on the database itself.
E.g. there are built-in PL/SQL procedures provided by the Oracle
database itself and I want to use/reference them in my own procedures so
what I'm trying to do is similar to using e.g. jar-libraries within the
CLASSPATH in Java.

The final goal would be to be able to reference those external PL/SQL
procedures just like any other resource and to open their content in a
read-only version of the normal Xtext editor when the user navigates to
those external resources.

Since I think that what I'm trying to do is rather common, I wanted to
ask what the best way of achieving my goal would be? Since the external
resources are not stored in project files, I was wondering whether I
would have to define my own type of URI which is then resolved through a
custom XtextResource/XtextResourceSet and opened again by a custom
IURIEditorOpener? Or is there a much simpler way to achieve the same goal?

Thanks a lot in advance for any help!

Kind regards,
Ovidio
Re: Including external Resources in XtextResourceSet [message #630582 is a reply to message #630498] Mon, 04 October 2010 09:29 Go to previous messageGo to next message
Sven Efftinge is currently offline Sven EfftingeFriend
Messages: 1823
Registered: July 2009
Senior Member
Am 10/3/10 1:31 PM, schrieb Ovidio Mallo:
> Since I think that what I'm trying to do is rather common, I wanted to
> ask what the best way of achieving my goal would be? Since the external
> resources are not stored in project files, I was wondering whether I
> would have to define my own type of URI which is then resolved through a
> custom XtextResource/XtextResourceSet and opened again by a custom
> IURIEditorOpener?

Yes, that's one way to do it.
You don't need your own XtextResource or ResourceSet but a special
URIConverter registered with your ResourceSet.

Exporting the scripts to a local project physically, would be the
easiest way and would allow to work in offline mode.

Sven

--
Need professional support for Xtext or other Eclipse Modeling technologies?
Go to: http://xtext.itemis.com
Twitter : @svenefftinge
Blog : http://blog.efftinge.de
Re: Including external Resources in XtextResourceSet [message #631209 is a reply to message #630582] Wed, 06 October 2010 14:57 Go to previous message
Ovidio Mallo is currently offline Ovidio MalloFriend
Messages: 35
Registered: July 2009
Member
Sven, thanks a lot for your feedback!

I think I will give it a try using the URIConverter in a first run but
you might be right that it could be easiert to physically store the
scripts in the workspace which might be a good idea anyway.

Thanks again & regards,
Ovidio


On 10/04/2010 11:29 AM, Sven Efftinge wrote:
> Am 10/3/10 1:31 PM, schrieb Ovidio Mallo:
>> Since I think that what I'm trying to do is rather common, I wanted to
>> ask what the best way of achieving my goal would be? Since the external
>> resources are not stored in project files, I was wondering whether I
>> would have to define my own type of URI which is then resolved through a
>> custom XtextResource/XtextResourceSet and opened again by a custom
>> IURIEditorOpener?
>
> Yes, that's one way to do it.
> You don't need your own XtextResource or ResourceSet but a special
> URIConverter registered with your ResourceSet.
>
> Exporting the scripts to a local project physically, would be the
> easiest way and would allow to work in offline mode.
>
> Sven
>
Previous Topic:Support for RHEL 6
Next Topic:[Xtext] Custom Validation of (E)List Elements
Goto Forum:
  


Current Time: Fri Apr 26 07:41:47 GMT 2024

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

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

Back to the top