Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Visual Editor (VE) » SelectionCreationToolEntry.ISelector
SelectionCreationToolEntry.ISelector [message #131597] Thu, 28 September 2006 08:25 Go to next message
Eclipse UserFriend
Originally posted by: grega.vsl.sk

Hi,

Is there a way to get a Complete (E)Object tree from
SelectionCreationToolEntry.ISelector?
(Dialog with Panel, buttons etc.) (it is surly possible to create Dialog
and Panel at once)

Full story:
I want to extend VE for displaying an already designed Dialog from Dialog
instance.
I have made custom button on the palette,which acts similary to
ChooseBeanSelector / ChooseBeanDialog.


public class ImporterSelector implements
SelectionCreationToolEntry.ISelector {

public Object[] getNewObjectAndType(CreationTool creationTool,
org.eclipse.gef.EditDomain domain) {
...


// code here is executed when my custom palette button is pressed,
EObjects are returned
ResourceSet rset= (ResourceSet)
ed.getData("org.eclipse.ve.internal.cde.emf.resourcesetkey");

JavaClass javaClass =
Utilities.getJavaClass("java:/avcdte.container#Dialog",rset);
JavaClass panelClass =
Utilities.getJavaClass("java:/avcdte.container#Panel",rset);
JavaClass buttonClass =
Utilities.getJavaClass("java:/avcdte#Button",rset);

EObject eDialog = null; EObject ePanel = null; EObject eButton
= null;

eDialog =
javaClass.getEPackage().getEFactoryInstance().create(javaCla ss);
ePanel =
panelClass.getEPackage().getEFactoryInstance().create(panelC lass);
eButton =
buttonClass.getEPackage().getEFactoryInstance().create(butto nClass);

But only thing I have done so far , is

eDialog.eSet((EReferenceImpl)cp,ePanel); - where cp is ContentPane
of eDialog (taken
from .eAllContents)

Is there a way I can add eButton to ePanel?, (I have tried eInverseAdd
but I am not sure of the arguments e.g ID)
Can the properties of eDialog be changed? (setDefaultValue is acting
strange (with eType set) )

Thanks - Michael
Re: SelectionCreationToolEntry.ISelector [message #131630 is a reply to message #131597] Thu, 28 September 2006 14:26 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

You don't need to do any of that to create this. Take a look at

org.eclipse.ve.jfc/palette/JTableWithScrollPane.xmi

That shows how to setup a preconfigured object that can be dropped. Then
look at

org.eclipse.ve.jfc/palette/javavisualbeanscat.xmi

and look for JTableWithScrollPane. This will show how it is referenced
in the palette entry.

--
Thanks,
Rich Kulp
Re: SelectionCreationToolEntry.ISelector [message #614673 is a reply to message #131597] Thu, 28 September 2006 14:26 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

You don't need to do any of that to create this. Take a look at

org.eclipse.ve.jfc/palette/JTableWithScrollPane.xmi

That shows how to setup a preconfigured object that can be dropped. Then
look at

org.eclipse.ve.jfc/palette/javavisualbeanscat.xmi

and look for JTableWithScrollPane. This will show how it is referenced
in the palette entry.

--
Thanks,
Rich Kulp
Previous Topic:SWT Widget Property Sheet
Next Topic:SWT Widget Property Sheet
Goto Forum:
  


Current Time: Sat Apr 27 02:03:07 GMT 2024

Powered by FUDForum. Page generated in 0.03456 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top