Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » "Hide" Option in ContextMenu
"Hide" Option in ContextMenu [message #150775] Tue, 14 September 2004 07:01 Go to next message
Eclipse UserFriend
Originally posted by: amitsaxena.iopsis.com

Hi,
I m using the GEF Plugin and using the Shape plugin of gef that is
defiend in CVS of GEF.
On right click of any diagram, the context menu shows options of Undo, Redo,
Delete and etc.
I wanted the Functionality of "Hide" added to the context menu when right
clicked on any diagram which will hide that particular diagram and also the
"View" that will show the hidden diagram when clicked on view context menu.
Can u provide any directions or sample of how to proceed further??
Re: "Hide" Option in ContextMenu [message #150829 is a reply to message #150775] Tue, 14 September 2004 17:20 Go to previous messageGo to next message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
Add a property to your model that would indicate whether or not it's hidden.

The parent editpart should only return visible children in its
getModelChildren() method.

Add the Hide action in your ContextMenuProvider. The action should change
the hidden state. When the child's editpart gets notified of this change,
it should tell its parent to refreshChildren() (or rather, add/removeChild()
for better performance).

How do you intend to allow the user to show hidden parts?

You can look at the palette as an example. Right-click on the logic palette
and select "Customize." It has a hide checkbox which does the same thing.
The implementation is slightly different in that the parent editpart listens
for changes to all its children, and refreshes itself when the hide property
changes on any of them. Related classes: PaletteEditPart, PaletteEntry.


"Amit Saxena" <amitsaxena@iopsis.com> wrote in message
news:ci645e$vn8$1@eclipse.org...
> Hi,
> I m using the GEF Plugin and using the Shape plugin of gef that is
> defiend in CVS of GEF.
> On right click of any diagram, the context menu shows options of Undo,
Redo,
> Delete and etc.
> I wanted the Functionality of "Hide" added to the context menu when right
> clicked on any diagram which will hide that particular diagram and also
the
> "View" that will show the hidden diagram when clicked on view context
menu.
> Can u provide any directions or sample of how to proceed further??
>
>
>
Re: "Hide" Option in ContextMenu [message #150897 is a reply to message #150829] Wed, 15 September 2004 12:00 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: amitsaxena.iopsis.com

Hello,
I want to Hide the Figures that r drawn on editor, not the palete
one. The Logic example hides the palete diagrams. Suppose, I drag a figure
and on the right click that figure on the editor , a menu of "Hide" should
appear and when clicked on that the figure should hide (some icon should
come on Palete when Hide is clicked on any figure in the editor).
Can u provide any sample of that ???

"Pratik Shah" <ppshah@us.ibm.com> wrote in message
news:ci7910$9ll$1@eclipse.org...
> Add a property to your model that would indicate whether or not it's
hidden.
>
> The parent editpart should only return visible children in its
> getModelChildren() method.
>
> Add the Hide action in your ContextMenuProvider. The action should change
> the hidden state. When the child's editpart gets notified of this change,
> it should tell its parent to refreshChildren() (or rather,
add/removeChild()
> for better performance).
>
> How do you intend to allow the user to show hidden parts?
>
> You can look at the palette as an example. Right-click on the logic
palette
> and select "Customize." It has a hide checkbox which does the same thing.
> The implementation is slightly different in that the parent editpart
listens
> for changes to all its children, and refreshes itself when the hide
property
> changes on any of them. Related classes: PaletteEditPart, PaletteEntry.
>
>
> "Amit Saxena" <amitsaxena@iopsis.com> wrote in message
> news:ci645e$vn8$1@eclipse.org...
> > Hi,
> > I m using the GEF Plugin and using the Shape plugin of gef that is
> > defiend in CVS of GEF.
> > On right click of any diagram, the context menu shows options of Undo,
> Redo,
> > Delete and etc.
> > I wanted the Functionality of "Hide" added to the context menu when
right
> > clicked on any diagram which will hide that particular diagram and also
> the
> > "View" that will show the hidden diagram when clicked on view context
> menu.
> > Can u provide any directions or sample of how to proceed further??
> >
> >
> >
>
>
Re: "Hide" Option in ContextMenu [message #150912 is a reply to message #150897] Wed, 15 September 2004 14:58 Go to previous messageGo to next message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
Yes, the palette. The palette is a graphical viewer driven by a model just
like your main graphical viewer.

"Amit Saxena" <amitsaxena@iopsis.com> wrote in message
news:ci9a1r$c7c$1@eclipse.org...
> Hello,
> I want to Hide the Figures that r drawn on editor, not the palete
> one. The Logic example hides the palete diagrams. Suppose, I drag a figure
> and on the right click that figure on the editor , a menu of "Hide" should
> appear and when clicked on that the figure should hide (some icon should
> come on Palete when Hide is clicked on any figure in the editor).
> Can u provide any sample of that ???
>
> "Pratik Shah" <ppshah@us.ibm.com> wrote in message
> news:ci7910$9ll$1@eclipse.org...
> > Add a property to your model that would indicate whether or not it's
> hidden.
> >
> > The parent editpart should only return visible children in its
> > getModelChildren() method.
> >
> > Add the Hide action in your ContextMenuProvider. The action should
change
> > the hidden state. When the child's editpart gets notified of this
change,
> > it should tell its parent to refreshChildren() (or rather,
> add/removeChild()
> > for better performance).
> >
> > How do you intend to allow the user to show hidden parts?
> >
> > You can look at the palette as an example. Right-click on the logic
> palette
> > and select "Customize." It has a hide checkbox which does the same
thing.
> > The implementation is slightly different in that the parent editpart
> listens
> > for changes to all its children, and refreshes itself when the hide
> property
> > changes on any of them. Related classes: PaletteEditPart, PaletteEntry.
> >
> >
> > "Amit Saxena" <amitsaxena@iopsis.com> wrote in message
> > news:ci645e$vn8$1@eclipse.org...
> > > Hi,
> > > I m using the GEF Plugin and using the Shape plugin of gef that
is
> > > defiend in CVS of GEF.
> > > On right click of any diagram, the context menu shows options of Undo,
> > Redo,
> > > Delete and etc.
> > > I wanted the Functionality of "Hide" added to the context menu when
> right
> > > clicked on any diagram which will hide that particular diagram and
also
> > the
> > > "View" that will show the hidden diagram when clicked on view context
> > menu.
> > > Can u provide any directions or sample of how to proceed further??
> > >
> > >
> > >
> >
> >
>
>
Re: "Hide" Option in ContextMenu [message #151210 is a reply to message #150912] Thu, 16 September 2004 11:20 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: amitsaxena.iopsis.com

Hello,
I have this method that contains context menu .. When we right
click on any diagram on the editor , not on the Palete.
We get the option of Undo, Redo and Delete by the following code.
But the GEFActionConstants() does not contains "Hide" field in the
GEF API ...
It contains all fields except the "Hide" field.
I wanted the Hide option in the context menu with "Hide" and
"View" as option.
When Clicked on Hide option, it should hide that particular
diagram and
when clicked on View option, the diagram shown be visible.
And wht Methods to write in GEF for the above following ??
Can u modify the code for "Hide " and "View "??

public void buildContextMenu(IMenuManager menu)
{
// Add standard action groups to the menu
GEFActionConstants.addStandardActionGroups(menu);

// Add actions to the menu
menu.appendToGroup(
GEFActionConstants.GROUP_UNDO, // target group id
getAction(ActionFactory.UNDO.getId())); // action to add

menu.appendToGroup(
GEFActionConstants.GROUP_UNDO,
getAction(ActionFactory.REDO.getId()));

menu.appendToGroup(
GEFActionConstants.GROUP_EDIT,
getAction(ActionFactory.DELETE.getId()));
}

And Provide some sample or direction of how to proceed further??




"Pratik Shah" <ppshah@us.ibm.com> wrote in message
news:ci9l3e$3p3$1@eclipse.org...
> Yes, the palette. The palette is a graphical viewer driven by a model
just
> like your main graphical viewer.
>
> "Amit Saxena" <amitsaxena@iopsis.com> wrote in message
> news:ci9a1r$c7c$1@eclipse.org...
> > Hello,
> > I want to Hide the Figures that r drawn on editor, not the
palete
> > one. The Logic example hides the palete diagrams. Suppose, I drag a
figure
> > and on the right click that figure on the editor , a menu of "Hide"
should
> > appear and when clicked on that the figure should hide (some icon should
> > come on Palete when Hide is clicked on any figure in the editor).
> > Can u provide any sample of that ???
> >
> > "Pratik Shah" <ppshah@us.ibm.com> wrote in message
> > news:ci7910$9ll$1@eclipse.org...
> > > Add a property to your model that would indicate whether or not it's
> > hidden.
> > >
> > > The parent editpart should only return visible children in its
> > > getModelChildren() method.
> > >
> > > Add the Hide action in your ContextMenuProvider. The action should
> change
> > > the hidden state. When the child's editpart gets notified of this
> change,
> > > it should tell its parent to refreshChildren() (or rather,
> > add/removeChild()
> > > for better performance).
> > >
> > > How do you intend to allow the user to show hidden parts?
> > >
> > > You can look at the palette as an example. Right-click on the logic
> > palette
> > > and select "Customize." It has a hide checkbox which does the same
> thing.
> > > The implementation is slightly different in that the parent editpart
> > listens
> > > for changes to all its children, and refreshes itself when the hide
> > property
> > > changes on any of them. Related classes: PaletteEditPart,
PaletteEntry.
> > >
> > >
> > > "Amit Saxena" <amitsaxena@iopsis.com> wrote in message
> > > news:ci645e$vn8$1@eclipse.org...
> > > > Hi,
> > > > I m using the GEF Plugin and using the Shape plugin of gef that
> is
> > > > defiend in CVS of GEF.
> > > > On right click of any diagram, the context menu shows options of
Undo,
> > > Redo,
> > > > Delete and etc.
> > > > I wanted the Functionality of "Hide" added to the context menu when
> > right
> > > > clicked on any diagram which will hide that particular diagram and
> also
> > > the
> > > > "View" that will show the hidden diagram when clicked on view
context
> > > menu.
> > > > Can u provide any directions or sample of how to proceed further??
> > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>
Re: "Hide" Option in ContextMenu [message #151247 is a reply to message #151210] Thu, 16 September 2004 15:02 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

You need to create your own constants, actions, and request types, and the
commands to hide and show your model objects.

"Amit Saxena" <amitsaxena@iopsis.com> wrote in message
news:cibs2q$h1k$1@eclipse.org...
> Hello,
> I have this method that contains context menu .. When we right
> click on any diagram on the editor , not on the Palete.
> We get the option of Undo, Redo and Delete by the following code.
> But the GEFActionConstants() does not contains "Hide" field in
the
> GEF API ...
> It contains all fields except the "Hide" field.
> I wanted the Hide option in the context menu with "Hide" and
> "View" as option.
> When Clicked on Hide option, it should hide that particular
> diagram and
> when clicked on View option, the diagram shown be visible.
> And wht Methods to write in GEF for the above following ??
> Can u modify the code for "Hide " and "View "??
>
> public void buildContextMenu(IMenuManager menu)
> {
> // Add standard action groups to the menu
> GEFActionConstants.addStandardActionGroups(menu);
>
> // Add actions to the menu
> menu.appendToGroup(
> GEFActionConstants.GROUP_UNDO, // target group id
> getAction(ActionFactory.UNDO.getId())); // action to add
>
> menu.appendToGroup(
> GEFActionConstants.GROUP_UNDO,
> getAction(ActionFactory.REDO.getId()));
>
> menu.appendToGroup(
> GEFActionConstants.GROUP_EDIT,
> getAction(ActionFactory.DELETE.getId()));
> }
>
> And Provide some sample or direction of how to proceed further??
>
>
>
>
> "Pratik Shah" <ppshah@us.ibm.com> wrote in message
> news:ci9l3e$3p3$1@eclipse.org...
> > Yes, the palette. The palette is a graphical viewer driven by a model
> just
> > like your main graphical viewer.
> >
> > "Amit Saxena" <amitsaxena@iopsis.com> wrote in message
> > news:ci9a1r$c7c$1@eclipse.org...
> > > Hello,
> > > I want to Hide the Figures that r drawn on editor, not the
> palete
> > > one. The Logic example hides the palete diagrams. Suppose, I drag a
> figure
> > > and on the right click that figure on the editor , a menu of "Hide"
> should
> > > appear and when clicked on that the figure should hide (some icon
should
> > > come on Palete when Hide is clicked on any figure in the editor).
> > > Can u provide any sample of that ???
> > >
> > > "Pratik Shah" <ppshah@us.ibm.com> wrote in message
> > > news:ci7910$9ll$1@eclipse.org...
> > > > Add a property to your model that would indicate whether or not it's
> > > hidden.
> > > >
> > > > The parent editpart should only return visible children in its
> > > > getModelChildren() method.
> > > >
> > > > Add the Hide action in your ContextMenuProvider. The action should
> > change
> > > > the hidden state. When the child's editpart gets notified of this
> > change,
> > > > it should tell its parent to refreshChildren() (or rather,
> > > add/removeChild()
> > > > for better performance).
> > > >
> > > > How do you intend to allow the user to show hidden parts?
> > > >
> > > > You can look at the palette as an example. Right-click on the logic
> > > palette
> > > > and select "Customize." It has a hide checkbox which does the same
> > thing.
> > > > The implementation is slightly different in that the parent editpart
> > > listens
> > > > for changes to all its children, and refreshes itself when the hide
> > > property
> > > > changes on any of them. Related classes: PaletteEditPart,
> PaletteEntry.
> > > >
> > > >
> > > > "Amit Saxena" <amitsaxena@iopsis.com> wrote in message
> > > > news:ci645e$vn8$1@eclipse.org...
> > > > > Hi,
> > > > > I m using the GEF Plugin and using the Shape plugin of gef
that
> > is
> > > > > defiend in CVS of GEF.
> > > > > On right click of any diagram, the context menu shows options of
> Undo,
> > > > Redo,
> > > > > Delete and etc.
> > > > > I wanted the Functionality of "Hide" added to the context menu
when
> > > right
> > > > > clicked on any diagram which will hide that particular diagram and
> > also
> > > > the
> > > > > "View" that will show the hidden diagram when clicked on view
> context
> > > > menu.
> > > > > Can u provide any directions or sample of how to proceed further??
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>
Re: "Hide" Option in ContextMenu [message #151396 is a reply to message #151247] Mon, 20 September 2004 06:19 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: amitsaxena.iopsis.com

Can u provide any examples regarding the below question of creating
constants,actions and request types to hide the figure from the editor ..
Or Provide any samples ??

"Randy Hudson" <none@us.ibm.com> wrote in message
news:cic9n3$dhv$1@eclipse.org...
> You need to create your own constants, actions, and request types, and the
> commands to hide and show your model objects.
>
> "Amit Saxena" <amitsaxena@iopsis.com> wrote in message
> news:cibs2q$h1k$1@eclipse.org...
> > Hello,
> > I have this method that contains context menu .. When we right
> > click on any diagram on the editor , not on the Palete.
> > We get the option of Undo, Redo and Delete by the following
code.
> > But the GEFActionConstants() does not contains "Hide" field in
> the
> > GEF API ...
> > It contains all fields except the "Hide" field.
> > I wanted the Hide option in the context menu with "Hide" and
> > "View" as option.
> > When Clicked on Hide option, it should hide that particular
> > diagram and
> > when clicked on View option, the diagram shown be visible.
> > And wht Methods to write in GEF for the above following ??
> > Can u modify the code for "Hide " and "View "??
> >
> > public void buildContextMenu(IMenuManager menu)
> > {
> > // Add standard action groups to the menu
> > GEFActionConstants.addStandardActionGroups(menu);
> >
> > // Add actions to the menu
> > menu.appendToGroup(
> > GEFActionConstants.GROUP_UNDO, // target group id
> > getAction(ActionFactory.UNDO.getId())); // action to add
> >
> > menu.appendToGroup(
> > GEFActionConstants.GROUP_UNDO,
> > getAction(ActionFactory.REDO.getId()));
> >
> > menu.appendToGroup(
> > GEFActionConstants.GROUP_EDIT,
> > getAction(ActionFactory.DELETE.getId()));
> > }
> >
> > And Provide some sample or direction of how to proceed further??
> >
> >
> >
> >
> > "Pratik Shah" <ppshah@us.ibm.com> wrote in message
> > news:ci9l3e$3p3$1@eclipse.org...
> > > Yes, the palette. The palette is a graphical viewer driven by a model
> > just
> > > like your main graphical viewer.
> > >
> > > "Amit Saxena" <amitsaxena@iopsis.com> wrote in message
> > > news:ci9a1r$c7c$1@eclipse.org...
> > > > Hello,
> > > > I want to Hide the Figures that r drawn on editor, not the
> > palete
> > > > one. The Logic example hides the palete diagrams. Suppose, I drag a
> > figure
> > > > and on the right click that figure on the editor , a menu of "Hide"
> > should
> > > > appear and when clicked on that the figure should hide (some icon
> should
> > > > come on Palete when Hide is clicked on any figure in the editor).
> > > > Can u provide any sample of that ???
> > > >
> > > > "Pratik Shah" <ppshah@us.ibm.com> wrote in message
> > > > news:ci7910$9ll$1@eclipse.org...
> > > > > Add a property to your model that would indicate whether or not
it's
> > > > hidden.
> > > > >
> > > > > The parent editpart should only return visible children in its
> > > > > getModelChildren() method.
> > > > >
> > > > > Add the Hide action in your ContextMenuProvider. The action
should
> > > change
> > > > > the hidden state. When the child's editpart gets notified of this
> > > change,
> > > > > it should tell its parent to refreshChildren() (or rather,
> > > > add/removeChild()
> > > > > for better performance).
> > > > >
> > > > > How do you intend to allow the user to show hidden parts?
> > > > >
> > > > > You can look at the palette as an example. Right-click on the
logic
> > > > palette
> > > > > and select "Customize." It has a hide checkbox which does the
same
> > > thing.
> > > > > The implementation is slightly different in that the parent
editpart
> > > > listens
> > > > > for changes to all its children, and refreshes itself when the
hide
> > > > property
> > > > > changes on any of them. Related classes: PaletteEditPart,
> > PaletteEntry.
> > > > >
> > > > >
> > > > > "Amit Saxena" <amitsaxena@iopsis.com> wrote in message
> > > > > news:ci645e$vn8$1@eclipse.org...
> > > > > > Hi,
> > > > > > I m using the GEF Plugin and using the Shape plugin of gef
> that
> > > is
> > > > > > defiend in CVS of GEF.
> > > > > > On right click of any diagram, the context menu shows options of
> > Undo,
> > > > > Redo,
> > > > > > Delete and etc.
> > > > > > I wanted the Functionality of "Hide" added to the context menu
> when
> > > > right
> > > > > > clicked on any diagram which will hide that particular diagram
and
> > > also
> > > > > the
> > > > > > "View" that will show the hidden diagram when clicked on view
> > context
> > > > > menu.
> > > > > > Can u provide any directions or sample of how to proceed
further??
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>
Re: "Hide" Option in ContextMenu [message #151669 is a reply to message #151396] Wed, 22 September 2004 05:05 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: amitsaxena.iopsis.com

Can u provide any examples or sample code for hiding of figures when click
"hide " from the context menu ..


"Amit Saxena" <amitsaxena@iopsis.com> wrote in message
news:cilsgm$8fu$1@eclipse.org...
> Can u provide any examples regarding the below question of creating
> constants,actions and request types to hide the figure from the editor ..
> Or Provide any samples ??
>
> "Randy Hudson" <none@us.ibm.com> wrote in message
> news:cic9n3$dhv$1@eclipse.org...
> > You need to create your own constants, actions, and request types, and
the
> > commands to hide and show your model objects.
> >
> > "Amit Saxena" <amitsaxena@iopsis.com> wrote in message
> > news:cibs2q$h1k$1@eclipse.org...
> > > Hello,
> > > I have this method that contains context menu .. When we
right
> > > click on any diagram on the editor , not on the Palete.
> > > We get the option of Undo, Redo and Delete by the following
> code.
> > > But the GEFActionConstants() does not contains "Hide" field
in
> > the
> > > GEF API ...
> > > It contains all fields except the "Hide" field.
> > > I wanted the Hide option in the context menu with "Hide" and
> > > "View" as option.
> > > When Clicked on Hide option, it should hide that particular
> > > diagram and
> > > when clicked on View option, the diagram shown be visible.
> > > And wht Methods to write in GEF for the above following ??
> > > Can u modify the code for "Hide " and "View "??
> > >
> > > public void buildContextMenu(IMenuManager menu)
> > > {
> > > // Add standard action groups to the menu
> > > GEFActionConstants.addStandardActionGroups(menu);
> > >
> > > // Add actions to the menu
> > > menu.appendToGroup(
> > > GEFActionConstants.GROUP_UNDO, // target group id
> > > getAction(ActionFactory.UNDO.getId())); // action to add
> > >
> > > menu.appendToGroup(
> > > GEFActionConstants.GROUP_UNDO,
> > > getAction(ActionFactory.REDO.getId()));
> > >
> > > menu.appendToGroup(
> > > GEFActionConstants.GROUP_EDIT,
> > > getAction(ActionFactory.DELETE.getId()));
> > > }
> > >
> > > And Provide some sample or direction of how to proceed further??
> > >
> > >
> > >
> > >
> > > "Pratik Shah" <ppshah@us.ibm.com> wrote in message
> > > news:ci9l3e$3p3$1@eclipse.org...
> > > > Yes, the palette. The palette is a graphical viewer driven by a
model
> > > just
> > > > like your main graphical viewer.
> > > >
> > > > "Amit Saxena" <amitsaxena@iopsis.com> wrote in message
> > > > news:ci9a1r$c7c$1@eclipse.org...
> > > > > Hello,
> > > > > I want to Hide the Figures that r drawn on editor, not
the
> > > palete
> > > > > one. The Logic example hides the palete diagrams. Suppose, I drag
a
> > > figure
> > > > > and on the right click that figure on the editor , a menu of
"Hide"
> > > should
> > > > > appear and when clicked on that the figure should hide (some icon
> > should
> > > > > come on Palete when Hide is clicked on any figure in the editor).
> > > > > Can u provide any sample of that ???
> > > > >
> > > > > "Pratik Shah" <ppshah@us.ibm.com> wrote in message
> > > > > news:ci7910$9ll$1@eclipse.org...
> > > > > > Add a property to your model that would indicate whether or not
> it's
> > > > > hidden.
> > > > > >
> > > > > > The parent editpart should only return visible children in its
> > > > > > getModelChildren() method.
> > > > > >
> > > > > > Add the Hide action in your ContextMenuProvider. The action
> should
> > > > change
> > > > > > the hidden state. When the child's editpart gets notified of
this
> > > > change,
> > > > > > it should tell its parent to refreshChildren() (or rather,
> > > > > add/removeChild()
> > > > > > for better performance).
> > > > > >
> > > > > > How do you intend to allow the user to show hidden parts?
> > > > > >
> > > > > > You can look at the palette as an example. Right-click on the
> logic
> > > > > palette
> > > > > > and select "Customize." It has a hide checkbox which does the
> same
> > > > thing.
> > > > > > The implementation is slightly different in that the parent
> editpart
> > > > > listens
> > > > > > for changes to all its children, and refreshes itself when the
> hide
> > > > > property
> > > > > > changes on any of them. Related classes: PaletteEditPart,
> > > PaletteEntry.
> > > > > >
> > > > > >
> > > > > > "Amit Saxena" <amitsaxena@iopsis.com> wrote in message
> > > > > > news:ci645e$vn8$1@eclipse.org...
> > > > > > > Hi,
> > > > > > > I m using the GEF Plugin and using the Shape plugin of
gef
> > that
> > > > is
> > > > > > > defiend in CVS of GEF.
> > > > > > > On right click of any diagram, the context menu shows options
of
> > > Undo,
> > > > > > Redo,
> > > > > > > Delete and etc.
> > > > > > > I wanted the Functionality of "Hide" added to the context menu
> > when
> > > > > right
> > > > > > > clicked on any diagram which will hide that particular diagram
> and
> > > > also
> > > > > > the
> > > > > > > "View" that will show the hidden diagram when clicked on view
> > > context
> > > > > > menu.
> > > > > > > Can u provide any directions or sample of how to proceed
> further??
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>
Re: "Hide" Option in ContextMenu [message #151684 is a reply to message #151669] Wed, 22 September 2004 14:13 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

See the INCREMENT action in the logic example, and its associated constants
and model operations.

"Amit Saxena" <amitsaxena@iopsis.com> wrote in message
news:cir0ue$fml$1@eclipse.org...
> Can u provide any examples or sample code for hiding of figures when click
> "hide " from the context menu ..
>
>
> "Amit Saxena" <amitsaxena@iopsis.com> wrote in message
> news:cilsgm$8fu$1@eclipse.org...
> > Can u provide any examples regarding the below question of creating
> > constants,actions and request types to hide the figure from the editor
...
> > Or Provide any samples ??
> >
> > "Randy Hudson" <none@us.ibm.com> wrote in message
> > news:cic9n3$dhv$1@eclipse.org...
> > > You need to create your own constants, actions, and request types, and
> the
> > > commands to hide and show your model objects.
> > >
> > > "Amit Saxena" <amitsaxena@iopsis.com> wrote in message
> > > news:cibs2q$h1k$1@eclipse.org...
> > > > Hello,
> > > > I have this method that contains context menu .. When we
> right
> > > > click on any diagram on the editor , not on the Palete.
> > > > We get the option of Undo, Redo and Delete by the following
> > code.
> > > > But the GEFActionConstants() does not contains "Hide"
field
> in
> > > the
> > > > GEF API ...
> > > > It contains all fields except the "Hide" field.
> > > > I wanted the Hide option in the context menu with "Hide"
and
> > > > "View" as option.
> > > > When Clicked on Hide option, it should hide that
particular
> > > > diagram and
> > > > when clicked on View option, the diagram shown be
visible.
> > > > And wht Methods to write in GEF for the above following
??
> > > > Can u modify the code for "Hide " and "View "??
> > > >
> > > > public void buildContextMenu(IMenuManager menu)
> > > > {
> > > > // Add standard action groups to the menu
> > > > GEFActionConstants.addStandardActionGroups(menu);
> > > >
> > > > // Add actions to the menu
> > > > menu.appendToGroup(
> > > > GEFActionConstants.GROUP_UNDO, // target group id
> > > > getAction(ActionFactory.UNDO.getId())); // action to add
> > > >
> > > > menu.appendToGroup(
> > > > GEFActionConstants.GROUP_UNDO,
> > > > getAction(ActionFactory.REDO.getId()));
> > > >
> > > > menu.appendToGroup(
> > > > GEFActionConstants.GROUP_EDIT,
> > > > getAction(ActionFactory.DELETE.getId()));
> > > > }
> > > >
> > > > And Provide some sample or direction of how to proceed further??
> > > >
> > > >
> > > >
> > > >
> > > > "Pratik Shah" <ppshah@us.ibm.com> wrote in message
> > > > news:ci9l3e$3p3$1@eclipse.org...
> > > > > Yes, the palette. The palette is a graphical viewer driven by a
> model
> > > > just
> > > > > like your main graphical viewer.
> > > > >
> > > > > "Amit Saxena" <amitsaxena@iopsis.com> wrote in message
> > > > > news:ci9a1r$c7c$1@eclipse.org...
> > > > > > Hello,
> > > > > > I want to Hide the Figures that r drawn on editor, not
> the
> > > > palete
> > > > > > one. The Logic example hides the palete diagrams. Suppose, I
drag
> a
> > > > figure
> > > > > > and on the right click that figure on the editor , a menu of
> "Hide"
> > > > should
> > > > > > appear and when clicked on that the figure should hide (some
icon
> > > should
> > > > > > come on Palete when Hide is clicked on any figure in the
editor).
> > > > > > Can u provide any sample of that ???
> > > > > >
> > > > > > "Pratik Shah" <ppshah@us.ibm.com> wrote in message
> > > > > > news:ci7910$9ll$1@eclipse.org...
> > > > > > > Add a property to your model that would indicate whether or
not
> > it's
> > > > > > hidden.
> > > > > > >
> > > > > > > The parent editpart should only return visible children in its
> > > > > > > getModelChildren() method.
> > > > > > >
> > > > > > > Add the Hide action in your ContextMenuProvider. The action
> > should
> > > > > change
> > > > > > > the hidden state. When the child's editpart gets notified of
> this
> > > > > change,
> > > > > > > it should tell its parent to refreshChildren() (or rather,
> > > > > > add/removeChild()
> > > > > > > for better performance).
> > > > > > >
> > > > > > > How do you intend to allow the user to show hidden parts?
> > > > > > >
> > > > > > > You can look at the palette as an example. Right-click on the
> > logic
> > > > > > palette
> > > > > > > and select "Customize." It has a hide checkbox which does the
> > same
> > > > > thing.
> > > > > > > The implementation is slightly different in that the parent
> > editpart
> > > > > > listens
> > > > > > > for changes to all its children, and refreshes itself when the
> > hide
> > > > > > property
> > > > > > > changes on any of them. Related classes: PaletteEditPart,
> > > > PaletteEntry.
> > > > > > >
> > > > > > >
> > > > > > > "Amit Saxena" <amitsaxena@iopsis.com> wrote in message
> > > > > > > news:ci645e$vn8$1@eclipse.org...
> > > > > > > > Hi,
> > > > > > > > I m using the GEF Plugin and using the Shape plugin of
> gef
> > > that
> > > > > is
> > > > > > > > defiend in CVS of GEF.
> > > > > > > > On right click of any diagram, the context menu shows
options
> of
> > > > Undo,
> > > > > > > Redo,
> > > > > > > > Delete and etc.
> > > > > > > > I wanted the Functionality of "Hide" added to the context
menu
> > > when
> > > > > > right
> > > > > > > > clicked on any diagram which will hide that particular
diagram
> > and
> > > > > also
> > > > > > > the
> > > > > > > > "View" that will show the hidden diagram when clicked on
view
> > > > context
> > > > > > > menu.
> > > > > > > > Can u provide any directions or sample of how to proceed
> > further??
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>
Re: "Hide" Option in ContextMenu [message #152363 is a reply to message #151684] Wed, 29 September 2004 11:44 Go to previous message
Eclipse UserFriend
Originally posted by: amitsaxena.iopsis.com

Hello,

I m not getting the exact flow of how to procedd.. i have also
checked the Logic Part ...But it is too vast to ge the flow of Logic...
Can u provide any small example which contains the Hiding of diagrams on
context menu ..
Or Provide me the direction of how to proceed ??

"Randy Hudson" <none@us.ibm.com> wrote in message
news:cis11g$ieg$1@eclipse.org...

> See the INCREMENT action in the logic example, and its associated
constants
> and model operations.
>
> "Amit Saxena" <amitsaxena@iopsis.com> wrote in message
> news:cir0ue$fml$1@eclipse.org...
> > Can u provide any examples or sample code for hiding of figures when
click
> > "hide " from the context menu ..
> >
> >
> > "Amit Saxena" <amitsaxena@iopsis.com> wrote in message
> > news:cilsgm$8fu$1@eclipse.org...
> > > Can u provide any examples regarding the below question of creating
> > > constants,actions and request types to hide the figure from the editor
> ..
> > > Or Provide any samples ??
> > >
> > > "Randy Hudson" <none@us.ibm.com> wrote in message
> > > news:cic9n3$dhv$1@eclipse.org...
> > > > You need to create your own constants, actions, and request types,
and
> > the
> > > > commands to hide and show your model objects.
> > > >
> > > > "Amit Saxena" <amitsaxena@iopsis.com> wrote in message
> > > > news:cibs2q$h1k$1@eclipse.org...
> > > > > Hello,
> > > > > I have this method that contains context menu .. When we
> > right
> > > > > click on any diagram on the editor , not on the Palete.
> > > > > We get the option of Undo, Redo and Delete by the
following
> > > code.
> > > > > But the GEFActionConstants() does not contains "Hide"
> field
> > in
> > > > the
> > > > > GEF API ...
> > > > > It contains all fields except the "Hide" field.
> > > > > I wanted the Hide option in the context menu with "Hide"
> and
> > > > > "View" as option.
> > > > > When Clicked on Hide option, it should hide that
> particular
> > > > > diagram and
> > > > > when clicked on View option, the diagram shown be
> visible.
> > > > > And wht Methods to write in GEF for the above following
> ??
> > > > > Can u modify the code for "Hide " and "View "??
> > > > >
> > > > > public void buildContextMenu(IMenuManager menu)
> > > > > {
> > > > > // Add standard action groups to the menu
> > > > > GEFActionConstants.addStandardActionGroups(menu);
> > > > >
> > > > > // Add actions to the menu
> > > > > menu.appendToGroup(
> > > > > GEFActionConstants.GROUP_UNDO, // target group id
> > > > > getAction(ActionFactory.UNDO.getId())); // action to add
> > > > >
> > > > > menu.appendToGroup(
> > > > > GEFActionConstants.GROUP_UNDO,
> > > > > getAction(ActionFactory.REDO.getId()));
> > > > >
> > > > > menu.appendToGroup(
> > > > > GEFActionConstants.GROUP_EDIT,
> > > > > getAction(ActionFactory.DELETE.getId()));
> > > > > }
> > > > >
> > > > > And Provide some sample or direction of how to proceed further??
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > "Pratik Shah" <ppshah@us.ibm.com> wrote in message
> > > > > news:ci9l3e$3p3$1@eclipse.org...
> > > > > > Yes, the palette. The palette is a graphical viewer driven by a
> > model
> > > > > just
> > > > > > like your main graphical viewer.
> > > > > >
> > > > > > "Amit Saxena" <amitsaxena@iopsis.com> wrote in message
> > > > > > news:ci9a1r$c7c$1@eclipse.org...
> > > > > > > Hello,
> > > > > > > I want to Hide the Figures that r drawn on editor,
not
> > the
> > > > > palete
> > > > > > > one. The Logic example hides the palete diagrams. Suppose, I
> drag
> > a
> > > > > figure
> > > > > > > and on the right click that figure on the editor , a menu of
> > "Hide"
> > > > > should
> > > > > > > appear and when clicked on that the figure should hide (some
> icon
> > > > should
> > > > > > > come on Palete when Hide is clicked on any figure in the
> editor).
> > > > > > > Can u provide any sample of that ???
> > > > > > >
> > > > > > > "Pratik Shah" <ppshah@us.ibm.com> wrote in message
> > > > > > > news:ci7910$9ll$1@eclipse.org...
> > > > > > > > Add a property to your model that would indicate whether or
> not
> > > it's
> > > > > > > hidden.
> > > > > > > >
> > > > > > > > The parent editpart should only return visible children in
its
> > > > > > > > getModelChildren() method.
> > > > > > > >
> > > > > > > > Add the Hide action in your ContextMenuProvider. The action
> > > should
> > > > > > change
> > > > > > > > the hidden state. When the child's editpart gets notified
of
> > this
> > > > > > change,
> > > > > > > > it should tell its parent to refreshChildren() (or rather,
> > > > > > > add/removeChild()
> > > > > > > > for better performance).
> > > > > > > >
> > > > > > > > How do you intend to allow the user to show hidden parts?
> > > > > > > >
> > > > > > > > You can look at the palette as an example. Right-click on
the
> > > logic
> > > > > > > palette
> > > > > > > > and select "Customize." It has a hide checkbox which does
the
> > > same
> > > > > > thing.
> > > > > > > > The implementation is slightly different in that the parent
> > > editpart
> > > > > > > listens
> > > > > > > > for changes to all its children, and refreshes itself when
the
> > > hide
> > > > > > > property
> > > > > > > > changes on any of them. Related classes: PaletteEditPart,
> > > > > PaletteEntry.
> > > > > > > >
> > > > > > > >
> > > > > > > > "Amit Saxena" <amitsaxena@iopsis.com> wrote in message
> > > > > > > > news:ci645e$vn8$1@eclipse.org...
> > > > > > > > > Hi,
> > > > > > > > > I m using the GEF Plugin and using the Shape plugin
of
> > gef
> > > > that
> > > > > > is
> > > > > > > > > defiend in CVS of GEF.
> > > > > > > > > On right click of any diagram, the context menu shows
> options
> > of
> > > > > Undo,
> > > > > > > > Redo,
> > > > > > > > > Delete and etc.
> > > > > > > > > I wanted the Functionality of "Hide" added to the context
> menu
> > > > when
> > > > > > > right
> > > > > > > > > clicked on any diagram which will hide that particular
> diagram
> > > and
> > > > > > also
> > > > > > > > the
> > > > > > > > > "View" that will show the hidden diagram when clicked on
> view
> > > > > context
> > > > > > > > menu.
> > > > > > > > > Can u provide any directions or sample of how to proceed
> > > further??
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>
Previous Topic:Relative paths when loading images
Next Topic:2nd view for the model
Goto Forum:
  


Current Time: Fri Apr 19 12:45:01 GMT 2024

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

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

Back to the top