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

Simeo: moving items

JeebSceneInterface

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.