Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Access EObject from an outline view filter
Access EObject from an outline view filter [message #898024] Wed, 25 July 2012 15:52 Go to next message
Jeff MAURY is currently offline Jeff MAURYFriend
Messages: 44
Registered: July 2009
Member
Hello,

I am implementing an outline view filter.
I want to filter on nodes that have a specific feature set so I need to access the EObject from the IOutlineNode.
The way I did it was to inject a Provider<XtextResourceSet> in my filter and if the node if an EObjectNode, then resolve the EObject using the XtextResourceSet returned by the provider.
This works but this first time my filter apply method is called, the XtextResource is loaded and this seems curious to me as the resource has probably been loaded by the editor.

Thanks
Jeff
Re: Access EObject from an outline view filter [message #898039 is a reply to message #898024] Wed, 25 July 2012 16:27 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
Hi Jeff,

please use EObjectNode..readOnly(IUnitOfWork<T, EObject>) instead.

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

Am 25.07.12 17:52, schrieb Jeff MAURY:
> Hello,
>
> I am implementing an outline view filter.
> I want to filter on nodes that have a specific feature set so I need to
> access the EObject from the IOutlineNode.
> The way I did it was to inject a Provider<XtextResourceSet> in my filter
> and if the node if an EObjectNode, then resolve the EObject using the
> XtextResourceSet returned by the provider.
> This works but this first time my filter apply method is called, the
> XtextResource is loaded and this seems curious to me as the resource has
> probably been loaded by the editor.
>
> Thanks
> Jeff
>
Re: Access EObject from an outline view filter [message #898325 is a reply to message #898039] Thu, 26 July 2012 08:27 Go to previous message
Jeff MAURY is currently offline Jeff MAURYFriend
Messages: 44
Registered: July 2009
Member
Thanks for the tip

Jeff
Previous Topic:Static Enumeration Literal Assignment
Next Topic:Supress generating preference and property pages for the compiler
Goto Forum:
  


Current Time: Thu Apr 18 18:49:43 GMT 2024

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

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

Back to the top