> Hi Sarosianer, > > I currently try to implement a IDE independent SessionInvitation, and > right > now I use an ISarosSessionManager for that.(I am not sure that this works > the way it's intended so feel free to review :) [1] > > Stefan give me the advice to use CollaborationUtils class[2], which > already > provide the needed functionality. I like to get some feedback about > different approaches to use this. > > Since this class is implemented in IntelliJ and Eclipse, with the same > public methods (and 95% same code), my first approach would be to > introduce > an ICollaborationUtils Interface to the core. > > The problem is that Java don't allow static methods to implement an > Interface, so I would need to to change all static methods and initiate > this class at some point(Where?When?). I have no idea about the impact of > this. (As I see it, the class is instantiated by PICO on plugin load in > the > static block). Is there a way to do this, and is this a good idea anyway? > > Another, (quite smelly) way would be to Introduce an ICollabUtil that > provides exactly the same methodes but will be implemented by another (non > static) class which would just delegate the actions to CollaborationUtils.
+1 - this is the approach I always took for migrating static utility classes to core. It works if in all places you want to use CollabUtils you can use the PicoContainer (which in most cases you already do anyways) > This class would be instantiated with PICO when it's needed by the UI. > This > wouldn't impact the usage of CollaborationUtils at all. > > The last approach would be to Implement a Core_CollabUtils, but I am not > sure that this can be done, because the implementation could be IDE > depended. > > I hope this isn't to confusing. What would be the best solution? > > Best, > Matthias > > [1] > http://saros-build.imp.fu-berlin.de/gerrit/#/c/2297/1/de.fu_berlin.inf.dpp.ui/src/de/fu_berlin/inf/dpp/ui/browser_functions/SessionWizardPageBrowserFunctions.java > [2] > https://github.com/saros-project/saros/blob/master/de.fu_berlin.inf.dpp/src/de/fu_berlin/inf/dpp/ui/util/CollaborationUtils.java > ------------------------------------------------------------------------------ > Monitor 25 network devices or servers for free with OpManager! > OpManager is web-based network management software that monitors > network devices and physical & virtual servers, alerts via email & sms > for fault. Monitor 25 devices for free with no restriction. Download now > http://ad.doubleclick.net/ddm/clk/292181274;119417398;o_______________________________________________ > DPP-Devel mailing list > DPP-Devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/dpp-devel > ------------------------------------------------------------------------------ Monitor 25 network devices or servers for free with OpManager! OpManager is web-based network management software that monitors network devices and physical & virtual servers, alerts via email & sms for fault. Monitor 25 devices for free with no restriction. Download now http://ad.doubleclick.net/ddm/clk/292181274;119417398;o _______________________________________________ DPP-Devel mailing list DPP-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dpp-devel