Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[ve-dev] Visual Editor Beans Tree reuse

Hi VE developers

We are interested in reusing the Java Beans Tree for our own application. However, we only need the "view" functionality of the Beans Tree, i.e. no editing / moving around of components.

What we would like to do is to show the containment hierarchy of a Visual Java class, even if that class is not open in a Visual Editor. In other words: 

We have the java source file at hand and would like to get the (non-editable) beans tree for it. Is that possible and if yes, could you give us a few hints where to start? 

We've already contacted Janak Mulani of Canoo and he's given us a few insights, however he redirected us to you for details, see the two mails below.

Thanks in advance for any help,
Alain + Kaspar


-----Ursprüngliche Nachricht-----
Von: Janak Mulani [mailto:janak.mulani@xxxxxxxxx] 
Gesendet: Mittwoch, 7. Februar 2007 10:20
An: Alain Helfenstein
Cc: ulc-developer@xxxxxxxxxxxxxxx
Betreff: RE: [ULC-developer] Visual Editor Beans Tree reuse

Hi Alain,

The bean tree represents the bean containment hierarchy.

The way it works is that, JavaSourceTranslator parses the code and builds
the model and instantiates beans in the target VM. The model is then read to
build the  TreeEditParts in the Bean Tree. The model of a visual class is
cached in the workspace
(.metadata\.plugins\org.eclipse.core.resources\.projects\ULC VE
Test\org.eclipse.ve.java.core\.cache\emfmodel\src). Perhaps you can directly
read the cached model (bypassing the JavaSourceTranslator) and construct the
bean tree from it.

You will have to ask the Eclipse VE team (ve-dev@xxxxxxxxxxx) if it is
possible to invoke these APIs (parsing source to build model, constructing
bean tree, accessing cached model to construct bean tree, etc.) directly and
what is the best way to achieve what you desire.

Thanks and regards,

Janak

-----Original Message-----
From: ulc-developer-admin@xxxxxxxxxxxxxxx
[mailto:ulc-developer-admin@xxxxxxxxxxxxxxx]On Behalf Of Alain Helfenstein
Sent: Tuesday, February 06, 2007 11:26 AM
To: ulc-developer@xxxxxxxxxxxxxxx
Subject: [ULC-developer] Visual Editor Beans Tree reuse


Hi everybody

We are interested in reusing the Beans Tree of the ULC Visual Editor in an
own Dialog. The dialog will appear in places, while the Visual Editor is not
open or not the currently selected editor.

The tree is merely used to show the structure of a visual class (read only),
it does not have to run in "editable mode". The file with the visual class
is available, either on disk (no Visual Editor open) or in a Visual Editor
which is not selected, but in unsaved state. The dialog which should show
the tree is modal, so the tree does not have to synchronize itself live with
the contents of the unsaved editor, a snapshot is enough.

We are wondering, how we have to feed the tree with the beans content under
those circumstances. We've discovered classes called JavaSourceTranslator
and EditDomain but we don't see exactly how to set things up. Can anyone out
there help us in this matter?

Any hints will be appreciated.

Alain Helfenstein
Informatik Ing. FH

SORECOgroup
ivyTeam
Alpenstrasse 9
CH-6304 Zug

Telefon Zentrale: +41 (0)41 710 80 20
Telefon direkt: +41 (0)41 726 07 91
Fax:       +41 (0)41 710 80 60
e-mail:  alain.helfenstein@xxxxxxxxxx
www.ivyteam.com





Back to the top