cayenne-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eshan Sudharaka <esudhar...@gmail.com>
Subject Re: Gsoc Project Update
Date Fri, 01 Jul 2011 03:51:47 GMT
Thanks. I got it. I have another problem in implementing plugin actions
classes. We can register external Actions to actionMap in
DefaultActionManager class. So I registered PlugingProject class and add
that class in to file menu of CayenneModelerFrame and run my plugin. Then it
seems project close action is menu item is disabled .I think I need add
PluginProjectAction class   following in DefaultActionManager class.

  static final Collection<String> PROJECT_ACTIONS = Arrays.asList(
            RevertAction.class.getName(),
            ProjectAction.class.getName(),
            ValidateAction.class.getName(),
            SaveAsAction.class.getName(),
            FindAction.class.getName());

Here I should add my PluginProjectAction class. I have extended
PluginActionManager from DefaultActionManager class. Since this is a static
this list is not inherited to child class and also we can not add any thing
since it is final. How to overcome this issue ? We can do this by modifying
parent class ( DefaultActionManager class ) and I am not sure whether it is
a good approach or not. Now I am working on this.

Thanks.

On Thu, Jun 30, 2011 at 7:04 PM, Ksenia Khailenko <xenia_khailenka@tut.by>wrote:

> >>>>>
> 1:07
> Eshan Sudharaka
> Hi , what is the reason to do setEnable(false )  for some items in file
> menu
> in cayenne modeler in your plugin ?
> I dint get the point
> >>>>>>>
> Eshan means this one:
>
> if (NewProjectAction.getActionName().equals(name)
> +                        || OpenProjectAction.getActionName().equals(name)
> +                        || ProjectAction.getActionName().equals(name)
> +                        || "Recent Projects".equals(name)) {
> +                    item.setEnabled(false);
> +                }
> All these actions perform manipulations with some another projects, but we
> are dealing with the selected project from Eclipse, so, it was considered
> then that the switching between projects is undesirable when working with
> plugin - it may happen that we don't have the correspondent project in
> Eclipse, and on change will try to update it...
>
> But I think we can enable the "NewProjectAction" for example, to create the
> cayenne project by the plugin....or we can just leave these buttons for now
>
> 2011/6/28 Andrus Adamchik <andrus@objectstyle.org>
>
> > Sounds good.
> >
> > We might still want to change the naming convention for consistency down
> > the road, but good to hear there's no urgency.
> >
> > Andrus
> >
> > On Jun 28, 2011, at 2:16 PM, Eshan Sudharaka wrote:
> >
> > > Hi ,
> > >  I am sorry. I found a way to check the content of the XML files
> > (currently
> > > root element) and if it is cayenne project file then load cayenne icon
> in
> > > eclipse. So no need of changing file naming conventions.
> > >
> > > On Sun, Jun 26, 2011 at 8:34 PM, Andrus Adamchik <
> andrus@objectstyle.org
> > >wrote:
> > >
> > >>
> > >> On Jun 26, 2011, at 5:45 PM, Andrus Adamchik wrote:
> > >>
> > >>> However... nothing prevents us from changing the naming convention
> > again.
> > >> After all 3.1 is not final yet (not even Beta). We might as well adopt
> > >> another "double extension":
> > >>>
> > >>> Main project file: xyz.cayenne.xml
> > >>> DataMap file: xyz.map.xml
> > >>>
> > >>> This will ensure both types of files follow a similar convention, and
> > >> make them Eclipse-friendly.
> > >>
> > >> Also the beauty of Cayenne 3.1 is that the name of the project file is
> > >> specified explicitly when the runtime is started, so the file can
> really
> > be
> > >> called anything (doesn't even have to have .xml extension). So the
> focus
> > of
> > >> this discussion is the tools (CayenneModeler, Eclipse, etc..), not the
> > >> runtime.
> > >>
> > >> Andrus
> > >>
> > >>
> > >
> > >
> > > --
> > > *~Thanks & Regards~*
> > > ***
> > > *
> > > P.A.Eshan Sudharaka
> > > Dept of Computer Science and Engineering
> > > University of Moratuwa
> > > Sri Lanka
> > > http://esudharaka.blogspot.com/
> >
> >
>
>
> --
> Regards, Ksenia Khailenko
>



-- 
*~Thanks & Regards~*
***
*
P.A.Eshan Sudharaka
Dept of Computer Science and Engineering
University of Moratuwa
Sri Lanka
http://esudharaka.blogspot.com/

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message