- Tools::ChangeSetBrowser2
class definition
added:11 methods
changed:11 methods
category of:
- Tools::ChangeList
changed: #updateList
- extensions
...
--- a/Make.proto Thu May 17 16:29:24 2012 +0100
+++ b/Make.proto Fri May 18 00:13:53 2012 +0100
@@ -243,7 +243,7 @@
$(OUTDIR)NewLauncher.$(O) NewLauncher.$(H): NewLauncher.st $(INCLUDE_TOP)/stx/libtool/AbstractLauncherApplication.$(H) $(INCLUDE_TOP)/stx/libview2/ToolApplicationModel.$(H) $(INCLUDE_TOP)/stx/libview2/ApplicationModel.$(H) $(INCLUDE_TOP)/stx/libview2/Model.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)OrderedCollectionInspectorView.$(O) OrderedCollectionInspectorView.$(H): OrderedCollectionInspectorView.st $(INCLUDE_TOP)/stx/libtool/InspectorView.$(H) $(INCLUDE_TOP)/stx/libview/SimpleView.$(H) $(INCLUDE_TOP)/stx/libview/DisplaySurface.$(H) $(INCLUDE_TOP)/stx/libview/GraphicsMedium.$(H) $(INCLUDE_TOP)/stx/libview/DeviceGraphicsContext.$(H) $(INCLUDE_TOP)/stx/libview/GraphicsContext.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)SetInspectorView.$(O) SetInspectorView.$(H): SetInspectorView.st $(INCLUDE_TOP)/stx/libtool/InspectorView.$(H) $(INCLUDE_TOP)/stx/libview/SimpleView.$(H) $(INCLUDE_TOP)/stx/libview/DisplaySurface.$(H) $(INCLUDE_TOP)/stx/libview/GraphicsMedium.$(H) $(INCLUDE_TOP)/stx/libview/DeviceGraphicsContext.$(H) $(INCLUDE_TOP)/stx/libview/GraphicsContext.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
-$(OUTDIR)SettingsDialog.$(O) SettingsDialog.$(H): SettingsDialog.st $(INCLUDE_TOP)/stx/libview2/ApplicationModel.$(H) $(INCLUDE_TOP)/stx/libview2/Model.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libtool/AbstractSettingsApplication.$(H) $(INCLUDE_TOP)/stx/libwidg2/HierarchicalList.$(H) $(INCLUDE_TOP)/stx/libbasic2/List.$(H) $(INCLUDE_TOP)/stx/libbasic/OrderedCollection.$(H) $(INCLUDE_TOP)/stx/libbasic/SequenceableCollection.$(H) $(INCLUDE_TOP)/stx/libbasic/Collection.$(H) $(INCLUDE_TOP)/stx/libwidg2/HierarchicalItemWithLabelAndIcon.$(H) $(INCLUDE_TOP)/stx/libwidg2/HierarchicalItemWithLabel.$(H) $(INCLUDE_TOP)/stx/libwidg2/HierarchicalItem.$(H) $(STCHDR)
+$(OUTDIR)SettingsDialog.$(O) SettingsDialog.$(H): SettingsDialog.st $(INCLUDE_TOP)/stx/libview2/ApplicationModel.$(H) $(INCLUDE_TOP)/stx/libview2/Model.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libwidg2/HierarchicalList.$(H) $(INCLUDE_TOP)/stx/libbasic2/List.$(H) $(INCLUDE_TOP)/stx/libbasic/OrderedCollection.$(H) $(INCLUDE_TOP)/stx/libbasic/SequenceableCollection.$(H) $(INCLUDE_TOP)/stx/libbasic/Collection.$(H) $(INCLUDE_TOP)/stx/libwidg2/HierarchicalItemWithLabelAndIcon.$(H) $(INCLUDE_TOP)/stx/libwidg2/HierarchicalItemWithLabel.$(H) $(INCLUDE_TOP)/stx/libwidg2/HierarchicalItem.$(H) $(INCLUDE_TOP)/stx/libtool/AbstractSettingsApplication.$(H) $(STCHDR)
$(OUTDIR)SmalltalkCodeGeneratorTool.$(O) SmalltalkCodeGeneratorTool.$(H): SmalltalkCodeGeneratorTool.st $(INCLUDE_TOP)/stx/libtool/CodeGeneratorTool.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)Tools__BackgroundSourceProcessingService.$(O) Tools__BackgroundSourceProcessingService.$(H): Tools__BackgroundSourceProcessingService.st $(INCLUDE_TOP)/stx/libtool/Tools__CodeViewService.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)Tools__BreakpointService.$(O) Tools__BreakpointService.$(H): Tools__BreakpointService.st $(INCLUDE_TOP)/stx/libtool/Tools__CodeViewService.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
@@ -299,7 +299,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__ChangeList.st Thu May 17 16:29:24 2012 +0100
+++ b/Tools__ChangeList.st Fri May 18 00:13:53 2012 +0100
@@ -899,9 +899,14 @@
!
updateList
- |inGenerator changeset newList |
+ |inGenerator changeset firstLineShown oldSel newList newSel |
inGenerator := self inGeneratorHolder value.
+ listView notNil ifTrue:[
+ firstLineShown := listView yVisibleToLineNr:1.
+ ].
+ oldSel := self selection.
+
changeset := inGenerator ifNil:[ #() ] ifNotNil:[ inGenerator ].
newList := changeset
select:
@@ -915,13 +920,24 @@
self listHolder value: newList.
((newList size ~~ 0) and:[scrollToBottom]) ifTrue:[
self selection: { newList last }
+ ] ifFalse:[
+ oldSel notEmptyOrNil ifTrue:[
+ newSel := oldSel species new: oldSel size.
+ oldSel := oldSel reject:[:e|e isNil].
+ oldSel := oldSel collect:[:e|e change].
+ newList do:[:e|(oldSel includes:e change) ifTrue:[newSel add:e]].
+ self selection: newSel.
+ ].
+ (listView notNil and:[firstLineShown notNil]) ifTrue:[
+ listView scrollToLine: (newList size min: firstLineShown).
+ ].
].
scrollToBottom := false.
]
"Modified: / 28-12-2011 / 15:46:15 / cg"
- "Modified: / 30-03-2012 / 17:04:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 17-05-2012 / 23:27:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!ChangeList methodsFor:'queries'!
@@ -1127,7 +1143,7 @@
| list cx icon colW colS |
list := self application.
cx := x := newX.
- list allowRemoveHolder value ifTrue:
+ (list allowRemoveHolder value and:[list showRemovedHolder value]) ifTrue:
[(icon := self iconRemoved) ifNotNil:
[icon displayOn: aGC x: cx y: y + (h / 2) - (icon height / 2) ].
cx := cx + 22."experimental value - this looks good"].
@@ -1150,7 +1166,7 @@
super displayLabel:colS h:lH on:aGC x: (aGC width - 5 - colW) y:y h:h.
].
- "Modified: / 03-04-2012 / 17:23:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 17-05-2012 / 23:05:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!ChangeList::ListEntry methodsFor:'private'!
@@ -1180,7 +1196,7 @@
!ChangeList class methodsFor:'documentation'!
version
- ^ '$Id: Tools__ChangeList.st 7964 2012-04-03 17:37:50Z vranyj1 $'
+ ^ '$Id: Tools__ChangeList.st 7999 2012-05-17 23:13:53Z vranyj1 $'
!
version_CVS
@@ -1188,5 +1204,5 @@
!
version_SVN
- ^ '$Id: Tools__ChangeList.st 7964 2012-04-03 17:37:50Z vranyj1 $'
+ ^ '$Id: Tools__ChangeList.st 7999 2012-05-17 23:13:53Z vranyj1 $'
! !
--- a/Tools__ChangeSetBrowser2.st Thu May 17 16:29:24 2012 +0100
+++ b/Tools__ChangeSetBrowser2.st Fri May 18 00:13:53 2012 +0100
@@ -34,7 +34,8 @@
languageHolder codeAspectHolder showRemovedAspect showSameAspect
sourceView changeSourceHolder imageSourceHolder targetPackage
targetNamespace allowRemoveHolder allowAcceptHolder infoPanel
- updateChangeFileHolder showFilterHolder showColumnSpecHolder'
+ updateChangeFileHolder showFilterHolder showColumnSpecHolder
+ isWorkingHolder isWorkingNotHolder hasSelectionHolder'
classVariableNames:'ShowRemoved LastSelectionConditionString'
poolDictionaries:''
category:'Interface-Browsers-ChangeSet'
@@ -80,11 +81,18 @@
!ChangeSetBrowser2 class methodsFor:'instance creation'!
-on: aChangeSet
-
- ^self on: aChangeSet label: aChangeSet name
-
- "Modified: / 26-10-2010 / 22:51:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+on: aStringOrChangeSet
+ "Opens a browser on given changeset. If the argument is
+ string, then loads the changeset from given file - for
+ compatibility with other tools"
+
+ aStringOrChangeSet isString ifTrue:[
+ self onFile: aStringOrChangeSet
+ ] ifFalse:[
+ self on: aStringOrChangeSet label: aStringOrChangeSet name
+ ]
+
+ "Modified: / 17-05-2012 / 23:36:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
on: aChangeSet label: aString
@@ -106,6 +114,16 @@
^browser
"Created: / 26-10-2010 / 22:50:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+onFile: aString
+ | browser |
+
+ browser := self new.
+ browser enqueueDelayedAction:[browser doOpenFile: aString].
+ ^browser
+
+ "Created: / 17-05-2012 / 23:36:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!ChangeSetBrowser2 class methodsFor:'accessing'!
@@ -235,7 +253,7 @@
the UIHelpTool may not be able to read the specification."
"
- UIHelpTool openOnClass:NewChangesBrowser
+ UIHelpTool openOnClass:Tools::ChangeSetBrowser2
"
<resource: #help>
@@ -323,6 +341,9 @@
#testFindNextSnapshot
'Searches forward for the next snapshot entry.'
+#testFindPreviousSnapshot
+''
+
)
! !
@@ -1197,7 +1218,7 @@
isVisible: allowAcceptHolder
)
(MenuItem
- label: 'Delete'
+ label: 'Delete (selected)'
itemValue: changeMenuDeleteSelection:
nameKey: Delete
translateLabel: true
@@ -1205,6 +1226,13 @@
shortcutKey: Delete
)
(MenuItem
+ label: 'Delete (unselected)'
+ itemValue: changeMenuDeleteSelectionInverted:
+ nameKey: Delete
+ translateLabel: true
+ isVisible: allowRemoveHolder
+ )
+ (MenuItem
label: 'Undelete'
itemValue: changeMenuUndeleteSelection:
nameKey: Undelete
@@ -1255,10 +1283,15 @@
translateLabel: true
)
(MenuItem
+ label: 'Invert Selection'
+ itemValue: changeMenuSelectInversion:
+ translateLabel: true
+ )
+ (MenuItem
label: '-'
)
(MenuItem
- label: 'Select using block'
+ label: 'Select Using Block...'
itemValue: changeMenuSelectUsingBlock:
translateLabel: true
)
@@ -1302,302 +1335,19 @@
!
changeMenu1
- "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::ChangeSetBrowser2 andSelector:#changeMenu1
- (Menu new fromLiteralArrayEncoding:(Tools::ChangeSetBrowser2 changeMenu1)) startUp
- "
-
<resource: #menu>
- ^
- #(Menu
- (
- (MenuItem
- enabled: hasChangeSelectedAndNotRemoved:
- label: 'Apply'
- itemValue: changeMenuApplySelection:
- translateLabel: true
- isVisible: allowAcceptHolder
- shortcutKey: Accept
- auxValue: 100
- )
- (MenuItem
- label: 'Apply All'
- itemValue: changeMenuApply:
- translateLabel: true
- isVisible: allowAcceptHolder
- )
- (MenuItem
- label: '-'
- isVisible: allowAcceptHolder
- )
- (MenuItem
- label: 'Delete'
- itemValue: changeMenuDeleteSelection:
- nameKey: Delete
- translateLabel: true
- isVisible: allowRemoveHolder
- shortcutKey: Delete
- )
- (MenuItem
- label: 'Undelete'
- itemValue: changeMenuUndeleteSelection:
- nameKey: Undelete
- translateLabel: true
- isVisible: allowRemoveHolder
- )
- (MenuItem
- label: '-'
- isVisible: allowRemoveHolder
- )
- (MenuItem
- label: 'Select...'
- translateLabel: true
- submenu:
- (Menu
- (
- (MenuItem
- label: 'Select Same'
- itemValue: changeMenuSelectSame:
- translateLabel: true
- )
- (MenuItem
- label: 'Select Additions (new Classes/Methods)'
- itemValue: changeMenuSelectAdditions:
- translateLabel: true
- )
- (MenuItem
- label: 'Select Removals'
- itemValue: changeMenuSelectRemovals:
- translateLabel: true
- )
- (MenuItem
- label: 'Select Differences'
- itemValue: changeMenuSelectDifferences:
- translateLabel: true
- )
- (MenuItem
- label: '-'
- )
- (MenuItem
- label: 'Select All'
- itemValue: changeMenuSelectAll:
- translateLabel: true
- )
- (MenuItem
- label: 'Select None'
- itemValue: changeMenuSelectNone:
- translateLabel: true
- )
- (MenuItem
- label: '-'
- )
- (MenuItem
- label: 'Select using Block'
- itemValue: changeMenuSelectUsingBlock:
- translateLabel: true
- )
- )
- nil
- nil
- )
- )
- (MenuItem
- label: '-'
- )
- (MenuItem
- label: 'Show Deleted'
- translateLabel: true
- isVisible: allowRemoveHolder
- indication: showRemovedAspect
- )
- (MenuItem
- label: 'Show Same'
- translateLabel: true
- indication: showSameAspect
- )
- (MenuItem
- label: '-'
- )
- (MenuItem
- label: 'Inspect Change'
- itemValue: changeMenuInspect:
- translateLabel: true
- )
- (MenuItem
- enabled: hasSingleChangeSelectedAndCanBrowse:
- label: 'Browse Method(s)'
- itemValue: changeMenuBrowse:
- translateLabel: true
- )
- (MenuItem
- enabled: hasSingleChangeSelectedAndCanBrowse:
- label: 'Browse Class(s)'
- itemValue: changeMenuBrowseClass:
- translateLabel: true
- )
- (MenuItem
- label: '-'
- )
- (MenuItem
- enabled: hasSingleChangeSelectedAndCanBrowse:
- label: 'Compare Class Against...'
- itemValue: changeMenuCompareClass:
- translateLabel: true
- )
- )
- nil
- nil
- )
+ ^self changeMenu
+
+ "Modified: / 17-05-2012 / 22:51:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
changeMenu2
- "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::ChangeSetBrowser2 andSelector:#changeMenu2
- (Menu new fromLiteralArrayEncoding:(Tools::ChangeSetBrowser2 changeMenu2)) startUp
- "
-
<resource: #menu>
- ^
- #(Menu
- (
- (MenuItem
- enabled: hasChangeSelectedAndNotRemoved:
- label: 'Apply'
- itemValue: changeMenuApplySelection:
- translateLabel: true
- isVisible: allowAcceptHolder
- shortcutKey: Accept
- auxValue: 100
- )
- (MenuItem
- label: 'Apply to End'
- itemValue: changeMenuApplyToEnd:
- translateLabel: true
- isVisible: allowAcceptHolder
- )
- (MenuItem
- label: '-'
- isVisible: allowAcceptHolder
- )
- (MenuItem
- label: 'Delete'
- itemValue: changeMenuDeleteSelection:
- nameKey: Delete
- translateLabel: true
- isVisible: allowRemoveHolder
- shortcutKey: Delete
- )
- (MenuItem
- label: 'Undelete'
- itemValue: changeMenuUndeleteSelection:
- nameKey: Undelete
- translateLabel: true
- isVisible: allowRemoveHolder
- )
- (MenuItem
- label: '-'
- isVisible: allowRemoveHolder
- )
- (MenuItem
- label: 'Select...'
- translateLabel: true
- submenu:
- (Menu
- (
- (MenuItem
- label: 'Select Same'
- itemValue: changeMenuSelectSame:
- translateLabel: true
- )
- (MenuItem
- label: 'Select Additions (new Classes/Methods)'
- itemValue: changeMenuSelectAdditions:
- translateLabel: true
- )
- (MenuItem
- label: 'Select Removals'
- itemValue: changeMenuSelectRemovals:
- translateLabel: true
- )
- (MenuItem
- label: 'Select Differences'
- itemValue: changeMenuSelectDifferences:
- translateLabel: true
- )
- (MenuItem
- label: '-'
- )
- (MenuItem
- label: 'Select All'
- itemValue: changeMenuSelectAll:
- translateLabel: true
- )
- (MenuItem
- label: 'Select None'
- itemValue: changeMenuSelectNone:
- translateLabel: true
- )
- (MenuItem
- label: '-'
- )
- (MenuItem
- label: 'Select using Block'
- itemValue: changeMenuSelectUsingBlock:
- translateLabel: true
- )
- )
- nil
- nil
- )
- )
- (MenuItem
- label: '-'
- )
- (MenuItem
- label: 'Show Deleted'
- translateLabel: true
- isVisible: allowRemoveHolder
- indication: showRemovedAspect
- )
- (MenuItem
- label: 'Show Same'
- translateLabel: true
- indication: showSameAspect
- )
- (MenuItem
- label: '-'
- )
- (MenuItem
- label: 'Inspect Change'
- itemValue: changeMenuInspect:
- translateLabel: true
- )
- (MenuItem
- enabled: hasSingleChangeSelectedAndCanBrowse:
- label: 'Browse Method(s)'
- itemValue: changeMenuBrowse:
- translateLabel: true
- )
- )
- nil
- nil
- )
+ ^self changeMenu
+
+ "Modified: / 17-05-2012 / 22:51:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
mainMenu
@@ -1625,6 +1375,7 @@
(Menu
(
(MenuItem
+ enabled: isWorkingNotHolder
label: 'Open...'
itemValue: doOpen
translateLabel: true
@@ -1632,17 +1383,20 @@
shortcutKey: Ctrlo
)
(MenuItem
+ enabled: isWorkingNotHolder
label: 'Open Current'
itemValue: doOpenCurrent
translateLabel: true
isVisible: allowOpenHolder
)
(MenuItem
+ enabled: isWorkingNotHolder
label: 'Save'
itemValue: doSave
translateLabel: true
)
(MenuItem
+ enabled: isWorkingNotHolder
label: 'Save As...'
itemValue: doSaveAs
translateLabel: true
@@ -1661,18 +1415,21 @@
)
)
(MenuItem
+ enabled: isWorkingNotHolder
label: 'Changes'
translateLabel: true
isVisible: isTwoColumnHolderNot
submenuChannel: list1MenuHolder
)
(MenuItem
+ enabled: isWorkingNotHolder
label: 'Left'
translateLabel: true
isVisible: isTwoColumnHolder
submenuChannel: list1MenuHolder
)
(MenuItem
+ enabled: isWorkingNotHolder
label: 'Right'
translateLabel: true
isVisible: isTwoColumnHolder
@@ -1770,9 +1527,10 @@
"Do not manually edit this!! If it is corrupted,
the MenuEditor may not be able to read the specification."
+
"
- MenuEditor new openOnClass:NewChangesBrowser andSelector:#toolbarMenu
- (Menu new fromLiteralArrayEncoding:(NewChangesBrowser toolbarMenu)) startUp
+ MenuEditor new openOnClass:Tools::ChangeSetBrowser2 andSelector:#toolbarMenu
+ (Menu new fromLiteralArrayEncoding:(Tools::ChangeSetBrowser2 toolbarMenu)) startUp
"
<resource: #menu>
@@ -1782,7 +1540,7 @@
(
(MenuItem
activeHelpKey: fileLoad
- enabled: valueOfNotReading
+ enabled: isWorkingNotHolder
label: 'Load'
itemValue: doLoad
translateLabel: true
@@ -1791,7 +1549,7 @@
)
(MenuItem
activeHelpKey: fileSave
- enabled: valueOfNotSaving
+ enabled: isWorkingNotHolder
label: 'Save'
itemValue: doSave
translateLabel: true
@@ -1803,7 +1561,7 @@
)
(MenuItem
activeHelpKey: applyLine
- enabled: valueOfHavingChangeSelection
+ enabled: hasSelectionHolder
label: 'Apply'
itemValue: doApply
translateLabel: true
@@ -1812,7 +1570,7 @@
)
(MenuItem
activeHelpKey: applyToEnd
- enabled: valueOfHavingSelection
+ enabled: hasSelectionHolder
label: 'Apply To End'
itemValue: doApplyToEnd
translateLabel: true
@@ -1821,7 +1579,7 @@
)
(MenuItem
activeHelpKey: applyFromLastSnapshot
- enabled: valueOfNotReading
+ enabled: hasSelectionHolder
label: 'Apply From Last Snapshot'
itemValue: doApplyFromLastSnapshot
translateLabel: true
@@ -1833,7 +1591,7 @@
)
(MenuItem
activeHelpKey: deleteLine
- enabled: valueOfHavingSelection
+ enabled: hasSelectionHolder
label: 'Delete'
itemValue: doDelete
translateLabel: true
@@ -1842,7 +1600,7 @@
)
(MenuItem
activeHelpKey: deleteToEnd
- enabled: valueOfHavingSelection
+ enabled: hasSelectionHolder
label: 'Delete To End'
itemValue: doDeleteToEnd
translateLabel: true
@@ -1851,7 +1609,7 @@
)
(MenuItem
activeHelpKey: deleteCompress
- enabled: valueOfNotReading
+ enabled: isWorkingNotHolder
label: 'Compress'
itemValue: doCompress
translateLabel: true
@@ -1863,7 +1621,7 @@
)
(MenuItem
activeHelpKey: testFindPreviousSnapshot
- enabled: valueOfHavingSelection
+ enabled: hasSelectionHolder
label: 'Find Previous Snapshot'
itemValue: doFindSnapshot:
translateLabel: true
@@ -1873,7 +1631,7 @@
)
(MenuItem
activeHelpKey: testFindNextSnapshot
- enabled: valueOfHavingSelection
+ enabled: hasSelectionHolder
label: 'Find Next Snapshot'
itemValue: doFindSnapshot:
translateLabel: true
@@ -1886,7 +1644,7 @@
nil
)
- "Modified: / 26-03-2012 / 12:56:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 17-05-2012 / 20:45:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!ChangeSetBrowser2 class methodsFor:'plugIn spec'!
@@ -2477,6 +2235,44 @@
"Created: / 11-02-2012 / 22:40:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
+!ChangeSetBrowser2 methodsFor:'aspects-queries'!
+
+hasSelectionHolder
+
+ hasSelectionHolder isNil ifTrue:[
+ hasSelectionHolder :=
+ BlockValue
+ with:[:sel1 :sel2|
+ sel1 value notEmptyOrNil or:[sel2 value notEmptyOrNil]
+ ]
+ argument: self selection1Holder
+ argument: self selection2Holder
+ ].
+ ^hasSelectionHolder
+
+ "Created: / 17-05-2012 / 20:45:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+isWorkingHolder
+
+ isWorkingHolder isNil ifTrue:[
+ isWorkingHolder := ValueHolder with: false.
+ ].
+ ^isWorkingHolder
+
+ "Created: / 17-05-2012 / 20:45:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+isWorkingNotHolder
+
+ isWorkingNotHolder isNil ifTrue:[
+ isWorkingNotHolder := BlockValue forLogicalNot: self isWorkingHolder
+ ].
+ ^isWorkingNotHolder
+
+ "Created: / 17-05-2012 / 20:45:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
!ChangeSetBrowser2 methodsFor:'change & update'!
changesetChanged
@@ -2633,6 +2429,7 @@
] ifFalse:[
self showColumnSpecHolder remove: #timestamp ifAbsent:[].
].
+ self allowRemove: true.
self doOpen: cs.
].
@@ -2671,13 +2468,24 @@
!
doSaveAs: newFile
+ | changesetToSave |
+
+ changesetToSave := ChangeSet new.
+ self list1Holder value do:[:e|
+ e removed ~~ true ifTrue:[changesetToSave add:e].
+ ].
"/ [
- self changeset saveToFile: newFile format: #classSource.
+ (newFile asFilename suffix = 'st') ifTrue:[
+ changesetToSave saveToFile: newFile format: #classSource.
+ ] ifFalse:[
+ changesetToSave saveToFile: newFile
+ ].
+ changesetFile := newFile.
"/ ] on: Error do:
"/ [:ex|Dialog warn: 'Erorr saving changes: ' , ex description]
- "Modified: / 20-03-2012 / 13:52:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 17-05-2012 / 23:56:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
doScrollToBottom
@@ -2976,7 +2784,8 @@
changeMenuDeleteSelection: changeList
changeList selection do:[:change|self changeMenuDeleteChange:change change].
- list2 notNil ifTrue:[
+ changeList updateList.
+ (list2 notNil and:[changeList ~~ list2]) ifTrue:[
"/ to get the =-icons
list2 updateList
].
@@ -2984,6 +2793,24 @@
"Created: / 04-08-2011 / 17:28:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
+changeMenuDeleteSelectionInverted: changeList
+ | sel |
+
+ sel := changeList selection ? #().
+ changeList list do:[:change|
+ (sel includes: change) ifFalse:[
+ self changeMenuDeleteChange:change change
+ ].
+ ].
+ changeList updateList.
+ (list2 notNil and:[changeList ~~ list2]) ifTrue:[
+ "/ to get the =-icons
+ list2 updateList
+ ].
+
+ "Created: / 17-05-2012 / 22:55:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
changeMenuDeleteToEnd: changeList
|lastIdx|
@@ -3036,6 +2863,21 @@
"Created: / 04-08-2011 / 17:29:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
+changeMenuSelectInversion: changeList
+
+ | oldSel newSel |
+ oldSel := changeList selection.
+ newSel := oldSel species new.
+ changeList list do:[:change|
+ (oldSel includes: change) ifFalse:[
+ newSel add: change.
+ ]
+ ].
+ changeList selection: newSel.
+
+ "Created: / 17-05-2012 / 23:03:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
changeMenuSelectNone: changeList
self changeMenuSelectIn: changeList suchThat:[:change|false]
@@ -3250,7 +3092,14 @@
showProgress: label while: block
- self infoPanel progress: label while: block
+ self infoPanel progress: label while: [
+ [
+ self isWorkingHolder value: true.
+ block value
+ ] ensure:[
+ self isWorkingHolder value: false.
+ ]
+ ]
"Created: / 10-02-2012 / 10:35:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
@@ -3626,7 +3475,7 @@
!ChangeSetBrowser2 class methodsFor:'documentation'!
version
- ^ '$Id: Tools__ChangeSetBrowser2.st 7963 2012-04-03 12:32:03Z vranyj1 $'
+ ^ '$Id: Tools__ChangeSetBrowser2.st 7999 2012-05-17 23:13:53Z vranyj1 $'
!
version_CVS
@@ -3634,5 +3483,5 @@
!
version_SVN
- ^ '$Id: Tools__ChangeSetBrowser2.st 7963 2012-04-03 12:32:03Z vranyj1 $'
+ ^ '$Id: Tools__ChangeSetBrowser2.st 7999 2012-05-17 23:13:53Z vranyj1 $'
! !
--- a/bc.mak Thu May 17 16:29:24 2012 +0100
+++ b/bc.mak Fri May 18 00:13:53 2012 +0100
@@ -185,7 +185,7 @@
$(OUTDIR)NewLauncher.$(O) NewLauncher.$(H): NewLauncher.st $(INCLUDE_TOP)\stx\libtool\AbstractLauncherApplication.$(H) $(INCLUDE_TOP)\stx\libview2\ToolApplicationModel.$(H) $(INCLUDE_TOP)\stx\libview2\ApplicationModel.$(H) $(INCLUDE_TOP)\stx\libview2\Model.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)OrderedCollectionInspectorView.$(O) OrderedCollectionInspectorView.$(H): OrderedCollectionInspectorView.st $(INCLUDE_TOP)\stx\libtool\InspectorView.$(H) $(INCLUDE_TOP)\stx\libview\SimpleView.$(H) $(INCLUDE_TOP)\stx\libview\DisplaySurface.$(H) $(INCLUDE_TOP)\stx\libview\GraphicsMedium.$(H) $(INCLUDE_TOP)\stx\libview\DeviceGraphicsContext.$(H) $(INCLUDE_TOP)\stx\libview\GraphicsContext.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)SetInspectorView.$(O) SetInspectorView.$(H): SetInspectorView.st $(INCLUDE_TOP)\stx\libtool\InspectorView.$(H) $(INCLUDE_TOP)\stx\libview\SimpleView.$(H) $(INCLUDE_TOP)\stx\libview\DisplaySurface.$(H) $(INCLUDE_TOP)\stx\libview\GraphicsMedium.$(H) $(INCLUDE_TOP)\stx\libview\DeviceGraphicsContext.$(H) $(INCLUDE_TOP)\stx\libview\GraphicsContext.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
-$(OUTDIR)SettingsDialog.$(O) SettingsDialog.$(H): SettingsDialog.st $(INCLUDE_TOP)\stx\libview2\ApplicationModel.$(H) $(INCLUDE_TOP)\stx\libview2\Model.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libtool\AbstractSettingsApplication.$(H) $(INCLUDE_TOP)\stx\libwidg2\HierarchicalList.$(H) $(INCLUDE_TOP)\stx\libbasic2\List.$(H) $(INCLUDE_TOP)\stx\libbasic\OrderedCollection.$(H) $(INCLUDE_TOP)\stx\libbasic\SequenceableCollection.$(H) $(INCLUDE_TOP)\stx\libbasic\Collection.$(H) $(INCLUDE_TOP)\stx\libwidg2\HierarchicalItemWithLabelAndIcon.$(H) $(INCLUDE_TOP)\stx\libwidg2\HierarchicalItemWithLabel.$(H) $(INCLUDE_TOP)\stx\libwidg2\HierarchicalItem.$(H) $(STCHDR)
+$(OUTDIR)SettingsDialog.$(O) SettingsDialog.$(H): SettingsDialog.st $(INCLUDE_TOP)\stx\libview2\ApplicationModel.$(H) $(INCLUDE_TOP)\stx\libview2\Model.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libwidg2\HierarchicalList.$(H) $(INCLUDE_TOP)\stx\libbasic2\List.$(H) $(INCLUDE_TOP)\stx\libbasic\OrderedCollection.$(H) $(INCLUDE_TOP)\stx\libbasic\SequenceableCollection.$(H) $(INCLUDE_TOP)\stx\libbasic\Collection.$(H) $(INCLUDE_TOP)\stx\libwidg2\HierarchicalItemWithLabelAndIcon.$(H) $(INCLUDE_TOP)\stx\libwidg2\HierarchicalItemWithLabel.$(H) $(INCLUDE_TOP)\stx\libwidg2\HierarchicalItem.$(H) $(INCLUDE_TOP)\stx\libtool\AbstractSettingsApplication.$(H) $(STCHDR)
$(OUTDIR)SmalltalkCodeGeneratorTool.$(O) SmalltalkCodeGeneratorTool.$(H): SmalltalkCodeGeneratorTool.st $(INCLUDE_TOP)\stx\libtool\CodeGeneratorTool.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)Tools__BackgroundSourceProcessingService.$(O) Tools__BackgroundSourceProcessingService.$(H): Tools__BackgroundSourceProcessingService.st $(INCLUDE_TOP)\stx\libtool\Tools__CodeViewService.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)Tools__BreakpointService.$(O) Tools__BreakpointService.$(H): Tools__BreakpointService.st $(INCLUDE_TOP)\stx\libtool\Tools__CodeViewService.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
@@ -241,7 +241,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 Thu May 17 16:29:24 2012 +0100
+++ b/libtool.rc Fri May 18 00:13:53 2012 +0100
@@ -3,7 +3,7 @@
// automagically generated from the projectDefinition: stx_libtool.
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 6,2,7976,7976
+ FILEVERSION 6,2,7993,7993
PRODUCTVERSION 6,2,1,1
#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.7976.7976\0"
+ VALUE "FileVersion", "6.2.7993.7993\0"
VALUE "InternalName", "stx:libtool\0"
VALUE "LegalCopyright", "Copyright Claus Gittinger 1988-2011\nCopyright eXept Software AG 1998-2011\0"
VALUE "ProductName", "Smalltalk/X\0"
VALUE "ProductVersion", "6.2.1.1\0"
- VALUE "ProductDate", "Fri, 11 May 2012 16:25:04 GMT\0"
+ VALUE "ProductDate", "Thu, 17 May 2012 23:16:13 GMT\0"
END
END