Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Sapphire » adding <hint> to all properties of an editor page
adding <hint> to all properties of an editor page [message #1707160] Wed, 02 September 2015 16:48 Go to next message
Zoe Guillen is currently offline Zoe GuillenFriend
Messages: 6
Registered: May 2015
Junior Member
Hi guys,

We are customizing how the contextual help is displayed in sapphire for individual fields by implementing a PropertyEditorAssistContributor, "HelpActionContributor" so that when the lightbulb is clicked on next to a field the user sees a link, "Show Help" and in our implementation we programmatically open the help.

We also do not want the user to see the "Show in source" action in that same lightbulb pop up. I've learned how to do that by including as a <hint> in the property editor "suppress.assist.contributors".

We want this behavior on all properties in our editor. So this means that we have to copy/paste this for every property-editor:

<property-editor>
	...
	<hint>
		<name>assist.contributors</name>
		<value>HelpActionContributor</value>
	</hint>
	<hint>
		<name>suppress.assist.contributors</name>
		<value>System.ShowInSourceActionContributor</value>
	</hint>
</property-editor>


Is there a way to add these hints globally instead of having to copy/paste them everywhere?

And 2 related questions: I'm currently trying to figure out 1) how to remove the 'show in source' action from the context menu of the outline and 2) how to hide the source xml tab of the editor. I found that I could easily hide that source xml tab in my class that extends SapphireEditor via, "this.removePage(1);" however when I did that the UI had some very bad behavior where it would clear fields as I typed in them, losing all changes. Any suggestions on how to accomplish these other two items would be much appreciated!

Thanks,
Zoe
Re: adding <hint> to all properties of an editor page [message #1707167 is a reply to message #1707160] Wed, 02 September 2015 17:39 Go to previous messageGo to next message
Konstantin Komissarchik is currently offline Konstantin KomissarchikFriend
Messages: 1077
Registered: July 2009
Senior Member
There is no facility for applying a set of hints to all property editors. There is an open task item to convert assist dialog contributors into services, which can be registered either locally or globally.

Regarding your battle with the source editor page and the show in source actions, you need to instantiate your model around an in-memory resource store instead of around a source editor to get the effect you are after. So, don't do anything in createSourcePages() method and change your createModel() method to use XmlResourceStore wrapped around WorkspaceFileResourceStore instead of XmlEditorResourceStore.
Re: adding <hint> to all properties of an editor page [message #1707170 is a reply to message #1707167] Wed, 02 September 2015 18:18 Go to previous message
Zoe Guillen is currently offline Zoe GuillenFriend
Messages: 6
Registered: May 2015
Junior Member
Thanks for the speedy reply! Will give that a try.
Previous Topic:Default values behavior in property editor.
Next Topic:Sapphire repositories now include .pack.gz files
Goto Forum:
  


Current Time: Tue Oct 08 12:33:06 GMT 2024

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

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

Back to the top