Browse Source

Use the HLManager instance environment by default

Nicolas Petton 12 năm trước cách đây
mục cha
commit
2f77965e17

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 328 - 319
js/Helios-Core.deploy.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 328 - 319
js/Helios-Core.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 318 - 337
js/Helios-Inspector.deploy.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 314 - 349
js/Helios-Inspector.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 326 - 313
js/Helios-Workspace.deploy.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 326 - 313
js/Helios-Workspace.js


+ 17 - 1
st/Helios-Core.st

@@ -596,7 +596,7 @@ setupKeyBindings
 ! !
 
 HLWidget subclass: #HLManager
-	instanceVariableNames: 'tabs activeTab keyBinder'
+	instanceVariableNames: 'tabs activeTab keyBinder environment'
 	package: 'Helios-Core'!
 
 !HLManager methodsFor: 'accessing'!
@@ -605,6 +605,16 @@ activeTab
 	^ activeTab
 !
 
+environment
+	"The default environment used by all Helios objects"
+    
+	^ environment ifNil: [ environment := self defaultEnvironment ]
+!
+
+environment: anEnvironment
+	environment := anEnvironment
+!
+
 keyBinder
 	^ keyBinder ifNil: [ keyBinder := HLKeyBinder new ]
 !
@@ -638,6 +648,12 @@ removeTab: aTab
 	self refresh
 ! !
 
+!HLManager methodsFor: 'defaults'!
+
+defaultEnvironment
+	^ HLLocalEnvironment new
+! !
+
 !HLManager methodsFor: 'initialization'!
 
 initialize

+ 1 - 19
st/Helios-Inspector.st

@@ -276,7 +276,7 @@ code
 !
 
 environment
-	^ environment ifNil: [ self initializeEnvironment]
+	^ environment ifNil: [ HLManager current environment ]
 !
 
 environment: anEnvironment
@@ -322,20 +322,6 @@ variables: aCollection
 
 !HLInspectorModel methodsFor: 'actions'!
 
-beLocal
-
-	self initializeEnvironment
-!
-
-beRemoteOn: anIPAddress port: aPort
-
-	"to-do"
-    
-    "environment := HLRemoteEnvironment on: anIPAddress port: aPort
-    
-    ...kind of stuff"
-!
-
 inspect: anObject on: anInspector
 
 	inspectee := anObject.
@@ -368,10 +354,6 @@ initializeCode
 	^ code := HLCodeModel on: self environment
 !
 
-initializeEnvironment
-	^ environment := HLLocalEnvironment new
-!
-
 initializeSelection
 
 	^ selection := ''

+ 1 - 19
st/Helios-Workspace.st

@@ -366,7 +366,7 @@ code
 !
 
 environment
-	^ environment ifNil: [ self initializeEnvironment]
+	^ environment ifNil: [ HLManager current environment ]
 !
 
 environment: anEnvironment
@@ -375,20 +375,6 @@ environment: anEnvironment
 
 !HLWorkspaceModel methodsFor: 'actions'!
 
-beLocal
-
-	self initializeEnvironment
-!
-
-beRemoteOn: anIPAddress port: aPort
-
-	"to-do"
-    
-    "environment := HLRemoteEnvironment on: anIPAddress port: aPort
-    
-    ...kind of stuff"
-!
-
 subscribe: aWidget
 	aWidget subscribeTo: self announcer
 ! !
@@ -402,10 +388,6 @@ initializeAnnouncer
 initializeCode
 
 	^ code := HLCodeModel on: self environment
-!
-
-initializeEnvironment
-	^ environment := HLLocalEnvironment new
 ! !
 
 !HLWorkspaceModel methodsFor: 'reactions'!

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác