Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Overview on all XText models of a project
Overview on all XText models of a project [message #665596] Fri, 15 April 2011 08:19 Go to next message
Sebastian Paul is currently offline Sebastian PaulFriend
Messages: 106
Registered: July 2009
Senior Member
Hi,
we are planning a view which shows an overview on the data model of the
currently selected project (sort of super-outline). I guess this is very
complex. All models have to be loaded from the individual DSL files.
Some files are linked with references, even across project boundaries.
And the view has to refresh when the model changes.
Is there already anything in XText what may assist here? Any hint for a
starting point?

--
Best regards,
Sebastian Paul
Re: Overview on all XText models of a project [message #665609 is a reply to message #665596] Fri, 15 April 2011 09:13 Go to previous messageGo to next message
Jan Koehnlein is currently offline Jan KoehnleinFriend
Messages: 760
Registered: July 2009
Location: Hamburg
Senior Member
Sounds like a good application for the index. It's likely, the view
shows indexed elements only, or at least loads models for details on
demand only.

Have a look at IResourceDescriptions and learn how to customize its
contents (section on scoping in the docs).

Am 15.04.11 10:19, schrieb Sebastian Paul:
> Hi,
> we are planning a view which shows an overview on the data model of the
> currently selected project (sort of super-outline). I guess this is very
> complex. All models have to be loaded from the individual DSL files.
> Some files are linked with references, even across project boundaries.
> And the view has to refresh when the model changes.
> Is there already anything in XText what may assist here? Any hint for a
> starting point?
>


--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com


---
Get professional support from the Xtext committers at www.typefox.io
Re: Overview on all XText models of a project [message #665717 is a reply to message #665609] Fri, 15 April 2011 15:18 Go to previous messageGo to next message
Sebastian Paul is currently offline Sebastian PaulFriend
Messages: 106
Registered: July 2009
Senior Member
Hi!

Am 2011-04-15 11:13, schrieb Jan Koehnlein:
> Sounds like a good application for the index. It's likely, the view
> shows indexed elements only, or at least loads models for details on
> demand only.
> Have a look at IResourceDescriptions and learn how to customize its
> contents (section on scoping in the docs).
This seems to be exactly what I need. Is there a mechanism which informs
me about any changes? At a fist look, I did not find something like
listeners.

--
Best regards,
Sebastian Paul
Re: Overview on all XText models of a project [message #665722 is a reply to message #665717] Fri, 15 April 2011 15:26 Go to previous messageGo to next message
Sebastian Paul is currently offline Sebastian PaulFriend
Messages: 106
Registered: July 2009
Senior Member
Am 2011-04-15 17:18, schrieb Sebastian Paul:
> Is there a mechanism which informs
> me about any changes? At a fist look, I did not find something like
> listeners.
I think there it is:
org.eclipse.xtext.resource.IResourceDescription.Event.Listen er
IMHO Nested classes are hard to find :)

--
Best regards,
Sebastian Paul
Re: Overview on all XText models of a project [message #665983 is a reply to message #665609] Mon, 18 April 2011 12:24 Go to previous messageGo to next message
Sebastian Paul is currently offline Sebastian PaulFriend
Messages: 106
Registered: July 2009
Senior Member
Hi,
I tried to use the index as described in the docs (using the Fowlerdsl
example), but without success for now.

I extended the runtime and UI module as described for "Eclipse
Project-Based Containers".

My sample view gets the index as follows:
@Inject
private IResourceDescriptions resourceDescriptions;
I verified that the injected implementation is
DirtyStateAwareResourceDescriptions.

In createPartControl, the view checks if resourceDescriptions implements
IResourceDescription.Event.Source and adds a listener.
Unfortuanately the listener is never triggered. Even with manual update,
the index never returns any ResourceDescriptions.

So what is the missing piece to get the index running with the FowlerDsl
example? Maybe I need some setup for the builder?


Am 2011-04-15 11:13, schrieb Jan Koehnlein:
> Sounds like a good application for the index. It's likely, the view
> shows indexed elements only, or at least loads models for details on
> demand only.
>
> Have a look at IResourceDescriptions and learn how to customize its
> contents (section on scoping in the docs).
>
> Am 15.04.11 10:19, schrieb Sebastian Paul:
>> we are planning a view which shows an overview on the data model of the
>> currently selected project (sort of super-outline).


--
Best regards,
Sebastian Paul
Re: Overview on all XText models of a project [message #665984 is a reply to message #665983] Mon, 18 April 2011 12:36 Go to previous messageGo to next message
Sebastian Paul is currently offline Sebastian PaulFriend
Messages: 106
Registered: July 2009
Senior Member
I looked into the DomainModel example and found the missing piece:
BuilderIntegrationFragment.
After adding this to my mwe2 workflow, I was asked to add the XText
nature to my project, and then the index worked. This also enabled
rename refactoring with "Global Scopes Based On Explicit Imports
(ImportURI Mechanism)", wich did not work otherwise.


Am 2011-04-18 14:24, schrieb Sebastian Paul:
> So what is the missing piece to get the index running with the FowlerDsl
> example? Maybe I need some setup for the builder?

--
Best regards,
Sebastian Paul
Re: Overview on all XText models of a project [message #666377 is a reply to message #665609] Wed, 20 April 2011 08:35 Go to previous message
Sebastian Paul is currently offline Sebastian PaulFriend
Messages: 106
Registered: July 2009
Senior Member
Hi,
the index is absolutely the feature what I need. But I noticed that I
cannot use it unless "Build Automatically" is activated in the
workspace. Is it possible to trigger indexing manually? Or have indexing
activated for particular projects?


Am 2011-04-15 11:13, schrieb Jan Koehnlein:
> Sounds like a good application for the index.
>
> Am 15.04.11 10:19, schrieb Sebastian Paul:
>> we are planning a view which shows an overview on the data model of the
>> currently selected project (sort of super-outline).

--
Best regards,
Sebastian Paul
Previous Topic:Defining a list/array with mixed types
Next Topic:How to setUp Unit Test for Xtend/Xpand (Xtend Tools)?
Goto Forum:
  


Current Time: Fri Apr 26 19:53:47 GMT 2024

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

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

Back to the top