--- a/Tools_NavigationState.st Wed Feb 05 20:08:53 2014 +0100
+++ b/Tools_NavigationState.st Wed Feb 05 20:08:56 2014 +0100
@@ -38,7 +38,7 @@
bookmarkHolder worker packageInfoBackgroundColorHolder
packageInfoButton showMethodTemplate lastMethodShownInCodeView
showingParseError'
- classVariableNames:''
+ classVariableNames:'CodeAspectTranslations'
poolDictionaries:''
category:'Interface-Browsers-New'
!
@@ -59,6 +59,23 @@
"
! !
+!NavigationState class methodsFor:'initialization'!
+
+initialize
+ "Invoked at system start or when the class is dynamically loaded."
+
+ "/ please change as required (and remove this comment)
+
+ CodeAspectTranslations := Dictionary new.
+ CodeAspectTranslations at: #newApplication put: SyntaxHighlighter codeAspectClassDefinition.
+ CodeAspectTranslations at: #newError put: SyntaxHighlighter codeAspectClassDefinition.
+
+
+ "/ Add more...
+
+ "Modified: / 23-10-2012 / 11:27:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
!NavigationState methodsFor:'accessing'!
autoSearchAction
@@ -144,15 +161,16 @@
codeAspect:aSymbolOrNil
"set the codeAspect; a symbol describing what is shown in the codeView"
- |cv|
+ codeAspect := aSymbolOrNil.
+ (codeView notNil and:[codeView isCodeView2]) ifTrue:[
+ | xlatedCodeAspect |
- codeAspect := aSymbolOrNil.
- (cv := self codeView) notNil ifTrue:[
- cv codeAspect: aSymbolOrNil
+ xlatedCodeAspect := CodeAspectTranslations at: aSymbolOrNil ifAbsent: aSymbolOrNil.
+ codeView codeAspect: xlatedCodeAspect
].
"Created: / 11-02-2000 / 12:43:45 / cg"
- "Modified: / 27-09-2013 / 09:59:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 22-10-2012 / 17:05:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
codePaneAndPluginView
@@ -507,52 +525,53 @@
!
setUpScrollableCodeView
- |v aScrollableCodeView codeView |
+ |v newScrollableCodeView newCodeView |
(UserPreferences current useCodeView2In: #Browser) ifTrue:[
- codeView := aScrollableCodeView := CodeView2 new.
- codeView mode: #method.
- codeView methodHolder: ValueHolder new. "/ self theSingleSelectedMethodHolder.
- codeView classHolder: self theSingleSelectedClassHolder.
+ newCodeView := newScrollableCodeView := CodeView2 new.
+ newCodeView mode: #method.
+ newCodeView methodHolder: self theSingleSelectedMethodHolder.
+ newCodeView classHolder: self theSingleSelectedClassHolder.
] ifFalse:[
- aScrollableCodeView := HVScrollableView for:CodeView.
- codeView := aScrollableCodeView scrolledView.
- aScrollableCodeView horizontalMini:true.
+ newScrollableCodeView := HVScrollableView for:CodeView.
+ newCodeView := newScrollableCodeView scrolledView.
+ newScrollableCodeView horizontalMini:true.
].
- aScrollableCodeView name:'CodeView'.
- codeView modifiedChannel:self codeModifiedHolder.
- codeView model:self codeHolder.
- codeView canTab:true.
+ newScrollableCodeView name:'CodeView'.
+ newCodeView modifiedChannel:self codeModifiedHolder.
+ newCodeView model:self codeHolder.
+ newCodeView canTab:true.
UserPreferences current useCodeView2InTools ifTrue:[
- codeView
+ newCodeView
classHolder:self theSingleSelectedClassFromMethodHolder;
languageHolder:self languageHolder
].
- UserPreferences current showAcceptCancelBarInBrowser ifTrue:[
+ (UserPreferences current showAcceptCancelBarInBrowser
+ and:[newCodeView isCodeView2 not or:[UserPreferences current codeView2ShowAcceptCancel not]]) ifTrue:[
ViewWithAcceptAndCancelBar notNil ifTrue:[
v := ViewWithAcceptAndCancelBar new.
- v slaveView:aScrollableCodeView.
+ v slaveView:newScrollableCodeView.
v reallyModifiedHolder:self realModifiedStateHolder.
v cancelAction:
[
"/ codeView setClipboardText:(codeView contents). "/ for undo
- codeView device rememberInCopyBufferHistory:(codeView contents). "/ for undo
- codeView application
+ newCodeView device rememberInCopyBufferHistory:(newCodeView contents). "/ for undo
+ newCodeView application
delayedUpdateCodeWithAutoSearch:false checkModified:false.
- codeView requestFocus.
+ newCodeView requestFocus.
].
v compareAction:
[
- codeView application doCompareIn:self.
- codeView requestFocus
+ newCodeView application doCompareIn:self.
+ newCodeView requestFocus
].
- aScrollableCodeView := v.
+ newScrollableCodeView := v.
]
].
- ^aScrollableCodeView
+ ^newScrollableCodeView
"Modified: / 05-07-2011 / 10:34:33 / cg"
"Modified: / 05-08-2011 / 09:44:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
@@ -984,12 +1003,12 @@
!
selectedClasses
- "bad name- it's a holder, baby"
-
selectedClasses isNil ifTrue:[
selectedClasses := "SpecialValueHolder with:nil." nil asValue.
].
^ selectedClasses
+
+ "Modified: / 26-02-2013 / 12:29:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
selectedLintRules
@@ -1203,14 +1222,14 @@
addToHistory: class selector: selector
| entry |
- selector ifNil:[^self].
+ "/selector ifNil:[^self].
entry := SystemBrowser historyEntryForClass: class selector: selector.
self navigationHistory goTo: entry.
^entry
"Created: / 22-02-2008 / 08:44:05 / janfrog"
"Modified: / 22-02-2008 / 17:20:00 / janfrog"
- "Modified: / 25-10-2009 / 15:06:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 06-04-2012 / 10:55:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!NavigationState methodsFor:'printing & storing'!
@@ -1694,14 +1713,16 @@
!NavigationState class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/Tools_NavigationState.st,v 1.53 2013-12-12 11:01:05 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Tools_NavigationState.st,v 1.54 2014-02-05 19:08:56 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libtool/Tools_NavigationState.st,v 1.53 2013-12-12 11:01:05 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Tools_NavigationState.st,v 1.54 2014-02-05 19:08:56 cg Exp $'
!
version_SVN
- ^ '$Id: Tools_NavigationState.st,v 1.53 2013-12-12 11:01:05 cg Exp $'
+ ^ '$Id: Tools_NavigationState.st,v 1.54 2014-02-05 19:08:56 cg Exp $'
! !
+
+NavigationState initialize!