]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.structural2/src/org/simantics/structural2/utils/StructuralChangeVisitor.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.structural2 / src / org / simantics / structural2 / utils / StructuralChangeVisitor.java
diff --git a/bundles/org.simantics.structural2/src/org/simantics/structural2/utils/StructuralChangeVisitor.java b/bundles/org.simantics.structural2/src/org/simantics/structural2/utils/StructuralChangeVisitor.java
new file mode 100644 (file)
index 0000000..2fef02a
--- /dev/null
@@ -0,0 +1,21 @@
+package org.simantics.structural2.utils;\r
+\r
+import org.simantics.db.ReadGraph;\r
+import org.simantics.db.Resource;\r
+import org.simantics.db.exception.DatabaseException;\r
+\r
+public interface StructuralChangeVisitor {\r
+\r
+    /**\r
+     * This method is called for components when\r
+     * <ul>\r
+     *     <li>They are created</li>\r
+     *     <li>Their children are removed</li>\r
+     *     <li>Their properties are changed</li>\r
+     *     <li>Their connections are modified</li>\r
+     * </ul>\r
+     * Flag {@code onlySubstructureChanged} is false, if only the children of the component are removed.\r
+     */\r
+    void visitComponentChange(ReadGraph graph, Resource component, boolean componentItselfModified) throws DatabaseException;\r
+\r
+}\r