====== Technical notes (for developers) ====== ** Edito2 - big volumes management ** (fc-29.5.2013, under progress) A copy of Simeo-Edito, aims at organizing better the files management: as least copies as possible, if a plant is added 2 times in the scene, only one file is copied in the working dir and the 2 mockups have the same file. A Proxy can be asked to get the archiTree of a mockup, it will look in maps. It may also cache the archiTrees to answer faster. When a mockup is changed, be careful to change a copy of its archiTree (to avoid changing several trees). Write through the proxy: it will write a real file for this mockup and memo it if is different (e.g. in filePath_1). This new backup file will be returned by the proxy for the mockup. In Mockup: getFileKey () // Check the primary key String key = mockup.getR_FilePath_1 (); // If primary the key is null, get the secondary key if (key == null) { // a_filePath_0 is the secondary key key = mockup.getA_FilePath_0 (); // never null } In proxy: // Get the backup file String backupFile = mockupFile_backupFile.get (key); The proxy may take care of the bboxes, the outlines (see the May 2013 work on outlines in Edito). **Ideas:** __FileProxy__: add (Mockup), instead of copyFile (...), getFile (Mockup) returns the backup file __ArchiTreeCache__: getArchiTree (Mockup), relies on FileProxy and a Map of SoftReferences __OutlineCache__: getOutline (Mockup), relies on ArchiTreeCache __BboxCache__: getBbox (Mockup), relies on ArchiTreeCache **OR** __MockupCache__: getArchiTree (Mockup), getOutline (Mockup), getBbox (Mockup) **See the writing system quickly** a mockup has been changed (twisted, pruned, irradiated...) -> The change must be done in a copy of the ArchiTree: manage properly -> The change must be written through the FileProxy: a new file must be created and the FileKey must be changed. FileProxy.write (Mockup) ? ** Xplo JTreeTable ** * JTreeTable implements LisenedTo * Fine tuning of the selection event thrown by the JTreeTable * one single event sent to the Listeners (ArchiTreeTableView) with deselection, selection **Simeo: moving items** * Polylines / polygons (LineItem subclasses): bounding box can not go outside the terrain during the moves. * Other items: the anchor point can not go outside the terrain during the moves **JeebSceneInterface** * All Gscene subclasses in Simeo AND Xplo modules must implement JeebSceneInterface. JeebSceneInterface = GScene + isEditable (). * JeebScene is a particular case, often used but not always: Lollymangrove scene is a JeebSceneInterface but not a JeebScene (it extends a capsis.defaulttype.TreeList) **Editable steps** in Xplo and Simeo, steps are editable if they are intervention results (with a '*') and isLeaf (). Special case: in PlantEditor and Edito, all steps are editable. -> To edit a non-editable step, make a copy with the 'duplicate step' command.