Skip to main content



      Home
Home » Eclipse Projects » GEF » Palette Tools/Entries confusing
Palette Tools/Entries confusing [message #93177] Wed, 10 September 2003 03:23 Go to next message
Eclipse UserFriend
I added a palette to my simple GEF application. It has at the moment 2
buttons.
One is a CreationToolEntry and the other ConnectionCreationToolEntry.

Clicking on creationtoolentry, creates a tool and allows mouseDrag
feedback but has no visible effect afterwards. With some debug output, and
by commenting out createTool(), I discovered that the ToolEntry itself
(setup with a simpleFactory) creates the feedback and creates an instance
of whatever the Factory is set up to create.
I can't get the tool to do anything.
Looking at the JavaDoc for ToolEntry, then CreationFactory, SimpleFactory
doesn't tell you what the factory is supposed to create. You have to go to
the Tool's page-so I eventually found that the Factory is meant to create
the EditPart. Confusingly, in the logic example, the factories create
instances of things in the model package...
The only way I can create Nodes at the moment is by creating the model,
adding it the list of nodes/children and calling refresh from the contents
editpart so that an editpart gets created for it and the associated
figures etc. However, this will only create them at a default location and
size.

What is the process for setting up and using palette tools? What is their
relationship with the entry?

Thanks
Chris Heald
Re: Palette Tools/Entries confusing [message #93990 is a reply to message #93177] Fri, 12 September 2003 09:17 Go to previous messageGo to next message
Eclipse UserFriend
OK, duh! Subclassing inorder to remove a method isn't goign to work...!
Got the createTool method to return null and indeed, no tool is created
and no feedback is performed and no objects are created.

But the question remains - How do I get the tool to actually create the
model, controller and update the display?
Do I have to subclass the tool?

Thanks
Chris
Re: Palette Tools/Entries confusing [message #94078 is a reply to message #93990] Fri, 12 September 2003 11:43 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

No, the creation tool sends requests to the target (editpart) of the
creation. See CreateRequest. See LayoutEditPolicy.getCreateCommand. Read
the tutorial for more information about requests, commands, and refreshing
the controllers (editparts) so your new object appears.

"Chris Heald" <chris.heald@m.eads.net> wrote in message
news:bjsh0t$l1p$1@eclipse.org...
> OK, duh! Subclassing inorder to remove a method isn't goign to work...!
> Got the createTool method to return null and indeed, no tool is created
> and no feedback is performed and no objects are created.
>
> But the question remains - How do I get the tool to actually create the
> model, controller and update the display?
> Do I have to subclass the tool?
>
> Thanks
> Chris
>
Previous Topic:Can't install gef2.1.1 on Eclipse 2.1.1
Next Topic:Unofficial "Randy Patch" available for 3.0 M3
Goto Forum:
  


Current Time: Sun Aug 31 09:48:07 EDT 2025

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

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

Back to the top