X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=org.simantics.interop.update%2Fsrc%2Forg%2Fsimantics%2Finterop%2Fupdate%2Fmodel%2FModelUpdate.java;fp=org.simantics.interop.update%2Fsrc%2Forg%2Fsimantics%2Finterop%2Fupdate%2Fmodel%2FModelUpdate.java;h=e736e22e8747758bf2aa640936ae788d102b4c07;hb=fad28e2a01ee43b7448cffaef1bc6ba2eed84e39;hp=2149fc5dd5710ce207efab5378683e9f6583de15;hpb=ed79a91bdd86658d28be3d50322a0d4d8cff98dc;p=simantics%2Finterop.git diff --git a/org.simantics.interop.update/src/org/simantics/interop/update/model/ModelUpdate.java b/org.simantics.interop.update/src/org/simantics/interop/update/model/ModelUpdate.java index 2149fc5..e736e22 100644 --- a/org.simantics.interop.update/src/org/simantics/interop/update/model/ModelUpdate.java +++ b/org.simantics.interop.update/src/org/simantics/interop/update/model/ModelUpdate.java @@ -3,6 +3,7 @@ package org.simantics.interop.update.model; import java.util.ArrayDeque; import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; import java.util.Deque; import java.util.List; import java.util.Map.Entry; @@ -145,6 +146,10 @@ public abstract class ModelUpdate { } + public List getFilters() { + return Collections.unmodifiableList(filters); + } + /** * Adds an user filter. Use refreshUserFilters() to apply the changes. * @param filter @@ -168,6 +173,10 @@ public abstract class ModelUpdate { userFilters.clear(); } + public List getUserFilters() { + return userFilters; + } + public void refreshUserFilters() throws DatabaseException{ // use user filters to set visible flags of changes. // First, set all changes visible. @@ -233,6 +242,7 @@ public abstract class ModelUpdate { continue; if (lc.getFirst().equals(rc.getFirst())) { comparable.map(lc, rc); + break; } } } @@ -331,7 +341,7 @@ public abstract class ModelUpdate { - private class FilterChangesRead implements Read { + public static class FilterChangesRead implements Read { private GraphChanges changes; private List filters; @@ -347,7 +357,7 @@ public abstract class ModelUpdate { /** * Filters changes: - * 1. Changes that are not essential for model update (changes that can be found when the models are axcatly the same) + * 1. Changes that are not essential for model update (changes that can be found when the models are exactly the same) * 2. Runs custom filters for value changes. * * @param g