class: WorkspaceApplication
authorClaus Gittinger <cg@exept.de>
Wed, 17 Dec 2014 21:14:34 +0100
changeset 15046 0441bc4caefc
parent 15045 fb673fb38d77
child 15047 cdfb5c80a65e
class: WorkspaceApplication added: #openWithText: #syntax: comment/format in: #openWith: #openWith:selected: #openWith:selected:title:
WorkspaceApplication.st
--- a/WorkspaceApplication.st	Wed Dec 17 20:53:36 2014 +0100
+++ b/WorkspaceApplication.st	Wed Dec 17 21:14:34 2014 +0100
@@ -1946,7 +1946,8 @@
 !
 
 openWith:initialText
-    "launch a new workspace with some initial contents"
+    "launch a new workspace with some initial contents.
+     The workspace will be opened in smalltalk syntax mode"
 
     ^ self openWith:initialText selected:false
 
@@ -1956,7 +1957,8 @@
 !
 
 openWith:initialText selected:selectedBoolean
-    "launch a new workspace with some initial contents"
+    "launch a new workspace with some initial contents.
+     The workspace will be opened in smalltalk syntax mode"
 
     |workspace|
 
@@ -1971,7 +1973,8 @@
 !
 
 openWith:initialText selected:selectedBoolean title:titleString
-    "launch a new workspace with some initial contents"
+    "launch a new workspace with some initial contents.
+     The workspace will be opened in smalltalk syntax mode"
 
     |workspace|
 
@@ -2000,6 +2003,20 @@
     "
 !
 
+openWithText:initialText
+    "like openWith, but will set the language to 'text', so it is not incorrectly syntax highlighted"
+
+    |ws|
+
+    ws := self openWith:initialText selected:false.
+    ws syntax:nil.
+    ^ ws.
+
+    "
+     WorkspaceApplication openWithText:'foo 1 2 3 4'
+    "
+!
+
 openWithWorkspaceVariableInspector
     "open a workspaceApp with a single initial pane, showing workspace variables.
      Same as Workspace workspaceVariables inspect, but looks nicer..."
@@ -2252,6 +2269,12 @@
     ^ smalltalkMenuEnabledHolder
 !
 
+syntax:aProgrammingLanguageOrNil
+    "the argument must sth. like SmalltalkLanguage"
+
+    self syntaxHolder value:aProgrammingLanguageOrNil
+!
+
 syntaxHolder
     syntaxHolder isNil ifTrue:[
         syntaxHolder := self defaultEvaluatorSyntax asValue.
@@ -4529,14 +4552,14 @@
 !WorkspaceApplication class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/WorkspaceApplication.st,v 1.277 2014-11-14 15:18:58 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/WorkspaceApplication.st,v 1.278 2014-12-17 20:14:34 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/WorkspaceApplication.st,v 1.277 2014-11-14 15:18:58 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/WorkspaceApplication.st,v 1.278 2014-12-17 20:14:34 cg Exp $'
 !
 
 version_SVN
-    ^ '$Id: WorkspaceApplication.st,v 1.277 2014-11-14 15:18:58 cg Exp $'
+    ^ '$Id: WorkspaceApplication.st,v 1.278 2014-12-17 20:14:34 cg Exp $'
 ! !