--- a/Tools__ChangeSetBrowser2.st Tue Jan 24 23:18:49 2012 +0100
+++ b/Tools__ChangeSetBrowser2.st Tue Jan 24 23:19:43 2012 +0100
@@ -1,6 +1,7 @@
+
"
COPYRIGHT (c) 2010 by Jan Vrany, SWING Research Group. CTU in Prague
- All Rights Reserved
+ All Rights Reserved
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
@@ -28,24 +29,24 @@
"{ NameSpace: Tools }"
ToolApplicationModel subclass:#ChangeSetBrowser2
- instanceVariableNames:'changesetHolder titleHolder allowOpenHolder changesetFile
- navigatorChangesetHolder navigatorSpecHolder list1 list1Holder
- selection1Holder list2 list2Holder selection2Holder classHolder
- languageHolder codeAspectHolder showRemovedAspect showSameAspect
- acceptEnabledHolder sourceView changeSourceHolder
- imageSourceHolder targetPackage targetNamespace
- updateChangefileHolder'
- classVariableNames:'ShowRemoved LastSelectionConditionString'
- poolDictionaries:''
- category:'Interface-Browsers-ChangeSet'
+ instanceVariableNames:'changesetHolder titleHolder allowOpenHolder changesetFile
+ navigatorChangesetHolder navigatorSpecHolder list1 list1Holder
+ selection1Holder list2 list2Holder selection2Holder classHolder
+ languageHolder codeAspectHolder showRemovedAspect showSameAspect
+ sourceView changeSourceHolder imageSourceHolder targetPackage
+ targetNamespace updateChangefileHolder allowRemoveHolder
+ allowAcceptHolder'
+ classVariableNames:'ShowRemoved LastSelectionConditionString'
+ poolDictionaries:''
+ category:'Interface-Browsers-ChangeSet'
!
ApplicationModel subclass:#ChangeEditor
- instanceVariableNames:'changeHolder readonlyHolder showdiffHolder sourceChangeHolder
- sourceImageHolder'
- classVariableNames:''
- poolDictionaries:''
- privateIn:ChangeSetBrowser2
+ instanceVariableNames:'changeHolder readonlyHolder showdiffHolder sourceChangeHolder
+ sourceImageHolder'
+ classVariableNames:''
+ poolDictionaries:''
+ privateIn:ChangeSetBrowser2
!
!ChangeSetBrowser2 class methodsFor:'documentation'!
@@ -53,7 +54,7 @@
copyright
"
COPYRIGHT (c) 2010 by Jan Vrany, SWING Research Group. CTU in Prague
- All Rights Reserved
+ All Rights Reserved
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
@@ -100,8 +101,8 @@
browser := self new.
browser
- changeset: aChangeSet;
- title: label.
+ changeset: aChangeSet;
+ title: label.
aBlock value: browser.
^browser
@@ -163,8 +164,8 @@
|browser browserView dialog|
browser := self on: aChangeSet.
- browser acceptEnabled: false.
- browser showRemovedAspect: (true asValue).
+ browser allowAccept: false.
+ browser allowRemove: true.
browserView := ApplicationSubView new
client:browser
spec:#windowSpecForEmbedding.
@@ -194,13 +195,18 @@
"
"Created: / 08-11-2010 / 17:59:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 04-08-2011 / 18:06:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
"Modified: / 07-09-2011 / 20:19:44 / cg"
+ "Modified: / 24-01-2012 / 20:00:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
openOn: aChangeSet
-
^(self on: aChangeSet) open
+
+ "
+ self openOn: ChangeSet current
+ "
+
+ "Modified (comment): / 24-01-2012 / 20:01:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
openOn: aChangeSet label: aString
@@ -235,64 +241,68 @@
^
#(FullSpec
- name: hierarchicalNavigatorSpec
- window:
+ name: hierarchicalNavigatorSpec
+ window:
(WindowSpec
- label: 'Hierarchical Navigator'
- name: 'Hierarchical Navigator'
- min: (Point 10 10)
- bounds: (Rectangle 0 0 300 300)
- )
- component:
+ label: 'Hierarchical Navigator'
+ name: 'Hierarchical Navigator'
+ min: (Point 10 10)
+ bounds: (Rectangle 0 0 300 300)
+ )
+ component:
(SpecCollection
- collection: (
- (SubCanvasSpec
- name: 'ChangeList'
- layout: (LayoutFrame 0 0 0 0 0 1 0 1)
- hasHorizontalScrollBar: false
- hasVerticalScrollBar: false
- majorKey: #'Tools::HierarchicalChangeList'
- subAspectHolders:
- (Array
-
- (SubChannelInfoSpec
- subAspect: acceptEnabledHolder
- aspect: acceptEnabledHolder
- )
- (SubChannelInfoSpec
- subAspect: inGeneratorHolder
- aspect: list1Holder
- )
-
- (SubChannelInfoSpec
- subAspect: menuHolder
- aspect: list1MenuHolder
- )
- (SubChannelInfoSpec
- subAspect: selectionHolder
- aspect: selection1Holder
- )
-
- (SubChannelInfoSpec
- subAspect: showRemovedHolder
- aspect: showRemovedAspect
- )
- (SubChannelInfoSpec
- subAspect: showSameHolder
- aspect: showSameAspect
- )
-
- )
- createNewApplication: true
- createNewBuilder: true
- postBuildCallback: list1View:
- )
- )
-
- )
+ collection: (
+ (SubCanvasSpec
+ name: 'ChangeList'
+ layout: (LayoutFrame 0 0 0 0 0 1 0 1)
+ hasHorizontalScrollBar: false
+ hasVerticalScrollBar: false
+ majorKey: #'Tools::HierarchicalChangeList'
+ subAspectHolders:
+ (Array
+
+ (SubChannelInfoSpec
+ subAspect: allowAcceptHolder
+ aspect: allowAcceptHolder
+ )
+ (SubChannelInfoSpec
+ subAspect: allowRemoveHolder
+ aspect: allowRemoveHolder
+ )
+ (SubChannelInfoSpec
+ subAspect: inGeneratorHolder
+ aspect: list1Holder
+ )
+
+ (SubChannelInfoSpec
+ subAspect: menuHolder
+ aspect: list1MenuHolder
+ )
+ (SubChannelInfoSpec
+ subAspect: selectionHolder
+ aspect: selection1Holder
+ )
+
+ (SubChannelInfoSpec
+ subAspect: showRemovedHolder
+ aspect: showRemovedAspect
+ )
+ (SubChannelInfoSpec
+ subAspect: showSameHolder
+ aspect: showSameAspect
+ )
+
+ )
+ createNewApplication: true
+ createNewBuilder: true
+ postBuildCallback: list1View:
+ )
+ )
+
+ )
)
- "Modified: / 04-08-2011 / 18:43:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 24-01-2012 / 19:57:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
oneColumnNavigatorSpec
@@ -309,66 +319,68 @@
<resource: #canvas>
- ^
+ ^
#(FullSpec
- name: oneColumnNavigatorSpec
- window:
+ name: oneColumnNavigatorSpec
+ window:
(WindowSpec
- label: 'One Column Navigator'
- name: 'One Column Navigator'
- min: (Point 10 10)
- bounds: (Rectangle 0 0 300 300)
- )
- component:
+ label: 'One Column Navigator'
+ name: 'One Column Navigator'
+ min: (Point 10 10)
+ bounds: (Rectangle 0 0 300 300)
+ )
+ component:
(SpecCollection
- collection: (
- (SubCanvasSpec
- name: 'ChangeList'
- layout: (LayoutFrame 0 0 0 0 0 1 0 1)
- hasHorizontalScrollBar: false
- hasVerticalScrollBar: false
- majorKey: #'Tools::ChangeList'
- subAspectHolders:
- (Array
-
- (SubChannelInfoSpec
- subAspect: acceptEnabledHolder
- aspect: acceptEnabledHolder
- )
- (SubChannelInfoSpec
- subAspect: inGeneratorHolder
- aspect: list1Holder
- )
-
- (SubChannelInfoSpec
- subAspect: menuHolder
- aspect: list1MenuHolder
- )
- (SubChannelInfoSpec
- subAspect: selectionHolder
- aspect: selection1Holder
- )
-
- (SubChannelInfoSpec
- subAspect: showRemovedHolder
- aspect: showRemovedAspect
- )
- (SubChannelInfoSpec
- subAspect: showSameHolder
- aspect: showSameAspect
- )
-
- )
- createNewApplication: true
- createNewBuilder: true
- postBuildCallback: list1View:
- )
- )
-
- )
+ collection: (
+ (SubCanvasSpec
+ name: 'ChangeList'
+ layout: (LayoutFrame 0 0 0 0 0 1 0 1)
+ hasHorizontalScrollBar: false
+ hasVerticalScrollBar: false
+ majorKey: #'Tools::ChangeList'
+ subAspectHolders:
+ (Array
+
+ (SubChannelInfoSpec
+ subAspect: allowAcceptHolder
+ aspect: allowAcceptHolder
+ )
+ (SubChannelInfoSpec
+ subAspect: allowRemoveHolder
+ aspect: allowRemoveHolder
+ )
+
+ (SubChannelInfoSpec
+ subAspect: inGeneratorHolder
+ aspect: list1Holder
+ )
+ (SubChannelInfoSpec
+ subAspect: menuHolder
+ aspect: list1MenuHolder
+ )
+
+ (SubChannelInfoSpec
+ subAspect: selectionHolder
+ aspect: selection1Holder
+ )
+ (SubChannelInfoSpec
+ subAspect: showRemovedHolder
+ aspect: showRemovedAspect
+ )
+
+ (SubChannelInfoSpec
+ subAspect: showSameHolder
+ aspect: showSameAspect
+ )
+ )
+ createNewApplication: true
+ createNewBuilder: true
+ postBuildCallback: list1View:
+ )
+ )
+
+ )
)
-
- "Modified: / 04-08-2011 / 18:43:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
twoColumnNavigatorSpec
@@ -387,116 +399,124 @@
^
#(FullSpec
- name: twoColumnNavigatorSpec
- window:
+ name: twoColumnNavigatorSpec
+ window:
(WindowSpec
- label: 'Two Column Navigator'
- name: 'Two Column Navigator'
- min: (Point 10 10)
- bounds: (Rectangle 0 0 300 300)
- )
- component:
+ label: 'Two Column Navigator'
+ name: 'Two Column Navigator'
+ min: (Point 10 10)
+ bounds: (Rectangle 0 0 300 300)
+ )
+ component:
(SpecCollection
- collection: (
- (VariableHorizontalPanelSpec
- name: 'Columns'
- layout: (LayoutFrame 0 0 0 0 0 1 0 1)
- component:
- (SpecCollection
- collection: (
- (SubCanvasSpec
- name: 'FirstColumn'
- hasHorizontalScrollBar: false
- hasVerticalScrollBar: false
- majorKey: #'Tools::ChangeList'
- subAspectHolders:
- (Array
-
- (SubChannelInfoSpec
- subAspect: acceptEnabledHolder
- aspect: acceptEnabledHolder
- )
- (SubChannelInfoSpec
- subAspect: inGeneratorHolder
- aspect: list1Holder
- )
-
- (SubChannelInfoSpec
- subAspect: menuHolder
- aspect: list1MenuHolder
- )
- (SubChannelInfoSpec
- subAspect: outGeneratorHolder
- aspect: list2Holder
- )
-
- (SubChannelInfoSpec
- subAspect: selectionHolder
- aspect: selection1Holder
- )
- (SubChannelInfoSpec
- subAspect: showRemovedHolder
- aspect: showRemovedAspect
- )
- (SubChannelInfoSpec
- subAspect: showSameHolder
- aspect: showSameAspect
- )
- )
- createNewApplication: true
- createNewBuilder: true
- postBuildCallback: list1View:
- )
- (SubCanvasSpec
- name: 'SecondColumn'
- hasHorizontalScrollBar: false
- hasVerticalScrollBar: false
- majorKey: #'Tools::ChangeList'
- subAspectHolders:
- (Array
-
- (SubChannelInfoSpec
- subAspect: acceptEnabledHolder
- aspect: acceptEnabledHolder
- )
- (SubChannelInfoSpec
- subAspect: inGeneratorHolder
- aspect: list2Holder
- )
-
- (SubChannelInfoSpec
- subAspect: menuHolder
- aspect: list2MenuHolder
- )
- (SubChannelInfoSpec
- subAspect: selectionHolder
- aspect: selection2Holder
- )
-
- (SubChannelInfoSpec
- subAspect: showRemovedHolder
- aspect: showRemovedAspect
- )
- (SubChannelInfoSpec
- subAspect: showSameHolder
- aspect: showSameAspect
- )
- )
- createNewApplication: true
- createNewBuilder: true
- postBuildCallback: list2View:
- )
- )
-
- )
- handles: (Any 0.5 1.0)
- )
- )
-
- )
+ collection: (
+ (VariableHorizontalPanelSpec
+ name: 'Columns'
+ layout: (LayoutFrame 0 0 0 0 0 1 0 1)
+ component:
+ (SpecCollection
+ collection: (
+ (SubCanvasSpec
+ name: 'FirstColumn'
+ hasHorizontalScrollBar: false
+ hasVerticalScrollBar: false
+ majorKey: #'Tools::ChangeList'
+ subAspectHolders:
+ (Array
+
+ (SubChannelInfoSpec
+ subAspect: allowAcceptHolder
+ aspect: allowAcceptHolder
+ )
+ (SubChannelInfoSpec
+ subAspect: allowRemoveHolder
+ aspect: allowRemoveHolder
+ )
+ (SubChannelInfoSpec
+ subAspect: inGeneratorHolder
+ aspect: list1Holder
+ )
+
+ (SubChannelInfoSpec
+ subAspect: menuHolder
+ aspect: list1MenuHolder
+ )
+ (SubChannelInfoSpec
+ subAspect: outGeneratorHolder
+ aspect: list2Holder
+ )
+
+ (SubChannelInfoSpec
+ subAspect: selectionHolder
+ aspect: selection1Holder
+ )
+ (SubChannelInfoSpec
+ subAspect: showRemovedHolder
+ aspect: showRemovedAspect
+ )
+ (SubChannelInfoSpec
+ subAspect: showSameHolder
+ aspect: showSameAspect
+ )
+ )
+ createNewApplication: true
+ createNewBuilder: true
+ postBuildCallback: list1View:
+ )
+ (SubCanvasSpec
+ name: 'SecondColumn'
+ hasHorizontalScrollBar: false
+ hasVerticalScrollBar: false
+ majorKey: #'Tools::ChangeList'
+ subAspectHolders:
+ (Array
+
+ (SubChannelInfoSpec
+ subAspect: allowAcceptHolder
+ aspect: allowAcceptHolder
+ )
+ (SubChannelInfoSpec
+ subAspect: allowRemoveHolder
+ aspect: allowRemoveHolder
+ )
+ (SubChannelInfoSpec
+ subAspect: inGeneratorHolder
+ aspect: list2Holder
+ )
+
+ (SubChannelInfoSpec
+ subAspect: menuHolder
+ aspect: list2MenuHolder
+ )
+ (SubChannelInfoSpec
+ subAspect: selectionHolder
+ aspect: selection2Holder
+ )
+
+ (SubChannelInfoSpec
+ subAspect: showRemovedHolder
+ aspect: showRemovedAspect
+ )
+ (SubChannelInfoSpec
+ subAspect: showSameHolder
+ aspect: showSameAspect
+ )
+ )
+ createNewApplication: true
+ createNewBuilder: true
+ postBuildCallback: list2View:
+ )
+ )
+
+ )
+ handles: (Any 0.5 1.0)
+ )
+ )
+
+ )
)
- "Modified: / 04-08-2011 / 18:43:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 24-01-2012 / 19:57:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
windowSpec
@@ -516,33 +536,33 @@
^
#(FullSpec
- name: windowSpec
- window:
+ name: windowSpec
+ window:
(WindowSpec
- label: 'ChangeSet browser'
- name: 'ChangeSet browser'
- labelChannel: titleHolder
- min: (Point 10 10)
- bounds: (Rectangle 0 0 653 488)
- menu: mainMenu
- )
- component:
+ label: 'ChangeSet browser'
+ name: 'ChangeSet browser'
+ labelChannel: titleHolder
+ min: (Point 10 10)
+ bounds: (Rectangle 0 0 653 488)
+ menu: mainMenu
+ )
+ component:
(SpecCollection
- collection: (
- (MenuPanelSpec
- name: 'ToolBar'
- layout: (LayoutFrame 0 0 0 0 0 1 30 0)
- menu: toolbarMenu
- textDefault: true
- )
- (UISubSpecification
- name: 'Contents'
- layout: (LayoutFrame 0 0 30 0 0 1 0 1)
- minorKey: windowSpecWithoutToolbar
- )
- )
-
- )
+ collection: (
+ (MenuPanelSpec
+ name: 'ToolBar'
+ layout: (LayoutFrame 0 0 0 0 0 1 30 0)
+ menu: toolbarMenu
+ textDefault: true
+ )
+ (UISubSpecification
+ name: 'Contents'
+ layout: (LayoutFrame 0 0 30 0 0 1 0 1)
+ minorKey: windowSpecWithoutToolbar
+ )
+ )
+
+ )
)
!
@@ -673,7 +693,7 @@
label: 'Apply'
itemValue: changeMenuApplySelection:
translateLabel: true
- isVisible: acceptEnabledHolder
+ isVisible: allowAcceptHolder
shortcutKey: Accept
auxValue: 100
)
@@ -681,16 +701,18 @@
label: 'Apply all'
itemValue: changeMenuApply:
translateLabel: true
- isVisible: acceptEnabledHolder
+ isVisible: allowAcceptHolder
)
(MenuItem
label: '-'
+ isVisible: allowAcceptHolder
)
(MenuItem
label: 'Delete'
itemValue: changeMenuDeleteSelection:
nameKey: Delete
translateLabel: true
+ isVisible: allowRemoveHolder
shortcutKey: Delete
)
(MenuItem
@@ -698,9 +720,11 @@
itemValue: changeMenuUndeleteSelection:
nameKey: Undelete
translateLabel: true
+ isVisible: allowRemoveHolder
)
(MenuItem
label: '-'
+ isVisible: allowRemoveHolder
)
(MenuItem
label: 'Select...'
@@ -760,6 +784,7 @@
(MenuItem
label: 'Show Deleted'
translateLabel: true
+ isVisible: allowRemoveHolder
indication: showRemovedAspect
)
(MenuItem
@@ -810,7 +835,7 @@
label: 'Apply'
itemValue: changeMenuApplySelection:
translateLabel: true
- isVisible: acceptEnabledHolder
+ isVisible: allowAcceptHolder
shortcutKey: Accept
auxValue: 100
)
@@ -818,16 +843,18 @@
label: 'Apply All'
itemValue: changeMenuApply:
translateLabel: true
- isVisible: acceptEnabledHolder
+ isVisible: allowAcceptHolder
)
(MenuItem
label: '-'
+ isVisible: allowAcceptHolder
)
(MenuItem
label: 'Delete'
itemValue: changeMenuDeleteSelection:
nameKey: Delete
translateLabel: true
+ isVisible: allowRemoveHolder
shortcutKey: Delete
)
(MenuItem
@@ -835,9 +862,11 @@
itemValue: changeMenuUndeleteSelection:
nameKey: Undelete
translateLabel: true
+ isVisible: allowRemoveHolder
)
(MenuItem
label: '-'
+ isVisible: allowRemoveHolder
)
(MenuItem
label: 'Select...'
@@ -897,6 +926,7 @@
(MenuItem
label: 'Show Deleted'
translateLabel: true
+ isVisible: allowRemoveHolder
indication: showRemovedAspect
)
(MenuItem
@@ -937,8 +967,6 @@
nil
nil
)
-
- "Modified: / 27-12-2011 / 10:51:12 / cg"
!
changeMenu2
@@ -964,7 +992,7 @@
label: 'Apply'
itemValue: changeMenuApplySelection:
translateLabel: true
- isVisible: acceptEnabledHolder
+ isVisible: allowAcceptHolder
shortcutKey: Accept
auxValue: 100
)
@@ -972,16 +1000,18 @@
label: 'Apply to End'
itemValue: changeMenuApplyToEnd:
translateLabel: true
- isVisible: acceptEnabledHolder
+ isVisible: allowAcceptHolder
)
(MenuItem
label: '-'
+ isVisible: allowAcceptHolder
)
(MenuItem
label: 'Delete'
itemValue: changeMenuDeleteSelection:
nameKey: Delete
translateLabel: true
+ isVisible: allowRemoveHolder
shortcutKey: Delete
)
(MenuItem
@@ -989,9 +1019,11 @@
itemValue: changeMenuUndeleteSelection:
nameKey: Undelete
translateLabel: true
+ isVisible: allowRemoveHolder
)
(MenuItem
label: '-'
+ isVisible: allowRemoveHolder
)
(MenuItem
label: 'Select...'
@@ -1051,6 +1083,7 @@
(MenuItem
label: 'Show Deleted'
translateLabel: true
+ isVisible: allowRemoveHolder
indication: showRemovedAspect
)
(MenuItem
@@ -1076,8 +1109,6 @@
nil
nil
)
-
- "Modified: / 27-12-2011 / 10:51:49 / cg"
!
mainMenu
@@ -1274,16 +1305,18 @@
(if this app is embedded in a subCanvas)."
^ #(
- #changesetHolder
+ #changesetHolder
).
! !
!ChangeSetBrowser2 methodsFor:'accessing'!
-acceptEnabled: aBoolean
-
- ^self acceptEnabledHolder value: aBoolean
+allowAccept: aBoolean
+
+ ^self allowAcceptHolder value: aBoolean
+
+ "Created: / 24-01-2012 / 19:50:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
allowOpen: aBoolean
@@ -1293,6 +1326,13 @@
"Created: / 26-10-2010 / 23:18:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
+allowRemove: aBoolean
+
+ ^self allowRemoveHolder value: aBoolean
+
+ "Created: / 24-01-2012 / 20:00:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
beHierarchical
^self navigatorSpecHolder value: #hierarchicalNavigatorSpec
@@ -1357,12 +1397,12 @@
change := nil.
sel := selection2Holder value.
sel isNil ifTrue:[
- sel := selection1Holder value.
+ sel := selection1Holder value.
].
sel do:
- [:each|
- change ifNotNil:[nil].
- change ifNil:[change := each]].
+ [:each|
+ change ifNotNil:[nil].
+ change ifNil:[change := each]].
^change
"Modified: / 04-08-2011 / 18:55:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
@@ -1434,32 +1474,69 @@
!ChangeSetBrowser2 methodsFor:'aspects'!
-acceptEnabledHolder
+allowAcceptHolder
"return/create the 'selectionHolder' value holder (automatically generated)"
- acceptEnabledHolder isNil ifTrue:[
- acceptEnabledHolder := ValueHolder with: true.
+ allowAcceptHolder isNil ifTrue:[
+ allowAcceptHolder := ValueHolder with: true.
].
- ^ acceptEnabledHolder
+ ^ allowAcceptHolder
"Modified: / 24-10-2009 / 19:56:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Created: / 24-01-2012 / 19:50:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
allowOpenHolder
"return/create the 'allowOpenHolder' value holder (automatically generated)"
allowOpenHolder isNil ifTrue:[
- allowOpenHolder := ValueHolder with: true.
+ allowOpenHolder := ValueHolder with: true.
].
^ allowOpenHolder
"Modified: / 17-03-2011 / 22:32:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
+allowRemoveHolder
+ "return/create the 'allowRemoveHolder' value holder (automatically generated)"
+
+ allowRemoveHolder isNil ifTrue:[
+ allowRemoveHolder := ValueHolder with:false.
+ allowRemoveHolder addDependent:self.
+ ].
+ ^ allowRemoveHolder
+
+ "Modified: / 24-01-2012 / 19:59:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+allowRemoveHolder:something
+ "set the 'showRemovedHolder' value holder (automatically generated)"
+
+ |oldValue newValue|
+
+ allowRemoveHolder notNil ifTrue:[
+ oldValue := allowRemoveHolder value.
+ allowRemoveHolder removeDependent:self.
+ ].
+ allowRemoveHolder := something.
+ allowRemoveHolder notNil ifTrue:[
+ allowRemoveHolder addDependent:self.
+ ].
+ newValue := allowRemoveHolder value.
+ oldValue ~~ newValue ifTrue:[
+ self
+ update:#value
+ with:newValue
+ from:allowRemoveHolder.
+ ].
+
+ "Modified (format): / 24-01-2012 / 19:48:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
changeSourceHolder
<resource: #uiAspect>
changeSourceHolder isNil ifTrue: [
- changeSourceHolder := nil asValue.
+ changeSourceHolder := nil asValue.
].
^ changeSourceHolder.
@@ -1470,8 +1547,8 @@
"return/create the 'changesetHolder' value holder (automatically generated)"
changesetHolder isNil ifTrue:[
- changesetHolder := ValueHolder new.
- changesetHolder addDependent:self.
+ changesetHolder := ValueHolder new.
+ changesetHolder addDependent:self.
].
^ changesetHolder
!
@@ -1482,16 +1559,16 @@
|oldValue newValue|
changesetHolder notNil ifTrue:[
- oldValue := changesetHolder value.
- changesetHolder removeDependent:self.
+ oldValue := changesetHolder value.
+ changesetHolder removeDependent:self.
].
changesetHolder := something.
changesetHolder notNil ifTrue:[
- changesetHolder addDependent:self.
+ changesetHolder addDependent:self.
].
newValue := changesetHolder value.
oldValue ~~ newValue ifTrue:[
- self update:#value with:newValue from:changesetHolder.
+ self update:#value with:newValue from:changesetHolder.
].
!
@@ -1499,7 +1576,7 @@
"return/create the 'classHolder' value holder (automatically generated)"
classHolder isNil ifTrue:[
- classHolder := ValueHolder with:nil.
+ classHolder := ValueHolder with:nil.
].
^ classHolder
@@ -1510,7 +1587,7 @@
"return/create the 'codeAspectHolder' value holder (automatically generated)"
codeAspectHolder isNil ifTrue:[
- codeAspectHolder := ValueHolder new.
+ codeAspectHolder := ValueHolder new.
].
^ codeAspectHolder
!
@@ -1518,7 +1595,7 @@
imageSourceHolder
<resource: #uiAspect>
imageSourceHolder isNil ifTrue: [
- imageSourceHolder := nil asValue.
+ imageSourceHolder := nil asValue.
].
^ imageSourceHolder.
@@ -1553,7 +1630,7 @@
"return/create the 'list1Holder' value holder (automatically generated)"
list1Holder isNil ifTrue:[
- list1Holder := ValueHolder new.
+ list1Holder := ValueHolder new.
].
^ list1Holder
!
@@ -1568,7 +1645,7 @@
"return/create the 'list2Holder' value holder (automatically generated)"
list2Holder isNil ifTrue:[
- list2Holder := ValueHolder new.
+ list2Holder := ValueHolder new.
].
^ list2Holder
!
@@ -1583,7 +1660,7 @@
"return/create the 'navigatorChangesetHolder' value holder (automatically generated)"
navigatorChangesetHolder isNil ifTrue:[
- navigatorChangesetHolder := ValueHolder new.
+ navigatorChangesetHolder := ValueHolder new.
].
^ navigatorChangesetHolder
!
@@ -1600,6 +1677,7 @@
].
^ navigatorSpecHolder.
+
"Modified: / 24-01-2012 / 17:13:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
@@ -1607,8 +1685,8 @@
"return/create the 'selection1Holder' value holder (automatically generated)"
selection1Holder isNil ifTrue:[
- selection1Holder := ValueHolder new.
- selection1Holder addDependent:self.
+ selection1Holder := ValueHolder new.
+ selection1Holder addDependent:self.
].
^ selection1Holder
!
@@ -1619,16 +1697,16 @@
|oldValue newValue|
selection1Holder notNil ifTrue:[
- oldValue := selection1Holder value.
- selection1Holder removeDependent:self.
+ oldValue := selection1Holder value.
+ selection1Holder removeDependent:self.
].
selection1Holder := something.
selection1Holder notNil ifTrue:[
- selection1Holder addDependent:self.
+ selection1Holder addDependent:self.
].
newValue := selection1Holder value.
oldValue ~~ newValue ifTrue:[
- self update:#value with:newValue from:selection1Holder.
+ self update:#value with:newValue from:selection1Holder.
].
!
@@ -1636,8 +1714,8 @@
"return/create the 'selection2Holder' value holder (automatically generated)"
selection2Holder isNil ifTrue:[
- selection2Holder := ValueHolder new.
- selection2Holder addDependent:self.
+ selection2Holder := ValueHolder new.
+ selection2Holder addDependent:self.
].
^ selection2Holder
!
@@ -1648,16 +1726,16 @@
|oldValue newValue|
selection2Holder notNil ifTrue:[
- oldValue := selection2Holder value.
- selection2Holder removeDependent:self.
+ oldValue := selection2Holder value.
+ selection2Holder removeDependent:self.
].
selection2Holder := something.
selection2Holder notNil ifTrue:[
- selection2Holder addDependent:self.
+ selection2Holder addDependent:self.
].
newValue := selection2Holder value.
oldValue ~~ newValue ifTrue:[
- self update:#value with:newValue from:selection2Holder.
+ self update:#value with:newValue from:selection2Holder.
].
!
@@ -1665,8 +1743,8 @@
"return/create the 'showDeletedAspect' value holder (automatically generated)"
showRemovedAspect isNil ifTrue:[
- showRemovedAspect := (AspectAdaptor forAspect:#showRemoved)
- subject: self class.
+ showRemovedAspect := (AspectAdaptor forAspect:#showRemoved)
+ subject: self class.
].
^ showRemovedAspect
!
@@ -1679,7 +1757,7 @@
"return/create the 'showSameAspect' value holder (automatically generated)"
showSameAspect isNil ifTrue:[
- showSameAspect := ValueHolder with: true.
+ showSameAspect := ValueHolder with: true.
].
^ showSameAspect
@@ -1696,7 +1774,7 @@
"return/create the 'titleHolder' value holder (automatically generated)"
titleHolder isNil
- ifTrue:[ titleHolder := ValueHolder with:self defaultTitle. ].
+ ifTrue:[ titleHolder := ValueHolder with:self defaultTitle. ].
^ titleHolder
"Modified: / 26-10-2010 / 22:54:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
@@ -1800,8 +1878,8 @@
doSave
changesetFile
- ifNil:[self doSaveAs]
- ifNotNil:[self doSaveAs: changesetFile]
+ ifNil:[self doSaveAs]
+ ifNotNil:[self doSaveAs: changesetFile]
"Modified: / 24-10-2009 / 22:55:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
@@ -1819,12 +1897,12 @@
doSaveAs: newFile
[
- | s |
- s := newFile asFilename writeStream.
- [self changeset fileOutOn: s] ensure:[s close].
- changesetFile := newFile.
+ | s |
+ s := newFile asFilename writeStream.
+ [self changeset fileOutOn: s] ensure:[s close].
+ changesetFile := newFile.
] on: Error do:
- [:ex|Dialog warn: 'Erorr saving changes: ' , ex description]
+ [:ex|Dialog warn: 'Erorr saving changes: ' , ex description]
!
setTargetNamespace
@@ -2099,8 +2177,8 @@
changes := OrderedCollection new: 1.
self selectionDo:[:chg|changes add: chg].
changes size = 1
- ifTrue:[changes anyOne inspect]
- ifFalse:[changes inspect].
+ ifTrue:[changes anyOne inspect]
+ ifFalse:[changes inspect].
"Created: / 04-08-2011 / 17:28:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
@@ -2171,17 +2249,17 @@
'.
LastSelectionConditionString isNil ifTrue:[
- LastSelectionConditionString := template.
+ LastSelectionConditionString := template.
].
textHolder := ValueHolder new.
dialog := Dialog
- forRequestText:(resources string:'Enter condition for selection')
- lines:20
- columns:70
- initialAnswer:LastSelectionConditionString
- model:textHolder.
+ forRequestText:(resources string:'Enter condition for selection')
+ lines:20
+ columns:70
+ initialAnswer:LastSelectionConditionString
+ model:textHolder.
dialog addButton:(Button label:'Template' action:[textHolder value:template. textHolder changed:#value.]).
dialog open.
dialog accepted ifFalse:[^ self].
@@ -2191,8 +2269,8 @@
conditionBlock := Parser evaluate:conditionBlockString.
conditionBlock isBlock ifFalse:[
- self error:'Bad selection block (syntax error?)'.
- ^ self
+ self error:'Bad selection block (syntax error?)'.
+ ^ self
].
self changeMenuSelectIn: changeList suchThat: conditionBlock
@@ -2247,15 +2325,15 @@
changesThatFailToApply := ChangeSet new.
ProgressIndicator
- displayProgress:'Applying changes...'
- at:(Screen default center)
- from:200 to:400
- during:[:val |
- 1 to: changesToApply size do:
- [:i|
- val value:((100 / changesToApply size) * i) rounded.
- [self changeMenuApplyChange: (changesToApply at: i)]
- on: Error do:[changesThatFailToApply add: (changesToApply at: i)]]]
+ displayProgress:'Applying changes...'
+ at:(Screen default center)
+ from:200 to:400
+ during:[:val |
+ 1 to: changesToApply size do:
+ [:i|
+ val value:((100 / changesToApply size) * i) rounded.
+ [self changeMenuApplyChange: (changesToApply at: i)]
+ on: Error do:[changesThatFailToApply add: (changesToApply at: i)]]]
"Created: / 04-08-2011 / 17:26:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
@@ -2283,10 +2361,10 @@
| changeset |
changeset := changesetHolder value deepCopy.
(changeset isKindOf: ChangeSet) ifFalse:
- [changeset := ChangeSet withAll: changeset].
+ [changeset := ChangeSet withAll: changeset].
(self navigatorSpecHolder value ~= #oneColumnNavigatorSpec)
- ifTrue:[^changeset groupByClass].
+ ifTrue:[^changeset groupByClass].
"Default"
^changeset
@@ -2298,10 +2376,10 @@
redrawChangeListViews
list1 notNil ifTrue:[
- list1 builder window allSubViewsDo: [:v|v redraw]
+ list1 builder window allSubViewsDo: [:v|v redraw]
].
list2 notNil ifTrue:[
- list2 builder window allSubViewsDo: [:v|v redraw]
+ list2 builder window allSubViewsDo: [:v|v redraw]
].
"Created: / 16-03-2011 / 22:41:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
@@ -2338,12 +2416,12 @@
sourceView ifNil:[^self].
panel := builder componentAt: #VerticalPanel.
aBoolean ifTrue:[
- (panel subViews includes: sourceView) ifTrue:[^self].
- panel addSubView: sourceView.
+ (panel subViews includes: sourceView) ifTrue:[^self].
+ panel addSubView: sourceView.
] ifFalse:[
- (panel subViews includes: sourceView) ifFalse:[^self].
- panel removeSubView: sourceView.
- sourceView setId: nil.
+ (panel subViews includes: sourceView) ifFalse:[^self].
+ panel removeSubView: sourceView.
+ sourceView setId: nil.
]
@@ -2669,11 +2747,11 @@
!ChangeSetBrowser2 class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/Tools__ChangeSetBrowser2.st,v 1.29 2012-01-24 17:41:02 vrany Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Tools__ChangeSetBrowser2.st,v 1.30 2012-01-24 22:19:43 vrany Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libtool/Tools__ChangeSetBrowser2.st,v 1.29 2012-01-24 17:41:02 vrany Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Tools__ChangeSetBrowser2.st,v 1.30 2012-01-24 22:19:43 vrany Exp $'
!
version_SVN