Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Problem with a non-collapsible compartment
Problem with a non-collapsible compartment [message #145239] Sat, 04 August 2007 21:10 Go to next message
Eclipse UserFriend
Originally posted by: NOSPAM.xyz.com

Hi, I have A Top-Level Node with a compartment. I need to open
a dialog after a double-click anywhere in that node. So I install

installEditPolicy(EditPolicyRoles.OPEN_ROLE, new
OpenParamDialogEditPolicy());
on this compartment's EP.

If the compartment is collapsible everything works fine - on double-click
its edit part gets
SelectionRequest of type "open" and so on.
However if the compartments is non-collapsible ( canCollapse="false"
hideIfEmpty="false" in *gmfgen)
and occupies the whole area of the parent's top-level node than nobody gets
a "open" request at all, neither the compartment EP nor its parent EP.
I know that you may wonder why would somebody want to switch-off one of the
neatest
UI features of GMF, but in the context of my application it just doesn't
make sense to
collapse a compartment but leave its parent node occupying real estate. So I
use a compartment only
for the cool sliders but I must have it fully expanded all the time.
Any idea why would such a compartment suddenly stop receiving "open"
requests?
Regards,
Theo M
Re: Problem with a non-collapsible compartment [message #145702 is a reply to message #145239] Tue, 07 August 2007 17:22 Go to previous message
Eclipse UserFriend
Originally posted by: NOSPAM.xyz.com

"Theo" <NOSPAM@xyz.com> wrote in message
news:f92poh$ou3$1@build.eclipse.org...
> Hi, I have A Top-Level Node with a compartment. I need to open
> a dialog after a double-click anywhere in that node. So I install
>
> installEditPolicy(EditPolicyRoles.OPEN_ROLE, new
> OpenParamDialogEditPolicy());
> on this compartment's EP.
>
> If the compartment is collapsible everything works fine - on double-click
> its edit part gets
> SelectionRequest of type "open" and so on.
> However if the compartments is non-collapsible ( canCollapse="false"
> hideIfEmpty="false" in *gmfgen)
> and occupies the whole area of the parent's top-level node than nobody
> gets
> a "open" request at all, neither the compartment EP nor its parent EP.
> I know that you may wonder why would somebody want to switch-off one of
> the neatest
> UI features of GMF, but in the context of my application it just doesn't
> make sense to
> collapse a compartment but leave its parent node occupying real estate. So
> I use a compartment only
> for the cool sliders but I must have it fully expanded all the time.
> Any idea why would such a compartment suddenly stop receiving "open"
> requests?
> Regards,
> Theo M

I think I found it. When one chooses non-collapsible compartment in the
tooling the generated compartment EP does not override
ShapeCompartmentEditPart's

getDragTracker(Request req)

It returns just a RubberbandDragTracker which knows nothing about REQ_OPEN
and so on.
I overrode it to rerurn SelectEditPartTracker and now it seems to work, but
i'll have to test further.
Theo
Previous Topic:Online Doc linked to Eclipse 3.1 help
Next Topic:custom figures archive
Goto Forum:
  


Current Time: Mon Jul 22 05:12:29 GMT 2024

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

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

Back to the top