On Wed, May 9, 2012 at 11:02 AM, Usman Bhatti <
usman.bhatti@gmail.com> wrote:
> On Tue, May 8, 2012 at 10:47 PM, Tudor Girba <
tudor@tudorgirba.com> wrote:
>>
>> Hi Usman,
>>
>> Could we start from your actual requirement?
>>
>> As I understood, you would just want to have a subclass of MooseModel, and
>> then have a MoosePanel that has a special menu for this entity. Is that so?
>
>
> This is just one requirement and it was not difficult to resolve and its
> done away with.
>
> The problem is occurring from the requirement that I need to build
> customized menus for entities in the model (FAMIXClass, FAMIXMethod, etc.)
> in my browser: I want to eliminate some menus (inspect, evaluate, etc.) for
> my entities.
>
> Now, the menus are defined in MooseEntity hierarchy so even if I am creating
> a different browser/finder, my patch blocks the menus for all browser and
> not just mine. So, the change set provides a way to resolve this problem,
> though not completely :-).
>
> hence the question: how to resolve the problem of customized menus for moose
> entities without impacting other browsers and without making the solution
> complicated?
>
> we can talk about it if you want.
>
> Usman
>
>
>
>>
>> If yes, the simplest way would be to define a YourPanel and build the menu
>> you want there. Would this not work?
>>
>> Cheers,
>> Doru
>>
>>
>> On 8 May 2012, at 21:53, Usman Bhatti wrote:
>>
>> >
>> >
>> > On Tue, May 8, 2012 at 3:03 PM, Tudor Girba <
tudor@tudorgirba.com>
>> > wrote:
>> > Hi,
>> >
>> > I took a quick look, and I think this is the wrong way to approach the
>> > problem. The default Moose menu relies on a lightweight implementation
>> > that is useful for just that: being a default menu. If you are adding
>> > multiple layers to this mechanism it will become too complex.
>> >
>> > I agree that adapting the current system for customization will make it
>> > more complex and difficult to manage.
>> >
>> >
>> > If you want to go into customization, than the way to go is to reify
>> > each action as an object and then assembly the menu by putting those
>> > objects together in the menu logic. Basically, you would need to
>> > implement a command hierarchy (like the hierarchy of
>> > MoosePanelCommand).
>> >
>> > So, you mean we need to create a default object for menu construction
>> > and customization are done by subclassing the default object?
>> >
>> > Usman
>> >
>> >
>> > So meaning that
>> >
>> >
>> > Cheers,
>> > Doru
>> >
>> >
>> > On Tue, May 8, 2012 at 2:25 PM, Usman Bhatti <
usman.bhatti@gmail.com>
>> > wrote:
>> > > Hi,
>> > >
>> > >
>> > > As discussed, I am working on the idea how to customize menus for
>> > > entities
>> > > in Moose Finder. As the menu construction depends on the pragmas
>> > > defined on
>> > > moose entity hierarchy, the idea is to read pragmas in some specific
>> > > way. We
>> > > tried something with Stéphane yesterday and here I am sending you the
>> > > change
>> > > set. Can you please have a look?
>> > >
>> > >
>> > > The change set does not complete resolve the problem :-). The problem
>> > > is
>> > > that menus are duplicated and changes are still invasive (that is the
>> > > code
>> > > overrides the default moose finder behavior). But this can be a
>> > > possible
>> > > approach to resolve it.
>> > >
>> > >
>> > > tx
>> > >
>> > > Usman
>> > >
>> > >
>> > > _______________________________________________
>> > > Moose-dev mailing list
>> > >
Moose-dev@iam.unibe.ch
>> > >
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>> > >
>> >
>> >
>> >
>> > --
>> >
www.tudorgirba.com
>> >
>> > "Every thing has its own flow"
>> >
>> > _______________________________________________
>> > Moose-dev mailing list
>> >
Moose-dev@iam.unibe.ch
>> >
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>> >
>> > _______________________________________________
>> > Moose-dev mailing list
>> >
Moose-dev@iam.unibe.ch
>> >
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>> --
>>
www.tudorgirba.com
>>
>> "Presenting is storytelling."
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>>
Moose-dev@iam.unibe.ch
>>
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
>
> _______________________________________________
> Moose-dev mailing list
>
Moose-dev@iam.unibe.ch
>
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
--
www.tudorgirba.com
"Every thing has its own flow"
_______________________________________________
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev