From afa3ed0be2f440b84f5a204ca6ed40c15b30feb8 Mon Sep 17 00:00:00 2001 From: elena-posea Date: Tue, 29 Jul 2014 16:33:32 +0300 Subject: [PATCH 01/12] #362 - Propagate message child flag (+icon) to parents --- .../sdiff/CodeSyncSdiffConstants.java | 15 +++ .../codesync/sdiff/CodeSyncSdiffPlugin.java | 53 +++++--- .../CanContainCommentAddNodeListener.java | 22 ++++ .../CanContainCommentPropertyController.java | 54 +++++++++ .../CanContainCommentRemoveNodeListener.java | 19 +++ .../controller/ContainsCommentPropagator.java | 76 ++++++++++++ .../StructureDiffCommentController.java | 8 +- .../org/flowerplatform/core/CorePlugin.java | 3 + .../core/DirtyPropagatorController.java | 114 ++++++++++++++++++ .../codesync.sdiff/comment-marker/comment.png | Bin 0 -> 413 bytes .../comment-marker/comments.png | Bin 0 -> 557 bytes org.flowerplatform.resources/readme.md | 5 +- 12 files changed, 350 insertions(+), 19 deletions(-) create mode 100644 org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentAddNodeListener.java create mode 100644 org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentPropertyController.java create mode 100644 org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentRemoveNodeListener.java create mode 100644 org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/ContainsCommentPropagator.java create mode 100644 org.flowerplatform.core/src/org/flowerplatform/core/DirtyPropagatorController.java create mode 100644 org.flowerplatform.resources/public-resources/images/codesync.sdiff/comment-marker/comment.png create mode 100644 org.flowerplatform.resources/public-resources/images/codesync.sdiff/comment-marker/comments.png diff --git a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/CodeSyncSdiffConstants.java b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/CodeSyncSdiffConstants.java index 816455f3..10995f18 100644 --- a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/CodeSyncSdiffConstants.java +++ b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/CodeSyncSdiffConstants.java @@ -15,6 +15,8 @@ */ package org.flowerplatform.codesync.sdiff; +import org.flowerplatform.util.UtilConstants; + public class CodeSyncSdiffConstants { ////////////////////////////////// @@ -25,6 +27,8 @@ public class CodeSyncSdiffConstants { public static final String STRUCTURE_DIFF_EXTENSION = ".sdiff"; public static final String COMMENT = "sdiffComment"; + public static final String CAN_CONTAIN_COMMENT = "containsComment"; + public static final String CATEGORY_CAN_CONTAIN_COMMENT = UtilConstants.CATEGORY_PREFIX + CAN_CONTAIN_COMMENT; // relative to repository public static final String STRUCTURE_DIFFS_FOLDER = "sdiffs"; @@ -40,10 +44,21 @@ public class CodeSyncSdiffConstants { public static final String MATCH_COLOR_CHILDREN_MODIFIED = "#FFCC00"; public static final String MATCH_COLOR_COMMENT = "#FFFF00"; + // dirty marker for comments + public static final String SHOULD_NOT_BE_CONSIDERED_DIRTY = "shouldBeConsideredDirty"; + public static final String NODE_URI_TO_BE_IGNORED = "nodeURIToBeIgnored"; + ////////////////////////////////// // Service context options ////////////////////////////////// public static final String SKIP_MATCH_CHILDREN_PROVIDER = "skipMatchChildrenProvider"; + ///////////////////////////////// + // Images + //////////////////////////////// + + public static final String IMG_TYPE_COMMENTS = "comments.png"; + public static final String IMG_TYPE_COMMENT = "comment.png"; + } \ No newline at end of file diff --git a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/CodeSyncSdiffPlugin.java b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/CodeSyncSdiffPlugin.java index 7853d008..ef6d140e 100644 --- a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/CodeSyncSdiffPlugin.java +++ b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/CodeSyncSdiffPlugin.java @@ -16,20 +16,29 @@ package org.flowerplatform.codesync.sdiff; import static org.flowerplatform.codesync.CodeSyncConstants.MATCH; +import static org.flowerplatform.codesync.sdiff.CodeSyncSdiffConstants.CATEGORY_CAN_CONTAIN_COMMENT; import static org.flowerplatform.codesync.sdiff.CodeSyncSdiffConstants.COMMENT; import static org.flowerplatform.codesync.sdiff.CodeSyncSdiffConstants.STRUCTURE_DIFF; import static org.flowerplatform.codesync.sdiff.CodeSyncSdiffConstants.STRUCTURE_DIFF_EXTENSION; import static org.flowerplatform.core.CoreConstants.ADD_CHILD_DESCRIPTOR; +import static org.flowerplatform.core.CoreConstants.ADD_NODE_CONTROLLER; import static org.flowerplatform.core.CoreConstants.CHILDREN_PROVIDER; import static org.flowerplatform.core.CoreConstants.FILE_NODE_TYPE; import static org.flowerplatform.core.CoreConstants.PROPERTIES_PROVIDER; +import static org.flowerplatform.core.CoreConstants.PROPERTY_SETTER; +import static org.flowerplatform.core.CoreConstants.REMOVE_NODE_CONTROLLER; +import org.flowerplatform.codesync.sdiff.controller.CanContainCommentAddNodeListener; +import org.flowerplatform.codesync.sdiff.controller.CanContainCommentPropertyController; +import org.flowerplatform.codesync.sdiff.controller.CanContainCommentRemoveNodeListener; import org.flowerplatform.codesync.sdiff.controller.StructureDiffCommentController; import org.flowerplatform.codesync.sdiff.controller.StructureDiffMatchChildrenProvider; import org.flowerplatform.codesync.sdiff.controller.StructureDiffMatchPropertiesProvider; +import org.flowerplatform.core.CoreConstants; import org.flowerplatform.core.CorePlugin; import org.flowerplatform.core.file.FileSubscribableProvider; import org.flowerplatform.core.node.remote.AddChildDescriptor; +import org.flowerplatform.core.node.remote.GenericValueDescriptor; import org.flowerplatform.resources.ResourcesPlugin; import org.flowerplatform.util.plugin.AbstractFlowerJavaPlugin; import org.osgi.framework.BundleContext; @@ -40,31 +49,41 @@ public class CodeSyncSdiffPlugin extends AbstractFlowerJavaPlugin { protected static CodeSyncSdiffPlugin INSTANCE; - + public static CodeSyncSdiffPlugin getInstance() { return INSTANCE; } - + public void start(BundleContext bundleContext) throws Exception { super.start(bundleContext); INSTANCE = this; - + CorePlugin.getInstance().getServiceRegistry().registerService("structureDiffService", new StructureDiffService()); - - CorePlugin.getInstance().getNodeTypeDescriptorRegistry().getOrCreateTypeDescriptor(STRUCTURE_DIFF); - + + CorePlugin.getInstance().getNodeTypeDescriptorRegistry().getOrCreateTypeDescriptor(STRUCTURE_DIFF) + .addCategory(CATEGORY_CAN_CONTAIN_COMMENT); + CorePlugin.getInstance().getNodeTypeDescriptorRegistry().getOrCreateTypeDescriptor(FILE_NODE_TYPE) - .addAdditiveController(PROPERTIES_PROVIDER, new FileSubscribableProvider(STRUCTURE_DIFF_EXTENSION, "fpp", "mindmap", true)); - + .addAdditiveController(PROPERTIES_PROVIDER, new FileSubscribableProvider(STRUCTURE_DIFF_EXTENSION, "fpp", "mindmap", true)); + CorePlugin.getInstance().getNodeTypeDescriptorRegistry().getOrCreateTypeDescriptor(MATCH) - .addAdditiveController(PROPERTIES_PROVIDER, new StructureDiffMatchPropertiesProvider()) - .addAdditiveController(CHILDREN_PROVIDER, new StructureDiffMatchChildrenProvider()) - .addAdditiveController(ADD_CHILD_DESCRIPTOR, new AddChildDescriptor().setChildTypeAs(COMMENT).setLabelAs(ResourcesPlugin.getInstance().getMessage("codesync.sdiff.comment"))); - + .addAdditiveController(PROPERTIES_PROVIDER, new StructureDiffMatchPropertiesProvider()) + .addAdditiveController(CHILDREN_PROVIDER, new StructureDiffMatchChildrenProvider()) + .addCategory(CATEGORY_CAN_CONTAIN_COMMENT); + CorePlugin.getInstance().getNodeTypeDescriptorRegistry().getOrCreateTypeDescriptor(COMMENT) - .addAdditiveController(PROPERTIES_PROVIDER, new StructureDiffCommentController()); + .addAdditiveController(PROPERTIES_PROVIDER, new StructureDiffCommentController()) + .addCategory(CATEGORY_CAN_CONTAIN_COMMENT); + + CorePlugin.getInstance().getNodeTypeDescriptorRegistry().getOrCreateCategoryTypeDescriptor(CATEGORY_CAN_CONTAIN_COMMENT) + .addAdditiveController(PROPERTIES_PROVIDER, new CanContainCommentPropertyController()) + .addAdditiveController(PROPERTY_SETTER, new CanContainCommentPropertyController()) + .addAdditiveController(ADD_NODE_CONTROLLER, new CanContainCommentAddNodeListener().setOrderIndexAs(10000)) + .addAdditiveController(REMOVE_NODE_CONTROLLER, new CanContainCommentRemoveNodeListener().setOrderIndexAs(-10000)) + .addAdditiveController(ADD_CHILD_DESCRIPTOR, + new AddChildDescriptor().setChildTypeAs(COMMENT).setLabelAs(ResourcesPlugin.getInstance().getMessage("codesync.sdiff.comment"))); } - + public void stop(BundleContext bundleContext) throws Exception { super.stop(bundleContext); INSTANCE = null; @@ -74,5 +93,9 @@ public void stop(BundleContext bundleContext) throws Exception { public void registerMessageBundle() throws Exception { // nothing to do yet } - + + public String getImagePath(String img) { + return ResourcesPlugin.getInstance().getResourceUrl("/images/codesync.sdiff/comment-marker/" + img); + } + } \ No newline at end of file diff --git a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentAddNodeListener.java b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentAddNodeListener.java new file mode 100644 index 00000000..618b690a --- /dev/null +++ b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentAddNodeListener.java @@ -0,0 +1,22 @@ +package org.flowerplatform.codesync.sdiff.controller; + +import static org.flowerplatform.codesync.sdiff.CodeSyncSdiffConstants.COMMENT; +import static org.flowerplatform.codesync.sdiff.CodeSyncSdiffConstants.SHOULD_NOT_BE_CONSIDERED_DIRTY; +import org.flowerplatform.core.node.NodeService; +import org.flowerplatform.core.node.controller.IAddNodeController; +import org.flowerplatform.core.node.remote.Node; +import org.flowerplatform.core.node.remote.ServiceContext; +/** + * + * @author Elena Posea + */ +public class CanContainCommentAddNodeListener extends ContainsCommentPropagator implements IAddNodeController{ + + @Override + public void addNode(Node node, Node child, ServiceContext serviceContext) { + if(child.getType().equals(COMMENT)){ + setDirtyAndPropagateToParents(child, serviceContext.add(SHOULD_NOT_BE_CONSIDERED_DIRTY, true)); + } + } + +} diff --git a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentPropertyController.java b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentPropertyController.java new file mode 100644 index 00000000..f3ae107f --- /dev/null +++ b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentPropertyController.java @@ -0,0 +1,54 @@ +package org.flowerplatform.codesync.sdiff.controller; + +import static org.flowerplatform.codesync.sdiff.CodeSyncSdiffConstants.CAN_CONTAIN_COMMENT; +import static org.flowerplatform.codesync.sdiff.CodeSyncSdiffConstants.IMG_TYPE_COMMENTS; +import static org.flowerplatform.core.CoreConstants.EXECUTE_ONLY_FOR_UPDATER; +import static org.flowerplatform.core.CoreConstants.ICONS; + +import org.flowerplatform.codesync.sdiff.CodeSyncSdiffPlugin; +import org.flowerplatform.core.CoreConstants; +import org.flowerplatform.core.node.NodeService; +import org.flowerplatform.core.node.controller.IPropertiesProvider; +import org.flowerplatform.core.node.controller.IPropertySetter; +import org.flowerplatform.core.node.remote.Node; +import org.flowerplatform.core.node.remote.ServiceContext; +import org.flowerplatform.util.controller.AbstractController; + +public class CanContainCommentPropertyController extends AbstractController implements IPropertySetter, IPropertiesProvider { + + @Override + public void populateWithProperties(Node node, ServiceContext context) { + Boolean b = (Boolean) node.getProperties().get(CAN_CONTAIN_COMMENT); + if (b != null && b == true) { // is dirty + node.getProperties().put(ICONS, CodeSyncSdiffPlugin.getInstance().getImagePath(IMG_TYPE_COMMENTS)); + } + } + + @Override + public void setProperty(Node node, String property, Object value, ServiceContext context) { + if (property.equals(CAN_CONTAIN_COMMENT) && (Boolean) value == true) { + setIcon(node, context); + } + } + + private void setIcon(Node node, ServiceContext context) { + ServiceContext newContext = new ServiceContext(); + newContext.getContext().put(EXECUTE_ONLY_FOR_UPDATER, true); + String newIcon = CodeSyncSdiffPlugin.getInstance().getImagePath(IMG_TYPE_COMMENTS); + String icon = (String) node.getPropertyValue(ICONS); + if(icon == null) icon = ""; + icon = icon + (!icon.isEmpty() ? CoreConstants.ICONS_SEPARATOR : "") + newIcon; + context.getService().setProperty(node, ICONS, icon, newContext); + } + + + @Override + public void unsetProperty(Node node, String property, ServiceContext context) { + if (property.equals(CAN_CONTAIN_COMMENT)) { + ServiceContext newContext = new ServiceContext(); + newContext.getContext().put(EXECUTE_ONLY_FOR_UPDATER, true); + context.getService().unsetProperty(node, ICONS, newContext); + } + } + +} diff --git a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentRemoveNodeListener.java b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentRemoveNodeListener.java new file mode 100644 index 00000000..c8e61f9e --- /dev/null +++ b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentRemoveNodeListener.java @@ -0,0 +1,19 @@ +package org.flowerplatform.codesync.sdiff.controller; + +import org.flowerplatform.core.node.NodeService; +import org.flowerplatform.core.node.controller.IRemoveNodeController; +import org.flowerplatform.core.node.remote.Node; +import org.flowerplatform.core.node.remote.ServiceContext; + +/** + * + * @author Elena Posea + */ +public class CanContainCommentRemoveNodeListener extends ContainsCommentPropagator implements IRemoveNodeController { + + @Override + public void removeNode(Node node, Node child, ServiceContext serviceContext) { + unsetDirtyAndPropagateToParents(child, serviceContext); + } + +} diff --git a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/ContainsCommentPropagator.java b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/ContainsCommentPropagator.java new file mode 100644 index 00000000..cf68774b --- /dev/null +++ b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/ContainsCommentPropagator.java @@ -0,0 +1,76 @@ +package org.flowerplatform.codesync.sdiff.controller; + +import static org.flowerplatform.codesync.sdiff.CodeSyncSdiffConstants.CAN_CONTAIN_COMMENT; +import static org.flowerplatform.codesync.sdiff.CodeSyncSdiffConstants.IMG_TYPE_COMMENT; +import static org.flowerplatform.codesync.sdiff.CodeSyncSdiffConstants.NODE_URI_TO_BE_IGNORED; +import static org.flowerplatform.codesync.sdiff.CodeSyncSdiffConstants.SHOULD_NOT_BE_CONSIDERED_DIRTY; +import static org.flowerplatform.core.CoreConstants.ICONS; + +import org.flowerplatform.codesync.sdiff.CodeSyncSdiffConstants; +import org.flowerplatform.codesync.sdiff.CodeSyncSdiffPlugin; +import org.flowerplatform.core.DirtyPropagatorController; +import org.flowerplatform.core.node.NodeService; +import org.flowerplatform.core.node.remote.Node; +import org.flowerplatform.core.node.remote.ServiceContext; + +/** + * @author Elena Posea + */ +public class ContainsCommentPropagator extends DirtyPropagatorController { + + @Override + public void setDirty(Node node, ServiceContext serviceContext) { + // nothing to do + } + + @Override + public void unsetDirty(Node node, ServiceContext serviceContext) { + // if(node.getType().equals(COMMENT)) // if it is not a comment, isDirty + // will return false anyway, but isChildrenDirty won't + serviceContext.add(NODE_URI_TO_BE_IGNORED, node.getNodeUri()); + } + + @Override + public void setChildrenDirty(Node node, ServiceContext context) { + context.getService().setProperty(node, CAN_CONTAIN_COMMENT, true, context); + node.getProperties().put(ICONS, CodeSyncSdiffPlugin.getInstance().getImagePath(IMG_TYPE_COMMENT)); + + } + + // private String append(String icon, String decorator) { + // return CodeSyncJavaPlugin.getInstance().getImageComposerUrl(icon, + // getImagePath(decorator)); + // } + + @Override + public void unsetChildrenDirty(Node node, ServiceContext context) { + context.getService().unsetProperty(node, CAN_CONTAIN_COMMENT, context); + context.getService().unsetProperty(node, ICONS, context); + } + + @Override + public boolean isDirty(Node node, ServiceContext serviceContext) { + if (node.getNodeUri().equals(serviceContext.getContext().get(NODE_URI_TO_BE_IGNORED))) + return false; + return node.getType().equals(CodeSyncSdiffConstants.COMMENT) && (!serviceContext.getContext().containsKey(SHOULD_NOT_BE_CONSIDERED_DIRTY)); + } + + @Override + public boolean isChildrenDirty(Node node, ServiceContext serviceContext) { + Boolean b = (Boolean) node.getPropertyValue(CAN_CONTAIN_COMMENT); // is + // something + // that + // has + // a + // child + // comment, + // and + // it + // should + // not + // be + // ignored + return b != null && b && !(node.getNodeUri().equals(serviceContext.getContext().get(NODE_URI_TO_BE_IGNORED))); + } + +} diff --git a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/StructureDiffCommentController.java b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/StructureDiffCommentController.java index a3d03b3b..116f326d 100644 --- a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/StructureDiffCommentController.java +++ b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/StructureDiffCommentController.java @@ -15,9 +15,12 @@ */ package org.flowerplatform.codesync.sdiff.controller; +import static org.flowerplatform.codesync.sdiff.CodeSyncSdiffConstants.IMG_TYPE_COMMENT; +import static org.flowerplatform.codesync.sdiff.CodeSyncSdiffConstants.MATCH_COLOR_COMMENT; +import static org.flowerplatform.core.CoreConstants.ICONS; import static org.flowerplatform.mindmap.MindMapConstants.COLOR_BACKGROUND; -import org.flowerplatform.codesync.sdiff.CodeSyncSdiffConstants; +import org.flowerplatform.codesync.sdiff.CodeSyncSdiffPlugin; import org.flowerplatform.core.node.NodeService; import org.flowerplatform.core.node.controller.IPropertiesProvider; import org.flowerplatform.core.node.remote.Node; @@ -31,7 +34,8 @@ public class StructureDiffCommentController extends AbstractController implement @Override public void populateWithProperties(Node node, ServiceContext context) { - node.getProperties().put(COLOR_BACKGROUND, CodeSyncSdiffConstants.MATCH_COLOR_COMMENT); + node.getProperties().put(COLOR_BACKGROUND, MATCH_COLOR_COMMENT); + node.getProperties().put(ICONS, CodeSyncSdiffPlugin.getInstance().getImagePath(IMG_TYPE_COMMENT)); } } \ No newline at end of file diff --git a/org.flowerplatform.core/src/org/flowerplatform/core/CorePlugin.java b/org.flowerplatform.core/src/org/flowerplatform/core/CorePlugin.java index c58d6f59..9c521956 100644 --- a/org.flowerplatform.core/src/org/flowerplatform/core/CorePlugin.java +++ b/org.flowerplatform.core/src/org/flowerplatform/core/CorePlugin.java @@ -16,6 +16,7 @@ package org.flowerplatform.core; import static org.flowerplatform.core.CoreConstants.DEFAULT_PROPERTY_PROVIDER; +import static org.flowerplatform.core.CoreConstants.POPULATE_WITH_PROPERTIES; import static org.flowerplatform.core.CoreConstants.PROPERTY_DESCRIPTOR; import static org.flowerplatform.core.CoreConstants.PROPERTY_LINE_RENDERER_TYPE_PREFERENCE; @@ -33,9 +34,11 @@ import org.flowerplatform.core.node.controller.PropertyDescriptorDefaultPropertyValueProvider; import org.flowerplatform.core.node.controller.TypeDescriptorRegistryDebugControllers; import org.flowerplatform.core.node.remote.GenericValueDescriptor; +import org.flowerplatform.core.node.remote.Node; import org.flowerplatform.core.node.remote.NodeServiceRemote; import org.flowerplatform.core.node.remote.PropertyDescriptor; import org.flowerplatform.core.node.remote.ResourceServiceRemote; +import org.flowerplatform.core.node.remote.ServiceContext; import org.flowerplatform.core.node.resource.BaseResourceHandler; import org.flowerplatform.core.node.resource.ResourceDebugControllers; import org.flowerplatform.core.node.resource.ResourceService; diff --git a/org.flowerplatform.core/src/org/flowerplatform/core/DirtyPropagatorController.java b/org.flowerplatform.core/src/org/flowerplatform/core/DirtyPropagatorController.java new file mode 100644 index 00000000..040504b2 --- /dev/null +++ b/org.flowerplatform.core/src/org/flowerplatform/core/DirtyPropagatorController.java @@ -0,0 +1,114 @@ +package org.flowerplatform.core; + +import static org.flowerplatform.core.CoreConstants.POPULATE_WITH_PROPERTIES; + +import java.util.List; + +import org.flowerplatform.core.node.NodeService; +import org.flowerplatform.core.node.remote.Node; +import org.flowerplatform.core.node.remote.ServiceContext; +import org.flowerplatform.util.controller.AbstractController; + +/** + * + * @author Elena Posea + */ +public abstract class DirtyPropagatorController extends AbstractController{ + + public abstract void setDirty(Node node, ServiceContext context); + + public abstract void unsetDirty(Node node, ServiceContext context); + + public abstract void setChildrenDirty(Node node, ServiceContext context); + + public abstract void unsetChildrenDirty(Node node, ServiceContext context); + + /** + * In Node node, for property flagProperty, is it changer, or does it have + * the default value? + * + * @param node + * @param flagProperty + * @param defaultFlagValue + * @return true, if the flagProperty property of node is different than the + * defaultFlagValue + */ + public abstract boolean isDirty(Node node, ServiceContext serviceContext); + + public abstract boolean isChildrenDirty(Node node, ServiceContext serviceContext); + + /** + * @param node + * the node on which I want to start propagation + * @param serviceContext + * the service used for this node + * @param propagator + * the class that contains the implementation for + */ + public void setDirtyAndPropagateToParents(Node node, ServiceContext serviceContext) { + if(isDirty(node, serviceContext)){ + return; + } + setDirty(node, serviceContext); + // propagate childrenDirty flag for parents + Node parent = null; + while ((parent = serviceContext.getService().getParent(node, serviceContext)) != null) { + if (isChildrenDirty(parent, serviceContext)) { + // the parentSync flag has already been propagated + return; + } + // set childrenDirty (flag2) to default value for is dirty / mark + setChildrenDirty(parent, serviceContext); + // mark it as having dirty children true + // service.setProperty(parent, flag2, defaultValueForIsDirty, new + // ServiceContext(service)); + node = parent; + } + } + + + public void unsetDirtyAndPropagateToParents(Node node, ServiceContext serviceContext) { + if (!isDirty(node, serviceContext) && !isChildrenDirty(node, serviceContext)) { + // already set + return; + } + // set DIRTY false/ it is not dirty + unsetDirty(node, serviceContext); + // propagate childrenDirty flag for parents + + Node parent = null; + while ((parent = serviceContext.getService().getParent(node, serviceContext)) != null) { + if (!isChildrenDirty(parent, serviceContext)) { + // the parentSync flag has already been propagated + return; + } + + // besides this dirtyChild that I just cleaned up, is there any other dirtyChildren? + if (containsDirtyChild(parent, serviceContext)) { + return; + } + + // set childrenDirty (flag2) to default value for is dirty / mark + unsetChildrenDirty(parent, serviceContext); + + + // mark it as having dirty children true + // service.setProperty(parent, flag2, defaultValueForIsDirty, new + // ServiceContext(service)); + node = parent; + } + + } + + private boolean containsDirtyChild(Node node, ServiceContext serviceContext) { + NodeService service = serviceContext.getService(); + List nodeList = service.getChildren(node, new ServiceContext(service).add(POPULATE_WITH_PROPERTIES, true)); + for (Node child : nodeList) { + if ((isDirty(child, serviceContext) || isChildrenDirty(child, serviceContext))) { + return true; + } + } + return false; + } + +} diff --git a/org.flowerplatform.resources/public-resources/images/codesync.sdiff/comment-marker/comment.png b/org.flowerplatform.resources/public-resources/images/codesync.sdiff/comment-marker/comment.png new file mode 100644 index 0000000000000000000000000000000000000000..7bc9233ea63c89d52a99494dd0f0735a29a3ec3b GIT binary patch literal 413 zcmV;O0b>4%P)i2vikyMR~)n*keF9=!Gc_n*K2@qsNT?}H4v4a974 z1ArVJApZ0B-@pGKzWw|E^3%Wn&p!V9|K$C@{}12&`+x7vzyG&i{r!LE6~yrB1;;^# zm?0Y=moxPMSn>r>N00000NkvXX Hu0mjf$^yWL literal 0 HcmV?d00001 diff --git a/org.flowerplatform.resources/public-resources/images/codesync.sdiff/comment-marker/comments.png b/org.flowerplatform.resources/public-resources/images/codesync.sdiff/comment-marker/comments.png new file mode 100644 index 0000000000000000000000000000000000000000..39433cf78a3e9869f24b0a95f04b1819391596e8 GIT binary patch literal 557 zcmV+|0@D47P)kO-!8JjERGZgNx4o8zwI5pnrkJT^AW7B+k01lLkoCLBu@bfRhnJSkT}{ z5cwz-C?AEk;`Q7|NyO0V@Jst%?>X<@)8|?6hNplZoH}p}R=_wBd4A);huvr*D{8ta zv>weaRZy(zA{a{x)NMK$oUyoq;&Q_jA9Yid>V_!Q3{lkDazCTg+2GL8fKO$yVv7pZ zw#ZdlB3o|B^q?JFdAt+nq80!As0d}1Z|KFR(*lEh^G}{es&~_I}wY;n4d5jAs0d}gj@(+ z%6*K*29I(Myv%_UPWDD&5qS@s3~ZAJGDH vT*SlN0ce3)r#d%-F%SaNZe6;L@E^Vb!Ji3~dec0&00000NkvXXu0mjflI-*P literal 0 HcmV?d00001 diff --git a/org.flowerplatform.resources/readme.md b/org.flowerplatform.resources/readme.md index 2962e4b5..e60a65a4 100644 --- a/org.flowerplatform.resources/readme.md +++ b/org.flowerplatform.resources/readme.md @@ -17,9 +17,10 @@ Holds images and messages. | images/core/keyboard.png | https://www.iconfinder.com/icons/36136/keyboard_icon#size=16 | http://www.fatcow.com/ | core | | images/mindmap/arrowDown.png | https://www.iconfinder.com/icons/211620/arrow_b_right_icon#size=16 | http://opensource.org/licenses/MIT | mindmap | | images/mindmap/arrowUp.png | https://www.iconfinder.com/icons/211620/arrow_b_right_icon#size=16 | http://opensource.org/licenses/MIT | mindmap | -| images/properties/preferences.png | https://www.iconfinder.com/icons/105256/application_applications_configuration_contact_control_de_desktop_engineering_gear_gears_generator_machine_mime_preferences_reductor_settings_system_tool_tools_work_icon#size=16 | http://www.aha-soft.com/ | properties | +| images/properties/preferences.png | https://www.iconfinder.com/icons/105256/application_applications_configuration_contact_control_de_desktop_engineering_gear_gears_generator_machine_mime_preferences_reductor_settings_system_tool_tools_work_icon#size=16 | http://www.aha-soft.com/ | properties | | images/properties/preference.png | https://www.iconfinder.com/icons/105244/application_applications_configuration_contact_control_desktop_engineering_gear_gears_generator_machine_mime_preferences_reductor_settings_system_tool_tools_work_icon#size=16 | http://www.aha-soft.com/ | properties | - +| images/codesync/comment-marker/comment.png | http://www.famfamfam.com/lab/icons/silk/ | http://www.famfamfam.com/lab/icons/silk/ |properties| +| images/codesync/comment-marker/comments.png | http://www.famfamfam.com/lab/icons/silk/ | http://www.famfamfam.com/lab/icons/silk/ |properties| ### Icons allowed for commercial use (NO link required) == | Icon Name | Icon Source URL | Usage | From f35b3a328a731b936b8fc4f91d1f1786e100f00b Mon Sep 17 00:00:00 2001 From: elena-posea Date: Wed, 30 Jul 2014 17:47:45 +0300 Subject: [PATCH 02/12] #362 - finished propagation + icon (provider and setter), started to work on using DirtyPropagationController for sync --- .../sdiff/CodeSyncSdiffConstants.java | 4 +- .../CanContainCommentPropertyController.java | 71 ++++++++++---- .../controller/ContainsCommentPropagator.java | 35 ++----- .../codesync/CodeSyncPlugin.java | 1 + .../controller/CodeSyncPropagator.java | 96 +++++++++++++++++++ .../controller/CodeSyncPropertySetter.java | 7 +- .../CodeSyncRemoveNodeController.java | 3 +- .../core/DirtyPropagatorController.java | 19 +--- .../controller/MindMapParentProvider.java | 5 +- 9 files changed, 176 insertions(+), 65 deletions(-) create mode 100644 org.flowerplatform.codesync/src/org/flowerplatform/codesync/controller/CodeSyncPropagator.java rename org.flowerplatform.codesync/src/org/flowerplatform/codesync/{ => controller}/CodeSyncRemoveNodeController.java (91%) diff --git a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/CodeSyncSdiffConstants.java b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/CodeSyncSdiffConstants.java index 10995f18..91dea74d 100644 --- a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/CodeSyncSdiffConstants.java +++ b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/CodeSyncSdiffConstants.java @@ -27,8 +27,8 @@ public class CodeSyncSdiffConstants { public static final String STRUCTURE_DIFF_EXTENSION = ".sdiff"; public static final String COMMENT = "sdiffComment"; - public static final String CAN_CONTAIN_COMMENT = "containsComment"; - public static final String CATEGORY_CAN_CONTAIN_COMMENT = UtilConstants.CATEGORY_PREFIX + CAN_CONTAIN_COMMENT; + public static final String CONTAINS_COMMENT = "containsComment"; + public static final String CATEGORY_CAN_CONTAIN_COMMENT = UtilConstants.CATEGORY_PREFIX + "canContainComment"; // relative to repository public static final String STRUCTURE_DIFFS_FOLDER = "sdiffs"; diff --git a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentPropertyController.java b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentPropertyController.java index f3ae107f..e1a3c84d 100644 --- a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentPropertyController.java +++ b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentPropertyController.java @@ -1,10 +1,12 @@ package org.flowerplatform.codesync.sdiff.controller; -import static org.flowerplatform.codesync.sdiff.CodeSyncSdiffConstants.CAN_CONTAIN_COMMENT; +import static org.flowerplatform.codesync.sdiff.CodeSyncSdiffConstants.CONTAINS_COMMENT; import static org.flowerplatform.codesync.sdiff.CodeSyncSdiffConstants.IMG_TYPE_COMMENTS; import static org.flowerplatform.core.CoreConstants.EXECUTE_ONLY_FOR_UPDATER; import static org.flowerplatform.core.CoreConstants.ICONS; +import java.util.regex.Matcher; + import org.flowerplatform.codesync.sdiff.CodeSyncSdiffPlugin; import org.flowerplatform.core.CoreConstants; import org.flowerplatform.core.node.NodeService; @@ -16,38 +18,73 @@ public class CanContainCommentPropertyController extends AbstractController implements IPropertySetter, IPropertiesProvider { + public CanContainCommentPropertyController() { + setOrderIndex(10000); + } + @Override public void populateWithProperties(Node node, ServiceContext context) { - Boolean b = (Boolean) node.getProperties().get(CAN_CONTAIN_COMMENT); - if (b != null && b == true) { // is dirty - node.getProperties().put(ICONS, CodeSyncSdiffPlugin.getInstance().getImagePath(IMG_TYPE_COMMENTS)); - } + node.getProperties().put(ICONS, getIcon(node, context)); } @Override public void setProperty(Node node, String property, Object value, ServiceContext context) { - if (property.equals(CAN_CONTAIN_COMMENT) && (Boolean) value == true) { - setIcon(node, context); + if (property.equals(CONTAINS_COMMENT) && (Boolean) value == true) { + ServiceContext newContext = new ServiceContext(context.getService()); + newContext.getContext().put(EXECUTE_ONLY_FOR_UPDATER, true); +// node.getProperties().put(ICONS, getIcon(node, context)); + context.getService().setProperty(node, ICONS, getIcon(node, context), newContext); } +// else{ +// if (property.equals(ICONS)) { +// node.getProperties().put(ICONS, getIcon(node, context)); +// } +// } + } - private void setIcon(Node node, ServiceContext context) { - ServiceContext newContext = new ServiceContext(); - newContext.getContext().put(EXECUTE_ONLY_FOR_UPDATER, true); + + private String getIcon(Node node, ServiceContext context){ + Boolean b = (Boolean) node.getProperties().get(CONTAINS_COMMENT); + Object obj = node.getProperties().get(ICONS); + String icon = ""; + if(obj != null) icon = (String) obj; + // icon = current icon list String newIcon = CodeSyncSdiffPlugin.getInstance().getImagePath(IMG_TYPE_COMMENTS); - String icon = (String) node.getPropertyValue(ICONS); - if(icon == null) icon = ""; - icon = icon + (!icon.isEmpty() ? CoreConstants.ICONS_SEPARATOR : "") + newIcon; - context.getService().setProperty(node, ICONS, icon, newContext); + // newIcon = the icon that I would like to add + if (b != null && b == true) { + if(icon.indexOf(newIcon) == -1){ // this node doesn't already contain this icon + icon = icon + (!icon.isEmpty() ? CoreConstants.ICONS_SEPARATOR : "") + newIcon; + } + return icon; + } + else{ + // remove property + int index = icon.indexOf(newIcon); + if(index != -1){ // this node contains the icon; remove it + icon = icon.replaceAll(",?" + Matcher.quoteReplacement(newIcon), ""); + } + return icon; + } } - +// private void setIcon(Node node, ServiceContext context) { +// ServiceContext newContext = new ServiceContext(context.getService()); +// newContext.getContext().put(EXECUTE_ONLY_FOR_UPDATER, true); +// String newIcon = CodeSyncSdiffPlugin.getInstance().getImagePath(IMG_TYPE_COMMENTS); +// Object obj = node.getProperties().get(ICONS); +// String icon = ""; +// if (obj != null) icon = (String) obj; +// icon = icon + (!icon.isEmpty() ? CoreConstants.ICONS_SEPARATOR : "") + newIcon; +// context.getService().setProperty(node, ICONS, icon, newContext); +// } + @Override public void unsetProperty(Node node, String property, ServiceContext context) { - if (property.equals(CAN_CONTAIN_COMMENT)) { + if (property.equals(CONTAINS_COMMENT)) { ServiceContext newContext = new ServiceContext(); newContext.getContext().put(EXECUTE_ONLY_FOR_UPDATER, true); - context.getService().unsetProperty(node, ICONS, newContext); + context.getService().setProperty(node, ICONS, getIcon(node, context),newContext); } } diff --git a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/ContainsCommentPropagator.java b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/ContainsCommentPropagator.java index cf68774b..4ac7e956 100644 --- a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/ContainsCommentPropagator.java +++ b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/ContainsCommentPropagator.java @@ -1,13 +1,10 @@ package org.flowerplatform.codesync.sdiff.controller; -import static org.flowerplatform.codesync.sdiff.CodeSyncSdiffConstants.CAN_CONTAIN_COMMENT; -import static org.flowerplatform.codesync.sdiff.CodeSyncSdiffConstants.IMG_TYPE_COMMENT; +import static org.flowerplatform.codesync.sdiff.CodeSyncSdiffConstants.CONTAINS_COMMENT; import static org.flowerplatform.codesync.sdiff.CodeSyncSdiffConstants.NODE_URI_TO_BE_IGNORED; import static org.flowerplatform.codesync.sdiff.CodeSyncSdiffConstants.SHOULD_NOT_BE_CONSIDERED_DIRTY; -import static org.flowerplatform.core.CoreConstants.ICONS; import org.flowerplatform.codesync.sdiff.CodeSyncSdiffConstants; -import org.flowerplatform.codesync.sdiff.CodeSyncSdiffPlugin; import org.flowerplatform.core.DirtyPropagatorController; import org.flowerplatform.core.node.NodeService; import org.flowerplatform.core.node.remote.Node; @@ -32,44 +29,26 @@ public void unsetDirty(Node node, ServiceContext serviceContext) { @Override public void setChildrenDirty(Node node, ServiceContext context) { - context.getService().setProperty(node, CAN_CONTAIN_COMMENT, true, context); - node.getProperties().put(ICONS, CodeSyncSdiffPlugin.getInstance().getImagePath(IMG_TYPE_COMMENT)); - + context.getService().setProperty(node, CONTAINS_COMMENT, true, context); } - // private String append(String icon, String decorator) { - // return CodeSyncJavaPlugin.getInstance().getImageComposerUrl(icon, - // getImagePath(decorator)); - // } - @Override public void unsetChildrenDirty(Node node, ServiceContext context) { - context.getService().unsetProperty(node, CAN_CONTAIN_COMMENT, context); - context.getService().unsetProperty(node, ICONS, context); + context.getService().unsetProperty(node, CONTAINS_COMMENT, context); } @Override public boolean isDirty(Node node, ServiceContext serviceContext) { - if (node.getNodeUri().equals(serviceContext.getContext().get(NODE_URI_TO_BE_IGNORED))) + if (node.getNodeUri().equals(serviceContext.getContext().get(NODE_URI_TO_BE_IGNORED))) { return false; + } return node.getType().equals(CodeSyncSdiffConstants.COMMENT) && (!serviceContext.getContext().containsKey(SHOULD_NOT_BE_CONSIDERED_DIRTY)); } @Override public boolean isChildrenDirty(Node node, ServiceContext serviceContext) { - Boolean b = (Boolean) node.getPropertyValue(CAN_CONTAIN_COMMENT); // is - // something - // that - // has - // a - // child - // comment, - // and - // it - // should - // not - // be - // ignored + Boolean b = (Boolean) node.getPropertyValue(CONTAINS_COMMENT); + // is something that has a child comment, and it should not be ignored return b != null && b && !(node.getNodeUri().equals(serviceContext.getContext().get(NODE_URI_TO_BE_IGNORED))); } diff --git a/org.flowerplatform.codesync/src/org/flowerplatform/codesync/CodeSyncPlugin.java b/org.flowerplatform.codesync/src/org/flowerplatform/codesync/CodeSyncPlugin.java index 262629cd..4c9f3421 100644 --- a/org.flowerplatform.codesync/src/org/flowerplatform/codesync/CodeSyncPlugin.java +++ b/org.flowerplatform.codesync/src/org/flowerplatform/codesync/CodeSyncPlugin.java @@ -61,6 +61,7 @@ import org.flowerplatform.codesync.adapter.NodeModelAdapterLeft; import org.flowerplatform.codesync.controller.CodeSyncAddNodeController; import org.flowerplatform.codesync.controller.CodeSyncPropertySetter; +import org.flowerplatform.codesync.controller.CodeSyncRemoveNodeController; import org.flowerplatform.codesync.controller.CodeSyncRepositoryChildrenProvider; import org.flowerplatform.codesync.controller.CodeSyncSubscribableResourceProvider; import org.flowerplatform.codesync.controller.ModelResourceSetProvider; diff --git a/org.flowerplatform.codesync/src/org/flowerplatform/codesync/controller/CodeSyncPropagator.java b/org.flowerplatform.codesync/src/org/flowerplatform/codesync/controller/CodeSyncPropagator.java new file mode 100644 index 00000000..477c7829 --- /dev/null +++ b/org.flowerplatform.codesync/src/org/flowerplatform/codesync/controller/CodeSyncPropagator.java @@ -0,0 +1,96 @@ +package org.flowerplatform.codesync.controller; + +import static org.flowerplatform.codesync.CodeSyncConstants.ADDED; +import static org.flowerplatform.codesync.CodeSyncConstants.CHILDREN_SYNC; +import static org.flowerplatform.codesync.CodeSyncConstants.ORIGINAL_SUFFIX; +import static org.flowerplatform.codesync.CodeSyncConstants.SYNC; +import static org.flowerplatform.codesync.CodeSyncConstants.REMOVED; + +import org.flowerplatform.core.DirtyPropagatorController; +import org.flowerplatform.core.node.NodeService; +import org.flowerplatform.core.node.remote.Node; +import org.flowerplatform.core.node.remote.ServiceContext; + +/** + * @author Elena Posea + */ +public class CodeSyncPropagator extends DirtyPropagatorController { + + @Override + public void setDirty(Node node, ServiceContext serviceContext) { + serviceContext.getService().setProperty(node, SYNC, true, new ServiceContext(serviceContext.getService())); + } + + @Override + public void unsetDirty(Node node, ServiceContext serviceContext) { + // nothing to do + } + + @Override + public void setChildrenDirty(Node node, ServiceContext serviceContext) { + // nothing to do + } + + @Override + public void unsetChildrenDirty(Node node, ServiceContext serviceContext) { + serviceContext.getService().setProperty(node, CHILDREN_SYNC, true, new ServiceContext(serviceContext.getService())); + } + + @Override + public boolean isDirty(Node node, ServiceContext serviceContext) { + if (isSync(node)) { + // already set + return true; + } + + // added/removed nodes are not sync + if (isAdded(node) || isRemoved(node)) { + return true; + } + + // check if it has any property.original set + boolean sync = true; + for (String property : node.getProperties().keySet()) { + if (isOriginalPropertyName(property)) { + sync = false; + } + } + if (!sync) { + return true; + } + return false; + } + + @Override + public boolean isChildrenDirty(Node node, ServiceContext serviceContext) { + return !hasFlagTrue(node, CHILDREN_SYNC); + } + + public static boolean isSync(Node node) { + return hasFlagTrue(node, SYNC); + } + + public static boolean isChildrenSync(Node node) { + return hasFlagTrue(node, CHILDREN_SYNC); + } + + public static boolean isAdded(Node node) { + return hasFlagTrue(node, ADDED); + } + + public static boolean isRemoved(Node node) { + return hasFlagTrue(node, REMOVED); + } + + private static boolean hasFlagTrue(Node node, String flag) { + Boolean b = (Boolean) node.getPropertyValue(flag); + return b != null && b; + } + + public static boolean isOriginalPropertyName(String property) { + return property.endsWith(ORIGINAL_SUFFIX); + } + + + +} diff --git a/org.flowerplatform.codesync/src/org/flowerplatform/codesync/controller/CodeSyncPropertySetter.java b/org.flowerplatform.codesync/src/org/flowerplatform/codesync/controller/CodeSyncPropertySetter.java index aa400ef4..e45f7e25 100644 --- a/org.flowerplatform.codesync/src/org/flowerplatform/codesync/controller/CodeSyncPropertySetter.java +++ b/org.flowerplatform.codesync/src/org/flowerplatform/codesync/controller/CodeSyncPropertySetter.java @@ -30,7 +30,7 @@ /** * @author Mariana Gheorghe */ -public class CodeSyncPropertySetter extends AbstractController implements IPropertySetter { +public class CodeSyncPropertySetter extends CodeSyncPropagator implements IPropertySetter { public CodeSyncPropertySetter() { // invoked before the persistence controllers @@ -43,6 +43,7 @@ public void setProperty(Node node, String property, Object value, ServiceContext // if the node is newly added or marked removed => propagate sync flag false if (CodeSyncConstants.REMOVED.equals(property) || CodeSyncConstants.ADDED.equals(property)) { setSyncFalseAndPropagateToParents(node, context.getService()); + //setDirtyAndPropagateToParents(node, context); return; } @@ -69,12 +70,14 @@ public void setProperty(Node node, String property, Object value, ServiceContext // trying to set a different value; keep the old value in property.original if it does not exist context.getService().setProperty(node, originalProperty, originalValue, new ServiceContext(context.getService())); setSyncFalseAndPropagateToParents(node, context.getService()); + //setDirtyAndPropagateToParents(node, context); } } else { if (isOriginalPropertySet) { // trying to set the same value as the original (a revert operation); unset the original value context.getService().unsetProperty(node, originalProperty, new ServiceContext(context.getService())); setSyncTrueAndPropagateToParents(node, context.getService()); + //unsetDirtyAndPropagateToParents(node, context); } } } @@ -88,4 +91,4 @@ private boolean isSyncProperty(Node node, String property) { return !CodeSyncControllerUtils.isCodeSyncFlagConstant(property); } -} +} diff --git a/org.flowerplatform.codesync/src/org/flowerplatform/codesync/CodeSyncRemoveNodeController.java b/org.flowerplatform.codesync/src/org/flowerplatform/codesync/controller/CodeSyncRemoveNodeController.java similarity index 91% rename from org.flowerplatform.codesync/src/org/flowerplatform/codesync/CodeSyncRemoveNodeController.java rename to org.flowerplatform.codesync/src/org/flowerplatform/codesync/controller/CodeSyncRemoveNodeController.java index 2a2aaf84..86163cab 100644 --- a/org.flowerplatform.codesync/src/org/flowerplatform/codesync/CodeSyncRemoveNodeController.java +++ b/org.flowerplatform.codesync/src/org/flowerplatform/codesync/controller/CodeSyncRemoveNodeController.java @@ -13,10 +13,11 @@ * * license-end */ -package org.flowerplatform.codesync; +package org.flowerplatform.codesync.controller; import static org.flowerplatform.core.CoreConstants.DONT_PROCESS_OTHER_CONTROLLERS; +import org.flowerplatform.codesync.CodeSyncConstants; import org.flowerplatform.core.node.NodeService; import org.flowerplatform.core.node.controller.IRemoveNodeController; import org.flowerplatform.core.node.remote.Node; diff --git a/org.flowerplatform.core/src/org/flowerplatform/core/DirtyPropagatorController.java b/org.flowerplatform.core/src/org/flowerplatform/core/DirtyPropagatorController.java index 040504b2..6d1807ac 100644 --- a/org.flowerplatform.core/src/org/flowerplatform/core/DirtyPropagatorController.java +++ b/org.flowerplatform.core/src/org/flowerplatform/core/DirtyPropagatorController.java @@ -15,13 +15,13 @@ */ public abstract class DirtyPropagatorController extends AbstractController{ - public abstract void setDirty(Node node, ServiceContext context); + public abstract void setDirty(Node node, ServiceContext serviceContext); - public abstract void unsetDirty(Node node, ServiceContext context); + public abstract void unsetDirty(Node node, ServiceContext serviceContext); - public abstract void setChildrenDirty(Node node, ServiceContext context); + public abstract void setChildrenDirty(Node node, ServiceContext serviceContext); - public abstract void unsetChildrenDirty(Node node, ServiceContext context); + public abstract void unsetChildrenDirty(Node node, ServiceContext serviceContext); /** * In Node node, for property flagProperty, is it changer, or does it have @@ -66,7 +66,6 @@ public void setDirtyAndPropagateToParents(Node node, ServiceContext } } - public void unsetDirtyAndPropagateToParents(Node node, ServiceContext serviceContext) { if (!isDirty(node, serviceContext) && !isChildrenDirty(node, serviceContext)) { // already set @@ -74,30 +73,22 @@ public void unsetDirtyAndPropagateToParents(Node node, ServiceContext(service)); node = parent; } - } private boolean containsDirtyChild(Node node, ServiceContext serviceContext) { diff --git a/org.flowerplatform.freeplane/src/org/flowerplatform/freeplane/controller/MindMapParentProvider.java b/org.flowerplatform.freeplane/src/org/flowerplatform/freeplane/controller/MindMapParentProvider.java index f8591e3e..7c6c35a8 100644 --- a/org.flowerplatform.freeplane/src/org/flowerplatform/freeplane/controller/MindMapParentProvider.java +++ b/org.flowerplatform.freeplane/src/org/flowerplatform/freeplane/controller/MindMapParentProvider.java @@ -39,7 +39,10 @@ public Node getParent(Node node, ServiceContext context) { } String scheme = Utils.getScheme(node.getNodeUri()); String ssp = Utils.getSchemeSpecificPart(node.getNodeUri()); - String parentUri = scheme + ":" + ssp + "#" + parentNodeModel.createID(); + String parentUri = scheme + ":" + ssp; + if(!parentNodeModel.getMap().getRootNode().createID().equals(parentNodeModel.createID())){ + parentUri += "#" + parentNodeModel.createID(); + } IResourceHandler resourceHandler = CorePlugin.getInstance().getResourceService().getResourceHandler(scheme); return resourceHandler.createNodeFromRawNodeData(parentUri, parentNodeModel); } From aa7b65f7751671e85074e53b4212e14cfddfe3cc Mon Sep 17 00:00:00 2001 From: elena-posea Date: Thu, 31 Jul 2014 13:05:22 +0300 Subject: [PATCH 03/12] #362 - solved bugs + changed CodeSyncPropertySetter to extend CodeSyncPropagator --- .../codesync/sdiff/CodeSyncSdiffConstants.java | 1 - .../CanContainCommentAddNodeListener.java | 11 ++++++----- .../controller/ContainsCommentPropagator.java | 3 +-- .../flowerplatform/codesync/CodeSyncPlugin.java | 4 ++-- .../codesync/controller/CodeSyncPropagator.java | 10 ++++------ .../controller/CodeSyncPropertySetter.java | 15 +++++---------- .../src/org/flowerplatform/core/CorePlugin.java | 3 --- .../core/DirtyPropagatorController.java | 9 +++------ 8 files changed, 21 insertions(+), 35 deletions(-) diff --git a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/CodeSyncSdiffConstants.java b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/CodeSyncSdiffConstants.java index 91dea74d..6984bbe8 100644 --- a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/CodeSyncSdiffConstants.java +++ b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/CodeSyncSdiffConstants.java @@ -45,7 +45,6 @@ public class CodeSyncSdiffConstants { public static final String MATCH_COLOR_COMMENT = "#FFFF00"; // dirty marker for comments - public static final String SHOULD_NOT_BE_CONSIDERED_DIRTY = "shouldBeConsideredDirty"; public static final String NODE_URI_TO_BE_IGNORED = "nodeURIToBeIgnored"; ////////////////////////////////// diff --git a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentAddNodeListener.java b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentAddNodeListener.java index 618b690a..34caf2b2 100644 --- a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentAddNodeListener.java +++ b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentAddNodeListener.java @@ -1,22 +1,23 @@ package org.flowerplatform.codesync.sdiff.controller; import static org.flowerplatform.codesync.sdiff.CodeSyncSdiffConstants.COMMENT; -import static org.flowerplatform.codesync.sdiff.CodeSyncSdiffConstants.SHOULD_NOT_BE_CONSIDERED_DIRTY; +import static org.flowerplatform.codesync.sdiff.CodeSyncSdiffConstants.NODE_URI_TO_BE_IGNORED; + import org.flowerplatform.core.node.NodeService; import org.flowerplatform.core.node.controller.IAddNodeController; import org.flowerplatform.core.node.remote.Node; import org.flowerplatform.core.node.remote.ServiceContext; + /** * * @author Elena Posea */ -public class CanContainCommentAddNodeListener extends ContainsCommentPropagator implements IAddNodeController{ +public class CanContainCommentAddNodeListener extends ContainsCommentPropagator implements IAddNodeController { @Override public void addNode(Node node, Node child, ServiceContext serviceContext) { - if(child.getType().equals(COMMENT)){ - setDirtyAndPropagateToParents(child, serviceContext.add(SHOULD_NOT_BE_CONSIDERED_DIRTY, true)); + if (child.getType().equals(COMMENT)) { + setDirtyAndPropagateToParents(child, serviceContext.add(NODE_URI_TO_BE_IGNORED, child.getNodeUri())); } } - } diff --git a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/ContainsCommentPropagator.java b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/ContainsCommentPropagator.java index 4ac7e956..e72b55ae 100644 --- a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/ContainsCommentPropagator.java +++ b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/ContainsCommentPropagator.java @@ -2,7 +2,6 @@ import static org.flowerplatform.codesync.sdiff.CodeSyncSdiffConstants.CONTAINS_COMMENT; import static org.flowerplatform.codesync.sdiff.CodeSyncSdiffConstants.NODE_URI_TO_BE_IGNORED; -import static org.flowerplatform.codesync.sdiff.CodeSyncSdiffConstants.SHOULD_NOT_BE_CONSIDERED_DIRTY; import org.flowerplatform.codesync.sdiff.CodeSyncSdiffConstants; import org.flowerplatform.core.DirtyPropagatorController; @@ -42,7 +41,7 @@ public boolean isDirty(Node node, ServiceContext serviceContext) { if (node.getNodeUri().equals(serviceContext.getContext().get(NODE_URI_TO_BE_IGNORED))) { return false; } - return node.getType().equals(CodeSyncSdiffConstants.COMMENT) && (!serviceContext.getContext().containsKey(SHOULD_NOT_BE_CONSIDERED_DIRTY)); + return node.getType().equals(CodeSyncSdiffConstants.COMMENT); } @Override diff --git a/org.flowerplatform.codesync/src/org/flowerplatform/codesync/CodeSyncPlugin.java b/org.flowerplatform.codesync/src/org/flowerplatform/codesync/CodeSyncPlugin.java index 4c9f3421..be1ea0b3 100644 --- a/org.flowerplatform.codesync/src/org/flowerplatform/codesync/CodeSyncPlugin.java +++ b/org.flowerplatform.codesync/src/org/flowerplatform/codesync/CodeSyncPlugin.java @@ -290,8 +290,8 @@ public void start(BundleContext context) throws Exception { .addCategory(CATEGORY_MODEL); CorePlugin.getInstance().getNodeTypeDescriptorRegistry().getOrCreateCategoryTypeDescriptor(CodeSyncConstants.CATEGORY_CODESYNC) - .addAdditiveController(ADD_NODE_CONTROLLER, new CodeSyncAddNodeController()) - .addAdditiveController(REMOVE_NODE_CONTROLLER, new CodeSyncRemoveNodeController()) + .addAdditiveController(ADD_NODE_CONTROLLER, new CodeSyncAddNodeController().setOrderIndexAs(10000)) + .addAdditiveController(REMOVE_NODE_CONTROLLER, new CodeSyncRemoveNodeController().setOrderIndexAs(-10000)) .addAdditiveController(PROPERTY_SETTER, new CodeSyncPropertySetter()) .addAdditiveController(PROPERTY_DESCRIPTOR, new PropertyDescriptor().setNameAs(CoreConstants.NAME)); diff --git a/org.flowerplatform.codesync/src/org/flowerplatform/codesync/controller/CodeSyncPropagator.java b/org.flowerplatform.codesync/src/org/flowerplatform/codesync/controller/CodeSyncPropagator.java index 477c7829..b5997c15 100644 --- a/org.flowerplatform.codesync/src/org/flowerplatform/codesync/controller/CodeSyncPropagator.java +++ b/org.flowerplatform.codesync/src/org/flowerplatform/codesync/controller/CodeSyncPropagator.java @@ -18,17 +18,17 @@ public class CodeSyncPropagator extends DirtyPropagatorController { @Override public void setDirty(Node node, ServiceContext serviceContext) { - serviceContext.getService().setProperty(node, SYNC, true, new ServiceContext(serviceContext.getService())); + serviceContext.getService().setProperty(node, SYNC, false, new ServiceContext(serviceContext.getService())); } @Override public void unsetDirty(Node node, ServiceContext serviceContext) { - // nothing to do + serviceContext.getService().setProperty(node, SYNC, true, new ServiceContext(serviceContext.getService())); } @Override public void setChildrenDirty(Node node, ServiceContext serviceContext) { - // nothing to do + serviceContext.getService().setProperty(node, CHILDREN_SYNC, false, new ServiceContext(serviceContext.getService())); } @Override @@ -38,7 +38,7 @@ public void unsetChildrenDirty(Node node, ServiceContext serviceCon @Override public boolean isDirty(Node node, ServiceContext serviceContext) { - if (isSync(node)) { + if (!isSync(node)) { // already set return true; } @@ -91,6 +91,4 @@ public static boolean isOriginalPropertyName(String property) { return property.endsWith(ORIGINAL_SUFFIX); } - - } diff --git a/org.flowerplatform.codesync/src/org/flowerplatform/codesync/controller/CodeSyncPropertySetter.java b/org.flowerplatform.codesync/src/org/flowerplatform/codesync/controller/CodeSyncPropertySetter.java index e45f7e25..34f4ee1f 100644 --- a/org.flowerplatform.codesync/src/org/flowerplatform/codesync/controller/CodeSyncPropertySetter.java +++ b/org.flowerplatform.codesync/src/org/flowerplatform/codesync/controller/CodeSyncPropertySetter.java @@ -16,8 +16,6 @@ package org.flowerplatform.codesync.controller; import static org.flowerplatform.codesync.controller.CodeSyncControllerUtils.getOriginalPropertyName; -import static org.flowerplatform.codesync.controller.CodeSyncControllerUtils.setSyncFalseAndPropagateToParents; -import static org.flowerplatform.codesync.controller.CodeSyncControllerUtils.setSyncTrueAndPropagateToParents; import org.flowerplatform.codesync.CodeSyncConstants; import org.flowerplatform.core.node.NodeService; @@ -25,7 +23,6 @@ import org.flowerplatform.core.node.remote.Node; import org.flowerplatform.core.node.remote.ServiceContext; import org.flowerplatform.util.Utils; -import org.flowerplatform.util.controller.AbstractController; /** * @author Mariana Gheorghe @@ -42,8 +39,7 @@ public CodeSyncPropertySetter() { public void setProperty(Node node, String property, Object value, ServiceContext context) { // if the node is newly added or marked removed => propagate sync flag false if (CodeSyncConstants.REMOVED.equals(property) || CodeSyncConstants.ADDED.equals(property)) { - setSyncFalseAndPropagateToParents(node, context.getService()); - //setDirtyAndPropagateToParents(node, context); + setDirtyAndPropagateToParents(node, context); return; } @@ -56,7 +52,7 @@ public void setProperty(Node node, String property, Object value, ServiceContext Object originalValue = null; String originalProperty = getOriginalPropertyName(property); // get the original value from property.original or property - if (node.getOrPopulateProperties(new ServiceContext(context.getService())).containsKey(originalProperty)) { + if (node.getOrPopulateProperties(new ServiceContext(context.getService())).containsKey(originalProperty)) { isOriginalPropertySet = true; originalValue = node.getPropertyValue(originalProperty); } else if (node.getOrPopulateProperties(new ServiceContext(context.getService())).containsKey(property)) { @@ -67,17 +63,16 @@ public void setProperty(Node node, String property, Object value, ServiceContext if (!Utils.safeEquals(originalValue, value)) { if (!isOriginalPropertySet) { + setDirtyAndPropagateToParents(node, context); // trying to set a different value; keep the old value in property.original if it does not exist + // this line has to be after propagation, otherwise it will see this child as already dirty, and it won't try to propagate the flag context.getService().setProperty(node, originalProperty, originalValue, new ServiceContext(context.getService())); - setSyncFalseAndPropagateToParents(node, context.getService()); - //setDirtyAndPropagateToParents(node, context); } } else { if (isOriginalPropertySet) { // trying to set the same value as the original (a revert operation); unset the original value context.getService().unsetProperty(node, originalProperty, new ServiceContext(context.getService())); - setSyncTrueAndPropagateToParents(node, context.getService()); - //unsetDirtyAndPropagateToParents(node, context); + unsetDirtyAndPropagateToParents(node, context); } } } diff --git a/org.flowerplatform.core/src/org/flowerplatform/core/CorePlugin.java b/org.flowerplatform.core/src/org/flowerplatform/core/CorePlugin.java index 9c521956..c58d6f59 100644 --- a/org.flowerplatform.core/src/org/flowerplatform/core/CorePlugin.java +++ b/org.flowerplatform.core/src/org/flowerplatform/core/CorePlugin.java @@ -16,7 +16,6 @@ package org.flowerplatform.core; import static org.flowerplatform.core.CoreConstants.DEFAULT_PROPERTY_PROVIDER; -import static org.flowerplatform.core.CoreConstants.POPULATE_WITH_PROPERTIES; import static org.flowerplatform.core.CoreConstants.PROPERTY_DESCRIPTOR; import static org.flowerplatform.core.CoreConstants.PROPERTY_LINE_RENDERER_TYPE_PREFERENCE; @@ -34,11 +33,9 @@ import org.flowerplatform.core.node.controller.PropertyDescriptorDefaultPropertyValueProvider; import org.flowerplatform.core.node.controller.TypeDescriptorRegistryDebugControllers; import org.flowerplatform.core.node.remote.GenericValueDescriptor; -import org.flowerplatform.core.node.remote.Node; import org.flowerplatform.core.node.remote.NodeServiceRemote; import org.flowerplatform.core.node.remote.PropertyDescriptor; import org.flowerplatform.core.node.remote.ResourceServiceRemote; -import org.flowerplatform.core.node.remote.ServiceContext; import org.flowerplatform.core.node.resource.BaseResourceHandler; import org.flowerplatform.core.node.resource.ResourceDebugControllers; import org.flowerplatform.core.node.resource.ResourceService; diff --git a/org.flowerplatform.core/src/org/flowerplatform/core/DirtyPropagatorController.java b/org.flowerplatform.core/src/org/flowerplatform/core/DirtyPropagatorController.java index 6d1807ac..93fbaed7 100644 --- a/org.flowerplatform.core/src/org/flowerplatform/core/DirtyPropagatorController.java +++ b/org.flowerplatform.core/src/org/flowerplatform/core/DirtyPropagatorController.java @@ -46,7 +46,7 @@ public abstract class DirtyPropagatorController extends AbstractController{ * the class that contains the implementation for */ public void setDirtyAndPropagateToParents(Node node, ServiceContext serviceContext) { - if(isDirty(node, serviceContext)){ + if (isDirty(node, serviceContext)){ return; } setDirty(node, serviceContext); @@ -57,11 +57,8 @@ public void setDirtyAndPropagateToParents(Node node, ServiceContext // the parentSync flag has already been propagated return; } - // set childrenDirty (flag2) to default value for is dirty / mark + // set childrenDirty to default value for is dirty / mark setChildrenDirty(parent, serviceContext); - // mark it as having dirty children true - // service.setProperty(parent, flag2, defaultValueForIsDirty, new - // ServiceContext(service)); node = parent; } } @@ -71,7 +68,7 @@ public void unsetDirtyAndPropagateToParents(Node node, ServiceContext Date: Tue, 5 Aug 2014 15:01:57 +0300 Subject: [PATCH 04/12] #362 - tests for SYNC and CONTAINS_COMMENT flag propagation --- .../codesync/CodeSyncConstants.java | 2 +- .../controller/CodeSyncPropagator.java | 5 + .../controller/CodeSyncPropertySetter.java | 29 +- .../git/controller/GitPropertiesProvider.java | 3 + org.flowerplatform.tests/META-INF/MANIFEST.MF | 5 +- .../FP Tests - Eclipse Independent.launch | 2 - .../CodeSyncCommentPropagationTest.java | 281 + .../codesync/CodeSyncPropagationTest.java | 242 + .../tests/codesync/CodeSyncTestSuite.java | 6 +- .../initial_all_sync/.codesync1 | 8932 ++++++++++++++++ .../initial_all_sync/.codesync2 | 8932 ++++++++++++++++ .../initial_all_sync/.codesync3 | 8932 ++++++++++++++++ .../codesyncSdiffOneCommentPatch.sdiff | 1124 +++ .../codesyncSdiffTwoCommentsDirtyPatch.sdiff | 1127 +++ .../codesyncSdiffTwoCommentsPatch.sdiff | 1128 +++ .../codesyncSdiffTwoDirtyChildrenPatch.sdiff | 1123 +++ .../codesyncSdiffPatch.sdiff | 1115 ++ .../initial_one_not_sync/.codesync4 | 8933 +++++++++++++++++ .../initial_one_not_sync/.codesync5 | 8933 +++++++++++++++++ 19 files changed, 50837 insertions(+), 17 deletions(-) create mode 100644 org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/CodeSyncCommentPropagationTest.java create mode 100644 org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/CodeSyncPropagationTest.java create mode 100644 org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_all_sync/.codesync1 create mode 100644 org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_all_sync/.codesync2 create mode 100644 org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_all_sync/.codesync3 create mode 100644 org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_comments_inside/codesyncSdiffOneCommentPatch.sdiff create mode 100644 org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_comments_inside/codesyncSdiffTwoCommentsDirtyPatch.sdiff create mode 100644 org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_comments_inside/codesyncSdiffTwoCommentsPatch.sdiff create mode 100644 org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_comments_inside/codesyncSdiffTwoDirtyChildrenPatch.sdiff create mode 100644 org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_no_comments_inside/codesyncSdiffPatch.sdiff create mode 100644 org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_one_not_sync/.codesync4 create mode 100644 org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_one_not_sync/.codesync5 diff --git a/org.flowerplatform.codesync/src/org/flowerplatform/codesync/CodeSyncConstants.java b/org.flowerplatform.codesync/src/org/flowerplatform/codesync/CodeSyncConstants.java index 79723693..18e578a7 100644 --- a/org.flowerplatform.codesync/src/org/flowerplatform/codesync/CodeSyncConstants.java +++ b/org.flowerplatform.codesync/src/org/flowerplatform/codesync/CodeSyncConstants.java @@ -60,7 +60,7 @@ private static final String getFileExtension(String extension) { ////////////////////////////////// // Node properties ////////////////////////////////// - + public static final String NODE_URI_TO_BE_IGNORED = "nodeUriToBeIgnored"; public static final String REMOVED = "removed"; public static final String ADDED = "added"; public static final String SYNC = "sync"; diff --git a/org.flowerplatform.codesync/src/org/flowerplatform/codesync/controller/CodeSyncPropagator.java b/org.flowerplatform.codesync/src/org/flowerplatform/codesync/controller/CodeSyncPropagator.java index b5997c15..12210be2 100644 --- a/org.flowerplatform.codesync/src/org/flowerplatform/codesync/controller/CodeSyncPropagator.java +++ b/org.flowerplatform.codesync/src/org/flowerplatform/codesync/controller/CodeSyncPropagator.java @@ -5,6 +5,7 @@ import static org.flowerplatform.codesync.CodeSyncConstants.ORIGINAL_SUFFIX; import static org.flowerplatform.codesync.CodeSyncConstants.SYNC; import static org.flowerplatform.codesync.CodeSyncConstants.REMOVED; +import static org.flowerplatform.codesync.CodeSyncConstants.NODE_URI_TO_BE_IGNORED; import org.flowerplatform.core.DirtyPropagatorController; import org.flowerplatform.core.node.NodeService; @@ -38,6 +39,10 @@ public void unsetChildrenDirty(Node node, ServiceContext serviceCon @Override public boolean isDirty(Node node, ServiceContext serviceContext) { + if (node.getNodeUri().equals(serviceContext.getContext().get(NODE_URI_TO_BE_IGNORED))) { + return false; + } + if (!isSync(node)) { // already set return true; diff --git a/org.flowerplatform.codesync/src/org/flowerplatform/codesync/controller/CodeSyncPropertySetter.java b/org.flowerplatform.codesync/src/org/flowerplatform/codesync/controller/CodeSyncPropertySetter.java index 34f4ee1f..cd111af7 100644 --- a/org.flowerplatform.codesync/src/org/flowerplatform/codesync/controller/CodeSyncPropertySetter.java +++ b/org.flowerplatform.codesync/src/org/flowerplatform/codesync/controller/CodeSyncPropertySetter.java @@ -15,6 +15,7 @@ */ package org.flowerplatform.codesync.controller; +import static org.flowerplatform.codesync.CodeSyncConstants.NODE_URI_TO_BE_IGNORED; import static org.flowerplatform.codesync.controller.CodeSyncControllerUtils.getOriginalPropertyName; import org.flowerplatform.codesync.CodeSyncConstants; @@ -34,25 +35,27 @@ public CodeSyncPropertySetter() { // to cache the current value of the property before it is overwritten setOrderIndex(-100000); } - + @Override public void setProperty(Node node, String property, Object value, ServiceContext context) { - // if the node is newly added or marked removed => propagate sync flag false + // if the node is newly added or marked removed => propagate sync flag + // false if (CodeSyncConstants.REMOVED.equals(property) || CodeSyncConstants.ADDED.equals(property)) { + context.add(NODE_URI_TO_BE_IGNORED, node.getNodeUri()); setDirtyAndPropagateToParents(node, context); return; } - + // check if property is synchronizable if (!isSyncProperty(node, property)) { return; } - + boolean isOriginalPropertySet = false; Object originalValue = null; String originalProperty = getOriginalPropertyName(property); // get the original value from property.original or property - if (node.getOrPopulateProperties(new ServiceContext(context.getService())).containsKey(originalProperty)) { + if (node.getOrPopulateProperties(new ServiceContext(context.getService())).containsKey(originalProperty)) { isOriginalPropertySet = true; originalValue = node.getPropertyValue(originalProperty); } else if (node.getOrPopulateProperties(new ServiceContext(context.getService())).containsKey(property)) { @@ -60,17 +63,21 @@ public void setProperty(Node node, String property, Object value, ServiceContext } else { originalValue = value; } - + if (!Utils.safeEquals(originalValue, value)) { if (!isOriginalPropertySet) { setDirtyAndPropagateToParents(node, context); - // trying to set a different value; keep the old value in property.original if it does not exist - // this line has to be after propagation, otherwise it will see this child as already dirty, and it won't try to propagate the flag + // trying to set a different value; keep the old value in + // property.original if it does not exist + // this line has to be after propagation, otherwise it will see + // this child as already dirty, and it won't try to propagate + // the flag context.getService().setProperty(node, originalProperty, originalValue, new ServiceContext(context.getService())); } } else { if (isOriginalPropertySet) { - // trying to set the same value as the original (a revert operation); unset the original value + // trying to set the same value as the original (a revert + // operation); unset the original value context.getService().unsetProperty(node, originalProperty, new ServiceContext(context.getService())); unsetDirtyAndPropagateToParents(node, context); } @@ -81,9 +88,9 @@ public void setProperty(Node node, String property, Object value, ServiceContext public void unsetProperty(Node node, String property, ServiceContext context) { // nothing to do } - + private boolean isSyncProperty(Node node, String property) { return !CodeSyncControllerUtils.isCodeSyncFlagConstant(property); } - + } diff --git a/org.flowerplatform.team.git/src/org/flowerplatform/team/git/controller/GitPropertiesProvider.java b/org.flowerplatform.team.git/src/org/flowerplatform/team/git/controller/GitPropertiesProvider.java index b9b71cac..32a4d958 100644 --- a/org.flowerplatform.team.git/src/org/flowerplatform/team/git/controller/GitPropertiesProvider.java +++ b/org.flowerplatform.team.git/src/org/flowerplatform/team/git/controller/GitPropertiesProvider.java @@ -37,6 +37,9 @@ public void populateWithProperties(Node node, ServiceContext contex String repoPath = Utils.getRepo(node.getNodeUri()); try { repo = GitUtils.getRepository((File) FileControllerUtils.getFileAccessController().getFile(repoPath)); + if (repo == null) { + return; + } } catch (Exception e) { e.printStackTrace(); } diff --git a/org.flowerplatform.tests/META-INF/MANIFEST.MF b/org.flowerplatform.tests/META-INF/MANIFEST.MF index c097b076..b242e26f 100644 --- a/org.flowerplatform.tests/META-INF/MANIFEST.MF +++ b/org.flowerplatform.tests/META-INF/MANIFEST.MF @@ -7,7 +7,9 @@ Bundle-RequiredExecutionEnvironment: JavaSE-1.7 Require-Bundle: org.eclipse.jdt.core, org.junit, org.flowerplatform.util, + org.flowerplatform.codesync, org.flowerplatform.codesync.java, + org.flowerplatform.codesync.sdiff, org.eclipse.core.resources, org.flowerplatform.core, org.flowerplatform.freeplane, @@ -15,8 +17,7 @@ Require-Bundle: org.eclipse.jdt.core, org.flowerplatform.resources, org.flowerplatform.codesync.as, org.eclipse.equinox.common, - org.eclipse.osgi, - org.flowerplatform.codesync + org.eclipse.osgi Bundle-Activator: org.flowerplatform.tests.TestActivator Bundle-ActivationPolicy: lazy Bundle-ClassPath: . diff --git a/org.flowerplatform.tests/launch_configs/FP Tests - Eclipse Independent.launch b/org.flowerplatform.tests/launch_configs/FP Tests - Eclipse Independent.launch index 22d71f99..823d8c92 100644 --- a/org.flowerplatform.tests/launch_configs/FP Tests - Eclipse Independent.launch +++ b/org.flowerplatform.tests/launch_configs/FP Tests - Eclipse Independent.launch @@ -11,8 +11,6 @@ - - diff --git a/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/CodeSyncCommentPropagationTest.java b/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/CodeSyncCommentPropagationTest.java new file mode 100644 index 00000000..20103ad0 --- /dev/null +++ b/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/CodeSyncCommentPropagationTest.java @@ -0,0 +1,281 @@ +package org.flowerplatform.tests.codesync; + +import static org.flowerplatform.codesync.sdiff.CodeSyncSdiffConstants.COMMENT; +import static org.flowerplatform.codesync.sdiff.CodeSyncSdiffConstants.CONTAINS_COMMENT; +import static org.flowerplatform.core.CoreConstants.TYPE_KEY; +import static org.junit.Assert.assertTrue; + +import org.flowerplatform.codesync.CodeSyncPlugin; +import org.flowerplatform.codesync.sdiff.CodeSyncSdiffConstants; +import org.flowerplatform.core.CorePlugin; +import org.flowerplatform.core.CoreUtils; +import org.flowerplatform.core.node.NodeService; +import org.flowerplatform.core.node.remote.Node; +import org.flowerplatform.core.node.remote.NodeServiceRemote; +import org.flowerplatform.core.node.remote.ServiceContext; +import org.flowerplatform.core.node.resource.ResourceService; +import org.junit.Test; + +/** + * + * @author Elena Posea + * + */ +public class CodeSyncCommentPropagationTest { + + public static final String NO_COMMENTS_INSIDE = "initial_no_comments_inside/codesyncSdiffPatch.sdiff"; + public static final String ONE_COMMENT_INSIDE = "initial_comments_inside/codesyncSdiffOneCommentPatch.sdiff"; + public static final String ONE_DIRTY_NODE_INSIDE = "initial_comments_inside/codesyncSdiffTwoDirtyChildrenPatch.sdiff"; + public static final String TWO_COMMENTS_INSIDE_REMOVE_COMMENT = "initial_comments_inside/codesyncSdiffTwoCommentsPatch.sdiff"; + public static final String TWO_COMMENTS_INSIDE_REMOVE_DIRTY_CHILD = "initial_comments_inside/codesyncSdiffTwoCommentsDirtyPatch.sdiff"; + + /** + * Initial: + * + *
+	 * Node1
+	 * 
+ * + * Expected after addition + * + *
+	 * Node1 (children dirty) - Comment
+	 * 
+ */ + @Test + public void testAddCommentPropagation() { + // subscribe to sdiff file + NodeServiceRemote nodeServiceRemote = new NodeServiceRemote(); + String sdiffNodeUri = CoreUtils.createNodeUriWithRepo("fpp", CodeSyncTestSuite.PROJECT, NO_COMMENTS_INSIDE); + Node root = CodeSyncPlugin.getInstance().getResource(sdiffNodeUri); + CorePlugin.getInstance().getResourceService().subscribeToParentResource("dummySessionId", sdiffNodeUri, new ServiceContext()); + + // get the node that we want to use as parent for our new node + Node testNode = CodeSyncTestSuite.getChild(root, new String[] {"CodeSyncSdiffConstants.java", "CodeSyncSdiffConstants", "STRUCTURE_DIFFS_FOLDER"}); + String testNodeFullyQualifiedName = testNode.getNodeUri();; + ServiceContext serviceContext = new ServiceContext(); + assertTrue("testNode is supposed to be initially clean", !isComment(testNode) && !isChildrenDirty(testNode)); + + // adding a comment child to this node + serviceContext.add(TYPE_KEY, COMMENT); + String comment1NodeFullyQualifiedName = nodeServiceRemote.addChild(testNodeFullyQualifiedName, serviceContext); + Node comment1Node = CorePlugin.getInstance().getResourceService().getNode(comment1NodeFullyQualifiedName); + + // update the values for testNode + testNode = CorePlugin.getInstance().getResourceService().getNode(testNodeFullyQualifiedName); + + // checking all the parents for this newly added comment (check + // propagation method) + assertTrue("all the parents are supposed to have the CONTAINS_COMMENT set after this new child has been added", isChildrenDirtyForAllParents(comment1Node, serviceContext)); + } + + /** + * Initial: + * + *
+	 * Node1 (children dirty) - Node2 (children dirty) - Node3 (children dirty) - Comment  
+	 *                        \ Comment
+	 * 
+ * + * Expected after removal + * + *
+	 * Node1 (children dirty) - Node2  - Node3
+	 *                        \ Comment
+	 * 
+ */ + @Test + public void testRemoveCommentButNotTheLastDirtyChild() { + // subscribe to sdiff file + NodeServiceRemote nodeServiceRemote = new NodeServiceRemote(); + String sdiffNodeUri = CoreUtils.createNodeUriWithRepo("fpp", CodeSyncTestSuite.PROJECT, TWO_COMMENTS_INSIDE_REMOVE_COMMENT); + Node root = CodeSyncPlugin.getInstance().getResource(sdiffNodeUri); + CorePlugin.getInstance().getResourceService().subscribeToParentResource("dummySessionId", sdiffNodeUri, new ServiceContext()); + + // get the node that we want to remove + Node testNode = CodeSyncTestSuite.getChild(root, new String[] {"CodeSyncSdiffPlugin.java", "CodeSyncSdiffPlugin", "registerMessageBundle()", "myMessage"}); + String testNodeFullyQualifiedName = testNode.getNodeUri();; + assertTrue("testNode is supposed to be a comment", isComment(testNode)); + + // get the first two parents of testNode + ServiceContext serviceContext = new ServiceContext(); + serviceContext.setService(CorePlugin.getInstance().getNodeService()); + Node parent1OfTestNode = serviceContext.getService().getParent(testNode, serviceContext); + String parent1OfTestNodeFullyQualifiedName = parent1OfTestNode.getNodeUri(); + Node parent2OfTestNode = serviceContext.getService().getParent(parent1OfTestNode, serviceContext); + + // remove comment node + nodeServiceRemote.removeChild(parent1OfTestNodeFullyQualifiedName, testNodeFullyQualifiedName); + + // take the first node that should stay dirty (as explained in this method's description) + Node firstDirtyNode = serviceContext.getService().getParent(parent2OfTestNode, serviceContext); + + // after this removal, both parent1 and parent 2 should be clean; + assertTrue("all parents without dirty children should be clean", !isChildrenDirty(parent1OfTestNode) && !isChildrenDirty(parent2OfTestNode)); + + // everything above should be dirty + assertTrue("all the parents are supposed to have the CONTAINS_COMMENT set if there is still any dirty child", isChildrenDirtyForAllParents(firstDirtyNode, serviceContext)); + } + + /** + * Initial: + * + *
+	 * Node1 (children dirty) - Node2 (children dirty) -  Node3 (children dirty)  - Comment  
+	 *                        \ Comment
+	 * 
+ * + * Expected after removal + * + *
+	 * Node1 (children dirty) - Node2  
+	 *                        \ Comment
+	 * 
+ */ + @Test + public void testRemoveNodeWithCommentButNotTheLastDirtyChild() { + // subscribe to sdiff file + NodeServiceRemote nodeServiceRemote = new NodeServiceRemote(); + String sdiffNodeUri = CoreUtils.createNodeUriWithRepo("fpp", CodeSyncTestSuite.PROJECT, TWO_COMMENTS_INSIDE_REMOVE_DIRTY_CHILD); + Node root = CodeSyncPlugin.getInstance().getResource(sdiffNodeUri); + CorePlugin.getInstance().getResourceService().subscribeToParentResource("dummySessionId", sdiffNodeUri, new ServiceContext()); + + // get the node with comment that we want to erase + Node testNode = CodeSyncTestSuite.getChild(root, new String[] {"CodeSyncSdiffPlugin.java", "CodeSyncSdiffPlugin", "registerMessageBundle()"}); + String testNodeFullyQualifiedName = testNode.getNodeUri();; + ServiceContext serviceContext = new ServiceContext(); + serviceContext.setService(CorePlugin.getInstance().getNodeService()); + assertTrue("testNode is supposed to be a node with a comment", isChildrenDirty(testNode)); + + // get testNode's parent + Node parentOfTestNode = serviceContext.getService().getParent(testNode, serviceContext); + String parentOfTestNodeFullyQualifiedName = parentOfTestNode.getNodeUri(); + Node firstDirtyNode = serviceContext.getService().getParent(parentOfTestNode, serviceContext); + + // remove node + nodeServiceRemote.removeChild(parentOfTestNodeFullyQualifiedName, testNodeFullyQualifiedName); + assertTrue("all parents without dirty children should be clean", !isChildrenDirty(parentOfTestNode)); + + // everything above should be dirty, since there is another comment child to keep them that way + assertTrue("all the parents are supposed to have the CONTAINS_COMMENT set if there is still any dirty child", isChildrenDirtyForAllParents(firstDirtyNode, serviceContext)); + } + + /** + * Initial: + * + *
+	 * Node1 (children dirty) - Node2 (children dirty) - Node3 (children dirty) - Comment  
+	 *                        \ Comment
+	 * 
+ * + * Expected after removal + * + *
+	 * Node1 (children dirty) - Node2  
+	 *                        \ Comment
+	 * 
+ */ + + @Test + public void testRemoveLastChildWithComment() { + // subscribe to sdiff file + NodeServiceRemote nodeServiceRemote = new NodeServiceRemote(); + String sdiffNodeUri = CoreUtils.createNodeUriWithRepo("fpp", CodeSyncTestSuite.PROJECT, ONE_DIRTY_NODE_INSIDE); + Node root = CodeSyncPlugin.getInstance().getResource(sdiffNodeUri); + CorePlugin.getInstance().getResourceService().subscribeToParentResource("dummySessionId", sdiffNodeUri, new ServiceContext()); + + // get testNode + Node testNode = CodeSyncTestSuite.getChild(root, new String[] {"CodeSyncSdiffPlugin.java", "CodeSyncSdiffPlugin", "registerMessageBundle()"}); + String testNodeFullyQualifiedName = testNode.getNodeUri();; + + assertTrue("testNode is supposed to be a node with comment", isChildrenDirty(testNode)); + + // get the parent of testNode + ServiceContext serviceContext = new ServiceContext(); + serviceContext.setService(CorePlugin.getInstance().getNodeService()); + Node parentOfTestNode = serviceContext.getService().getParent(testNode, serviceContext); + String parentOfTestNodeFullyQualifiedName = parentOfTestNode.getNodeUri(); + + // remove node + nodeServiceRemote.removeChild(parentOfTestNodeFullyQualifiedName, testNodeFullyQualifiedName); + + // update the values of parentOfTestNode + parentOfTestNode = CorePlugin.getInstance().getResourceService().getNode(parentOfTestNodeFullyQualifiedName); + + assertTrue("if no dirty child is left, all parents (that don't have dirty children) should loose the CONTAINS_COMMENT flag", + isChildrenNotDirtyForAllParents(parentOfTestNode, serviceContext)); + } + + /** + * Initial: + * + *
+	 * Node1 (children dirty) - Comment
+	 * 
+ * + * Expected after removal + * + *
+	 * Node1
+	 * 
+ */ + @Test + public void testRemoveLastComment() { + // remove testNode; this should make all the parents clean; + + // subscribe to sdiffile + NodeServiceRemote nodeServiceRemote = new NodeServiceRemote(); + String sdiffNodeUri = CoreUtils.createNodeUriWithRepo("fpp", CodeSyncTestSuite.PROJECT, ONE_COMMENT_INSIDE); + Node root = CodeSyncPlugin.getInstance().getResource(sdiffNodeUri); + CorePlugin.getInstance().getResourceService().subscribeToParentResource("dummySessionId", sdiffNodeUri, new ServiceContext()); + + // get testNode + Node testNode = CodeSyncTestSuite.getChild(root, new String[] {"CodeSyncSdiffPlugin.java", "CodeSyncSdiffPlugin", "registerMessageBundle()", "myComment"}); + String testNodeFullyQualifiedName = testNode.getNodeUri();; + assertTrue("testNode is supposed to be a comment", isComment(testNode)); + ServiceContext serviceContext = new ServiceContext(); + serviceContext.setService(CorePlugin.getInstance().getNodeService()); + + // get the parent of node + Node parentOfTestNode = serviceContext.getService().getParent(testNode, serviceContext); + String parentOfTestNodeFullyQualifiedName = parentOfTestNode.getNodeUri(); + + // remove node + nodeServiceRemote.removeChild(parentOfTestNodeFullyQualifiedName, testNodeFullyQualifiedName); + + assertTrue("if no dirty child is left, all parents (that don't have dirty children) should loose the CONTAINS_COMMENT flag", + isChildrenNotDirtyForAllParents(parentOfTestNode, serviceContext)); + } + + private boolean isComment(Node node) { + return node.getType().equals(CodeSyncSdiffConstants.COMMENT); + } + + private boolean isChildrenDirty(Node node) { + Boolean b = (Boolean) node.getPropertyValue(CONTAINS_COMMENT); + // is something that has a child comment + return b != null && b; + } + + private boolean isChildrenDirtyForAllParents(Node node, ServiceContext serviceContext) { + return flagChildrenDirtyForAllParents(node, serviceContext, false); + } + + private boolean isChildrenNotDirtyForAllParents(Node node, ServiceContext serviceContext) { + return flagChildrenDirtyForAllParents(node, serviceContext, true); + } + + private boolean flagChildrenDirtyForAllParents(Node node, ServiceContext serviceContext, boolean flag) { + Node parent = null; + while ((parent = serviceContext.getService().getParent(node, serviceContext)) != null) { + if (isChildrenDirty(parent) == flag) { + // the parentSync flag has already been propagated + return false; + } + node = parent; + } + return true; + + } + +} diff --git a/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/CodeSyncPropagationTest.java b/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/CodeSyncPropagationTest.java new file mode 100644 index 00000000..8758be80 --- /dev/null +++ b/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/CodeSyncPropagationTest.java @@ -0,0 +1,242 @@ +package org.flowerplatform.tests.codesync; + +import static org.flowerplatform.codesync.CodeSyncConstants.REMOVED; +import static org.flowerplatform.codesync.CodeSyncConstants.CHILDREN_SYNC; +import static org.flowerplatform.codesync.CodeSyncConstants.SYNC; +import static org.flowerplatform.codesync.code.java.CodeSyncJavaConstants.MODIFIER; +import static org.flowerplatform.core.CoreConstants.NAME; +import static org.flowerplatform.core.CoreConstants.TYPE_KEY; +import static org.junit.Assert.assertTrue; + +import org.flowerplatform.codesync.CodeSyncPlugin; +import org.flowerplatform.core.CorePlugin; +import org.flowerplatform.core.CoreUtils; +import org.flowerplatform.core.node.NodeService; +import org.flowerplatform.core.node.remote.Node; +import org.flowerplatform.core.node.remote.NodeServiceRemote; +import org.flowerplatform.core.node.remote.ServiceContext; +import org.flowerplatform.core.node.resource.ResourceService; +import org.junit.Test; + +/** + * + * @author Elena Posea + * + */ + +public class CodeSyncPropagationTest { + + private static final String INITIAL_ALL_SYNC = "initial_all_sync/"; + private static final String INITIAL_ONE_NOT_SYNC = "initial_one_not_sync/"; + private static final String test1 = ".codesync1"; + private static final String test2 = ".codesync2"; + private static final String test3 = ".codesync3"; + private static final String test4 = ".codesync4"; + private static final String test5 = ".codesync5"; + + /** + * Initial: + *
+	 * Node1 (SYNC, CHILDREN_SYNC)
+	 * 
+ * + * Expected after addition: + *
+	 * Node1 (not CHILDREN_SYNC) - Modifier
+	 * 
+ */ + @Test + public void testAddNodePropagation() { + // subscribe to sdiff file + NodeServiceRemote nodeServiceRemote = new NodeServiceRemote(); + String sdiffNodeUri = CoreUtils.createNodeUriWithRepo("fpp", CodeSyncTestSuite.PROJECT, INITIAL_ALL_SYNC + test1); + Node root = CodeSyncPlugin.getInstance().getResource(sdiffNodeUri); + CorePlugin.getInstance().getResourceService().subscribeToParentResource("dummySessionId", sdiffNodeUri, new ServiceContext()); + + // get testNode (the parent of the node I want to add) + Node testNode = CodeSyncTestSuite.getChild(root, new String[] {"modified_no_conflicts_perform_sync", "Test.java", "Test", "getTest()"}); + String testNodeFullyQualifiedName = testNode.getNodeUri();; + ServiceContext serviceContext = new ServiceContext(); + assertTrue("testNode is supposed to be initially sync", hasFlagTrue(testNode, SYNC)); + + // add a new child of type MODIFIER + serviceContext.add(TYPE_KEY, MODIFIER); + String modifierNodeFullyQualifiedName = nodeServiceRemote.addChild(testNodeFullyQualifiedName, serviceContext); + Node modifierNode = CorePlugin.getInstance().getResourceService().getNode(modifierNodeFullyQualifiedName); + + // update the value of node (its flag should change after this addition) + testNode = CorePlugin.getInstance().getResourceService().getNode(testNodeFullyQualifiedName); + assertTrue("all the parents are supposed to have the SYNC flag unset/set to false after this new child has been added", isChildrenDirtyForAllParents(modifierNode, serviceContext, INITIAL_ALL_SYNC + test1)); + } + + /** + * Initial + *
+	 * Node1 (CHILDREN_SYNC) - Node2 (SYNC)
+	 * 
+ * + * Expected after removal + *
+	 * Node1 (not CHILDREN_SYNC) - Node2 (marked as removed)
+	 * 
+ */ + @Test + public void testRemoveNodePropagation() { + // subscribe to sdiff file + NodeServiceRemote nodeServiceRemote = new NodeServiceRemote(); + String sdiffNodeUri = CoreUtils.createNodeUriWithRepo("fpp", CodeSyncTestSuite.PROJECT, INITIAL_ALL_SYNC + test2); + Node root = CodeSyncPlugin.getInstance().getResource(sdiffNodeUri); + CorePlugin.getInstance().getResourceService().subscribeToParentResource("dummySessionId", sdiffNodeUri, new ServiceContext()); + + // get the testNode + Node testNode = CodeSyncTestSuite.getChild(root, new String[] {"initial", "Test.java", "Test", "test(String)", "st"}); + String testNodeFullyQualifiedName = testNode.getNodeUri();; + ServiceContext serviceContext = new ServiceContext(); + serviceContext.setService(CorePlugin.getInstance().getNodeService()); + assertTrue("testNode is supposed to be initially sync", hasFlagTrue(testNode, SYNC)); + assertTrue("all the parents are supposed to be clean, initially", isChildrenNotDirtyForAllParents(testNode, serviceContext, INITIAL_ALL_SYNC + test2)); + + // get the parent of testNode + Node parentOfTestNode = serviceContext.getService().getParent(testNode, serviceContext); + String parentOfTestNodeFullyQualifiedName = parentOfTestNode.getNodeUri(); + + // remove node + nodeServiceRemote.removeChild(parentOfTestNodeFullyQualifiedName, testNodeFullyQualifiedName); + // update the value of testNode + testNode = CorePlugin.getInstance().getResourceService().getNode(testNodeFullyQualifiedName); + assertTrue("after removal, testNode should be marked as REMOVED", hasFlagTrue(testNode, REMOVED)); + + // everything above should be dirty, including the "removed" node + assertTrue("all the parents are supposed to have the SYNC flag unset/set to false after this removal", isChildrenDirtyForAllParents(testNode, serviceContext, INITIAL_ALL_SYNC + test2)); + } + + /** + * Initial + *
+	 * Node1 (CHILDREN_SYNC) - Node2 (SYNC)
+	 * 
+ * + * Expected after modification of value + *
+	 * Node1 (not CHILDREN_SYNC) - Node2 (not SYNC)
+	 * 
+ */ + + @Test + public void testChangeOriginalValueNodePropagation() { + // subscribe to sdiff file + NodeServiceRemote nodeServiceRemote = new NodeServiceRemote(); + String sdiffNodeUri = CoreUtils.createNodeUriWithRepo("fpp", CodeSyncTestSuite.PROJECT, INITIAL_ALL_SYNC + test3); + Node root = CodeSyncPlugin.getInstance().getResource(sdiffNodeUri); + CorePlugin.getInstance().getResourceService().subscribeToParentResource("dummySessionId", sdiffNodeUri, new ServiceContext()); + + // get testNode + Node testNode = CodeSyncTestSuite.getChild(root, new String[] {"modified_no_conflicts_perform_sync", "Test.java", "Test", "x"}); + String testNodeFullyQualifiedName = testNode.getNodeUri();; + ServiceContext serviceContext = new ServiceContext(); + serviceContext.setService(CorePlugin.getInstance().getNodeService()); + assertTrue("testNode is supposed to be initially sync", hasFlagTrue(testNode, SYNC)); + assertTrue("all the parents are supposed to be clean, initially", isChildrenNotDirtyForAllParents(testNode, serviceContext, INITIAL_ALL_SYNC + test3)); + + // change a property + nodeServiceRemote.setProperty(testNodeFullyQualifiedName, NAME, "xx"); + + // everything above should be dirty + assertTrue("all the parents are supposed to have the SYNC flag unset/set to false after this change", isChildrenDirtyForAllParents(testNode, serviceContext, INITIAL_ALL_SYNC + test3)); + + } + + + /** + * Initial + * Node (not CHILDREN_SYNC) - Node (not SYNC because x) + * + * Expected after rever on x but change on y + * Node (not CHILDREN_SYNC) - Node (not SYNC because y) + */ + @Test + public void testRevertToOriginalValueButNotTheLastOneNodePropagation() { + // subscribe to sdiff file + NodeServiceRemote nodeServiceRemote = new NodeServiceRemote(); + String sdiffNodeUri = CoreUtils.createNodeUriWithRepo("fpp", CodeSyncTestSuite.PROJECT, INITIAL_ONE_NOT_SYNC + test5); + Node root = CodeSyncPlugin.getInstance().getResource(sdiffNodeUri); + CorePlugin.getInstance().getResourceService().subscribeToParentResource("dummySessionId", sdiffNodeUri, new ServiceContext()); + + // get testNode + Node testNodeX = CodeSyncTestSuite.getChild(root, new String[] {"modified_no_conflicts_perform_sync", "Test.java", "Test", "xx"}); + String testNodeXFullyQualifiedName = testNodeX.getNodeUri();; + Node testNodeY = CodeSyncTestSuite.getChild(root, new String[] {"modified_no_conflicts_perform_sync", "Test.java", "Test", "y"}); + String testNodeYFullyQualifiedName = testNodeY.getNodeUri();; + + ServiceContext serviceContext = new ServiceContext(); + serviceContext.setService(CorePlugin.getInstance().getNodeService()); + assertTrue("testNodeX is supposed to be initially not SYNC", !hasFlagTrue(testNodeX, SYNC)); + assertTrue("testNodeY is supposed to be initially SYNC", hasFlagTrue(testNodeY, SYNC)); + assertTrue("all the parents are supposed to be dirty, initially", isChildrenDirtyForAllParents(testNodeX, serviceContext, INITIAL_ONE_NOT_SYNC + test5)); + + // change a property + nodeServiceRemote.setProperty(testNodeYFullyQualifiedName, NAME, "yy"); + // revert a property + nodeServiceRemote.setProperty(testNodeXFullyQualifiedName, NAME, "x"); + + // everything above should be dirty + assertTrue("all the parents are supposed to still have the SYNC flag unset/set to false after this change", isChildrenDirtyForAllParents(testNodeX, serviceContext, INITIAL_ONE_NOT_SYNC + test5)); + } + + + @Test + public void testRevertToOriginalValueNodePropagation() { + // subscribe to sdiff file + NodeServiceRemote nodeServiceRemote = new NodeServiceRemote(); + String sdiffNodeUri = CoreUtils.createNodeUriWithRepo("fpp", CodeSyncTestSuite.PROJECT, INITIAL_ONE_NOT_SYNC + test4); + Node root = CodeSyncPlugin.getInstance().getResource(sdiffNodeUri); + CorePlugin.getInstance().getResourceService().subscribeToParentResource("dummySessionId", sdiffNodeUri, new ServiceContext()); + + // get test node + Node testNode = CodeSyncTestSuite.getChild(root, new String[] {"modified_no_conflicts_perform_sync", "Test.java", "Test", "xx"}); + String testNodeFullyQualifiedName = testNode.getNodeUri();; + ServiceContext serviceContext = new ServiceContext(); + serviceContext.setService(CorePlugin.getInstance().getNodeService()); + assertTrue("testNode is supposed to be initially not sync", !hasFlagTrue(testNode, SYNC)); + assertTrue("all the parents are supposed to be dirty, initially", isChildrenDirtyForAllParents(testNode, serviceContext, INITIAL_ONE_NOT_SYNC + test4)); + + // change a property back to its original value + nodeServiceRemote.setProperty(testNodeFullyQualifiedName, NAME, "x"); + + // everything above should be clean again + assertTrue("all the parents are supposed to be clean, after I changed back this property", isChildrenNotDirtyForAllParents(testNode, serviceContext, INITIAL_ONE_NOT_SYNC + test4)); + } + + private static boolean hasFlagTrue(Node node, String flag) { + Boolean b = (Boolean) node.getPropertyValue(flag); + return b != null && b; + } + + private boolean isChildrenDirty(Node node) { + Boolean b = (Boolean) node.getPropertyValue(CHILDREN_SYNC); + // is something that has a child comment + return b == null || b == false; + } + + private boolean isChildrenDirtyForAllParents(Node node, ServiceContext serviceContext, String stop) { + return isChildrenFlagForAllParents(node, serviceContext, stop, false); + } + + private boolean isChildrenFlagForAllParents(Node node, ServiceContext serviceContext, String stop, boolean flag) { + Node parent = null; + while ((parent = serviceContext.getService().getParent(node, serviceContext)) != null && !parent.getNodeUri().endsWith(stop)) { + if (isChildrenDirty(parent) == flag) { + // the parentSync flag has already been propagated + return false; + } + node = parent; + } + return true; + } + + private boolean isChildrenNotDirtyForAllParents(Node node, ServiceContext serviceContext, String stop) { + return isChildrenFlagForAllParents(node, serviceContext, stop, true); + } + + +} diff --git a/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/CodeSyncTestSuite.java b/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/CodeSyncTestSuite.java index 3f9b3535..9abeaa40 100644 --- a/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/CodeSyncTestSuite.java +++ b/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/CodeSyncTestSuite.java @@ -28,6 +28,7 @@ import org.flowerplatform.codesync.as.CodeSyncAsPlugin; import org.flowerplatform.codesync.code.java.CodeSyncJavaPlugin; import org.flowerplatform.codesync.remote.CodeSyncOperationsService; +import org.flowerplatform.codesync.sdiff.CodeSyncSdiffPlugin; import org.flowerplatform.core.CoreConstants; import org.flowerplatform.core.CorePlugin; import org.flowerplatform.core.node.NodeService; @@ -49,7 +50,9 @@ @RunWith(Suite.class) @SuiteClasses({ CodeSyncJavaTest.class, - CodeSyncAsTest.class + CodeSyncAsTest.class, + CodeSyncCommentPropagationTest.class, + CodeSyncPropagationTest.class // CodeSyncJavascriptTest.class, // CodeSyncWikiTest.class }) @@ -71,6 +74,7 @@ public static void beforeClass() throws Exception { startPlugin(new CodeSyncPlugin()); startPlugin(new CodeSyncJavaPlugin()); startPlugin(new CodeSyncAsPlugin()); + startPlugin(new CodeSyncSdiffPlugin()); } public static File getFile(String path) { diff --git a/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_all_sync/.codesync1 b/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_all_sync/.codesync1 new file mode 100644 index 00000000..d52c4769 --- /dev/null +++ b/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_all_sync/.codesync1 @@ -0,0 +1,8932 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+ Flower Platform 4 +

+

+ - Flower Agile Process Sheet - +

+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
diff --git a/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_all_sync/.codesync2 b/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_all_sync/.codesync2 new file mode 100644 index 00000000..d52c4769 --- /dev/null +++ b/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_all_sync/.codesync2 @@ -0,0 +1,8932 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+ Flower Platform 4 +

+

+ - Flower Agile Process Sheet - +

+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
diff --git a/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_all_sync/.codesync3 b/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_all_sync/.codesync3 new file mode 100644 index 00000000..d52c4769 --- /dev/null +++ b/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_all_sync/.codesync3 @@ -0,0 +1,8932 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+ Flower Platform 4 +

+

+ - Flower Agile Process Sheet - +

+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
diff --git a/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_comments_inside/codesyncSdiffOneCommentPatch.sdiff b/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_comments_inside/codesyncSdiffOneCommentPatch.sdiff new file mode 100644 index 00000000..b85c46e8 --- /dev/null +++ b/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_comments_inside/codesyncSdiffOneCommentPatch.sdiff @@ -0,0 +1,1124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_comments_inside/codesyncSdiffTwoCommentsDirtyPatch.sdiff b/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_comments_inside/codesyncSdiffTwoCommentsDirtyPatch.sdiff new file mode 100644 index 00000000..9ef80e5c --- /dev/null +++ b/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_comments_inside/codesyncSdiffTwoCommentsDirtyPatch.sdiff @@ -0,0 +1,1127 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_comments_inside/codesyncSdiffTwoCommentsPatch.sdiff b/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_comments_inside/codesyncSdiffTwoCommentsPatch.sdiff new file mode 100644 index 00000000..23677305 --- /dev/null +++ b/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_comments_inside/codesyncSdiffTwoCommentsPatch.sdiff @@ -0,0 +1,1128 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_comments_inside/codesyncSdiffTwoDirtyChildrenPatch.sdiff b/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_comments_inside/codesyncSdiffTwoDirtyChildrenPatch.sdiff new file mode 100644 index 00000000..653a661b --- /dev/null +++ b/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_comments_inside/codesyncSdiffTwoDirtyChildrenPatch.sdiff @@ -0,0 +1,1123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_no_comments_inside/codesyncSdiffPatch.sdiff b/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_no_comments_inside/codesyncSdiffPatch.sdiff new file mode 100644 index 00000000..578879db --- /dev/null +++ b/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_no_comments_inside/codesyncSdiffPatch.sdiff @@ -0,0 +1,1115 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_one_not_sync/.codesync4 b/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_one_not_sync/.codesync4 new file mode 100644 index 00000000..29303061 --- /dev/null +++ b/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_one_not_sync/.codesync4 @@ -0,0 +1,8933 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+ Flower Platform 4 +

+

+ - Flower Agile Process Sheet - +

+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
diff --git a/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_one_not_sync/.codesync5 b/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_one_not_sync/.codesync5 new file mode 100644 index 00000000..29303061 --- /dev/null +++ b/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_one_not_sync/.codesync5 @@ -0,0 +1,8933 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+ Flower Platform 4 +

+

+ - Flower Agile Process Sheet - +

+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
From 2aa74532df97a75124ab5aa22d230377620f026b Mon Sep 17 00:00:00 2001 From: elena-posea Date: Tue, 5 Aug 2014 15:51:43 +0300 Subject: [PATCH 05/12] #362 - renamed codesync test files and cretaed function for ssubscribing to sdiff file --- .../CodeSyncCommentPropagationTest.java | 93 +++++++++---------- .../codesync/CodeSyncPropagationTest.java | 10 +- ...{.codesync1 => AllSyncAddNodeTestCodeSync} | 0 ...c2 => AllSyncChangeOriginalValueCondeSync} | 0 .../{.codesync3 => AllSyncSimpleRemoveSync} | 0 ...4 => NotSyncRevertToOriginalValueCodeSync} | 0 ...ReverToOriginalValueButNotTheLastCodeSync} | 0 7 files changed, 50 insertions(+), 53 deletions(-) rename org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_all_sync/{.codesync1 => AllSyncAddNodeTestCodeSync} (100%) rename org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_all_sync/{.codesync2 => AllSyncChangeOriginalValueCondeSync} (100%) rename org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_all_sync/{.codesync3 => AllSyncSimpleRemoveSync} (100%) rename org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_one_not_sync/{.codesync4 => NotSyncRevertToOriginalValueCodeSync} (100%) rename org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_one_not_sync/{.codesync5 => ReverToOriginalValueButNotTheLastCodeSync} (100%) diff --git a/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/CodeSyncCommentPropagationTest.java b/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/CodeSyncCommentPropagationTest.java index 20103ad0..952d9d47 100644 --- a/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/CodeSyncCommentPropagationTest.java +++ b/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/CodeSyncCommentPropagationTest.java @@ -28,6 +28,7 @@ public class CodeSyncCommentPropagationTest { public static final String ONE_DIRTY_NODE_INSIDE = "initial_comments_inside/codesyncSdiffTwoDirtyChildrenPatch.sdiff"; public static final String TWO_COMMENTS_INSIDE_REMOVE_COMMENT = "initial_comments_inside/codesyncSdiffTwoCommentsPatch.sdiff"; public static final String TWO_COMMENTS_INSIDE_REMOVE_DIRTY_CHILD = "initial_comments_inside/codesyncSdiffTwoCommentsDirtyPatch.sdiff"; + private static NodeServiceRemote nodeServiceRemote = new NodeServiceRemote(); /** * Initial: @@ -45,14 +46,12 @@ public class CodeSyncCommentPropagationTest { @Test public void testAddCommentPropagation() { // subscribe to sdiff file - NodeServiceRemote nodeServiceRemote = new NodeServiceRemote(); - String sdiffNodeUri = CoreUtils.createNodeUriWithRepo("fpp", CodeSyncTestSuite.PROJECT, NO_COMMENTS_INSIDE); - Node root = CodeSyncPlugin.getInstance().getResource(sdiffNodeUri); - CorePlugin.getInstance().getResourceService().subscribeToParentResource("dummySessionId", sdiffNodeUri, new ServiceContext()); + Node root = subscribeToSdiffFile(NO_COMMENTS_INSIDE); // get the node that we want to use as parent for our new node - Node testNode = CodeSyncTestSuite.getChild(root, new String[] {"CodeSyncSdiffConstants.java", "CodeSyncSdiffConstants", "STRUCTURE_DIFFS_FOLDER"}); - String testNodeFullyQualifiedName = testNode.getNodeUri();; + Node testNode = CodeSyncTestSuite.getChild(root, new String[] { "CodeSyncSdiffConstants.java", "CodeSyncSdiffConstants", "STRUCTURE_DIFFS_FOLDER" }); + String testNodeFullyQualifiedName = testNode.getNodeUri(); + ; ServiceContext serviceContext = new ServiceContext(); assertTrue("testNode is supposed to be initially clean", !isComment(testNode) && !isChildrenDirty(testNode)); @@ -87,32 +86,31 @@ public void testAddCommentPropagation() { @Test public void testRemoveCommentButNotTheLastDirtyChild() { // subscribe to sdiff file - NodeServiceRemote nodeServiceRemote = new NodeServiceRemote(); - String sdiffNodeUri = CoreUtils.createNodeUriWithRepo("fpp", CodeSyncTestSuite.PROJECT, TWO_COMMENTS_INSIDE_REMOVE_COMMENT); - Node root = CodeSyncPlugin.getInstance().getResource(sdiffNodeUri); - CorePlugin.getInstance().getResourceService().subscribeToParentResource("dummySessionId", sdiffNodeUri, new ServiceContext()); - + Node root = subscribeToSdiffFile(TWO_COMMENTS_INSIDE_REMOVE_COMMENT); + // get the node that we want to remove - Node testNode = CodeSyncTestSuite.getChild(root, new String[] {"CodeSyncSdiffPlugin.java", "CodeSyncSdiffPlugin", "registerMessageBundle()", "myMessage"}); - String testNodeFullyQualifiedName = testNode.getNodeUri();; + Node testNode = CodeSyncTestSuite.getChild(root, new String[] { "CodeSyncSdiffPlugin.java", "CodeSyncSdiffPlugin", "registerMessageBundle()", "myMessage" }); + String testNodeFullyQualifiedName = testNode.getNodeUri(); + ; assertTrue("testNode is supposed to be a comment", isComment(testNode)); - + // get the first two parents of testNode ServiceContext serviceContext = new ServiceContext(); serviceContext.setService(CorePlugin.getInstance().getNodeService()); Node parent1OfTestNode = serviceContext.getService().getParent(testNode, serviceContext); String parent1OfTestNodeFullyQualifiedName = parent1OfTestNode.getNodeUri(); Node parent2OfTestNode = serviceContext.getService().getParent(parent1OfTestNode, serviceContext); - + // remove comment node nodeServiceRemote.removeChild(parent1OfTestNodeFullyQualifiedName, testNodeFullyQualifiedName); - - // take the first node that should stay dirty (as explained in this method's description) + + // take the first node that should stay dirty (as explained in this + // method's description) Node firstDirtyNode = serviceContext.getService().getParent(parent2OfTestNode, serviceContext); - + // after this removal, both parent1 and parent 2 should be clean; assertTrue("all parents without dirty children should be clean", !isChildrenDirty(parent1OfTestNode) && !isChildrenDirty(parent2OfTestNode)); - + // everything above should be dirty assertTrue("all the parents are supposed to have the CONTAINS_COMMENT set if there is still any dirty child", isChildrenDirtyForAllParents(firstDirtyNode, serviceContext)); } @@ -135,14 +133,12 @@ public void testRemoveCommentButNotTheLastDirtyChild() { @Test public void testRemoveNodeWithCommentButNotTheLastDirtyChild() { // subscribe to sdiff file - NodeServiceRemote nodeServiceRemote = new NodeServiceRemote(); - String sdiffNodeUri = CoreUtils.createNodeUriWithRepo("fpp", CodeSyncTestSuite.PROJECT, TWO_COMMENTS_INSIDE_REMOVE_DIRTY_CHILD); - Node root = CodeSyncPlugin.getInstance().getResource(sdiffNodeUri); - CorePlugin.getInstance().getResourceService().subscribeToParentResource("dummySessionId", sdiffNodeUri, new ServiceContext()); + Node root = subscribeToSdiffFile(TWO_COMMENTS_INSIDE_REMOVE_DIRTY_CHILD); - // get the node with comment that we want to erase - Node testNode = CodeSyncTestSuite.getChild(root, new String[] {"CodeSyncSdiffPlugin.java", "CodeSyncSdiffPlugin", "registerMessageBundle()"}); - String testNodeFullyQualifiedName = testNode.getNodeUri();; + // get the node with comment that we want to erase + Node testNode = CodeSyncTestSuite.getChild(root, new String[] { "CodeSyncSdiffPlugin.java", "CodeSyncSdiffPlugin", "registerMessageBundle()" }); + String testNodeFullyQualifiedName = testNode.getNodeUri(); + ; ServiceContext serviceContext = new ServiceContext(); serviceContext.setService(CorePlugin.getInstance().getNodeService()); assertTrue("testNode is supposed to be a node with a comment", isChildrenDirty(testNode)); @@ -156,7 +152,8 @@ public void testRemoveNodeWithCommentButNotTheLastDirtyChild() { nodeServiceRemote.removeChild(parentOfTestNodeFullyQualifiedName, testNodeFullyQualifiedName); assertTrue("all parents without dirty children should be clean", !isChildrenDirty(parentOfTestNode)); - // everything above should be dirty, since there is another comment child to keep them that way + // everything above should be dirty, since there is another comment + // child to keep them that way assertTrue("all the parents are supposed to have the CONTAINS_COMMENT set if there is still any dirty child", isChildrenDirtyForAllParents(firstDirtyNode, serviceContext)); } @@ -179,17 +176,15 @@ public void testRemoveNodeWithCommentButNotTheLastDirtyChild() { @Test public void testRemoveLastChildWithComment() { // subscribe to sdiff file - NodeServiceRemote nodeServiceRemote = new NodeServiceRemote(); - String sdiffNodeUri = CoreUtils.createNodeUriWithRepo("fpp", CodeSyncTestSuite.PROJECT, ONE_DIRTY_NODE_INSIDE); - Node root = CodeSyncPlugin.getInstance().getResource(sdiffNodeUri); - CorePlugin.getInstance().getResourceService().subscribeToParentResource("dummySessionId", sdiffNodeUri, new ServiceContext()); - + Node root = subscribeToSdiffFile(ONE_DIRTY_NODE_INSIDE); + // get testNode - Node testNode = CodeSyncTestSuite.getChild(root, new String[] {"CodeSyncSdiffPlugin.java", "CodeSyncSdiffPlugin", "registerMessageBundle()"}); - String testNodeFullyQualifiedName = testNode.getNodeUri();; + Node testNode = CodeSyncTestSuite.getChild(root, new String[] { "CodeSyncSdiffPlugin.java", "CodeSyncSdiffPlugin", "registerMessageBundle()" }); + String testNodeFullyQualifiedName = testNode.getNodeUri(); + ; assertTrue("testNode is supposed to be a node with comment", isChildrenDirty(testNode)); - + // get the parent of testNode ServiceContext serviceContext = new ServiceContext(); serviceContext.setService(CorePlugin.getInstance().getNodeService()); @@ -198,10 +193,10 @@ public void testRemoveLastChildWithComment() { // remove node nodeServiceRemote.removeChild(parentOfTestNodeFullyQualifiedName, testNodeFullyQualifiedName); - + // update the values of parentOfTestNode parentOfTestNode = CorePlugin.getInstance().getResourceService().getNode(parentOfTestNodeFullyQualifiedName); - + assertTrue("if no dirty child is left, all parents (that don't have dirty children) should loose the CONTAINS_COMMENT flag", isChildrenNotDirtyForAllParents(parentOfTestNode, serviceContext)); } @@ -221,22 +216,18 @@ public void testRemoveLastChildWithComment() { */ @Test public void testRemoveLastComment() { - // remove testNode; this should make all the parents clean; - // subscribe to sdiffile - NodeServiceRemote nodeServiceRemote = new NodeServiceRemote(); - String sdiffNodeUri = CoreUtils.createNodeUriWithRepo("fpp", CodeSyncTestSuite.PROJECT, ONE_COMMENT_INSIDE); - Node root = CodeSyncPlugin.getInstance().getResource(sdiffNodeUri); - CorePlugin.getInstance().getResourceService().subscribeToParentResource("dummySessionId", sdiffNodeUri, new ServiceContext()); - + Node root = subscribeToSdiffFile(ONE_COMMENT_INSIDE); + // get testNode - Node testNode = CodeSyncTestSuite.getChild(root, new String[] {"CodeSyncSdiffPlugin.java", "CodeSyncSdiffPlugin", "registerMessageBundle()", "myComment"}); - String testNodeFullyQualifiedName = testNode.getNodeUri();; + Node testNode = CodeSyncTestSuite.getChild(root, new String[] { "CodeSyncSdiffPlugin.java", "CodeSyncSdiffPlugin", "registerMessageBundle()", "myComment" }); + String testNodeFullyQualifiedName = testNode.getNodeUri(); + ; assertTrue("testNode is supposed to be a comment", isComment(testNode)); ServiceContext serviceContext = new ServiceContext(); serviceContext.setService(CorePlugin.getInstance().getNodeService()); - - // get the parent of node + + // get the parent of node Node parentOfTestNode = serviceContext.getService().getParent(testNode, serviceContext); String parentOfTestNodeFullyQualifiedName = parentOfTestNode.getNodeUri(); @@ -278,4 +269,10 @@ private boolean flagChildrenDirtyForAllParents(Node node, ServiceContext()); + return root; + } } diff --git a/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/CodeSyncPropagationTest.java b/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/CodeSyncPropagationTest.java index 8758be80..10828693 100644 --- a/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/CodeSyncPropagationTest.java +++ b/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/CodeSyncPropagationTest.java @@ -28,11 +28,11 @@ public class CodeSyncPropagationTest { private static final String INITIAL_ALL_SYNC = "initial_all_sync/"; private static final String INITIAL_ONE_NOT_SYNC = "initial_one_not_sync/"; - private static final String test1 = ".codesync1"; - private static final String test2 = ".codesync2"; - private static final String test3 = ".codesync3"; - private static final String test4 = ".codesync4"; - private static final String test5 = ".codesync5"; + private static final String test1 = "AllSyncAddNodeTestCodeSync"; + private static final String test2 = "AllSyncSimpleRemoveSync"; + private static final String test3 = "AllSyncChangeOriginalValueCondeSync"; + private static final String test4 = "NotSyncRevertToOriginalValueCodeSync"; + private static final String test5 = "ReverToOriginalValueButNotTheLastCodeSync"; /** * Initial: diff --git a/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_all_sync/.codesync1 b/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_all_sync/AllSyncAddNodeTestCodeSync similarity index 100% rename from org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_all_sync/.codesync1 rename to org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_all_sync/AllSyncAddNodeTestCodeSync diff --git a/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_all_sync/.codesync2 b/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_all_sync/AllSyncChangeOriginalValueCondeSync similarity index 100% rename from org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_all_sync/.codesync2 rename to org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_all_sync/AllSyncChangeOriginalValueCondeSync diff --git a/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_all_sync/.codesync3 b/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_all_sync/AllSyncSimpleRemoveSync similarity index 100% rename from org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_all_sync/.codesync3 rename to org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_all_sync/AllSyncSimpleRemoveSync diff --git a/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_one_not_sync/.codesync4 b/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_one_not_sync/NotSyncRevertToOriginalValueCodeSync similarity index 100% rename from org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_one_not_sync/.codesync4 rename to org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_one_not_sync/NotSyncRevertToOriginalValueCodeSync diff --git a/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_one_not_sync/.codesync5 b/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_one_not_sync/ReverToOriginalValueButNotTheLastCodeSync similarity index 100% rename from org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_one_not_sync/.codesync5 rename to org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/resources/initial_to_be_copied/initial_one_not_sync/ReverToOriginalValueButNotTheLastCodeSync From a865fb948a5dfd7c18d2cc489e9c5d6149a6e73e Mon Sep 17 00:00:00 2001 From: elena-posea Date: Wed, 6 Aug 2014 18:41:07 +0300 Subject: [PATCH 06/12] #36 - solved merge problems; now both custom flags and codesync flag work properly --- .../codesync/sdiff/CodeSyncSdiffPlugin.java | 13 ++-- ...=> CanContainCommentPropertyProvider.java} | 72 +++++++++---------- .../StructureDiffCommentController.java | 27 ++++++- .../StructureDiffMatchPropertiesProvider.java | 7 +- .../codesync/CodeSyncConstants.java | 1 + .../codesync/CodeSyncPlugin.java | 11 ++- 6 files changed, 81 insertions(+), 50 deletions(-) rename org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/{CanContainCommentPropertyController.java => CanContainCommentPropertyProvider.java} (52%) diff --git a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/CodeSyncSdiffPlugin.java b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/CodeSyncSdiffPlugin.java index 1ff5d546..8eedb828 100644 --- a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/CodeSyncSdiffPlugin.java +++ b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/CodeSyncSdiffPlugin.java @@ -29,7 +29,7 @@ import static org.flowerplatform.core.CoreConstants.REMOVE_NODE_CONTROLLER; import org.flowerplatform.codesync.sdiff.controller.CanContainCommentAddNodeListener; -import org.flowerplatform.codesync.sdiff.controller.CanContainCommentPropertyController; +import org.flowerplatform.codesync.sdiff.controller.CanContainCommentPropertyProvider; import org.flowerplatform.codesync.sdiff.controller.CanContainCommentRemoveNodeListener; import org.flowerplatform.codesync.sdiff.controller.StructureDiffCommentController; import org.flowerplatform.codesync.sdiff.controller.StructureDiffMatchChildrenProvider; @@ -40,6 +40,7 @@ import org.flowerplatform.resources.ResourcesPlugin; import org.flowerplatform.util.plugin.AbstractFlowerJavaPlugin; import org.osgi.framework.BundleContext; +import static org.flowerplatform.codesync.CodeSyncConstants.CATEGORY_CAN_HOLD_CUSTOM_ICON; /** * @author Mariana Gheorghe @@ -78,12 +79,14 @@ public void start(BundleContext bundleContext) throws Exception { .addCategory(CATEGORY_CAN_CONTAIN_COMMENT); CorePlugin.getInstance().getNodeTypeDescriptorRegistry().getOrCreateTypeDescriptor(COMMENT) - .addAdditiveController(PROPERTIES_PROVIDER, new StructureDiffCommentController()) - .addCategory(CATEGORY_CAN_CONTAIN_COMMENT); + .addAdditiveController(PROPERTIES_PROVIDER, new StructureDiffCommentController().setOrderIndexAs(5000)) + .addAdditiveController(PROPERTY_SETTER, new StructureDiffCommentController().setOrderIndexAs(5000)) + .addCategory(CATEGORY_CAN_CONTAIN_COMMENT) + .addCategory(CATEGORY_CAN_HOLD_CUSTOM_ICON); CorePlugin.getInstance().getNodeTypeDescriptorRegistry().getOrCreateCategoryTypeDescriptor(CATEGORY_CAN_CONTAIN_COMMENT) - .addAdditiveController(PROPERTIES_PROVIDER, new CanContainCommentPropertyController()) - .addAdditiveController(PROPERTY_SETTER, new CanContainCommentPropertyController()) + .addAdditiveController(PROPERTIES_PROVIDER, new CanContainCommentPropertyProvider()) + .addAdditiveController(PROPERTY_SETTER, new CanContainCommentPropertyProvider()) .addAdditiveController(ADD_NODE_CONTROLLER, new CanContainCommentAddNodeListener().setOrderIndexAs(10000)) .addAdditiveController(REMOVE_NODE_CONTROLLER, new CanContainCommentRemoveNodeListener().setOrderIndexAs(-10000)) .addAdditiveController(ADD_CHILD_DESCRIPTOR, diff --git a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentPropertyController.java b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentPropertyProvider.java similarity index 52% rename from org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentPropertyController.java rename to org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentPropertyProvider.java index e1a3c84d..8a7871d7 100644 --- a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentPropertyController.java +++ b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentPropertyProvider.java @@ -2,8 +2,9 @@ import static org.flowerplatform.codesync.sdiff.CodeSyncSdiffConstants.CONTAINS_COMMENT; import static org.flowerplatform.codesync.sdiff.CodeSyncSdiffConstants.IMG_TYPE_COMMENTS; +import static org.flowerplatform.core.CoreConstants.CODESYNC_ICONS; import static org.flowerplatform.core.CoreConstants.EXECUTE_ONLY_FOR_UPDATER; -import static org.flowerplatform.core.CoreConstants.ICONS; +import static org.flowerplatform.core.CoreConstants.DONT_PROCESS_OTHER_CONTROLLERS; import java.util.regex.Matcher; @@ -16,75 +17,68 @@ import org.flowerplatform.core.node.remote.ServiceContext; import org.flowerplatform.util.controller.AbstractController; -public class CanContainCommentPropertyController extends AbstractController implements IPropertySetter, IPropertiesProvider { +public class CanContainCommentPropertyProvider extends AbstractController implements IPropertySetter, IPropertiesProvider { - public CanContainCommentPropertyController() { - setOrderIndex(10000); + public CanContainCommentPropertyProvider() { + setOrderIndex(10001); } - + @Override public void populateWithProperties(Node node, ServiceContext context) { - node.getProperties().put(ICONS, getIcon(node, context)); + node.getProperties().put(CODESYNC_ICONS, getCodeSyncIcon(node, context)); } @Override public void setProperty(Node node, String property, Object value, ServiceContext context) { - if (property.equals(CONTAINS_COMMENT) && (Boolean) value == true) { + if(context.get("myHardcodedFlag") != null) return; + if ((property.equals(CONTAINS_COMMENT) && (Boolean) value == true)) { ServiceContext newContext = new ServiceContext(context.getService()); newContext.getContext().put(EXECUTE_ONLY_FOR_UPDATER, true); -// node.getProperties().put(ICONS, getIcon(node, context)); - context.getService().setProperty(node, ICONS, getIcon(node, context), newContext); - } -// else{ -// if (property.equals(ICONS)) { -// node.getProperties().put(ICONS, getIcon(node, context)); -// } -// } - + newContext.getContext().put("myHardcodedFlag", true); + context.getService().setProperty(node, CODESYNC_ICONS, getCodeSyncIcon(node, context), newContext); + } else{ + if(property.equals(CODESYNC_ICONS)){ + ServiceContext newContext = new ServiceContext(context.getService()); + // otherwise, the next controller for MATCH is CanContainCommentPropertyProvider + Updater (we don't want this) + context.getContext().put(DONT_PROCESS_OTHER_CONTROLLERS, true); + newContext.getContext().put("myHardcodedFlag", true); + context.getService().setProperty(node, CODESYNC_ICONS, getCodeSyncIcon(node, context), newContext); + } + } } - - private String getIcon(Node node, ServiceContext context){ + private String getCodeSyncIcon(Node node, ServiceContext context) { Boolean b = (Boolean) node.getProperties().get(CONTAINS_COMMENT); - Object obj = node.getProperties().get(ICONS); + Object obj = node.getProperties().get(CODESYNC_ICONS); String icon = ""; - if(obj != null) icon = (String) obj; - // icon = current icon list + if (obj != null) + icon = (String) obj; + // icon = current icon list String newIcon = CodeSyncSdiffPlugin.getInstance().getImagePath(IMG_TYPE_COMMENTS); // newIcon = the icon that I would like to add if (b != null && b == true) { - if(icon.indexOf(newIcon) == -1){ // this node doesn't already contain this icon + if (icon.indexOf(newIcon) == -1) { // this node doesn't already + // contain this icon icon = icon + (!icon.isEmpty() ? CoreConstants.ICONS_SEPARATOR : "") + newIcon; } return icon; - } - else{ + } else { // remove property int index = icon.indexOf(newIcon); - if(index != -1){ // this node contains the icon; remove it + if (index != -1) { // this node contains the icon; remove it icon = icon.replaceAll(",?" + Matcher.quoteReplacement(newIcon), ""); } - return icon; + return icon; } } - -// private void setIcon(Node node, ServiceContext context) { -// ServiceContext newContext = new ServiceContext(context.getService()); -// newContext.getContext().put(EXECUTE_ONLY_FOR_UPDATER, true); -// String newIcon = CodeSyncSdiffPlugin.getInstance().getImagePath(IMG_TYPE_COMMENTS); -// Object obj = node.getProperties().get(ICONS); -// String icon = ""; -// if (obj != null) icon = (String) obj; -// icon = icon + (!icon.isEmpty() ? CoreConstants.ICONS_SEPARATOR : "") + newIcon; -// context.getService().setProperty(node, ICONS, icon, newContext); -// } - + @Override public void unsetProperty(Node node, String property, ServiceContext context) { if (property.equals(CONTAINS_COMMENT)) { ServiceContext newContext = new ServiceContext(); newContext.getContext().put(EXECUTE_ONLY_FOR_UPDATER, true); - context.getService().setProperty(node, ICONS, getIcon(node, context),newContext); + newContext.getContext().put("myHardcodedFlag", true); + context.getService().setProperty(node, CODESYNC_ICONS, getCodeSyncIcon(node, context), newContext); } } diff --git a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/StructureDiffCommentController.java b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/StructureDiffCommentController.java index 0d2460a7..44a330a4 100644 --- a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/StructureDiffCommentController.java +++ b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/StructureDiffCommentController.java @@ -17,12 +17,16 @@ import static org.flowerplatform.codesync.sdiff.CodeSyncSdiffConstants.IMG_TYPE_COMMENT; import static org.flowerplatform.codesync.sdiff.CodeSyncSdiffConstants.MATCH_COLOR_COMMENT; +import static org.flowerplatform.core.CoreConstants.CODESYNC_ICONS; +import static org.flowerplatform.core.CoreConstants.EXECUTE_ONLY_FOR_UPDATER; import static org.flowerplatform.core.CoreConstants.ICONS; import static org.flowerplatform.mindmap.MindMapConstants.COLOR_BACKGROUND; import org.flowerplatform.codesync.sdiff.CodeSyncSdiffPlugin; +import org.flowerplatform.core.CoreConstants; import org.flowerplatform.core.node.NodeService; import org.flowerplatform.core.node.controller.IPropertiesProvider; +import org.flowerplatform.core.node.controller.IPropertySetter; import org.flowerplatform.core.node.remote.Node; import org.flowerplatform.core.node.remote.ServiceContext; import org.flowerplatform.util.controller.AbstractController; @@ -30,12 +34,31 @@ /** * @author Mariana Gheorghe */ -public class StructureDiffCommentController extends AbstractController implements IPropertiesProvider { +public class StructureDiffCommentController extends AbstractController implements IPropertiesProvider, IPropertySetter { @Override public void populateWithProperties(Node node, ServiceContext context) { node.getProperties().put(COLOR_BACKGROUND, MATCH_COLOR_COMMENT); - node.getProperties().put(ICONS, CodeSyncSdiffPlugin.getInstance().getImagePath(IMG_TYPE_COMMENT)); + Object obj = node.getProperties().get(ICONS); + String icons = ""; + if(obj != null) icons = (String) obj; + node.getProperties().put(ICONS, icons); + node.getProperties().put(CODESYNC_ICONS, icons + (icons.isEmpty()? "" : CoreConstants.ICONS_SEPARATOR) + CodeSyncSdiffPlugin.getInstance().getImagePath(IMG_TYPE_COMMENT)); + } + + @Override + public void setProperty(Node node, String property, Object value, ServiceContext context) { + ServiceContext newContext = new ServiceContext(context.getService()); + newContext.getContext().put(EXECUTE_ONLY_FOR_UPDATER, true); + if (property.equals(ICONS)) { + String icons = (String)value; + context.getService().setProperty(node, CODESYNC_ICONS, icons + (icons.isEmpty()? "" : CoreConstants.ICONS_SEPARATOR) + CodeSyncSdiffPlugin.getInstance().getImagePath(IMG_TYPE_COMMENT), newContext); + } + } + + @Override + public void unsetProperty(Node node, String property, ServiceContext context) { + String test = "hello"; } } diff --git a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/StructureDiffMatchPropertiesProvider.java b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/StructureDiffMatchPropertiesProvider.java index c516774c..4178fa75 100644 --- a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/StructureDiffMatchPropertiesProvider.java +++ b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/StructureDiffMatchPropertiesProvider.java @@ -26,6 +26,7 @@ import static org.flowerplatform.codesync.sdiff.CodeSyncSdiffConstants.MATCH_COLOR_PROP_MODIFIED; import static org.flowerplatform.codesync.sdiff.CodeSyncSdiffConstants.MATCH_COLOR_REMOVED; import static org.flowerplatform.core.CoreConstants.CODESYNC_ICONS; +import static org.flowerplatform.core.CoreConstants.EXECUTE_ONLY_FOR_UPDATER; import static org.flowerplatform.core.CoreConstants.ICONS; import static org.flowerplatform.mindmap.MindMapConstants.COLOR_BACKGROUND; @@ -148,7 +149,11 @@ public void setProperty(Node node, String property, Object value, ServiceContext if (codeSyncIcons == null) { codeSyncIcons = ""; } - context.getService().setProperty(node, CODESYNC_ICONS, codeSyncIcons, context); + ServiceContext newContext = new ServiceContext(context.getService()); + + // so that CODESYNC_ICONS don't get persisted / written in the file + newContext.getContext().put(EXECUTE_ONLY_FOR_UPDATER, true); + context.getService().setProperty(node, CODESYNC_ICONS, codeSyncIcons, newContext); } } diff --git a/org.flowerplatform.codesync/src/org/flowerplatform/codesync/CodeSyncConstants.java b/org.flowerplatform.codesync/src/org/flowerplatform/codesync/CodeSyncConstants.java index 18e578a7..72c7d2f1 100644 --- a/org.flowerplatform.codesync/src/org/flowerplatform/codesync/CodeSyncConstants.java +++ b/org.flowerplatform.codesync/src/org/flowerplatform/codesync/CodeSyncConstants.java @@ -50,6 +50,7 @@ private static final String getFileExtension(String extension) { public static final String FILE = "codesyncFile"; public static final String CATEGORY_MODEL = UtilConstants.CATEGORY_PREFIX + "model"; + public static final String CATEGORY_CAN_HOLD_CUSTOM_ICON = UtilConstants.CATEGORY_PREFIX + "canHoldCustomIcons"; ////////////////////////////////// // Controllers diff --git a/org.flowerplatform.codesync/src/org/flowerplatform/codesync/CodeSyncPlugin.java b/org.flowerplatform.codesync/src/org/flowerplatform/codesync/CodeSyncPlugin.java index c9487332..7396663d 100644 --- a/org.flowerplatform.codesync/src/org/flowerplatform/codesync/CodeSyncPlugin.java +++ b/org.flowerplatform.codesync/src/org/flowerplatform/codesync/CodeSyncPlugin.java @@ -15,6 +15,7 @@ */ package org.flowerplatform.codesync; +import static org.flowerplatform.codesync.CodeSyncConstants.CATEGORY_CAN_HOLD_CUSTOM_ICON; import static org.flowerplatform.codesync.CodeSyncConstants.CATEGORY_CODESYNC; import static org.flowerplatform.codesync.CodeSyncConstants.CATEGORY_MODEL; import static org.flowerplatform.codesync.CodeSyncConstants.CODESYNC; @@ -298,9 +299,13 @@ public void start(BundleContext context) throws Exception { .addAdditiveController(REMOVE_NODE_CONTROLLER, new CodeSyncRemoveNodeController().setOrderIndexAs(-10000)) .addAdditiveController(PROPERTY_SETTER, new CodeSyncPropertySetter()) .addAdditiveController(PROPERTY_DESCRIPTOR, new PropertyDescriptor().setNameAs(CoreConstants.NAME)); - - CorePlugin.getInstance().getNodeTypeDescriptorRegistry().getOrCreateTypeDescriptor(MATCH) + + CorePlugin.getInstance().getNodeTypeDescriptorRegistry().getOrCreateCategoryTypeDescriptor(CATEGORY_CAN_HOLD_CUSTOM_ICON) .addAdditiveController(PROPERTY_DESCRIPTOR, new PropertyDescriptor().setNameAs(ICONS).setTitleAs(getLabel("codesync.match.icons")).setTypeAs(MINDMAP_ICONS_WITH_BUTTON_DESCRIPTOR_TYPE)) + .addSingleController(PROPERTY_FOR_ICON_DESCRIPTOR, new GenericValueDescriptor(CODESYNC_ICONS).setOrderIndexAs(-1000)); + + + CorePlugin.getInstance().getNodeTypeDescriptorRegistry().getOrCreateTypeDescriptor(MATCH) .addAdditiveController(PROPERTY_DESCRIPTOR, new PropertyDescriptor().setNameAs(MATCH_TYPE).setTitleAs(getLabel("codesync.match.type")).setReadOnlyAs(true)) .addAdditiveController(PROPERTY_DESCRIPTOR, new PropertyDescriptor().setNameAs(MATCH_FEATURE).setTitleAs(getLabel("codesync.match.feature")).setReadOnlyAs(true)) .addAdditiveController(PROPERTY_DESCRIPTOR, new PropertyDescriptor().setNameAs(MATCH_MODEL_ELEMENT_TYPE).setTitleAs(getLabel("codesync.match.modelElementType")).setReadOnlyAs(true)) @@ -311,7 +316,7 @@ public void start(BundleContext context) throws Exception { .addAdditiveController(PROPERTY_DESCRIPTOR, new PropertyDescriptor().setNameAs(MATCH_DIFFS_MODIFIED_RIGHT).setTitleAs(getLabel("codesync.match.diffs.modifiedRight")).setReadOnlyAs(true).setTypeAs(PROPERTY_DESCRIPTOR_TYPE_BOOLEAN)) .addAdditiveController(PROPERTY_DESCRIPTOR, new PropertyDescriptor().setNameAs(MATCH_DIFFS_CONFLICT).setTitleAs(getLabel("codesync.match.diffs.conflict")).setReadOnlyAs(true).setTypeAs(PROPERTY_DESCRIPTOR_TYPE_BOOLEAN)) .addAdditiveController(PROPERTY_DESCRIPTOR, new PropertyDescriptor().setNameAs(MATCH_BODY_MODIFIED).setTitleAs(getLabel("codesync.match.body.modified")).setReadOnlyAs(true).setTypeAs(PROPERTY_DESCRIPTOR_TYPE_BOOLEAN)) - .addSingleController(PROPERTY_FOR_ICON_DESCRIPTOR, new GenericValueDescriptor(CODESYNC_ICONS).setOrderIndexAs(-1000)); + .addCategory(CATEGORY_CAN_HOLD_CUSTOM_ICON); // TODO test setProjectAccessController(new ProjectAccessController()); From 63adedea5bb6b7579a720d42b6d22ea0d9ea19d4 Mon Sep 17 00:00:00 2001 From: elena-posea Date: Thu, 7 Aug 2014 10:21:19 +0300 Subject: [PATCH 07/12] #362 - solved minor bugs due to merge --- .../sdiff/CodeSyncSdiffConstants.java | 4 ++ .../CanContainCommentPropertyProvider.java | 9 ++-- .../controller/CodeSyncPropertySetter.java | 45 +++++++++++-------- 3 files changed, 36 insertions(+), 22 deletions(-) diff --git a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/CodeSyncSdiffConstants.java b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/CodeSyncSdiffConstants.java index 6984bbe8..88093ce7 100644 --- a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/CodeSyncSdiffConstants.java +++ b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/CodeSyncSdiffConstants.java @@ -46,7 +46,11 @@ public class CodeSyncSdiffConstants { // dirty marker for comments public static final String NODE_URI_TO_BE_IGNORED = "nodeURIToBeIgnored"; + + // flag so CanContainCommentPropertyProvider won't loop while trying to set CODESYNC_ICONS property + public static final String ALREADY_BEEN_IN_THIS_SETTER = "alreadyBeenInThisSetter"; + ////////////////////////////////// // Service context options ////////////////////////////////// diff --git a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentPropertyProvider.java b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentPropertyProvider.java index 8a7871d7..d1fad393 100644 --- a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentPropertyProvider.java +++ b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentPropertyProvider.java @@ -1,6 +1,7 @@ package org.flowerplatform.codesync.sdiff.controller; import static org.flowerplatform.codesync.sdiff.CodeSyncSdiffConstants.CONTAINS_COMMENT; +import static org.flowerplatform.codesync.sdiff.CodeSyncSdiffConstants.ALREADY_BEEN_IN_THIS_SETTER; import static org.flowerplatform.codesync.sdiff.CodeSyncSdiffConstants.IMG_TYPE_COMMENTS; import static org.flowerplatform.core.CoreConstants.CODESYNC_ICONS; import static org.flowerplatform.core.CoreConstants.EXECUTE_ONLY_FOR_UPDATER; @@ -30,18 +31,18 @@ public void populateWithProperties(Node node, ServiceContext contex @Override public void setProperty(Node node, String property, Object value, ServiceContext context) { - if(context.get("myHardcodedFlag") != null) return; + if(context.get(ALREADY_BEEN_IN_THIS_SETTER) != null) return; if ((property.equals(CONTAINS_COMMENT) && (Boolean) value == true)) { ServiceContext newContext = new ServiceContext(context.getService()); newContext.getContext().put(EXECUTE_ONLY_FOR_UPDATER, true); - newContext.getContext().put("myHardcodedFlag", true); + newContext.getContext().put(ALREADY_BEEN_IN_THIS_SETTER, true); context.getService().setProperty(node, CODESYNC_ICONS, getCodeSyncIcon(node, context), newContext); } else{ if(property.equals(CODESYNC_ICONS)){ ServiceContext newContext = new ServiceContext(context.getService()); // otherwise, the next controller for MATCH is CanContainCommentPropertyProvider + Updater (we don't want this) context.getContext().put(DONT_PROCESS_OTHER_CONTROLLERS, true); - newContext.getContext().put("myHardcodedFlag", true); + newContext.getContext().put(ALREADY_BEEN_IN_THIS_SETTER, true); context.getService().setProperty(node, CODESYNC_ICONS, getCodeSyncIcon(node, context), newContext); } } @@ -77,7 +78,7 @@ public void unsetProperty(Node node, String property, ServiceContext newContext = new ServiceContext(); newContext.getContext().put(EXECUTE_ONLY_FOR_UPDATER, true); - newContext.getContext().put("myHardcodedFlag", true); + newContext.getContext().put(ALREADY_BEEN_IN_THIS_SETTER, true); context.getService().setProperty(node, CODESYNC_ICONS, getCodeSyncIcon(node, context), newContext); } } diff --git a/org.flowerplatform.codesync/src/org/flowerplatform/codesync/controller/CodeSyncPropertySetter.java b/org.flowerplatform.codesync/src/org/flowerplatform/codesync/controller/CodeSyncPropertySetter.java index aa400ef4..7608bd7c 100644 --- a/org.flowerplatform.codesync/src/org/flowerplatform/codesync/controller/CodeSyncPropertySetter.java +++ b/org.flowerplatform.codesync/src/org/flowerplatform/codesync/controller/CodeSyncPropertySetter.java @@ -15,9 +15,8 @@ */ package org.flowerplatform.codesync.controller; -import static org.flowerplatform.codesync.controller.CodeSyncControllerUtils.getOriginalPropertyName; -import static org.flowerplatform.codesync.controller.CodeSyncControllerUtils.setSyncFalseAndPropagateToParents; -import static org.flowerplatform.codesync.controller.CodeSyncControllerUtils.setSyncTrueAndPropagateToParents; +import static org.flowerplatform.codesync.CodeSyncConstants.NODE_URI_TO_BE_IGNORED; +import static org.flowerplatform.codesync.CodeSyncConstants.ORIGINAL_SUFFIX; import org.flowerplatform.codesync.CodeSyncConstants; import org.flowerplatform.core.node.NodeService; @@ -25,32 +24,33 @@ import org.flowerplatform.core.node.remote.Node; import org.flowerplatform.core.node.remote.ServiceContext; import org.flowerplatform.util.Utils; -import org.flowerplatform.util.controller.AbstractController; /** * @author Mariana Gheorghe */ -public class CodeSyncPropertySetter extends AbstractController implements IPropertySetter { +public class CodeSyncPropertySetter extends CodeSyncPropagator implements IPropertySetter { public CodeSyncPropertySetter() { // invoked before the persistence controllers // to cache the current value of the property before it is overwritten setOrderIndex(-100000); } - + @Override public void setProperty(Node node, String property, Object value, ServiceContext context) { - // if the node is newly added or marked removed => propagate sync flag false + // if the node is newly added or marked removed => propagate sync flag + // false if (CodeSyncConstants.REMOVED.equals(property) || CodeSyncConstants.ADDED.equals(property)) { - setSyncFalseAndPropagateToParents(node, context.getService()); + context.add(NODE_URI_TO_BE_IGNORED, node.getNodeUri()); + setDirtyAndPropagateToParents(node, context); return; } - + // check if property is synchronizable if (!isSyncProperty(node, property)) { return; } - + boolean isOriginalPropertySet = false; Object originalValue = null; String originalProperty = getOriginalPropertyName(property); @@ -63,29 +63,38 @@ public void setProperty(Node node, String property, Object value, ServiceContext } else { originalValue = value; } - + if (!Utils.safeEquals(originalValue, value)) { if (!isOriginalPropertySet) { - // trying to set a different value; keep the old value in property.original if it does not exist + setDirtyAndPropagateToParents(node, context); + // trying to set a different value; keep the old value in + // property.original if it does not exist + // this line has to be after propagation, otherwise it will see + // this child as already dirty, and it won't try to propagate + // the flag context.getService().setProperty(node, originalProperty, originalValue, new ServiceContext(context.getService())); - setSyncFalseAndPropagateToParents(node, context.getService()); } } else { if (isOriginalPropertySet) { - // trying to set the same value as the original (a revert operation); unset the original value + // trying to set the same value as the original (a revert + // operation); unset the original value context.getService().unsetProperty(node, originalProperty, new ServiceContext(context.getService())); - setSyncTrueAndPropagateToParents(node, context.getService()); + unsetDirtyAndPropagateToParents(node, context); } } } + public static String getOriginalPropertyName(String property) { + return property + ORIGINAL_SUFFIX; + } + @Override public void unsetProperty(Node node, String property, ServiceContext context) { // nothing to do } - + private boolean isSyncProperty(Node node, String property) { return !CodeSyncControllerUtils.isCodeSyncFlagConstant(property); } - -} + +} From a911fadcad58882fcc1e4167a87dd5f34d85b918 Mon Sep 17 00:00:00 2001 From: elena-posea Date: Thu, 7 Aug 2014 10:42:01 +0300 Subject: [PATCH 08/12] #362 - removed class CodeSyncControllerUtils --- .../controller/JavaIconPropertyProvider.java | 13 +- .../adapter/AbstractModelAdapter.java | 6 + .../codesync/adapter/NodeModelAdapter.java | 3 - .../adapter/NodeModelAdapterAncestor.java | 3 +- .../adapter/NodeModelAdapterLeft.java | 3 +- .../controller/CodeSyncControllerUtils.java | 219 ------------------ .../controller/CodeSyncPropertySetter.java | 19 +- 7 files changed, 36 insertions(+), 230 deletions(-) delete mode 100644 org.flowerplatform.codesync/src/org/flowerplatform/codesync/controller/CodeSyncControllerUtils.java diff --git a/org.flowerplatform.codesync.java/src/org/flowerplatform/codesync/code/java/controller/JavaIconPropertyProvider.java b/org.flowerplatform.codesync.java/src/org/flowerplatform/codesync/code/java/controller/JavaIconPropertyProvider.java index a7b15c8f..4507ff48 100644 --- a/org.flowerplatform.codesync.java/src/org/flowerplatform/codesync/code/java/controller/JavaIconPropertyProvider.java +++ b/org.flowerplatform.codesync.java/src/org/flowerplatform/codesync/code/java/controller/JavaIconPropertyProvider.java @@ -25,6 +25,7 @@ import static org.eclipse.jdt.core.dom.Modifier.isSynchronized; import static org.eclipse.jdt.core.dom.Modifier.isTransient; import static org.eclipse.jdt.core.dom.Modifier.isVolatile; +import static org.flowerplatform.codesync.CodeSyncConstants.REMOVED; import static org.flowerplatform.codesync.code.java.CodeSyncJavaConstants.DECORATOR_ABSTRACT; import static org.flowerplatform.codesync.code.java.CodeSyncJavaConstants.DECORATOR_FINAL; import static org.flowerplatform.codesync.code.java.CodeSyncJavaConstants.DECORATOR_NATIVE; @@ -44,7 +45,6 @@ import org.eclipse.jdt.core.dom.Modifier.ModifierKeyword; import org.flowerplatform.codesync.code.java.CodeSyncJavaConstants; import org.flowerplatform.codesync.code.java.CodeSyncJavaPlugin; -import org.flowerplatform.codesync.controller.CodeSyncControllerUtils; import org.flowerplatform.core.CoreConstants; import org.flowerplatform.core.node.NodeService; import org.flowerplatform.core.node.controller.ConstantValuePropertyProvider; @@ -118,7 +118,7 @@ private String append(String icon, String decorator) { protected int getModifiersFlags(Node node, ServiceContext context) { int flags = 0; for (Node modifier : getModifiers(node, context)) { - if (CodeSyncControllerUtils.isRemoved(modifier)) { + if (isRemoved(modifier)) { // don't decorate if the modifier was marked removed continue; } @@ -141,6 +141,15 @@ protected List getModifiers(Node node, ServiceContext context return modifiers; } + public boolean isRemoved(Node node) { + return hasFlagTrue(node, REMOVED); + } + + private boolean hasFlagTrue(Node node, String flag) { + Boolean b = (Boolean) node.getPropertyValue(flag); + return b != null && b; + } + protected String getVisibilityPrivate() { return getIconWithVisibility(VISIBILITY_PRIVATE); } diff --git a/org.flowerplatform.codesync/src/org/flowerplatform/codesync/adapter/AbstractModelAdapter.java b/org.flowerplatform.codesync/src/org/flowerplatform/codesync/adapter/AbstractModelAdapter.java index cbe5ef75..25ab3e08 100644 --- a/org.flowerplatform.codesync/src/org/flowerplatform/codesync/adapter/AbstractModelAdapter.java +++ b/org.flowerplatform.codesync/src/org/flowerplatform/codesync/adapter/AbstractModelAdapter.java @@ -15,6 +15,8 @@ */ package org.flowerplatform.codesync.adapter; +import static org.flowerplatform.codesync.CodeSyncConstants.ORIGINAL_SUFFIX; + import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -167,4 +169,8 @@ public void setSync(Object element) { public void setChildrenSync(Object element) { // nothing to do } + + public String getOriginalPropertyName(String property) { + return property + ORIGINAL_SUFFIX; + } } \ No newline at end of file diff --git a/org.flowerplatform.codesync/src/org/flowerplatform/codesync/adapter/NodeModelAdapter.java b/org.flowerplatform.codesync/src/org/flowerplatform/codesync/adapter/NodeModelAdapter.java index 364fefdf..2d4d5967 100644 --- a/org.flowerplatform.codesync/src/org/flowerplatform/codesync/adapter/NodeModelAdapter.java +++ b/org.flowerplatform.codesync/src/org/flowerplatform/codesync/adapter/NodeModelAdapter.java @@ -34,7 +34,6 @@ import org.flowerplatform.codesync.FilteredIterable; import org.flowerplatform.codesync.Match; import org.flowerplatform.codesync.action.ActionResult; -import org.flowerplatform.codesync.controller.CodeSyncControllerUtils; import org.flowerplatform.core.CoreConstants; import org.flowerplatform.core.CorePlugin; import org.flowerplatform.core.node.NodeService; @@ -312,8 +311,6 @@ protected void processContainmentFeatureAfterActionPerformed(Node node, Object f } else { if (childNode.getProperties().containsKey(REMOVED)) { service.removeChild(node, childNode, new ServiceContext(service)); - // set childrenSync now, because after this match is synced, the parent won't be notified because this child is already removed - CodeSyncControllerUtils.setChildrenSyncTrueAndPropagateToParents(node, service); } } } diff --git a/org.flowerplatform.codesync/src/org/flowerplatform/codesync/adapter/NodeModelAdapterAncestor.java b/org.flowerplatform.codesync/src/org/flowerplatform/codesync/adapter/NodeModelAdapterAncestor.java index 79b03cd5..7d8fd176 100644 --- a/org.flowerplatform.codesync/src/org/flowerplatform/codesync/adapter/NodeModelAdapterAncestor.java +++ b/org.flowerplatform.codesync/src/org/flowerplatform/codesync/adapter/NodeModelAdapterAncestor.java @@ -22,7 +22,6 @@ import org.flowerplatform.codesync.FilteredIterable; import org.flowerplatform.codesync.Match; import org.flowerplatform.codesync.action.ActionResult; -import org.flowerplatform.codesync.controller.CodeSyncControllerUtils; import org.flowerplatform.core.node.remote.Node; /** @@ -54,7 +53,7 @@ protected boolean isAccepted(Object candidate) { */ @Override public Object getValueFeatureValue(Object element, Object feature, Object correspondingValue, CodeSyncAlgorithm codeSyncAlgorithm) { - Object originalValue = super.getValueFeatureValue(element, CodeSyncControllerUtils.getOriginalPropertyName(feature.toString()), correspondingValue, codeSyncAlgorithm); + Object originalValue = super.getValueFeatureValue(element, getOriginalPropertyName(feature.toString()), correspondingValue, codeSyncAlgorithm); if (originalValue == null) { originalValue = super.getValueFeatureValue(element, feature, correspondingValue, codeSyncAlgorithm); } diff --git a/org.flowerplatform.codesync/src/org/flowerplatform/codesync/adapter/NodeModelAdapterLeft.java b/org.flowerplatform.codesync/src/org/flowerplatform/codesync/adapter/NodeModelAdapterLeft.java index f040db82..16772e10 100644 --- a/org.flowerplatform.codesync/src/org/flowerplatform/codesync/adapter/NodeModelAdapterLeft.java +++ b/org.flowerplatform.codesync/src/org/flowerplatform/codesync/adapter/NodeModelAdapterLeft.java @@ -23,7 +23,6 @@ import org.flowerplatform.codesync.FilteredIterable; import org.flowerplatform.codesync.Match; import org.flowerplatform.codesync.action.ActionResult; -import org.flowerplatform.codesync.controller.CodeSyncControllerUtils; import org.flowerplatform.core.CorePlugin; import org.flowerplatform.core.node.NodeService; import org.flowerplatform.core.node.remote.Node; @@ -95,7 +94,7 @@ public void actionPerformed(Object element, Object feature, ActionResult result, int featureType = match.getCodeSyncAlgorithm().getFeatureProvider(match).getFeatureType(feature); switch (featureType) { case CodeSyncConstants.FEATURE_TYPE_VALUE: - CorePlugin.getInstance().getNodeService().unsetProperty(node, CodeSyncControllerUtils.getOriginalPropertyName(feature.toString()), new ServiceContext(CorePlugin.getInstance().getNodeService())); + CorePlugin.getInstance().getNodeService().unsetProperty(node, getOriginalPropertyName(feature.toString()), new ServiceContext(CorePlugin.getInstance().getNodeService())); break; case CodeSyncConstants.FEATURE_TYPE_CONTAINMENT: processContainmentFeatureAfterActionPerformed(node, feature, result, match); diff --git a/org.flowerplatform.codesync/src/org/flowerplatform/codesync/controller/CodeSyncControllerUtils.java b/org.flowerplatform.codesync/src/org/flowerplatform/codesync/controller/CodeSyncControllerUtils.java deleted file mode 100644 index 4f067cfe..00000000 --- a/org.flowerplatform.codesync/src/org/flowerplatform/codesync/controller/CodeSyncControllerUtils.java +++ /dev/null @@ -1,219 +0,0 @@ -/* license-start - * - * Copyright (C) 2008 - 2013 Crispico Software, . - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation version 3. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details, at . - * - * license-end - */ -package org.flowerplatform.codesync.controller; - -import static org.flowerplatform.codesync.CodeSyncConstants.ADDED; -import static org.flowerplatform.codesync.CodeSyncConstants.CHILDREN_CONFLICT; -import static org.flowerplatform.codesync.CodeSyncConstants.CHILDREN_SYNC; -import static org.flowerplatform.codesync.CodeSyncConstants.CONFLICT; -import static org.flowerplatform.codesync.CodeSyncConstants.ORIGINAL_SUFFIX; -import static org.flowerplatform.codesync.CodeSyncConstants.REMOVED; -import static org.flowerplatform.codesync.CodeSyncConstants.SYNC; - -import org.flowerplatform.core.node.NodeService; -import org.flowerplatform.core.node.remote.Node; -import org.flowerplatform.core.node.remote.ServiceContext; - -/** - * @author Mariana Gheorghe - */ -public class CodeSyncControllerUtils { - -// public static boolean isOriginalPropertyName(String property) { -// return property.endsWith(ORIGINAL_SUFFIX); -// } - - public static String getOriginalPropertyName(String property) { - return property + ORIGINAL_SUFFIX; - } - -// public static boolean isConflictPropertyName(String property) { -// return property.endsWith(CONFLICT_SUFFIX); -// } - -// public static String getConflictPropertyName(String property) { -// return property + CONFLICT_SUFFIX; -// } - - public static boolean isCodeSyncFlagConstant(String property) { - if (SYNC.equals(property) || CHILDREN_SYNC.equals(property) || - CONFLICT.equals(property) || CHILDREN_CONFLICT.equals(property) || - ADDED.equals(property) || REMOVED.equals(property)) { - return true; - } - return false; - } - - public static void setSyncFalseAndPropagateToParents(Node node, NodeService service) { - // set sync false - service.setProperty(node, SYNC, false, new ServiceContext(service)); - - // propagate childrenSync flag for parents - Node parent = null; - while ((parent = service.getParent(node, new ServiceContext(service))) != null) { - if (!isChildrenSync(parent)) { - // the parentSync flag has already been propagated - return; - } - // set childrenSync false - service.setProperty(parent, CHILDREN_SYNC, false, new ServiceContext(service)); - node = parent; - } - } - - public static void setSyncTrueAndPropagateToParents(Node node, NodeService service) { -// if (isSync(node)) { -// // already set -// return; -// } -// -// // added/removed nodes are not sync -// if (isAdded(node) || isRemoved(node)) { -// return; -// } -// -// // check if it has any property.original set -// boolean sync = true; -// for (String property : node.getProperties().keySet()) { -// if (isOriginalPropertyName(property)) { -// sync = false; -// } -// } -// if (!sync) { -// return; -// } -// -// // set sync true -// service.setProperty(node, SYNC, true, new ServiceContext(service)); -// -// propagate childrenSync flag for parents -// setChildrenSyncTrueAndPropagateToParents(service.getParent(node, new ServiceContext(service)), service); - } - - public static void setChildrenSyncTrueAndPropagateToParents(Node parent, NodeService service) { -// while (parent != null) { -// // if childrenSync is already true for the parent, no need to go up -// if (isChildrenSync(parent)) { -// return; -// } -// -// if (!allChildrenSync(parent, service)) { -// return; -// } -// -// // set childrenSync true -// service.setProperty(parent, CHILDREN_SYNC, true, new ServiceContext(service)); -// -// // if this parent is not sync, then its parents' childrenSync flag can't be set to true -// // it's better to just stop now -// if (!isSync(parent)) { -// return; -// } -// -// parent = service.getParent(parent, new ServiceContext(service)); -// } - } -// -// public static void setConflictTrueAndPropagateToParents(Node node, String conflictProperty, Object conflictValue, NodeService service) { -// service.setProperty(node, getConflictPropertyName(conflictProperty), conflictValue, new ServiceContext(service)); -// -// if (isConflict(node)) { -// // already set -// return; -// } -// -// // set conflict true -// service.setProperty(node, CONFLICT, true, new ServiceContext(service)); -// -// // propagate childrenConflict flag for parents -// Node parent = null; -// while ((parent = service.getParent(node, new ServiceContext(service))) != null) { -// if (isChildrenConflict(parent)) { -// // the childrenConflict flag has already been propagated -// return; -// } -// // set childrenConflict false -// service.setProperty(parent, CHILDREN_CONFLICT, true, new ServiceContext(service)); -// node = parent; -// } -// } - -// public static void setConflictFalseAndPropagateToParents(Node node, String conflictProperty, NodeService service) { -// -// -// // propagate childrenConflict flag for parents -// Node parent = null; -// while ((parent = service.getParent(node, new ServiceContext(service))) != null) { -// if (!noChildConflict(parent, service)) { -// return; -// } -// // if childrenConflict is already true for the parent, no need to go up -// if (!isChildrenConflict(parent)) { -// return; -// } -// // set childrenConflict false -// service.setProperty(parent, CHILDREN_CONFLICT, false, new ServiceContext(service)); -// node = parent; -// } -// } - -// public static boolean allChildrenSync(Node node, NodeService service) { -// for (Node child : service.getChildren(node, new ServiceContext(service).add(POPULATE_WITH_PROPERTIES, false))) { -// if (!isSync(child) || isAdded(child) || isRemoved(child)) { -// return false; -// } -// } -// return true; -// } - -// public static boolean noChildConflict(Node node, NodeService service) { -// for (Node child : service.getChildren(node, new ServiceContext(service).add(POPULATE_WITH_PROPERTIES, true))) { -// if (isConflict(child) || isChildrenConflict(child)) { -// return false; -// } -// } -// return true; -// } - -// public static boolean isSync(Node node) { -// return hasFlagTrue(node, SYNC); -// } - - public static boolean isChildrenSync(Node node) { - return hasFlagTrue(node, CHILDREN_SYNC); - } - -// public static boolean isAdded(Node node) { -// return hasFlagTrue(node, ADDED); -// } - - public static boolean isRemoved(Node node) { - return hasFlagTrue(node, REMOVED); - } - -// public static boolean isConflict(Node node) { -// return hasFlagTrue(node, CONFLICT); -// } - -// public static boolean isChildrenConflict(Node node) { -// return hasFlagTrue(node, CHILDREN_CONFLICT); -// } - - private static boolean hasFlagTrue(Node node, String flag) { - Boolean b = (Boolean) node.getPropertyValue(flag); - return b != null && b; - } -} diff --git a/org.flowerplatform.codesync/src/org/flowerplatform/codesync/controller/CodeSyncPropertySetter.java b/org.flowerplatform.codesync/src/org/flowerplatform/codesync/controller/CodeSyncPropertySetter.java index 7608bd7c..d44dcec9 100644 --- a/org.flowerplatform.codesync/src/org/flowerplatform/codesync/controller/CodeSyncPropertySetter.java +++ b/org.flowerplatform.codesync/src/org/flowerplatform/codesync/controller/CodeSyncPropertySetter.java @@ -15,8 +15,14 @@ */ package org.flowerplatform.codesync.controller; +import static org.flowerplatform.codesync.CodeSyncConstants.ADDED; +import static org.flowerplatform.codesync.CodeSyncConstants.CHILDREN_CONFLICT; +import static org.flowerplatform.codesync.CodeSyncConstants.CHILDREN_SYNC; +import static org.flowerplatform.codesync.CodeSyncConstants.CONFLICT; import static org.flowerplatform.codesync.CodeSyncConstants.NODE_URI_TO_BE_IGNORED; import static org.flowerplatform.codesync.CodeSyncConstants.ORIGINAL_SUFFIX; +import static org.flowerplatform.codesync.CodeSyncConstants.REMOVED; +import static org.flowerplatform.codesync.CodeSyncConstants.SYNC; import org.flowerplatform.codesync.CodeSyncConstants; import org.flowerplatform.core.node.NodeService; @@ -84,7 +90,7 @@ public void setProperty(Node node, String property, Object value, ServiceContext } } - public static String getOriginalPropertyName(String property) { + public String getOriginalPropertyName(String property) { return property + ORIGINAL_SUFFIX; } @@ -94,7 +100,16 @@ public void unsetProperty(Node node, String property, ServiceContext Date: Thu, 7 Aug 2014 10:47:04 +0300 Subject: [PATCH 09/12] #362 - added @author to my classes/methods --- .../sdiff/controller/CanContainCommentAddNodeListener.java | 1 - .../controller/CanContainCommentPropertyProvider.java | 7 ++++++- .../controller/CanContainCommentRemoveNodeListener.java | 1 - .../controller/StructureDiffMatchPropertiesProvider.java | 3 +++ .../codesync/controller/CodeSyncPropertySetter.java | 3 +++ 5 files changed, 12 insertions(+), 3 deletions(-) diff --git a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentAddNodeListener.java b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentAddNodeListener.java index 34caf2b2..f2d9644d 100644 --- a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentAddNodeListener.java +++ b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentAddNodeListener.java @@ -9,7 +9,6 @@ import org.flowerplatform.core.node.remote.ServiceContext; /** - * * @author Elena Posea */ public class CanContainCommentAddNodeListener extends ContainsCommentPropagator implements IAddNodeController { diff --git a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentPropertyProvider.java b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentPropertyProvider.java index d1fad393..3ed17714 100644 --- a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentPropertyProvider.java +++ b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentPropertyProvider.java @@ -18,6 +18,11 @@ import org.flowerplatform.core.node.remote.ServiceContext; import org.flowerplatform.util.controller.AbstractController; +/** + * + * @author Elena Posea + * + */ public class CanContainCommentPropertyProvider extends AbstractController implements IPropertySetter, IPropertiesProvider { public CanContainCommentPropertyProvider() { @@ -45,7 +50,7 @@ public void setProperty(Node node, String property, Object value, ServiceContext newContext.getContext().put(ALREADY_BEEN_IN_THIS_SETTER, true); context.getService().setProperty(node, CODESYNC_ICONS, getCodeSyncIcon(node, context), newContext); } - } + } } private String getCodeSyncIcon(Node node, ServiceContext context) { diff --git a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentRemoveNodeListener.java b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentRemoveNodeListener.java index c8e61f9e..e0ef74a3 100644 --- a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentRemoveNodeListener.java +++ b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentRemoveNodeListener.java @@ -6,7 +6,6 @@ import org.flowerplatform.core.node.remote.ServiceContext; /** - * * @author Elena Posea */ public class CanContainCommentRemoveNodeListener extends ContainsCommentPropagator implements IRemoveNodeController { diff --git a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/StructureDiffMatchPropertiesProvider.java b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/StructureDiffMatchPropertiesProvider.java index 4178fa75..fb4086cf 100644 --- a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/StructureDiffMatchPropertiesProvider.java +++ b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/StructureDiffMatchPropertiesProvider.java @@ -140,6 +140,9 @@ private boolean hasFlagTrue(Node node, String flag) { return b != null && b; } + /** + * @author Elena Posea + */ @Override public void setProperty(Node node, String property, Object value, ServiceContext context) { if (ICONS.equals(property)) { diff --git a/org.flowerplatform.codesync/src/org/flowerplatform/codesync/controller/CodeSyncPropertySetter.java b/org.flowerplatform.codesync/src/org/flowerplatform/codesync/controller/CodeSyncPropertySetter.java index d44dcec9..12f0eaba 100644 --- a/org.flowerplatform.codesync/src/org/flowerplatform/codesync/controller/CodeSyncPropertySetter.java +++ b/org.flowerplatform.codesync/src/org/flowerplatform/codesync/controller/CodeSyncPropertySetter.java @@ -42,6 +42,9 @@ public CodeSyncPropertySetter() { setOrderIndex(-100000); } + /** + * @author Elena Posea + */ @Override public void setProperty(Node node, String property, Object value, ServiceContext context) { // if the node is newly added or marked removed => propagate sync flag From 87c102fa5b37a7f2ae27d045f8144d5a63775a72 Mon Sep 17 00:00:00 2001 From: elena-posea Date: Tue, 26 Aug 2014 12:27:14 +0300 Subject: [PATCH 10/12] #362 - solved review problems --- .../codesync/sdiff/CodeSyncSdiffPlugin.java | 16 ++++---- .../CanContainCommentAddNodeListener.java | 1 + .../CanContainCommentPropertyProvider.java | 41 ++++++++++++------- .../CanContainCommentRemoveNodeListener.java | 4 ++ .../controller/ContainsCommentPropagator.java | 6 ++- .../StructureDiffCommentController.java | 17 ++++---- .../controller/CodeSyncPropertySetter.java | 5 +++ .../core/DirtyPropagatorController.java | 16 +++----- .../controller/MindMapParentProvider.java | 7 ++-- org.flowerplatform.resources/readme.md | 4 +- .../CodeSyncCommentPropagationTest.java | 4 -- 11 files changed, 72 insertions(+), 49 deletions(-) diff --git a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/CodeSyncSdiffPlugin.java b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/CodeSyncSdiffPlugin.java index 8eedb828..8be6411b 100644 --- a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/CodeSyncSdiffPlugin.java +++ b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/CodeSyncSdiffPlugin.java @@ -71,22 +71,24 @@ public void start(BundleContext bundleContext) throws Exception { CorePlugin.getInstance().getNodeTypeDescriptorRegistry().getOrCreateTypeDescriptor(FILE_NODE_TYPE) .addAdditiveController(PROPERTIES_PROVIDER, new FileSubscribableProvider(STRUCTURE_DIFF_EXTENSION, "fpp", "mindmap", true)); - StructureDiffMatchPropertiesProvider structureDiffMatchPropertiesController = new StructureDiffMatchPropertiesProvider(); + StructureDiffMatchPropertiesProvider structureDiffMatchPropertiesProvider = new StructureDiffMatchPropertiesProvider(); CorePlugin.getInstance().getNodeTypeDescriptorRegistry().getOrCreateTypeDescriptor(MATCH) - .addAdditiveController(PROPERTIES_PROVIDER, structureDiffMatchPropertiesController) - .addAdditiveController(PROPERTY_SETTER, structureDiffMatchPropertiesController) + .addAdditiveController(PROPERTIES_PROVIDER, structureDiffMatchPropertiesProvider) + .addAdditiveController(PROPERTY_SETTER, structureDiffMatchPropertiesProvider) .addAdditiveController(CHILDREN_PROVIDER, new StructureDiffMatchChildrenProvider()) .addCategory(CATEGORY_CAN_CONTAIN_COMMENT); + StructureDiffCommentController commentController = (StructureDiffCommentController) new StructureDiffCommentController().setOrderIndexAs(5000); CorePlugin.getInstance().getNodeTypeDescriptorRegistry().getOrCreateTypeDescriptor(COMMENT) - .addAdditiveController(PROPERTIES_PROVIDER, new StructureDiffCommentController().setOrderIndexAs(5000)) - .addAdditiveController(PROPERTY_SETTER, new StructureDiffCommentController().setOrderIndexAs(5000)) + .addAdditiveController(PROPERTIES_PROVIDER, commentController) + .addAdditiveController(PROPERTY_SETTER, commentController) .addCategory(CATEGORY_CAN_CONTAIN_COMMENT) .addCategory(CATEGORY_CAN_HOLD_CUSTOM_ICON); + CanContainCommentPropertyProvider commentPropertyProvider = new CanContainCommentPropertyProvider(); CorePlugin.getInstance().getNodeTypeDescriptorRegistry().getOrCreateCategoryTypeDescriptor(CATEGORY_CAN_CONTAIN_COMMENT) - .addAdditiveController(PROPERTIES_PROVIDER, new CanContainCommentPropertyProvider()) - .addAdditiveController(PROPERTY_SETTER, new CanContainCommentPropertyProvider()) + .addAdditiveController(PROPERTIES_PROVIDER, commentPropertyProvider) + .addAdditiveController(PROPERTY_SETTER, commentPropertyProvider) .addAdditiveController(ADD_NODE_CONTROLLER, new CanContainCommentAddNodeListener().setOrderIndexAs(10000)) .addAdditiveController(REMOVE_NODE_CONTROLLER, new CanContainCommentRemoveNodeListener().setOrderIndexAs(-10000)) .addAdditiveController(ADD_CHILD_DESCRIPTOR, diff --git a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentAddNodeListener.java b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentAddNodeListener.java index f2d9644d..4ed1424c 100644 --- a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentAddNodeListener.java +++ b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentAddNodeListener.java @@ -9,6 +9,7 @@ import org.flowerplatform.core.node.remote.ServiceContext; /** + * whenever you add a new node of type comment, that new node has to be marked as dirty, and this flag has to be propagated to parents * @author Elena Posea */ public class CanContainCommentAddNodeListener extends ContainsCommentPropagator implements IAddNodeController { diff --git a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentPropertyProvider.java b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentPropertyProvider.java index 3ed17714..54669777 100644 --- a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentPropertyProvider.java +++ b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentPropertyProvider.java @@ -19,14 +19,20 @@ import org.flowerplatform.util.controller.AbstractController; /** - * * @author Elena Posea - * */ public class CanContainCommentPropertyProvider extends AbstractController implements IPropertySetter, IPropertiesProvider { + /** + * order index has to be higher than CanContainCommentAddNodeListener's + * order index. First add the node, then set/provide properties it must also + * be higher than StructureDiffMatchPropertiesProvider's order index. For + * nodes of type Match, you should first invoke + * StructureDifffMatchPropertiesProvider, then this provider and higher than + * StructureDiffCommentController + */ public CanContainCommentPropertyProvider() { - setOrderIndex(10001); + setOrderIndex(11000); } @Override @@ -36,33 +42,40 @@ public void populateWithProperties(Node node, ServiceContext contex @Override public void setProperty(Node node, String property, Object value, ServiceContext context) { - if(context.get(ALREADY_BEEN_IN_THIS_SETTER) != null) return; + if (context.get(ALREADY_BEEN_IN_THIS_SETTER) != null) + return; if ((property.equals(CONTAINS_COMMENT) && (Boolean) value == true)) { ServiceContext newContext = new ServiceContext(context.getService()); newContext.getContext().put(EXECUTE_ONLY_FOR_UPDATER, true); newContext.getContext().put(ALREADY_BEEN_IN_THIS_SETTER, true); + // here I set only the codesync icons, that are not to be persisted; + // in order not to cycle/infinitely recourse in this setProperty + // function, I use the ALREADY_BEEN_IN_THIS_SETTER flag, in context context.getService().setProperty(node, CODESYNC_ICONS, getCodeSyncIcon(node, context), newContext); - } else{ - if(property.equals(CODESYNC_ICONS)){ + } else { + if (property.equals(CODESYNC_ICONS)) { ServiceContext newContext = new ServiceContext(context.getService()); - // otherwise, the next controller for MATCH is CanContainCommentPropertyProvider + Updater (we don't want this) + // otherwise, the next controller for MATCH is + // CanContainCommentPropertyProvider + Updater (we don't want + // this) context.getContext().put(DONT_PROCESS_OTHER_CONTROLLERS, true); newContext.getContext().put(ALREADY_BEEN_IN_THIS_SETTER, true); - context.getService().setProperty(node, CODESYNC_ICONS, getCodeSyncIcon(node, context), newContext); - } + context.getService().setProperty(node, CODESYNC_ICONS, getCodeSyncIcon(node, context), newContext); + } } } private String getCodeSyncIcon(Node node, ServiceContext context) { - Boolean b = (Boolean) node.getProperties().get(CONTAINS_COMMENT); - Object obj = node.getProperties().get(CODESYNC_ICONS); + Boolean containsCommentFlag = (Boolean) node.getProperties().get(CONTAINS_COMMENT); + Object codesyncListOfIcons = node.getProperties().get(CODESYNC_ICONS); String icon = ""; - if (obj != null) - icon = (String) obj; + if (codesyncListOfIcons != null) { + icon = (String) codesyncListOfIcons; + } // icon = current icon list String newIcon = CodeSyncSdiffPlugin.getInstance().getImagePath(IMG_TYPE_COMMENTS); // newIcon = the icon that I would like to add - if (b != null && b == true) { + if (containsCommentFlag != null && containsCommentFlag == true) { if (icon.indexOf(newIcon) == -1) { // this node doesn't already // contain this icon icon = icon + (!icon.isEmpty() ? CoreConstants.ICONS_SEPARATOR : "") + newIcon; diff --git a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentRemoveNodeListener.java b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentRemoveNodeListener.java index e0ef74a3..e13e86f9 100644 --- a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentRemoveNodeListener.java +++ b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentRemoveNodeListener.java @@ -6,6 +6,10 @@ import org.flowerplatform.core.node.remote.ServiceContext; /** + * after the removal of some node of type CanContainComment, attempt to clean/ + * propagate clean (whether this was the last dirty child or not, it tested by + * unsetDirtyAndPropagateToParents() method itself) + * * @author Elena Posea */ public class CanContainCommentRemoveNodeListener extends ContainsCommentPropagator implements IRemoveNodeController { diff --git a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/ContainsCommentPropagator.java b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/ContainsCommentPropagator.java index e72b55ae..12e4bc2e 100644 --- a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/ContainsCommentPropagator.java +++ b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/ContainsCommentPropagator.java @@ -10,6 +10,7 @@ import org.flowerplatform.core.node.remote.ServiceContext; /** + * this class describes the behavior of comment propagation: what does "dirty" mean, the logic/way of propagating clean/dirty * @author Elena Posea */ public class ContainsCommentPropagator extends DirtyPropagatorController { @@ -21,8 +22,8 @@ public void setDirty(Node node, ServiceContext serviceContext) { @Override public void unsetDirty(Node node, ServiceContext serviceContext) { - // if(node.getType().equals(COMMENT)) // if it is not a comment, isDirty - // will return false anyway, but isChildrenDirty won't + // I can't unset dirty on a comment; comment is, because of the fact that it is a comment, dirty + // but I don't want isDirty to return true for this node, because it doesn't matter what it is, I want to erase it anyway serviceContext.add(NODE_URI_TO_BE_IGNORED, node.getNodeUri()); } @@ -48,6 +49,7 @@ public boolean isDirty(Node node, ServiceContext serviceContext) { public boolean isChildrenDirty(Node node, ServiceContext serviceContext) { Boolean b = (Boolean) node.getPropertyValue(CONTAINS_COMMENT); // is something that has a child comment, and it should not be ignored + // we always ignore the current node/ the node on which we invoked unsetDirty as it should not count as dirty/ we want to erase it now return b != null && b && !(node.getNodeUri().equals(serviceContext.getContext().get(NODE_URI_TO_BE_IGNORED))); } diff --git a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/StructureDiffCommentController.java b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/StructureDiffCommentController.java index 44a330a4..9b3bb2ed 100644 --- a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/StructureDiffCommentController.java +++ b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/StructureDiffCommentController.java @@ -35,24 +35,27 @@ * @author Mariana Gheorghe */ public class StructureDiffCommentController extends AbstractController implements IPropertiesProvider, IPropertySetter { - + @Override public void populateWithProperties(Node node, ServiceContext context) { node.getProperties().put(COLOR_BACKGROUND, MATCH_COLOR_COMMENT); Object obj = node.getProperties().get(ICONS); String icons = ""; - if(obj != null) icons = (String) obj; + if (obj != null) { + icons = (String) obj; + } node.getProperties().put(ICONS, icons); - node.getProperties().put(CODESYNC_ICONS, icons + (icons.isEmpty()? "" : CoreConstants.ICONS_SEPARATOR) + CodeSyncSdiffPlugin.getInstance().getImagePath(IMG_TYPE_COMMENT)); + node.getProperties().put(CODESYNC_ICONS, icons + (icons.isEmpty() ? "" : CoreConstants.ICONS_SEPARATOR) + CodeSyncSdiffPlugin.getInstance().getImagePath(IMG_TYPE_COMMENT)); } - + @Override public void setProperty(Node node, String property, Object value, ServiceContext context) { ServiceContext newContext = new ServiceContext(context.getService()); newContext.getContext().put(EXECUTE_ONLY_FOR_UPDATER, true); if (property.equals(ICONS)) { - String icons = (String)value; - context.getService().setProperty(node, CODESYNC_ICONS, icons + (icons.isEmpty()? "" : CoreConstants.ICONS_SEPARATOR) + CodeSyncSdiffPlugin.getInstance().getImagePath(IMG_TYPE_COMMENT), newContext); + String icons = (String) value; + context.getService().setProperty(node, CODESYNC_ICONS, + icons + (icons.isEmpty() ? "" : CoreConstants.ICONS_SEPARATOR) + CodeSyncSdiffPlugin.getInstance().getImagePath(IMG_TYPE_COMMENT), newContext); } } @@ -61,4 +64,4 @@ public void unsetProperty(Node node, String property, ServiceContext context) { + // disable the controllers during the execution of sync algorithm + if (context.getBooleanValue(CodeSyncConstants.SYNC_IN_PROGRESS)) { + return; + } + // if the node is newly added or marked removed => propagate sync flag // false if (CodeSyncConstants.REMOVED.equals(property) || CodeSyncConstants.ADDED.equals(property)) { diff --git a/org.flowerplatform.core/src/org/flowerplatform/core/DirtyPropagatorController.java b/org.flowerplatform.core/src/org/flowerplatform/core/DirtyPropagatorController.java index 93fbaed7..f362f944 100644 --- a/org.flowerplatform.core/src/org/flowerplatform/core/DirtyPropagatorController.java +++ b/org.flowerplatform.core/src/org/flowerplatform/core/DirtyPropagatorController.java @@ -10,7 +10,7 @@ import org.flowerplatform.util.controller.AbstractController; /** - * + * contains all the common logic for propagation of flags; leaves describing particular behavior up to implementing classes * @author Elena Posea */ public abstract class DirtyPropagatorController extends AbstractController{ @@ -24,14 +24,12 @@ public abstract class DirtyPropagatorController extends AbstractController{ public abstract void unsetChildrenDirty(Node node, ServiceContext serviceContext); /** - * In Node node, for property flagProperty, is it changer, or does it have - * the default value? - * * @param node - * @param flagProperty - * @param defaultFlagValue - * @return true, if the flagProperty property of node is different than the - * defaultFlagValue + * the node which I want to test for dirty + * @param serviceContext + * the service used for this node + * @return true, if the node isDisrty, accordingly to the logic of being + * dirty in the implementing class false, otherwise */ public abstract boolean isDirty(Node node, ServiceContext serviceContext); @@ -42,8 +40,6 @@ public abstract class DirtyPropagatorController extends AbstractController{ * the node on which I want to start propagation * @param serviceContext * the service used for this node - * @param propagator - * the class that contains the implementation for */ public void setDirtyAndPropagateToParents(Node node, ServiceContext serviceContext) { if (isDirty(node, serviceContext)){ diff --git a/org.flowerplatform.freeplane/src/org/flowerplatform/freeplane/controller/MindMapParentProvider.java b/org.flowerplatform.freeplane/src/org/flowerplatform/freeplane/controller/MindMapParentProvider.java index 7c6c35a8..cea51d20 100644 --- a/org.flowerplatform.freeplane/src/org/flowerplatform/freeplane/controller/MindMapParentProvider.java +++ b/org.flowerplatform.freeplane/src/org/flowerplatform/freeplane/controller/MindMapParentProvider.java @@ -32,7 +32,7 @@ public class MindMapParentProvider extends AbstractController implements IParent @Override public Node getParent(Node node, ServiceContext context) { - NodeModel rawNodeData = ((NodeModel) node.getRawNodeData()); + NodeModel rawNodeData = ((NodeModel) node.getRawNodeData()); NodeModel parentNodeModel = rawNodeData.getParentNode(); if (parentNodeModel == null) { return null; @@ -40,11 +40,12 @@ public Node getParent(Node node, ServiceContext context) { String scheme = Utils.getScheme(node.getNodeUri()); String ssp = Utils.getSchemeSpecificPart(node.getNodeUri()); String parentUri = scheme + ":" + ssp; - if(!parentNodeModel.getMap().getRootNode().createID().equals(parentNodeModel.createID())){ + // this statement ensures that the string after "#" is not concatenated for root node (as this node should not contain it) + if (!parentNodeModel.getMap().getRootNode().createID().equals(parentNodeModel.createID())) { parentUri += "#" + parentNodeModel.createID(); } IResourceHandler resourceHandler = CorePlugin.getInstance().getResourceService().getResourceHandler(scheme); return resourceHandler.createNodeFromRawNodeData(parentUri, parentNodeModel); } -} +} diff --git a/org.flowerplatform.resources/readme.md b/org.flowerplatform.resources/readme.md index e60a65a4..5e2d4675 100644 --- a/org.flowerplatform.resources/readme.md +++ b/org.flowerplatform.resources/readme.md @@ -19,8 +19,8 @@ Holds images and messages. | images/mindmap/arrowUp.png | https://www.iconfinder.com/icons/211620/arrow_b_right_icon#size=16 | http://opensource.org/licenses/MIT | mindmap | | images/properties/preferences.png | https://www.iconfinder.com/icons/105256/application_applications_configuration_contact_control_de_desktop_engineering_gear_gears_generator_machine_mime_preferences_reductor_settings_system_tool_tools_work_icon#size=16 | http://www.aha-soft.com/ | properties | | images/properties/preference.png | https://www.iconfinder.com/icons/105244/application_applications_configuration_contact_control_desktop_engineering_gear_gears_generator_machine_mime_preferences_reductor_settings_system_tool_tools_work_icon#size=16 | http://www.aha-soft.com/ | properties | -| images/codesync/comment-marker/comment.png | http://www.famfamfam.com/lab/icons/silk/ | http://www.famfamfam.com/lab/icons/silk/ |properties| -| images/codesync/comment-marker/comments.png | http://www.famfamfam.com/lab/icons/silk/ | http://www.famfamfam.com/lab/icons/silk/ |properties| +| images/codesync/comment-marker/comment.png | http://www.famfamfam.com/lab/icons/silk/ | http://www.famfamfam.com/lab/icons/silk/ |codesync.sdiff| +| images/codesync/comment-marker/comments.png | http://www.famfamfam.com/lab/icons/silk/ | http://www.famfamfam.com/lab/icons/silk/ |codesync.sdiff| ### Icons allowed for commercial use (NO link required) == | Icon Name | Icon Source URL | Usage | diff --git a/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/CodeSyncCommentPropagationTest.java b/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/CodeSyncCommentPropagationTest.java index 952d9d47..cdd91bd7 100644 --- a/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/CodeSyncCommentPropagationTest.java +++ b/org.flowerplatform.tests/src/org/flowerplatform/tests/codesync/CodeSyncCommentPropagationTest.java @@ -17,9 +17,7 @@ import org.junit.Test; /** - * * @author Elena Posea - * */ public class CodeSyncCommentPropagationTest { @@ -51,7 +49,6 @@ public void testAddCommentPropagation() { // get the node that we want to use as parent for our new node Node testNode = CodeSyncTestSuite.getChild(root, new String[] { "CodeSyncSdiffConstants.java", "CodeSyncSdiffConstants", "STRUCTURE_DIFFS_FOLDER" }); String testNodeFullyQualifiedName = testNode.getNodeUri(); - ; ServiceContext serviceContext = new ServiceContext(); assertTrue("testNode is supposed to be initially clean", !isComment(testNode) && !isChildrenDirty(testNode)); @@ -226,7 +223,6 @@ public void testRemoveLastComment() { assertTrue("testNode is supposed to be a comment", isComment(testNode)); ServiceContext serviceContext = new ServiceContext(); serviceContext.setService(CorePlugin.getInstance().getNodeService()); - // get the parent of node Node parentOfTestNode = serviceContext.getService().getParent(testNode, serviceContext); String parentOfTestNodeFullyQualifiedName = parentOfTestNode.getNodeUri(); From c5cb498ed6cedd39d2a71dfdcc8663082c6247bd Mon Sep 17 00:00:00 2001 From: elena-posea Date: Tue, 26 Aug 2014 13:26:57 +0300 Subject: [PATCH 11/12] #362 - changed some doc messages --- .../controller/CanContainCommentAddNodeListener.java | 4 +++- .../controller/CanContainCommentPropertyProvider.java | 11 +++++------ .../CanContainCommentRemoveNodeListener.java | 4 ++-- .../sdiff/controller/ContainsCommentPropagator.java | 2 +- .../core/DirtyPropagatorController.java | 2 +- 5 files changed, 12 insertions(+), 11 deletions(-) diff --git a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentAddNodeListener.java b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentAddNodeListener.java index 4ed1424c..7971a703 100644 --- a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentAddNodeListener.java +++ b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentAddNodeListener.java @@ -9,7 +9,9 @@ import org.flowerplatform.core.node.remote.ServiceContext; /** - * whenever you add a new node of type comment, that new node has to be marked as dirty, and this flag has to be propagated to parents + * Whenever you add a new node of type comment, that new node has to be marked as dirty, + * and this flag has to be propagated to parents. + * * @author Elena Posea */ public class CanContainCommentAddNodeListener extends ContainsCommentPropagator implements IAddNodeController { diff --git a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentPropertyProvider.java b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentPropertyProvider.java index 54669777..2c087013 100644 --- a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentPropertyProvider.java +++ b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentPropertyProvider.java @@ -24,12 +24,11 @@ public class CanContainCommentPropertyProvider extends AbstractController implements IPropertySetter, IPropertiesProvider { /** - * order index has to be higher than CanContainCommentAddNodeListener's - * order index. First add the node, then set/provide properties it must also - * be higher than StructureDiffMatchPropertiesProvider's order index. For - * nodes of type Match, you should first invoke - * StructureDifffMatchPropertiesProvider, then this provider and higher than - * StructureDiffCommentController + * Order index has to be higher than CanContainCommentAddNodeListener's + * order index. First add the node, then set/provide properties. + * Order index must also be higher than StructureDiffMatchPropertiesProvider's order index. + * For nodes of type Match, you should first invoke StructureDifffMatchPropertiesProvider, + * then this provider. It should also be higher than StructureDiffCommentController. */ public CanContainCommentPropertyProvider() { setOrderIndex(11000); diff --git a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentRemoveNodeListener.java b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentRemoveNodeListener.java index e13e86f9..295f2897 100644 --- a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentRemoveNodeListener.java +++ b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/CanContainCommentRemoveNodeListener.java @@ -6,8 +6,8 @@ import org.flowerplatform.core.node.remote.ServiceContext; /** - * after the removal of some node of type CanContainComment, attempt to clean/ - * propagate clean (whether this was the last dirty child or not, it tested by + * After the removal of some node of type CanContainComment, attempt to clean/ + * propagate clean (whether this was the last dirty child or not, is tested by * unsetDirtyAndPropagateToParents() method itself) * * @author Elena Posea diff --git a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/ContainsCommentPropagator.java b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/ContainsCommentPropagator.java index 12e4bc2e..e7e030d6 100644 --- a/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/ContainsCommentPropagator.java +++ b/org.flowerplatform.codesync.sdiff/src/org/flowerplatform/codesync/sdiff/controller/ContainsCommentPropagator.java @@ -10,7 +10,7 @@ import org.flowerplatform.core.node.remote.ServiceContext; /** - * this class describes the behavior of comment propagation: what does "dirty" mean, the logic/way of propagating clean/dirty + * This class describes the behavior of comment propagation: what does "dirty" mean, the logic/way of propagating clean/dirty * @author Elena Posea */ public class ContainsCommentPropagator extends DirtyPropagatorController { diff --git a/org.flowerplatform.core/src/org/flowerplatform/core/DirtyPropagatorController.java b/org.flowerplatform.core/src/org/flowerplatform/core/DirtyPropagatorController.java index f362f944..ac653cd9 100644 --- a/org.flowerplatform.core/src/org/flowerplatform/core/DirtyPropagatorController.java +++ b/org.flowerplatform.core/src/org/flowerplatform/core/DirtyPropagatorController.java @@ -10,7 +10,7 @@ import org.flowerplatform.util.controller.AbstractController; /** - * contains all the common logic for propagation of flags; leaves describing particular behavior up to implementing classes + * Contains all the common logic for propagation of flags; leaves describing particular behavior up to implementing classes * @author Elena Posea */ public abstract class DirtyPropagatorController extends AbstractController{ From cea2a8fac0ca8a4e92786c33e661f5830d128e1c Mon Sep 17 00:00:00 2001 From: elena-posea Date: Tue, 9 Sep 2014 10:02:33 +0300 Subject: [PATCH 12/12] #362 - merge with master complete --- .../org_flowerplatform_resources.properties | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/org.flowerplatform.resources/public-resources/messages/org_flowerplatform_resources.properties b/org.flowerplatform.resources/public-resources/messages/org_flowerplatform_resources.properties index c78af6d2..8a22ce0c 100644 --- a/org.flowerplatform.resources/public-resources/messages/org_flowerplatform_resources.properties +++ b/org.flowerplatform.resources/public-resources/messages/org_flowerplatform_resources.properties @@ -343,7 +343,25 @@ regexMatch.end.label = End regexVirtual.name.label = Name regexVirtual.fullRegex.label = RegEx (w/o macros) -regex.action = Action +regex.action.label = Action +regex.attachSpecificInfoAction.label = Attach specific info action +regex.keepSpecificInfoAction.label = Keep specific info action +regex.createNodeAction.label = Create node action +regex.enterStateAction.label = Enter state action +regex.exitStateAction.label = Exit state action +regex.clearSpecificInfoAction.label = Clear specific info action +regex.attachNodeToCurrentStateAction.label = Attach node to current state +regex.increaseNestingLevelAction.label = Increase nesting level action +regex.decreaseNestingLevelAction.label = Decrease nesting level action +regex.checkStateAction.label = Check state action +regex.keepInfoKey.label = Keep Info Key +regex.attachInfoKey.label = Attach info key +regex.isList.label = Is list +regex.isContainment.label = Is containment +regex.properties.label = Properties +regex.newNodeType.label = New node type +regex.validStates.label = CSV list of valid states +regex.clearInfoKey.label = Clear info key regexes.root = RegExes