[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools.gef] Re: Pop up menu with IFigure

Hi Oscar,

I had a similar problem, I solved it in that way that the subfigures are no
more subfigures in gef but are in the same gef hierachie like the parent,
than you can select the subfigure the same way like the parent. I also had
problems with the clipping of the parent which was also solved by this
aproach. the only thing is when moving the parent you have to move the
childs manually, in the other case it's done together with the parent.

Dieter

"Oscar Martin" <OscarMartin@xxxxxxxxxx> schrieb im Newsbeitrag
news:b1laa8$c1i$1@xxxxxxxxxxxxxxxx
> Hi
>
> Thank you for your help
>
> My problem is more complex: the figure i want the context menu to be for
is
> inside another figure :
> I have a "main" Figure which represents a flow chart. Every state in that
> flow chart is another Figure and I want to use popup menu with those
> states...
>
> Cheers
>
>
> "Randy Hudson" <none@xxxxxxxxxx> wrote in message
> news:b1e423$o39$1@xxxxxxxxxxxxxxxx
> > Figures are not designed to host popup menus.
> >
> > In GEF, Figures are not meant to be the "interesting" objects.
EditParts
> > are.
> > The recommended way to do this is to have a single popup menu for the
> > Viewers.  The popup is built based on the currently selected EditParts.
> If
> > you right-click on a Figure, the EditPart will get selected first,
> followed
> > by the Menu's being shown.  See ContextMenuProvider.
> >
> > "Oscar Martin" <OscarMartin@xxxxxxxxxx> wrote in message
> > news:b1e3kg$noh$1@xxxxxxxxxxxxxxxx
> > > Sorry for the previous mesage. This is the right one :)
> > >
> > > Hello
> > >
> > > I need help associating a pop-up menu with a IFigure object.
> > >
> > > I have been following the example in the documentation about how to
> create
> > a
> > > pop-up menu. The problem is that I know how to register the menu with
a
> > > composite, using the "setMenu" method of Control, but I don´t know how
> to
> > > set the menu to my IFigure object which is inside a Composite
> > >
> > >
> > > Cheers
> > >
> > > "Oscar Martin" <OscarMartin@xxxxxxxxxx> wrote in message
> > > news:b1e3em$njj$1@xxxxxxxxxxxxxxxx
> > > > Hello
> > > >
> > > > I need to create a popup menu for a Figure object inside an
> IEditorPart.
> > > > In the createPartControl of the editor
> > > > I am following the example about pop-up menusin the documentation
but
> it
> > > > does not seem to work.
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>