+ } catch (Exception e)
+ {
+ Cache.log.warn("Problems parsing treefile '"
+ + tree.getNewick(0).getContent() + "'", e);
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see jalview.io.vamsas.DatastoreItem#conflict()
+ */
+ @Override
+ public void conflict()
+ {
+ Cache.log
+ .info("Update (with conflict) from vamsas document to alignment associated tree not implemented yet.");
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see jalview.io.vamsas.DatastoreItem#update()
+ */
+ @Override
+ public void updateToDoc()
+ {
+ if (isModifiable(tree.getModifiable()))
+ {
+ // synchronize(); // update();
+ // verify any changes.
+ log.info("TODO: Update tree in document from jalview.");
+ }
+ else
+ {
+ // handle conflict
+ log.info("TODO: Add the locally modified tree in Jalview as a new tree in document, leaving locked tree unchanged.");
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see jalview.io.vamsas.DatastoreItem#updateFromDoc()
+ */
+ @Override
+ public void updateFromDoc()
+ {
+ // should probably just open a new tree panel in the same place as the old
+ // one
+ // TODO: Tree.updateFromDoc
+ /*
+ * TreePanel tp = (TreePanel) jvobj; // getvObj2jv(tree);
+ *
+ * // make a new tree Object[] idata =
+ * recoverInputData(tree.getProvenance()); try { if (idata != null &&
+ * idata[0] != null) { inputData = (AlignmentView) idata[0]; } ntree =
+ * getNtree(); title = tree.getNewick(0).getTitle(); if (title == null ||
+ * title.length() == 0) { title = tree.getTitle(); // hack!!!! } } catch
+ * (Exception e) { Cache.log.warn("Problems parsing treefile '" +
+ * tree.getNewick(0).getContent() + "'", e); }
+ */
+ log.debug("Update the local tree in jalview from the document.");
+
+ if (isModifiable(tree.getModifiable()))
+ {
+ // synchronize(); // update();
+ // verify any changes.
+ log.debug("Update tree in document from jalview.");
+ }
+ else
+ {
+ // handle conflict
+ log.debug("Add modified jalview tree as new tree in document.");