UI fixes in ChangeSetDiffTool. More will come.
--- a/Make.proto Wed Jan 16 11:59:55 2013 +0000
+++ b/Make.proto Thu Jan 17 17:16:17 2013 +0000
@@ -312,7 +312,7 @@
$(OUTDIR)Tools__ImplementingClassList.$(O) Tools__ImplementingClassList.$(H): Tools__ImplementingClassList.st $(INCLUDE_TOP)/stx/libtool/Tools__MethodList.$(H) $(INCLUDE_TOP)/stx/libtool/Tools__BrowserList.$(H) $(INCLUDE_TOP)/stx/libtool/Tools__NavigatorModel.$(H) $(INCLUDE_TOP)/stx/libview2/ApplicationModel.$(H) $(INCLUDE_TOP)/stx/libview2/Model.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)Tools__ImplementingMethodList.$(O) Tools__ImplementingMethodList.$(H): Tools__ImplementingMethodList.st $(INCLUDE_TOP)/stx/libtool/Tools__MethodList.$(H) $(INCLUDE_TOP)/stx/libtool/Tools__BrowserList.$(H) $(INCLUDE_TOP)/stx/libtool/Tools__NavigatorModel.$(H) $(INCLUDE_TOP)/stx/libview2/ApplicationModel.$(H) $(INCLUDE_TOP)/stx/libview2/Model.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)Tools__NamespaceFilter.$(O) Tools__NamespaceFilter.$(H): Tools__NamespaceFilter.st $(INCLUDE_TOP)/stx/libtool/Tools__NamespaceList.$(H) $(INCLUDE_TOP)/stx/libtool/Tools__BrowserList.$(H) $(INCLUDE_TOP)/stx/libtool/Tools__NavigatorModel.$(H) $(INCLUDE_TOP)/stx/libview2/ApplicationModel.$(H) $(INCLUDE_TOP)/stx/libview2/Model.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
-$(OUTDIR)Tools__TestRunner2.$(O) Tools__TestRunner2.$(H): Tools__TestRunner2.st $(INCLUDE_TOP)/stx/libtool/Tools__AbstractTestRunner.$(H) $(INCLUDE_TOP)/stx/libview2/ApplicationModel.$(H) $(INCLUDE_TOP)/stx/libview2/Model.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libwidg2/HierarchicalItem.$(H) $(INCLUDE_TOP)/stx/libtool/Tools__ClassList.$(H) $(INCLUDE_TOP)/stx/libtool/Tools__BrowserList.$(H) $(INCLUDE_TOP)/stx/libtool/Tools__NavigatorModel.$(H) $(STCHDR)
+$(OUTDIR)Tools__TestRunner2.$(O) Tools__TestRunner2.$(H): Tools__TestRunner2.st $(INCLUDE_TOP)/stx/libtool/Tools__AbstractTestRunner.$(H) $(INCLUDE_TOP)/stx/libview2/ApplicationModel.$(H) $(INCLUDE_TOP)/stx/libview2/Model.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libtool/Tools__ClassList.$(H) $(INCLUDE_TOP)/stx/libtool/Tools__BrowserList.$(H) $(INCLUDE_TOP)/stx/libtool/Tools__NavigatorModel.$(H) $(INCLUDE_TOP)/stx/libwidg2/HierarchicalItem.$(H) $(STCHDR)
$(OUTDIR)Tools__HierarchicalChangeList.$(O) Tools__HierarchicalChangeList.$(H): Tools__HierarchicalChangeList.st $(INCLUDE_TOP)/stx/libtool/Tools__ChangeList.$(H) $(INCLUDE_TOP)/stx/libtool/Tools__BrowserListWithFilter.$(H) $(INCLUDE_TOP)/stx/libtool/Tools__BrowserList.$(H) $(INCLUDE_TOP)/stx/libtool/Tools__NavigatorModel.$(H) $(INCLUDE_TOP)/stx/libview2/ApplicationModel.$(H) $(INCLUDE_TOP)/stx/libview2/Model.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)Tools__HierarchicalPackageFilterList.$(O) Tools__HierarchicalPackageFilterList.$(H): Tools__HierarchicalPackageFilterList.st $(INCLUDE_TOP)/stx/libtool/Tools__HierarchicalProjectList.$(H) $(INCLUDE_TOP)/stx/libtool/Tools__ProjectList.$(H) $(INCLUDE_TOP)/stx/libtool/Tools__BrowserList.$(H) $(INCLUDE_TOP)/stx/libtool/Tools__NavigatorModel.$(H) $(INCLUDE_TOP)/stx/libview2/ApplicationModel.$(H) $(INCLUDE_TOP)/stx/libview2/Model.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libwidg2/HierarchicalItemWithLabel.$(H) $(INCLUDE_TOP)/stx/libwidg2/HierarchicalItem.$(H) $(STCHDR)
$(OUTDIR)Tools__InheritanceClassList.$(O) Tools__InheritanceClassList.$(H): Tools__InheritanceClassList.st $(INCLUDE_TOP)/stx/libtool/Tools__HierarchicalClassList.$(H) $(INCLUDE_TOP)/stx/libtool/Tools__ClassList.$(H) $(INCLUDE_TOP)/stx/libtool/Tools__BrowserList.$(H) $(INCLUDE_TOP)/stx/libtool/Tools__NavigatorModel.$(H) $(INCLUDE_TOP)/stx/libview2/ApplicationModel.$(H) $(INCLUDE_TOP)/stx/libview2/Model.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
--- a/Tools__ChangeSetDiffList.st Wed Jan 16 11:59:55 2013 +0000
+++ b/Tools__ChangeSetDiffList.st Thu Jan 17 17:16:17 2013 +0000
@@ -28,9 +28,9 @@
"{ NameSpace: Tools }"
BrowserListWithFilter subclass:#ChangeSetDiffList
- instanceVariableNames:'listHolder listEntryLabelGenerator listEntryIconGenerator
- showVersionMethodDiffsHolder showCopyrightMethodDiffsHolder
- highlightConflictsHolder'
+ instanceVariableNames:'listHolder listSelectionHolder listEntryLabelGenerator
+ listEntryIconGenerator showVersionMethodDiffsHolder
+ showCopyrightMethodDiffsHolder highlightConflictsHolder'
classVariableNames:''
poolDictionaries:''
category:'Interface-Diff'
@@ -120,7 +120,7 @@
(SelectionInListModelViewSpec
name: 'List'
layout: (LayoutFrame 0 0 0 0 0 1 0 1)
- model: selectionHolder
+ model: listSelectionHolder
menu: menuHolderWithShowFilter
hasHorizontalScrollBar: true
hasVerticalScrollBar: true
@@ -128,14 +128,13 @@
multipleSelectOk: true
useIndex: false
highlightMode: line
+ ignoreReselect: false
postBuildCallback: postBuildListView:
)
)
)
)
-
- "Modified: / 01-08-2012 / 17:31:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!ChangeSetDiffList class methodsFor:'plugIn spec'!
@@ -151,7 +150,7 @@
these can be connected to aspects of an embedding application
(if this app is embedded in a subCanvas)."
- ^ super aspectSelectors , #(
+ ^ #(
#highlightConflictsHolder
#inGeneratorHolder
#listEntryIconGenerator
@@ -159,10 +158,10 @@
#menuHolder
#outGeneratorHolder
#showCopyrightMethodDiffsHolder
+ #showFilterHolder
#showVersionMethodDiffsHolder
).
- "Modified (format): / 01-08-2012 / 17:32:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!ChangeSetDiffList methodsFor:'accessing'!
@@ -181,6 +180,14 @@
listEntryLabelGenerator:aBlock
listEntryLabelGenerator := aBlock.
+!
+
+selection: entry
+ self updateList.
+ self selectionHolder value: (Array with: entry).
+
+ "Created: / 17-01-2013 / 13:41:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 17-01-2013 / 16:37:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!ChangeSetDiffList methodsFor:'aspects'!
@@ -225,6 +232,18 @@
^ listHolder
!
+listSelectionHolder
+ "return/create the 'listSelectionHolder' value holder (automatically generated)"
+
+ listSelectionHolder isNil ifTrue:[
+ listSelectionHolder := ValueHolder new.
+ listSelectionHolder addDependent:self.
+ ].
+ ^ listSelectionHolder
+
+ "Modified: / 17-01-2013 / 16:51:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
showCopyrightMethodDiffsHolder
"return/create the 'showCopyrightMethodDiffsHolder' value holder (automatically generated)"
@@ -285,9 +304,66 @@
!ChangeSetDiffList methodsFor:'change & update'!
+enqueueDelayedUpdate:something with:aParameter from:changedObject
+ immediateUpdate value ifTrue:[
+ self delayedUpdate:something with:aParameter from:changedObject
+ ] ifFalse:[
+ super enqueueDelayedUpdate:something with:aParameter from:changedObject
+ ]
+
+ "Created: / 17-01-2013 / 16:25:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+enqueueDelayedUpdateList
+ immediateUpdate value ifTrue:[
+ self updateList
+ ] ifFalse:[
+ super enqueueDelayedUpdateList
+ ].
+
+ "Created: / 17-01-2013 / 16:44:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+listSelectionChanged
+ | lsel |
+
+ lsel := listSelectionHolder value ? #().
+ self selectionHolder
+ removeDependent: self;
+ value: (lsel collect:[:e | e model ]);
+ addDependent: self.
+ self enqueueDelayedUpdateOutputGenerator
+
+ "Created: / 17-01-2013 / 14:26:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 17-01-2013 / 16:23:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+selectionChanged
+ | sel lsel llist |
+
+ listSelectionHolder isNil ifTrue:[ ^ self ].
+
+ listSelectionHolder removeDependent: self.
+ sel := (self selectionHolder value) ? #().
+ llist := self listHolder value.
+ lsel := llist select:[:leach | sel includesIdentical: leach model].
+ listSelectionHolder value: lsel.
+ listSelectionHolder addDependent: self.
+
+ super selectionChanged.
+
+ "Created: / 17-01-2013 / 14:11:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 17-01-2013 / 16:36:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
update: aspect with: param from: sender
aspect == #resolution ifTrue:[^(self componentAt: #List) invalidateRepairNow: true].
+
+ sender == listSelectionHolder ifTrue:[
+ self listSelectionChanged.
+ ^self
+ ].
sender == selectionHolder ifTrue:[
self selectionChanged.
@@ -314,7 +390,7 @@
super update: aspect with: param from: sender.
- "Modified: / 01-08-2012 / 17:24:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 17-01-2013 / 15:26:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!ChangeSetDiffList methodsFor:'generators'!
@@ -324,9 +400,29 @@
^Iterator on:
[:whatToDo|
self selectionHolder value do:
- [:each|each model do: whatToDo]]
+ [:each|each notNil ifTrue:[each do: whatToDo]]]
+
+ "Modified: / 17-01-2013 / 17:12:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!ChangeSetDiffList methodsFor:'initialization'!
+
+initialize
+ "Invoked when a new instance is created."
- "Modified: / 26-11-2009 / 17:23:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "/ please change as required (and remove this comment)
+ "/ listHolder := nil.
+ "/ listSelectionHolder := nil.
+ "/ listEntryLabelGenerator := nil.
+ "/ listEntryIconGenerator := nil.
+ "/ showVersionMethodDiffsHolder := nil.
+ "/ showCopyrightMethodDiffsHolder := nil.
+ "/ highlightConflictsHolder := nil.
+
+ super initialize.
+ immediateUpdate := true asValue.
+
+ "Modified: / 17-01-2013 / 16:51:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!ChangeSetDiffList methodsFor:'private'!
@@ -404,8 +500,9 @@
updateList
"Superclass Tools::BrowserList says that I am responsible to implement this method"
- | newDiffs newList |
- self listHolder value ? #() do: [:entry|entry model removeDependent: self].
+ | newDiffs oldList newList anyNew |
+ oldList := self listHolder value ? #().
+ oldList do: [:entry|entry model removeDependent: self].
newDiffs := self inGeneratorHolder value ? #().
(newDiffs isKindOf: ChangeSetDiffComponent) ifTrue:
@@ -413,18 +510,22 @@
newDiffs := self filterList: newDiffs.
newList := OrderedCollection new:16.
- newDiffs do:
- [:item|
+ anyNew := false.
+ newDiffs do:[:item|
(self shouldDisplayDiff: item) ifTrue:[
- newList add:(ListEntry model: item application: self).
- item addDependent: self].
+ | entry |
+
+ entry := oldList detect:[:e|e model == entry] ifNone:[anyNew := true. (ListEntry model: item application: self)].
+ newList add:entry.
].
-
+ ].
newList sort:[:a :b|a label < b label].
- self listHolder value:newList
+ (anyNew or:[oldList size ~~ newList size]) ifTrue:[
+ self listHolder value:newList
+ ].
"Modified: / 07-07-2011 / 14:17:26 / jv"
- "Modified: / 03-08-2012 / 14:42:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 17-01-2013 / 16:40:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!ChangeSetDiffList::ListEntry class methodsFor:'instance creation'!
@@ -503,5 +604,5 @@
!
version_SVN
- ^ '$Id: Tools__ChangeSetDiffList.st 8086 2013-01-15 12:03:21Z vranyj1 $'
+ ^ '$Id: Tools__ChangeSetDiffList.st 8089 2013-01-17 17:16:17Z vranyj1 $'
! !
--- a/Tools__ChangeSetDiffTool.st Wed Jan 16 11:59:55 2013 +0000
+++ b/Tools__ChangeSetDiffTool.st Thu Jan 17 17:16:17 2013 +0000
@@ -35,7 +35,8 @@
versionBaseTextHolder textDiffToolHolder
textDiffToolWindowSpecHolder mergeHolder mergeDataHolder
showVersionMethodDiffsHolder showCopyrightMethodDiffsHolder
- highlightConflictsHolder hasDiffsetHolder mergeSavedHolder'
+ highlightConflictsHolder hasDiffsetHolder mergeSavedHolder list1
+ list2'
classVariableNames:'LastDiffInfo'
poolDictionaries:''
category:'Interface-Diff'
@@ -277,45 +278,45 @@
(Array
(SubChannelInfoSpec
+ subAspect: highlightConflictsHolder
+ aspect: highlightConflictsHolder
+ )
+ (SubChannelInfoSpec
subAspect: inGeneratorHolder
aspect: diffsetHolderPrivate
- )
+ )
+
(SubChannelInfoSpec
subAspect: listEntryLabelGenerator
aspect: diffListEntryLabelGeneratorAspect
- )
-
+ )
(SubChannelInfoSpec
subAspect: menuHolder
aspect: listMenuHolder
- )
+ )
+
(SubChannelInfoSpec
subAspect: outGeneratorHolder
aspect: selectionHolder
+ )
+ (SubChannelInfoSpec
+ subAspect: showCopyrightMethodDiffsHolder
+ aspect: showCopyrightMethodDiffsHolder
)
(SubChannelInfoSpec
subAspect: showVersionMethodDiffsHolder
aspect: showVersionMethodDiffsHolder
)
- (SubChannelInfoSpec
- subAspect: showCopyrightMethodDiffsHolder
- aspect: showCopyrightMethodDiffsHolder
- )
- (SubChannelInfoSpec
- subAspect: highlightConflictsHolder
- aspect: highlightConflictsHolder
- )
)
createNewApplication: true
createNewBuilder: false
+ postBuildCallback: list1View:
)
)
)
)
-
- "Modified: / 01-08-2012 / 17:05:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
twoColumnNavigatorSpec
@@ -352,7 +353,7 @@
(SpecCollection
collection: (
(SubCanvasSpec
- name: 'FirstColumn'
+ name: 'LeftList'
hasHorizontalScrollBar: false
hasVerticalScrollBar: false
majorKey: #'Tools::ChangeSetDiffList'
@@ -360,41 +361,43 @@
(Array
(SubChannelInfoSpec
+ subAspect: highlightConflictsHolder
+ aspect: highlightConflictsHolder
+ )
+ (SubChannelInfoSpec
subAspect: inGeneratorHolder
aspect: diffsetHolderPrivate
- )
+ )
+
(SubChannelInfoSpec
subAspect: listEntryLabelGenerator
aspect: diffListEntryLabelGeneratorAspect
- )
-
+ )
(SubChannelInfoSpec
subAspect: menuHolder
aspect: listMenuHolder
- )
+ )
+
(SubChannelInfoSpec
subAspect: outGeneratorHolder
aspect: firstColSelectionHolder
+ )
+ (SubChannelInfoSpec
+ subAspect: showCopyrightMethodDiffsHolder
+ aspect: showCopyrightMethodDiffsHolder
)
(SubChannelInfoSpec
subAspect: showVersionMethodDiffsHolder
aspect: showVersionMethodDiffsHolder
)
- (SubChannelInfoSpec
- subAspect: showCopyrightMethodDiffsHolder
- aspect: showCopyrightMethodDiffsHolder
- )
- (SubChannelInfoSpec
- subAspect: highlightConflictsHolder
- aspect: highlightConflictsHolder
- )
)
createNewApplication: true
createNewBuilder: true
+ postBuildCallback: list1View:
)
(SubCanvasSpec
- name: 'SecondColumn'
+ name: 'RightList'
hasHorizontalScrollBar: false
hasVerticalScrollBar: false
majorKey: #'Tools::ChangeSetDiffList'
@@ -402,38 +405,40 @@
(Array
(SubChannelInfoSpec
+ subAspect: highlightConflictsHolder
+ aspect: highlightConflictsHolder
+ )
+ (SubChannelInfoSpec
subAspect: inGeneratorHolder
aspect: firstColSelectionHolder
- )
+ )
+
(SubChannelInfoSpec
subAspect: listEntryLabelGenerator
aspect: diffListEntryLabelGeneratorAspect
- )
-
+ )
(SubChannelInfoSpec
subAspect: menuHolder
aspect: listMenuHolder
- )
+ )
+
(SubChannelInfoSpec
subAspect: outGeneratorHolder
aspect: selectionHolder
+ )
+ (SubChannelInfoSpec
+ subAspect: showCopyrightMethodDiffsHolder
+ aspect: showCopyrightMethodDiffsHolder
)
(SubChannelInfoSpec
subAspect: showVersionMethodDiffsHolder
aspect: showVersionMethodDiffsHolder
)
- (SubChannelInfoSpec
- subAspect: showCopyrightMethodDiffsHolder
- aspect: showCopyrightMethodDiffsHolder
- )
- (SubChannelInfoSpec
- subAspect: highlightConflictsHolder
- aspect: highlightConflictsHolder
- )
)
createNewApplication: true
createNewBuilder: true
+ postBuildCallback: list2View:
)
)
@@ -444,8 +449,6 @@
)
)
-
- "Modified: / 01-08-2012 / 17:05:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
windowSpec
@@ -477,9 +480,15 @@
component:
(SpecCollection
collection: (
+ (MenuPanelSpec
+ name: 'ToolBar'
+ layout: (LayoutFrame 0 0 0 0 0 1 30 0)
+ menu: toolbarMenu
+ textDefault: true
+ )
(SubCanvasSpec
name: 'InfoPanel'
- layout: (LayoutFrame 0 0 0 0 0 1 40 0)
+ layout: (LayoutFrame 0 0 30 0 0 1 70 0)
level: 0
initiallyInvisible: true
hasHorizontalScrollBar: false
@@ -489,14 +498,14 @@
)
(UISubSpecification
name: 'Label'
- layout: (LayoutFrame 0 0 0 0 0 1 56 0)
+ layout: (LayoutFrame 0 0 30 0 0 1 86 0)
initiallyInvisible: true
visibilityChannel: hasDiffsetHolder
minorKey: labelSpec
)
(VariableVerticalPanelSpec
name: 'Panel'
- layout: (LayoutFrame 0 0 56 0 0 1 0 1)
+ layout: (LayoutFrame 0 0 86 0 0 1 0 1)
initiallyInvisible: true
visibilityChannel: hasDiffsetHolder
showHandle: true
@@ -525,8 +534,6 @@
)
)
-
- "Modified: / 15-01-2013 / 11:33:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!ChangeSetDiffTool class methodsFor:'interface specs - labels'!
@@ -651,7 +658,7 @@
!ChangeSetDiffTool class methodsFor:'menu specs'!
-listMenu
+listMenuDiff
"This resource specification was automatically generated
by the MenuEditor of ST/X."
@@ -732,6 +739,88 @@
nil
nil
)
+
+ "Created: / 16-01-2013 / 15:47:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+listMenuMerge
+ "This resource specification was automatically generated
+ by the MenuEditor of ST/X."
+
+ "Do not manually edit this!! If it is corrupted,
+ the MenuEditor may not be able to read the specification."
+
+
+ "
+ MenuEditor new openOnClass:Tools::ChangeSetDiffTool andSelector:#listMenuMerge
+ (Menu new fromLiteralArrayEncoding:(Tools::ChangeSetDiffTool listMenuMerge)) startUp
+ "
+
+ <resource: #menu>
+
+ ^
+ #(Menu
+ (
+ (MenuItem
+ enabled: hasSelection
+ label: 'Browse'
+ itemValue: listMenuBrowse
+ )
+ (MenuItem
+ label: '-'
+ )
+ (MenuItem
+ enabled: hasSelection
+ label: 'Merge using A'
+ itemValue: listMenuMergeUsingA
+ shortcutKey: Ctrl2
+ )
+ (MenuItem
+ enabled: hasSelection
+ label: 'Merge using B'
+ itemValue: listMenuMergeUsingB
+ shortcutKey: Ctrl3
+ )
+ (MenuItem
+ enabled: hasSelection
+ label: 'Merge using Base'
+ itemValue: listMenuMergeUsingBase
+ shortcutKey: Ctrl1
+ )
+ (MenuItem
+ label: '-'
+ )
+ (MenuItem
+ label: 'Open in...'
+ submenu:
+ (Menu
+ (
+ (MenuItem
+ enabled: hasSelection
+ label: 'Inspector'
+ itemValue: listMenuInspect
+ )
+ (MenuItem
+ enabled: hasSelection
+ label: 'kdiff3'
+ itemValue: listMenuOpenInExternal:
+ argument: 'kdiff3'
+ )
+ (MenuItem
+ enabled: hasSelection
+ label: 'meld'
+ itemValue: listMenuOpenInExternal:
+ argument: 'meld'
+ )
+ )
+ nil
+ nil
+ )
+ )
+ )
+ nil
+ nil
+ )
!
mainMenu
@@ -754,41 +843,35 @@
(
(MenuItem
label: 'File'
- translateLabel: true
submenu:
(Menu
(
(MenuItem
label: 'Open...'
itemValue: fileMenuOpen
- translateLabel: true
shortcutKey: Ctrlo
)
(MenuItem
enabled: canSave
label: 'Save'
itemValue: fileMenuSave
- translateLabel: true
shortcutKey: Ctrls
)
(MenuItem
enabled: canSaveAs
label: 'Save As...'
itemValue: fileMenuSaveAs
- translateLabel: true
)
(MenuItem
enabled: canSaveAsPatch
label: 'Save As Patch '
itemValue: fileMenuSaveAsPatch
- translateLabel: true
isVisible: false
)
(MenuItem
enabled: canSaveMergedAs
label: 'Save Merged as... '
itemValue: fileMenuSaveMergedAs
- translateLabel: true
)
(MenuItem
label: '-'
@@ -796,7 +879,6 @@
(MenuItem
label: 'Exit'
itemValue: closeRequest
- translateLabel: true
shortcutKey: Ctrlq
)
)
@@ -806,7 +888,6 @@
)
(MenuItem
label: 'Changeset'
- translateLabel: true
submenu:
(Menu
(
@@ -814,25 +895,21 @@
enabled: isDiff2Or3
label: 'Browse changes (A)'
itemValue: changesetMenuBrowseA
- translateLabel: true
)
(MenuItem
enabled: isDiff2Or3
label: 'Browse changes (B)'
itemValue: changesetMenuBrowseB
- translateLabel: true
)
(MenuItem
enabled: isDiff3
label: 'Browse changes (Base)'
itemValue: changesetMenuBrowseBase
- translateLabel: true
)
(MenuItem
enabled: isMerge
label: 'Browse changes (Merge)'
itemValue: changesetMenuBrowseMerge
- translateLabel: true
)
)
nil
@@ -840,29 +917,24 @@
)
)
(MenuItem
- label: 'Diff'
- translateLabel: true
+ label: 'Change'
submenuChannel: listMenu
)
(MenuItem
label: 'View'
- translateLabel: true
submenu:
(Menu
(
(MenuItem
label: 'Show Diffs in Version Methods'
- translateLabel: true
indication: showVersionMethodDiffsHolder
)
(MenuItem
label: 'Show Diff in #copyright Methods'
- translateLabel: true
indication: showCopyrightMethodDiffsHolder
)
(MenuItem
label: 'Highlight Conflicts'
- translateLabel: true
indication: highlightConflictsHolder
)
)
@@ -874,6 +946,91 @@
nil
nil
)
+!
+
+toolbarMenu
+ "This resource specification was automatically generated
+ by the MenuEditor of ST/X."
+
+ "Do not manually edit this!! If it is corrupted,
+ the MenuEditor may not be able to read the specification."
+
+
+ "
+ MenuEditor new openOnClass:Tools::ChangeSetDiffTool andSelector:#toolbarMenu
+ (Menu new fromLiteralArrayEncoding:(Tools::ChangeSetDiffTool toolbarMenu)) startUp
+ "
+
+ <resource: #menu>
+
+ ^
+ #(Menu
+ (
+ (MenuItem
+ label: 'Open'
+ itemValue: fileMenuOpen
+ isButton: true
+ labelImage: (ResourceRetriever ToolbarIconLibrary loadFromFile22x22Icon)
+ )
+ (MenuItem
+ enabled: canSave
+ label: 'Save'
+ itemValue: fileMenuSave
+ isButton: true
+ labelImage: (ResourceRetriever ToolbarIconLibrary saveImageIcon)
+ )
+ (MenuItem
+ label: '-'
+ )
+ (MenuItem
+ label: 'Move to Previous'
+ itemValue: menuMoveUp
+ isButton: true
+ labelImage: (ResourceRetriever ToolbarIconLibrary mergePrev24x24)
+ )
+ (MenuItem
+ label: 'Move to Next'
+ itemValue: menuMoveDown
+ isButton: true
+ labelImage: (ResourceRetriever ToolbarIconLibrary mergeNext24x24)
+ )
+ (MenuItem
+ label: 'Move to Previous Conflict'
+ itemValue: menuMoveUpConflict
+ isButton: true
+ labelImage: (ResourceRetriever ToolbarIconLibrary mergePrevConflict24x24)
+ )
+ (MenuItem
+ label: 'Move to Next Conflict'
+ itemValue: menuMoveDownConflict
+ isButton: true
+ labelImage: (ResourceRetriever ToolbarIconLibrary mergeNextConflict24x24)
+ )
+ (MenuItem
+ label: '-'
+ )
+ (MenuItem
+ label: 'Merge using Base'
+ itemValue: menuMergeUsingBase
+ isButton: true
+ labelImage: (ResourceRetriever ToolbarIconLibrary mergeUsingBase24x24)
+ )
+ (MenuItem
+ label: 'Merge using A'
+ itemValue: menuMergeUsingA
+ isButton: true
+ labelImage: (ResourceRetriever ToolbarIconLibrary mergeUsingA24x24)
+ )
+ (MenuItem
+ label: 'Merge using B'
+ itemValue: menuMergeUsingB
+ isButton: true
+ labelImage: (ResourceRetriever ToolbarIconLibrary mergeUsingB24x24)
+ )
+ )
+ nil
+ nil
+ )
! !
!ChangeSetDiffTool class methodsFor:'plugIn spec'!
@@ -959,13 +1116,6 @@
"Created: / 22-10-2008 / 11:30:03 / Jan Vrany <vranyj1@fel.cvut.cz>"
!
-selection: selection
-
- ^self selectionHolder value: selection
-
- "Created: / 22-10-2008 / 11:30:11 / Jan Vrany <vranyj1@fel.cvut.cz>"
-!
-
showCopyrightMethodDiffs
^self showCopyrightMethodDiffsHolder value
@@ -1022,6 +1172,18 @@
!ChangeSetDiffTool methodsFor:'accessing - subapps'!
+list1View: aView
+ list1 := aView application.
+
+ "Created: / 17-01-2013 / 13:44:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+list2View: aView
+ list2 := aView application.
+
+ "Created: / 17-01-2013 / 13:44:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
textDiff2Tool
^TextDiff2Tool new
@@ -1057,6 +1219,66 @@
"Created: / 16-03-2012 / 15:16:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
+!ChangeSetDiffTool methodsFor:'accessing-menus'!
+
+listMenu
+ | spec |
+
+ spec := self isMerge ifTrue:[self class listMenuMerge] ifFalse:[self class listMenuDiff].
+ ^Menu decodeFromLiteralArray: spec.
+
+ "Created: / 16-01-2013 / 15:50:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!ChangeSetDiffTool methodsFor:'accessing-selection'!
+
+selection: entry
+
+
+ self isOneColumnBrowser ifTrue:[
+ list1 selection: entry
+ ] ifFalse:[
+ | parent |
+
+ parent := self diffsetHolderPrivate value diffs
+ detect:[:each|each diffs includes: entry] ifNone:[nil].
+ parent notNil ifTrue:[
+ list1 selection: parent.
+ list1 updateOutputGenerator.
+ list2 updateList.
+ list2 selection: entry.
+
+ ]
+ ]
+
+ "Created: / 22-10-2008 / 11:30:11 / Jan Vrany <vranyj1@fel.cvut.cz>"
+ "Modified: / 17-01-2013 / 16:28:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+theFirstSelectedEntry
+ | selection |
+
+ selection := self selectionHolder value.
+ selection isNil ifTrue:[ ^ nil ].
+ selection := selection collect:[:e|e]. "/selection might be an Iterator
+ selection isEmpty ifTrue:[ ^nil ].
+ ^selection first
+
+ "Created: / 17-01-2013 / 16:58:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+theLastSelectedEntry
+ | selection |
+
+ selection := self selectionHolder value.
+ selection isNil ifTrue:[ ^ nil ].
+ selection := selection collect:[:e|e]. "/selection might be an Iterator
+ selection isEmpty ifTrue:[ ^nil ].
+ ^selection last
+
+ "Created: / 17-01-2013 / 13:22:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
!ChangeSetDiffTool methodsFor:'aspects'!
diffInfoHolder
@@ -1215,13 +1437,14 @@
listMenuHolder
diffMenuHolder isNil ifTrue:[
- diffMenuHolder := ValueHolder with:(Menu decodeFromLiteralArray: self class listMenu)
+"/ diffMenuHolder := ValueHolder with:self listMenu
+ diffMenuHolder := BlockValue with:[:v|self listMenu] argument: self mergeHolder
].
^ diffMenuHolder
"Created: / 21-11-2009 / 18:52:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 09-12-2009 / 23:34:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
"Modified: / 18-11-2011 / 14:57:47 / cg"
+ "Modified: / 16-01-2013 / 15:59:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
mergeDataHolder
@@ -1300,6 +1523,14 @@
"Modified: / 20-11-2009 / 20:12:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
+secondColSelectionHolder
+ "return/create the valueHolder 'firstColSelectionHolder'"
+
+ ^self selectionHolder
+
+ "Created: / 17-01-2013 / 12:49:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
selectionHolder
"return/create the 'selectionHolder' value holder (automatically generated)"
@@ -1494,8 +1725,8 @@
self diffsetHolderPrivate value:
(self isOneColumnBrowser
- ifTrue:[ds flattened]
- ifFalse:[ds value]).
+ ifTrue:[ds flattened sort]
+ ifFalse:[ds value sort]).
self versionALabelHolder value: ds versionALabel.
self versionBLabelHolder value: ds versionBLabel.
@@ -1503,7 +1734,7 @@
"Created: / 05-12-2009 / 11:03:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
"Modified: / 29-06-2011 / 08:24:18 / Jan Vrany <enter your email here>"
- "Modified: / 15-01-2013 / 11:30:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 17-01-2013 / 13:58:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
mergeDataChanged
@@ -1792,6 +2023,24 @@
"Modified: / 09-12-2009 / 23:10:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
+listMenuMergeUsingA
+ self textDiffToolHolder value doMergeAllUsingA
+
+ "Modified: / 16-01-2013 / 15:57:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+listMenuMergeUsingB
+ self textDiffToolHolder value doMergeAllUsingB
+
+ "Created: / 16-01-2013 / 15:57:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+listMenuMergeUsingBase
+ self textDiffToolHolder value doMergeAllUsingBase
+
+ "Created: / 16-01-2013 / 15:57:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
listMenuOpenInExternal: command
(OperatingSystem canExecuteCommand: command) ifFalse:[
@@ -1821,6 +2070,57 @@
]
"Modified: / 17-03-2012 / 08:55:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+menuMoveDown
+ self menuMoveDownToSuchThat: [:entry|true]
+
+ "Modified: / 17-01-2013 / 16:53:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+menuMoveDownConflict
+ self menuMoveDownToSuchThat: [:entry|entry isMerged not]
+
+ "Modified: / 17-01-2013 / 16:53:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+menuMoveDownToSuchThat: aBlock
+ | oldSel newSel |
+ oldSel := self theLastSelectedEntry.
+ newSel := self diffsetHolderPrivate value nextEntryAfter: oldSel suchThat: aBlock.
+ self menuMoveTo: newSel.
+
+ "Created: / 17-01-2013 / 16:52:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+menuMoveTo: entry
+
+"/ self window sensor pushUserEvent:#selection: for: self withArgument: entry
+ self selection: entry.
+
+ "Created: / 17-01-2013 / 13:03:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 17-01-2013 / 16:27:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+menuMoveUp
+ self menuMoveUpToSuchThat: [:entry|true]
+
+ "Created: / 17-01-2013 / 16:58:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+menuMoveUpConflict
+ self menuMoveUpToSuchThat: [:entry|entry isMerged not]
+
+ "Created: / 17-01-2013 / 17:00:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+menuMoveUpToSuchThat: aBlock
+ | oldSel newSel |
+ oldSel := self theFirstSelectedEntry.
+ newSel := self diffsetHolderPrivate value nextEntryBefore: oldSel suchThat: aBlock.
+ self menuMoveTo: newSel.
+
+ "Created: / 17-01-2013 / 16:58:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!ChangeSetDiffTool methodsFor:'queries'!
@@ -1842,9 +2142,10 @@
| info |
info := self diffInfo.
info isNil ifTrue:[^false].
- ^info isMerge and:[info specMerge isFile and:[info diffset isMerged]]
+ ^info isMerge and:[info specMerge isFile and:[info diffset notNil and:[info diffset isMerged]]]
"Created: / 20-03-2012 / 15:00:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 17-01-2013 / 12:25:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
canSaveAs
@@ -2790,5 +3091,5 @@
!
version_SVN
- ^ '$Id: Tools__ChangeSetDiffTool.st 8087 2013-01-16 11:53:38Z vranyj1 $'
+ ^ '$Id: Tools__ChangeSetDiffTool.st 8089 2013-01-17 17:16:17Z vranyj1 $'
! !
--- a/bc.mak Wed Jan 16 11:59:55 2013 +0000
+++ b/bc.mak Thu Jan 17 17:16:17 2013 +0000
@@ -247,7 +247,7 @@
$(OUTDIR)Tools__ImplementingClassList.$(O) Tools__ImplementingClassList.$(H): Tools__ImplementingClassList.st $(INCLUDE_TOP)\stx\libtool\Tools__MethodList.$(H) $(INCLUDE_TOP)\stx\libtool\Tools__BrowserList.$(H) $(INCLUDE_TOP)\stx\libtool\Tools__NavigatorModel.$(H) $(INCLUDE_TOP)\stx\libview2\ApplicationModel.$(H) $(INCLUDE_TOP)\stx\libview2\Model.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)Tools__ImplementingMethodList.$(O) Tools__ImplementingMethodList.$(H): Tools__ImplementingMethodList.st $(INCLUDE_TOP)\stx\libtool\Tools__MethodList.$(H) $(INCLUDE_TOP)\stx\libtool\Tools__BrowserList.$(H) $(INCLUDE_TOP)\stx\libtool\Tools__NavigatorModel.$(H) $(INCLUDE_TOP)\stx\libview2\ApplicationModel.$(H) $(INCLUDE_TOP)\stx\libview2\Model.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)Tools__NamespaceFilter.$(O) Tools__NamespaceFilter.$(H): Tools__NamespaceFilter.st $(INCLUDE_TOP)\stx\libtool\Tools__NamespaceList.$(H) $(INCLUDE_TOP)\stx\libtool\Tools__BrowserList.$(H) $(INCLUDE_TOP)\stx\libtool\Tools__NavigatorModel.$(H) $(INCLUDE_TOP)\stx\libview2\ApplicationModel.$(H) $(INCLUDE_TOP)\stx\libview2\Model.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
-$(OUTDIR)Tools__TestRunner2.$(O) Tools__TestRunner2.$(H): Tools__TestRunner2.st $(INCLUDE_TOP)\stx\libtool\Tools__AbstractTestRunner.$(H) $(INCLUDE_TOP)\stx\libview2\ApplicationModel.$(H) $(INCLUDE_TOP)\stx\libview2\Model.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libwidg2\HierarchicalItem.$(H) $(INCLUDE_TOP)\stx\libtool\Tools__ClassList.$(H) $(INCLUDE_TOP)\stx\libtool\Tools__BrowserList.$(H) $(INCLUDE_TOP)\stx\libtool\Tools__NavigatorModel.$(H) $(STCHDR)
+$(OUTDIR)Tools__TestRunner2.$(O) Tools__TestRunner2.$(H): Tools__TestRunner2.st $(INCLUDE_TOP)\stx\libtool\Tools__AbstractTestRunner.$(H) $(INCLUDE_TOP)\stx\libview2\ApplicationModel.$(H) $(INCLUDE_TOP)\stx\libview2\Model.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libtool\Tools__ClassList.$(H) $(INCLUDE_TOP)\stx\libtool\Tools__BrowserList.$(H) $(INCLUDE_TOP)\stx\libtool\Tools__NavigatorModel.$(H) $(INCLUDE_TOP)\stx\libwidg2\HierarchicalItem.$(H) $(STCHDR)
$(OUTDIR)Tools__HierarchicalChangeList.$(O) Tools__HierarchicalChangeList.$(H): Tools__HierarchicalChangeList.st $(INCLUDE_TOP)\stx\libtool\Tools__ChangeList.$(H) $(INCLUDE_TOP)\stx\libtool\Tools__BrowserListWithFilter.$(H) $(INCLUDE_TOP)\stx\libtool\Tools__BrowserList.$(H) $(INCLUDE_TOP)\stx\libtool\Tools__NavigatorModel.$(H) $(INCLUDE_TOP)\stx\libview2\ApplicationModel.$(H) $(INCLUDE_TOP)\stx\libview2\Model.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)Tools__HierarchicalPackageFilterList.$(O) Tools__HierarchicalPackageFilterList.$(H): Tools__HierarchicalPackageFilterList.st $(INCLUDE_TOP)\stx\libtool\Tools__HierarchicalProjectList.$(H) $(INCLUDE_TOP)\stx\libtool\Tools__ProjectList.$(H) $(INCLUDE_TOP)\stx\libtool\Tools__BrowserList.$(H) $(INCLUDE_TOP)\stx\libtool\Tools__NavigatorModel.$(H) $(INCLUDE_TOP)\stx\libview2\ApplicationModel.$(H) $(INCLUDE_TOP)\stx\libview2\Model.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libwidg2\HierarchicalItemWithLabel.$(H) $(INCLUDE_TOP)\stx\libwidg2\HierarchicalItem.$(H) $(STCHDR)
$(OUTDIR)Tools__InheritanceClassList.$(O) Tools__InheritanceClassList.$(H): Tools__InheritanceClassList.st $(INCLUDE_TOP)\stx\libtool\Tools__HierarchicalClassList.$(H) $(INCLUDE_TOP)\stx\libtool\Tools__ClassList.$(H) $(INCLUDE_TOP)\stx\libtool\Tools__BrowserList.$(H) $(INCLUDE_TOP)\stx\libtool\Tools__NavigatorModel.$(H) $(INCLUDE_TOP)\stx\libview2\ApplicationModel.$(H) $(INCLUDE_TOP)\stx\libview2\Model.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
--- a/libtool.rc Wed Jan 16 11:59:55 2013 +0000
+++ b/libtool.rc Thu Jan 17 17:16:17 2013 +0000
@@ -3,7 +3,7 @@
// automagically generated from the projectDefinition: stx_libtool.
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 6,2,8075,8075
+ FILEVERSION 6,2,8088,8088
PRODUCTVERSION 6,2,3,0
#if (__BORLANDC__)
FILEFLAGSMASK VS_FF_DEBUG | VS_FF_PRERELEASE
@@ -20,12 +20,12 @@
BEGIN
VALUE "CompanyName", "eXept Software AG\0"
VALUE "FileDescription", "Smalltalk/X Tools (LIB)\0"
- VALUE "FileVersion", "6.2.8075.8075\0"
+ VALUE "FileVersion", "6.2.8088.8088\0"
VALUE "InternalName", "stx:libtool\0"
VALUE "LegalCopyright", "Copyright Claus Gittinger 1988-2012\nCopyright eXept Software AG 1998-2012\0"
VALUE "ProductName", "Smalltalk/X\0"
VALUE "ProductVersion", "6.2.3.0\0"
- VALUE "ProductDate", "Wed, 16 Jan 2013 11:59:03 GMT\0"
+ VALUE "ProductDate", "Thu, 17 Jan 2013 17:17:34 GMT\0"
END
END