Return-Path: X-Original-To: apmail-cayenne-dev-archive@www.apache.org Delivered-To: apmail-cayenne-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1D90F45FE for ; Mon, 11 Jul 2011 06:25:49 +0000 (UTC) Received: (qmail 56513 invoked by uid 500); 11 Jul 2011 06:25:46 -0000 Delivered-To: apmail-cayenne-dev-archive@cayenne.apache.org Received: (qmail 56463 invoked by uid 500); 11 Jul 2011 06:25:30 -0000 Mailing-List: contact dev-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cayenne.apache.org Delivered-To: mailing list dev@cayenne.apache.org Received: (qmail 56435 invoked by uid 99); 11 Jul 2011 06:25:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Jul 2011 06:25:20 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [208.78.103.231] (HELO vorsha.objectstyle.org) (208.78.103.231) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 11 Jul 2011 06:25:12 +0000 Received: (qmail 12890 invoked from network); 11 Jul 2011 06:24:50 -0000 Received: from unknown (HELO ?192.168.1.100?) (194.158.197.10) by vorsha.objectstyle.org with SMTP; 11 Jul 2011 06:24:50 -0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1084) Subject: Re: Gsoc Project Update From: Andrus Adamchik In-Reply-To: Date: Mon, 11 Jul 2011 09:24:49 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: References: <3D7CAA6B-3B43-49CF-A49A-E16F279C510B@objectstyle.org> <0CF5D654-CB9D-4E04-B77E-07D9DD7D45C1@objectstyle.org> <590952CA-28AF-42D0-88E3-7F91525B5BD9@objectstyle.org> <0796AEC7-4349-477D-933D-85A101226207@objectstyle.org> To: dev@cayenne.apache.org X-Mailer: Apple Mail (2.1084) X-Virus-Checked: Checked by ClamAV on apache.org I have no problem if we change DefaultActionManager etc. on the Cayenne = end to be easily extendable class. CayenneModeler configuration of = internal classes has lots of shortcuts, as it never assumed other apps = using or extending this code. Now it is time to evolve it. Andrus On Jul 10, 2011, at 1:12 PM, Ksenia Khailenko wrote: > Andrus, look at this one, please. We have the DefaultActionManager = with > final property which we want to override. It is possible to create an > another implementation of ActionManager, but in fact in this case, we > duplicate a lot of code... >=20 > 2011/7/2 Eshan Sudharaka >=20 >> Yes. It is possible. I have attached patch files with this. For this = patch >> I had to add default constructors to following classes. >>=20 >> CayenneController.java >> CayenneModelerController.java >>=20 >> trunk.patch includes this modification (Actualy no need to apply >> trunk.patch just add default constructors to those clases) >>=20 >> Second patch includes the modifications included in this thread. >>=20 >>=20 >> On Fri, Jul 1, 2011 at 8:59 PM, Ksenia Khailenko = wrote: >>=20 >>> May be it would be better not to extend from DefaultActionManager, = but >>> implement it's interface? Is it possible? >>>=20 >>> 2011/7/1 Eshan Sudharaka >>>=20 >>>> 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. >>>>=20 >>>> static final Collection PROJECT_ACTIONS =3D Arrays.asList( >>>> RevertAction.class.getName(), >>>> ProjectAction.class.getName(), >>>> ValidateAction.class.getName(), >>>> SaveAsAction.class.getName(), >>>> FindAction.class.getName()); >>>>=20 >>>> 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. >>>>=20 >>>> Thanks. >>>>=20 >>>> On Thu, Jun 30, 2011 at 7:04 PM, Ksenia Khailenko < >>> xenia_khailenka@tut.by >>>>> wrote: >>>>=20 >>>>>>>>>>=20 >>>>> 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 >>>>>>>>>>>>=20 >>>>> Eshan means this one: >>>>>=20 >>>>> 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... >>>>>=20 >>>>> 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 >>>>>=20 >>>>> 2011/6/28 Andrus Adamchik >>>>>=20 >>>>>> Sounds good. >>>>>>=20 >>>>>> We might still want to change the naming convention for = consistency >>>> down >>>>>> the road, but good to hear there's no urgency. >>>>>>=20 >>>>>> Andrus >>>>>>=20 >>>>>> On Jun 28, 2011, at 2:16 PM, Eshan Sudharaka wrote: >>>>>>=20 >>>>>>> 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. >>>>>>>=20 >>>>>>> On Sun, Jun 26, 2011 at 8:34 PM, Andrus Adamchik < >>>>> andrus@objectstyle.org >>>>>>> wrote: >>>>>>>=20 >>>>>>>>=20 >>>>>>>> On Jun 26, 2011, at 5:45 PM, Andrus Adamchik wrote: >>>>>>>>=20 >>>>>>>>> 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": >>>>>>>>>=20 >>>>>>>>> Main project file: xyz.cayenne.xml >>>>>>>>> DataMap file: xyz.map.xml >>>>>>>>>=20 >>>>>>>>> This will ensure both types of files follow a similar >>> convention, >>>> and >>>>>>>> make them Eclipse-friendly. >>>>>>>>=20 >>>>>>>> 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. >>>>>>>>=20 >>>>>>>> Andrus >>>>>>>>=20 >>>>>>>>=20 >>>>>>>=20 >>>>>>>=20 >>>>>>> -- >>>>>>> *~Thanks & Regards~* >>>>>>> *** >>>>>>> * >>>>>>> P.A.Eshan Sudharaka >>>>>>> Dept of Computer Science and Engineering >>>>>>> University of Moratuwa >>>>>>> Sri Lanka >>>>>>> http://esudharaka.blogspot.com/ >>>>>>=20 >>>>>>=20 >>>>>=20 >>>>>=20 >>>>> -- >>>>> Regards, Ksenia Khailenko >>>>>=20 >>>>=20 >>>>=20 >>>>=20 >>>> -- >>>> *~Thanks & Regards~* >>>> *** >>>> * >>>> P.A.Eshan Sudharaka >>>> Dept of Computer Science and Engineering >>>> University of Moratuwa >>>> Sri Lanka >>>> http://esudharaka.blogspot.com/ >>>>=20 >>>=20 >>>=20 >>>=20 >>> -- >>> Regards, Ksenia Khailenko >>>=20 >>=20 >>=20 >>=20 >> -- >> *~Thanks & Regards~* >> *** >> * >> P.A.Eshan Sudharaka >> Dept of Computer Science and Engineering >> University of Moratuwa >> Sri Lanka >> http://esudharaka.blogspot.com/ >>=20 >>=20 >=20 >=20 > --=20 > Regards, Ksenia Khailenko