made sniplets globally accessable
authorfm
Tue, 30 Sep 2008 18:11:54 +0200
changeset 3712 20989c5be134
parent 3711 e8d1ab008312
child 3713 a0946d019ad5
made sniplets globally accessable
Workspace.st
--- a/Workspace.st	Tue Sep 30 00:10:58 2008 +0200
+++ b/Workspace.st	Tue Sep 30 18:11:54 2008 +0200
@@ -18,7 +18,8 @@
 		poolsConsideredInDoIts'
 	classVariableNames:'DefaultViewBackground DefaultErrorForegroundColor
 		DefaultErrorBackgroundColor DefaultWarningBackgroundColor
-		DefaultWarningForegroundColor WorkspaceVariables DoItHistory'
+		DefaultWarningForegroundColor WorkspaceVariables DoItHistory
+		Sniplets'
 	poolDictionaries:''
 	category:'Interface-Smalltalk'
 !
@@ -96,6 +97,19 @@
 "
 ! !
 
+!Workspace class methodsFor:'accessing'!
+
+sniplets
+    Sniplets isNil ifTrue:[
+        Sniplets := Dictionary new.
+    ].
+    ^ Sniplets
+!
+
+sniplets:something
+    Sniplets := something.
+! !
+
 !Workspace class methodsFor:'defaults'!
 
 defaultLabel
@@ -943,15 +957,22 @@
 
 !Workspace methodsFor:'events'!
 
+expandAbbreviation
+
+"/    Dialog warn: 'expand'.
+    ^ AbbreviationsManager current expandAbbreviationIn: self
+!
+
 keyPress:key x:x y:y
-    <resource: #keyboard (#DoIt #InspectIt #PrintIt #ReplaceIt #BrowseIt)>
+    <resource: #keyboard (#DoIt #InspectIt #PrintIt #ReplaceIt #BrowseIt #ExpandIt)>
 
     (key == #DoIt)      ifTrue:[^ self doIt].
     (key == #InspectIt) ifTrue:[^ self inspectIt].
     (key == #PrintIt)   ifTrue:[^ self printIt].
     (key == #ReplaceIt) ifTrue:[^ self replaceIt].
     (key == #BrowseIt)  ifTrue:[^ self browseIt].
-    (key == #ImplementorsOfIt)  ifTrue:[^ self browseImplementorsOfIt].
+    (key == #ImplementorsOfIt)   ifTrue:[^ self browseImplementorsOfIt].
+    (key == #ExpandAbbreviation) ifTrue:[^ self expandAbbreviation].
 
     super keyPress:key x:x y:y
 
@@ -1463,5 +1484,5 @@
 !Workspace class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/Workspace.st,v 1.181 2008-05-30 11:12:47 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/Workspace.st,v 1.182 2008-09-30 16:11:54 fm Exp $'
 ! !