Skip to main content



      Home
Home » Archived » Sapphire » Access xml file-path from PossibleValuesService or ListPropertyBinding implementation
Access xml file-path from PossibleValuesService or ListPropertyBinding implementation [message #1733116] Tue, 24 May 2016 02:32 Go to next message
Eclipse UserFriend
Hi guys!

how can I get the path of the xml-file the Sapphire GUI is displaying from a PossibleValuesService or ListPropertyBinding implementation?

In either cases I need to consider the content of other files that reside on the same path as the currently open xml-file.

For EL-Function implementations a reference to the open xml-file can be easily obtained by casting the root-parent of the FunctionContext to a SapphireEditorForXml and then calling getEditorInput().

Kind regards, reinhart
Re: Access xml file-path from PossibleValuesService or ListPropertyBinding implementation [message #1733136 is a reply to message #1733116] Tue, 24 May 2016 12:58 Go to previous messageGo to next message
Eclipse UserFriend
Any place you have access to an Element from you model, you can call element.adapt( IFile.class ). To get Element from within a Service, call context( Element.class ). To get Element from within PropertyBinding, call property().element().

[Updated on: Tue, 24 May 2016 12:59] by Moderator

Re: Access xml file-path from PossibleValuesService or ListPropertyBinding implementation [message #1733814 is a reply to message #1733136] Wed, 01 June 2016 03:29 Go to previous messageGo to next message
Eclipse UserFriend
Thank you Konstantin! Are these kind of features documented anywhere else but in the Source-Code?

[Updated on: Wed, 01 June 2016 08:10] by Moderator

Re: Access xml file-path from PossibleValuesService or ListPropertyBinding implementation [message #1733874 is a reply to message #1733814] Wed, 01 June 2016 12:32 Go to previous message
Eclipse UserFriend
There are some API articles in the sapphire.doc plugin (Sapphire Developer Guide under Help), but most API documentation is in the form of javadoc. If javadoc for a particular method or class is lacking sufficient detail, please open a bug report.

[Updated on: Wed, 01 June 2016 12:33] by Moderator

Previous Topic:generate sdef
Next Topic:show/hide outline elements during runtime
Goto Forum:
  


Current Time: Fri Jun 20 22:49:29 EDT 2025

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

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

Back to the top