Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ve-dev] About the workbench selection


Hi,

I don't remember the specifics, but you are not really clicking on a JButton. The JButton instance doesn't even exist in Eclipse. In the VE the JButton is modeled by a BeanProxy object that models an actual JButton. I believe what is returned from the selection event handler is actually an IPropertySource which wrappers the JButton VE  model object.

Rich




"Nicolas DRUT" <nicolas.drut@xxxxxxxxx>
Sent by: ve-dev-bounces@xxxxxxxxxxx

08/07/2008 08:30 AM

Please respond to
Discussions people developing code for the Visual Editor project        <ve-dev@xxxxxxxxxxx>

To
"Discussions people developing code for the Visual Editor project" <ve-dev@xxxxxxxxxxx>
cc
Subject
[ve-dev] About the workbench selection





Hi,

This is me again with Visual Editor.
I am now trying to develop a new view to use it with VE. My view needs to know witch item is selected on the workbench. For example, if user clic on a JButton called myButton, I would like to be able to get an handle on the myButton class (in order to read his attributes for example).
I have tried to follow this tutorial :
http://www.eclipse.org/articles/Article-WorkbenchSelections/article.html, I managed to get back something but it is an Object type class whereas the item I clicked was a JButton. I tried to cast it in the JButton type but it failed, it seems to me that this is totally an other object ... Could you please help to find out how to get an handle on this JButton ?

I don't really know if it is a VE problem but perhaps some of you have tried to do the same someday, I hope.

Thank you very much for your help and looking forward to hearing from you.

Cheers,
Nicolas.
_______________________________________________
ve-dev mailing list
ve-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ve-dev


Back to the top