Is there any event on Click of OK button in Properties Window - enterprise-architect

I am using this EA_OnNotifyContextItemModified method for tracing the changes in the properties window of an element in EA.
I need to know is there any event on click of “OK/Cancel/Apply” buttons in the properties window of EA.
As shown in the image, i need to know is there any event that will be called particularly on click of "OK/Cancel/Apply" buttons of that window

It's either EA_OnPostNewElement if the element has been created newly or EA_OnNotifyContextItemModified if you have modified an existing element.
Btw. you find both in the help in this chapter and this one.

Related

Is there a way to click on selected object on jubula?

I'm using Jubula to automate a JavaFX application. The problem is that, when I selected a tabbed component, I want to click right on this component. However, this component isn't mapped cause I selected it with index.
Is there a way to click on it with the right button?
If the mouse in in the component, Jubula does not change the position for the next action(except it is specified in the action).
This means if you select the tab with the select tab action. You could do another action e.g. "select context menu" at the exact same position.

Should I provide new GWT place?

I have a general question for GWT Activity and Places paradigm realization
For example, I have a place "productList" and appropriate view ProductListView. A have a table with some Product entity in each row. I wanna to double click on row and got popup window which allow me to edit Product in doubleclicked row. How to implement it? Should I provide new place "editProduct" for this activity?
A popup dialog is not a place - users would not expect to see it when they press the back button. So there is no need to create a special EditProduct place.
You can think of "places" as something that users may want to see when they click on Back or Forward buttons, or something they want to bookmark.

Editing Records with MVVM/MVVM-Light

I have created a very simple wpf app with mvvm light.
I have rows in a list view, these are templated representations of Book objects.
I can click a row, then click an edit button, this button loads a new window and sends the new window the book to edit (using mvvm-light's Messenger).
The issue I have is when I edit the record in my new window the data on the main form is updated. The text boxes are bound to the object received via the Messenger.
I know this is because I have essentially passed a reference to the same Book object around the place, therefore I update in one place.. and voilà it updates on the main page too.
What I would like to know is.. is there a standard way/method/concept to achieve what I am trying to do? i.e. create an "edit" page/screen with the option of discarding the edits?
thanks.
Could you make your entity implement ICloneable and create a clone for editing?

how to show up the perspective button without click?

I have two perspectives , but to see the second perspective , as you know have to click button 'open perspective'.
Is there way that the second perspective button shown up automatically , when application start up?
This is an old topic, but I thought I would offer a more concrete answer since the accepted one is not the most direct in getting to a solution.
In your ApplicationWorkbenchWindowAdvisor.preWindowOpen() method use the below code to add perspectives to the perspective switcher.
// Get a reference to the preferences store
IPreferenceStore prefStore = PlatformUI.getPreferenceStore();
// Set the value for the perspective bar preference. Insert your own
// perspective id values.
prefStore.setValue(IWorkbenchPreferenceConstants.PERSPECTIVE_BAR_EXTRAS, "project.perspective.id.1, project.perspective.id.2,...");
There are a number of preference values that you can set through IWorkbenchPreferenceConstants (see api).
It sounds like you want the default size of the perspective switcher (the bar containing the perspective buttons) to be larger than usual. To do that, you could perhaps use an instance of the ActionBarAdvisor class; you'll probably also need a WorkbenchWindowAdvisor class.
I don't see any methods to directly access the switcher object, so I think you'll have to look at the component tree to find it.
Seems like there ought to be an easier way, but I don't see one.
The perspectives show up on a tab. Although it's not clear just from looking at it, the end of the tab can be dragged so it's longer and can display more perspective buttons.
Right click mouse on the perspective toolbar, then select dock it on left or top left. You would see more toolbar items of other perspective, and show more on the toolbar.

Programatically change icon for a eclipse RCP command

I have a menu drop down action in the coolbar. It has 3 sub items that form a radio group. I would like to change the icon shown in the coolbar when the user selects one of these options.
I've googled and seen that I should look at:
org.eclipse.ui.commands.ICommandService.refreshElements(String, Map)
and
org.eclipse.ui.commands.IElementUpdater
Its probably the right thing to look at exception its not enough information. One or two small code snippets will be excellent.
Thanks in advance.
Ok basically if you don't want to use a "custom" control the what to do it is to have your handler (handler that is linked to the specific command) implement IElementUpdater. When every the toolbar item gets shown or clicked on (i.e if the user selects on the the radio buttons) the method: updateElement(UIElement element, Map parameters) gets called.
The element has a setIcon() method and this is what i used to change the icon of the menu drop down action.
Every update to the Coolbar points to the specialization of the WorkbenchWindowControlContribution class.
This bug 186800 has some code example in it which can be of interest.