Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ve-dev] Understanding this huge pile of code... ;-)


... to get you started:
  • JButton on the palette
The JButton is contributed to the palette by the org.eclipse.ve.jfc plugin.xml extending the "org.eclipse.ve.java.core.registrations" point.
javavisualbeanscats.xmi specifies that a VE (Java Model element) of a swing instance will be used: creationClassURI="java:/javax.swing#JButton"
VE will build a GEF PaletteRoot in JavaVisualEditorPart.rebuildPalette()  and will create an AnnotatedCreationEntryImpl$CreationEntry for the JButton entry.
When you click on the JButton's palette  AnnotatedCreationEntryImpl$CreationEntry.createTool() will be called (a GEF thing).

Also the (xmi) override-directory on the jfc plugin denotes a JPanel will use the ContainerGraphicalEditPart when created (see the JPanel.override).
  • Dropping
You can break on the EMFCreationTool.getCommand() to see the GEF command that is retrieved when you move the creation tool of the JButton across.  Note that the getFactory().getObjectType() returns a "java:/javax.swing#JButton" as noted in the pallette xmi.

With a BorderLayout, the ContainerGraphicalEditPart(our JPanel) layout policy will be a BorderLayoutEditPolicy
You can break on any of the following:
BorderLayoutEditPolicy.showLayoutTargetFeedback()
ContainerGraphicalEditPart(AbstractEditPart).showTargetFeedback()




------------
Dr. Gili Mendel
IBM
Software Development
RTP Raleigh, NC
(919)543 6408, tie: 441 6408



Dave Orme <DaveO@xxxxxxxxxxxxxxx>
Sent by: ve-dev-admin@xxxxxxxxxxx

01/02/2004 11:29 AM
Please respond to ve-dev

       
        To:        ve-dev@xxxxxxxxxxx
        cc:        
        Subject:        [ve-dev] Understanding this huge pile of code... ;-)



I'll start things off with a few small questions for the IBM folks:  ;-)

Suppose I have a visual layout that extends JPanel and has a BorderLayout
set.  I then do the following:

- Select button in the palette.

- Drop it in the west region of the BorderLayout.

Questions:

- What actors (Java objects) will participate in selecting the button,
providing the borderlayout assistance as my mouse moves over the panel,
detecting the drop, hit testing the region of the border layout in which to
drop the button, and actually performing the drop?

- On what source lines should I drop break points if I want to see this
happen?

- How do I set break points in the target VM's code so I can watch it do its
thing?

- What parts of this are subject to change in the 3.0 code base?

:-)


Best Regards,

Dave
_______________________________________________
ve-dev mailing list
ve-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/ve-dev


Back to the top