Added menu entry to show diff against the code in the image
authorJan Vrany <jan.vrany@fit.cvut.cz>
Sat, 01 Nov 2014 01:05:26 +0100
changeset 935 5e40fb19c435
parent 934 6a56a913c6b0
child 936 c4564a0396b9
Added menu entry to show diff against the code in the image
MCRepositoryBrowser.st
--- a/MCRepositoryBrowser.st	Tue Oct 07 01:21:51 2014 +0200
+++ b/MCRepositoryBrowser.st	Sat Nov 01 01:05:26 2014 +0100
@@ -592,6 +592,13 @@
             label: '-'
           )
          (MenuItem
+            label: 'Compare with Image'
+            itemValue: versionCompareWithImage
+          )
+         (MenuItem
+            label: '-'
+          )
+         (MenuItem
             label: 'Save .mcz File As...'
             itemValue: saveMCZFileAs
           )
@@ -1190,6 +1197,27 @@
     "Modified: / 07-09-2011 / 20:17:36 / cg"
 !
 
+versionCompareWithImage
+
+    | version snapshot |
+
+    self withWaitCursorDo:[
+        version := self selectedVersionAsMCVersion.
+        version isNil ifTrue:[ ^ self ].
+        snapshot := version snapshot.
+        (Tools::ChangeSetBrowser2 
+                on: (snapshot asChangeSet name:('Diff for: ',version fileName))
+                label: version info name)
+            beOneColumn;
+            showSame: false;
+            targetNamespace:targetNamespace;
+            targetPackage:targetPackage;
+            open
+    ].
+
+    "Modified: / 01-11-2014 / 00:04:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 versionInspect
 
     | v |
@@ -1319,15 +1347,15 @@
 !MCRepositoryBrowser class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/goodies/monticello/MCRepositoryBrowser.st,v 1.36 2014-10-06 22:57:57 vrany Exp $'
+    ^ '$Header: /cvs/stx/stx/goodies/monticello/MCRepositoryBrowser.st,v 1.37 2014-11-01 00:05:26 vrany Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/goodies/monticello/MCRepositoryBrowser.st,v 1.36 2014-10-06 22:57:57 vrany Exp $'
+    ^ '$Header: /cvs/stx/stx/goodies/monticello/MCRepositoryBrowser.st,v 1.37 2014-11-01 00:05:26 vrany Exp $'
 !
 
 version_SVN
-    ^ '$Id: MCRepositoryBrowser.st,v 1.36 2014-10-06 22:57:57 vrany Exp $'
+    ^ '$Id: MCRepositoryBrowser.st,v 1.37 2014-11-01 00:05:26 vrany Exp $'
 ! !