how to use IViewActionDelegate? - eclipse

i have added a menu item to the variablesview menu by extending the org.eclipse.ui.popupMenus
extension point and what im trying to do is that when someone right clicks a variable and clicks my menu item i would parse the variable's value to an Ip format.
i succeded in adding the menu item and responding to a click with the IViewActionDelegate interface, but when someone clicks on my menu item the information given by IAction event is'nt helping with knowing which Object occoured the event or what is the value of the variable.
my question is, if there is a way to locate the variable's value after clicking my menu item?
or is there another way of using the interface IViewActionDelegate that i dont know of, or i dont use it correctly?.
i have checked a lot in google about how to add a menu item and found good guide:
http://www.eclipse.org/articles/article.php?file=Article-action-contribution/index.html
but it does'nt solve my problem, i really need help on this subject.
thanks.

Related

Custom Work Item Types don't show in any Board or Backlog?

We've created a new work item type called "Improvement", but found that it does not show in any board or backlog - only search. After some digging in settings, I found this:
Can you really not add new work item types and get them into your workflow along side the default types?
In this page, hover with the mouse on the work item level you want to include your custom item and click "Edit":
In the screen that opens you can add the custom work item.

Combobox in automatically closing popup

I'm new to React Native and want help with form making. I need a combobox, where a user should choose an option from several. When user clicks the combobox component, I want options in something like a popup on screen without going to another page, and once the option is chosen the popup or whatever automatically closes.
I created a standard combobox to select the option, but I want to show options in a popup with closure when the option has been chosen.
Is there anyone can help me?
You can use the Picker component.
Also check this library - it wrap native pickers. I believe you will get a popup picker in Android and a bottom-modal picker in iOS (just like native)
Oh, almost 2 years since you asked this question. But, maybe there are others who come up to this thread & wants to know the other option to display combobox like popup. This react-native-material-dropdown might be great for you. Try it !

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.

Predefined Add Dialog not working as expected in Lightswitch 2012

I've created a query to use in an AutoCompleteBox and it works as expected when the user select the AutoCompleteBox in the grid as shown in the picture below
However if the user click the plus button to add a new record using the predefined Add Dialog then the query and the AutoCompleteBox's format doesn't work as shown in the picture below
Why is this happening and how I can fix that?
Thanks
I haven't yet found a way to edit the default Add New dialog.
Instead, make a new screen, select the "New Data Screen" template, and link it to your entity data. You can customize the screen to fit your needs, even make it a Modal Window by changing the Control Type in the screen properties. Once you have the screen set up the way you want, go back to your grid screen, and double click on the Add... command in the Command Bar of your grid, to edit the AddAndEditNew_Execute code. In that method, call your custom screen.
So, as I got to thinking about this some more, I came back to the thought I had when I tried to do this a few months ago. There has to be a better way, so I Googled it again.
This time, I found something. He's using an old version of Lightswitch, but I've successfully applied his technique in my application built in Lightswitch 2012.
http://www.c-sharpcorner.com/UploadFile/051e29/modal-window-in-editable-grid-screen-in-lightswitch-2011/

Accessing forms created through LWUIT resource editor using code

I am trying to develop a quiz application using LWUIT resource editor and am having great difficulty.
I have created two Forms 'GUI1' and 'GUI2' .
GUI1 displays the following:
A question(in the form of a TextField)
5 RadioButtons belonging to the same group
A Button which says 'OK'
GUI2 displays the following:
A TextField
A Button to go back to GUI1
Now the problem is:
Initially GUI1 is displayed. When the user chooses a RadioButton , I wish to know which RadioButton was selected. If that RadioButton was indeed the correct answer, then when the user clicks on the 'OK' Button on GUI1, I wish to display the text 'correct' in the TextField on GUI2 and then display the GUI2.
If the user chose the wrong answer, then I wish to display the text "Wrong" in the TextField on GUI2 and then display the GUI2.
How can this be done with resource editor? I am very foxed. Please help.
I wish to refer to the TextField on GUI2 when I am currently on GUI1. How can this be done with resource editor? Writing a manual code for all this would be very time consuming.
Ok I will try to explain the best I can.
When you design the first Form GUI1 the five RadioButtons must be in the same group. I don't know how to do that in the resource editor (I think there is a field called ButtonGroup in the RadioButton, but I can't remeber). What I would do is take the five RadioButton by code in the before method of GUI1 and add them to a ButtonGroup element.
With ButtonGroup you can know which element is selected using ButtonGroup.setSelectedIndex(). When you press the Button take this value and act as appropriate to the situation.
If you don't understand anything please tell me and I will try to help you.
Is not a hard thing to do. There must be a way to do it with the Resoruce editor but at the moment I donĀ“t know how.
As Shai mentioned, the best thing to do is to use listeners to set the "state" of the buttons on clicking them and when you move to the next form you just retrieve the state of the previous text field.
Manual code may actually be faster for you, do most of the UI in the resource editor and transfer to a form that is written manually. That way you have full control over your objects and transfer back into the GUI builder form when needed.