--- a/Tools__NavigatorModel.st Sun Jan 12 23:30:25 2014 +0000
+++ b/Tools__NavigatorModel.st Wed Apr 01 10:38:01 2015 +0100
@@ -14,7 +14,7 @@
"{ NameSpace: Tools }"
ApplicationModel subclass:#NavigatorModel
- instanceVariableNames:'environment'
+ instanceVariableNames:'environmentHolder environment'
classVariableNames:'AllEntry SuperSendEntry UncommentedEntry'
poolDictionaries:''
category:'Interface-Browsers-New'
@@ -137,6 +137,10 @@
^ '* all (%1) *'
!
+nameListEntryForAllTests
+ ^ '* all tests (%1) *'
+!
+
nameListEntryForAnnotated
^ '* annotated (%1) *'
@@ -183,6 +187,10 @@
"Created: / 20-07-2011 / 18:20:53 / cg"
!
+nameListEntryForInheritedTests
+ ^ '* inherited tests (%1) *'
+!
+
nameListEntryForLong
^ '* long (%1) *'
!
@@ -200,7 +208,7 @@
!
nameListEntryForNotInstrumented
- ^ '* coverage unknown/not instrumented (%1) *'
+ ^ '* coverage unknown or not instrumented (%1) *'
"Created: / 20-07-2011 / 18:41:53 / cg"
!
@@ -346,6 +354,17 @@
^ NewSystemBrowser classResources
! !
+!NavigatorModel class methodsFor:'plugIn spec'!
+
+aspectSelectors
+
+ ^#(
+ environmentHolder
+ )
+
+ "Created: / 24-02-2014 / 10:35:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
!NavigatorModel class methodsFor:'queries'!
hasSubversionSupport
@@ -371,33 +390,90 @@
!
environment:env
- environment := env.
+ self environmentHolder value: env.
+
+ "Modified: / 24-02-2014 / 10:21:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
-!NavigatorModel methodsFor:'hooks'!
+!NavigatorModel methodsFor:'aspects'!
+
+environmentHolder
+ "return/create the 'environmentHolder' value holder (automatically generated)"
+
+ environmentHolder isNil ifTrue:[
+ environmentHolder := ValueHolder with: environment.
+"/ environmentHolder := ValueHolder with: nil.
+
+ environmentHolder addDependent:self.
+ ].
+ ^ environmentHolder
-commonPreBuild
- | topApp |
+ "Modified: / 28-02-2014 / 19:27:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+environmentHolder:aValueModel
+ "set the 'environmentHolder' value holder (automatically generated)"
+
+ | oldValue newValue |
+
+ environmentHolder notNil ifTrue:[
+ oldValue := environmentHolder value.
+ environmentHolder removeDependent:self.
+ ] ifFalse:[
+ oldValue := environment.
+ ].
- super commonPreBuild.
- topApp := self topApplication.
- (topApp notNil and:[topApp ~~ self]) ifTrue:[
- "Fetch the environment from the top application, fallback to previous environment"
- self environment: (topApp perform:#environment ifNotUnderstood:[environment])
- ]
+ environmentHolder := aValueModel.
+ environmentHolder notNil ifTrue:[
+ environmentHolder addDependent:self.
+ ].
+ newValue := environmentHolder value.
+ oldValue ~~ newValue ifTrue:[
+ self
+ update:#value
+ with:newValue
+ from:environmentHolder.
+ ].
+
+ "Modified: / 28-02-2014 / 19:30:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!NavigatorModel methodsFor:'change & update'!
- "Created: / 03-09-2013 / 16:25:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified (format): / 03-09-2013 / 18:31:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+environmentChanged
+ "My environment has changed. Update cached environment value.
+ Subclasses may need to override and invalidate it's contents."
+
+ | env |
+
+ env := environmentHolder value.
+ environment := env.
+
+ "Created: / 24-02-2014 / 10:18:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 24-02-2014 / 23:34:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+update:something with:aParameter from:changedObject
+ "Invoked when an object that I depend upon sends a change notification."
+
+ changedObject == environmentHolder ifTrue:[
+ self environmentChanged.
+ ^ self.
+ ].
+ super update:something with:aParameter from:changedObject
+
+ "Modified: / 24-02-2014 / 10:18:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!NavigatorModel methodsFor:'initialization'!
initialize
+ environment := environment ? Smalltalk.
super initialize.
- environment := Smalltalk.
"Created: / 03-09-2013 / 15:35:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 24-02-2014 / 23:27:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!NavigatorModel methodsFor:'misc'!
@@ -425,11 +501,11 @@
!NavigatorModel class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/Tools_NavigatorModel.st,v 1.24 2013-09-05 10:46:11 vrany Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Tools__NavigatorModel.st,v 1.32 2015-02-26 02:51:21 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libtool/Tools_NavigatorModel.st,v 1.24 2013-09-05 10:46:11 vrany Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Tools__NavigatorModel.st,v 1.32 2015-02-26 02:51:21 cg Exp $'
!
version_HG
@@ -438,7 +514,7 @@
!
version_SVN
- ^ '§Id: Tools__NavigatorModel.st 7802 2011-07-05 18:33:36Z vranyj1 §'
+ ^ '$Id: Tools__NavigatorModel.st,v 1.32 2015-02-26 02:51:21 cg Exp $'
! !