For Browse,
I was wondering if it is possible to modify the filtering capabilities of the dialog. In one case I need to filter from a list of classnames based on a regex pattern. In another case I would like to filter classes shown based on the value of another property in the sapphire model. So is there currently a method for plugging in arbitrary filtering logic for the browse action? Or maybe overriding the default browse action and be able to extend it?
[kosta] There isn’t a built-in system to do what you are after, but you can use a filter to remove the system-provided action handler and attach your own implementation.
For Create,
I was wondering if there is a way to modify the "create" action to dynamically provide the value of the superclass to use for the new java type?
I know that I add my own custom actions for "browse" and "create" but I wanted to see if we should add this type of capabilities to the framework instead before I wrote my own. Thanks so much!
[kosta] Currently, @JavaTypeConstraint is read directly, so there isn’t a way to substitute dynamic behavior. I can see adding JavaTypeConstraintService like we’ve done in other similar situations. Please open an enhancement request.
From: sapphire-dev-bounces@xxxxxxxxxxx [mailto:sapphire-dev-bounces@xxxxxxxxxxx] On Behalf Of Greg Amerson
Sent: Wednesday, November 09, 2011 1:47 AM
To: Sapphire project
Subject: [sapphire-dev] java type action customizations
Hello again,
In case you haven't figured this out from all of my recent questions, I am in the process of migrating one of our big wizards that has lots of custom dialogs that needs enhancements and instead of fixing my current stuff, I want to move it all to a new sapphire based editor instead. :) I already asked one question about being able to toggle the enablement or disablement of java type actions in another post, so I wont add that in here.
This latest question has to do with customizing the default java type browse/create actions. Here is what I would like to do:
I was wondering if it is possible to modify the filtering capabilities of the dialog. In one case I need to filter from a list of classnames based on a regex pattern. In another case I would like to filter classes shown based on the value of another property in the sapphire model. So is there currently a method for plugging in arbitrary filtering logic for the browse action? Or maybe overriding the default browse action and be able to extend it?
I was wondering if there is a way to modify the "create" action to dynamically provide the value of the superclass to use for the new java type?
I know that I add my own custom actions for "browse" and "create" but I wanted to see if we should add this type of capabilities to the framework instead before I wrote my own. Thanks so much!