Holger Schmeisky; holge...@fu-berlin.de Takustraße 9, Room 008, Freie Universität Berlin, 14195 Berlin +49 176 64146306
Am 21.08.2014 14:24, schrieb Stefan Rossbach: > On 21.08.2014 08:54, Holger Schmeisky wrote: >> Hi, >> >> I would like to refactor the IProject implementation in Saros/I and have >> a few questions about how the Resources API works in Eclipse: >> >> * Is ResourcesPlugin.getWorkspace().getRoot() the best way to get at >> the workspace? > It is the only way, maybe some other static methods but the result would > be the same >> - If yes, We will need a unified mechanism for getting projects >> from somewhere >> - Should it have static methods? In that case I dont know how to >> implement it :-) >> - otherwise I would suggest and interface + adding the >> implementation to PicoContainer OK so how do I do that? Static methods + Inheritance does not make sense. What about interface IResourceAccessor getWorkspace() class EclipseRessourceAccessor implements IResourceAccessor ResourcesPlugin delegate class IntelliJRessourceAccessor implements IResourceAccessor ... then add this to the PicoContainer Component.create(IResourceAccessor.class, EclipseResourceAccessor.class), and get it injected, where we need it? (I only did a quick but in most classes where ResourcesPlugin is used, Injection is also used so this would work) > Can you please describe your problem what is wrong with the current > interfaces ? No the interfaces are absolutely, just thinking how to correct the implementation in Saros/I :-) >> Regards, >> Holger >> ------------------------------------------------------------------------------ Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/ _______________________________________________ DPP-Devel mailing list DPP-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dpp-devel