]> gerrit.simantics Code Review - simantics/interop.git/commitdiff
Add third Resource reference to UpdateEditorInput for three-way
authorMarko Luukkainen <marko.luukkainen@vtt.fi>
Mon, 3 Apr 2017 14:02:00 +0000 (17:02 +0300)
committerMarko Luukkainen <marko.luukkainen@vtt.fi>
Mon, 3 Apr 2017 14:02:00 +0000 (17:02 +0300)
comparison support.

refs #7045

Change-Id: I3137324f7ce6c2d9981d2a148167c0e1e8cfaebf

org.simantics.interop.update/src/org/simantics/interop/update/editor/UpdateEditorInput.java
org.simantics.interop.update/src/org/simantics/interop/update/model/UpdateList.java

index 3c0a025265f8041a8816ab3b569efdbd48d1bf8e..83b381f765c29f20debce51e1e4fb5cc29cd4fc6 100644 (file)
@@ -17,8 +17,13 @@ public class UpdateEditorInput extends ResourceEditorInput2{
        private String editorID;
        private Resource r1;
        private Resource r2;
+       private Resource r3;
        
        public UpdateEditorInput(String editorID, Resource r1, Resource r2, Resource model, RVI rvi) {
+               this(editorID, r1, r2, null, model, rvi);
+       }
+       
+       public UpdateEditorInput(String editorID, Resource r1, Resource r2, Resource r3, Resource model, RVI rvi) {
                super(editorID, r1, model, rvi);
                this.r1 = r1;
                this.r2 = r2;
@@ -33,6 +38,10 @@ public class UpdateEditorInput extends ResourceEditorInput2{
                return r2;
        }
        
+       public Resource getR3() {
+               return r3;
+       }
+       
        
        public void openEditor() throws PartInitException {
                WorkbenchUtils.openEditor(editorID, this);
index 447ddff2579bf19421044cb82e0bb548c2bee842..747cd78c7c2a5a4381677f288a4782cd789eac51 100644 (file)
@@ -50,6 +50,10 @@ public class UpdateList {
                selected.remove(change);
        }
        
+       public boolean isSelected(Pair<Statement, Statement> change) {
+               return selected.contains(change);
+       }
+       
        public void clear() {
                changes.clear();
                selected.clear();