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

+ 1 - 19
st/Helios-Inspector.st

@@ -276,7 +276,7 @@ code
 !
 !
 
 
 environment
 environment
-	^ environment ifNil: [ self initializeEnvironment]
+	^ environment ifNil: [ HLManager current environment ]
 !
 !
 
 
 environment: anEnvironment
 environment: anEnvironment
@@ -322,20 +322,6 @@ variables: aCollection
 
 
 !HLInspectorModel methodsFor: 'actions'!
 !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
 inspect: anObject on: anInspector
 
 
 	inspectee := anObject.
 	inspectee := anObject.
@@ -368,10 +354,6 @@ initializeCode
 	^ code := HLCodeModel on: self environment
 	^ code := HLCodeModel on: self environment
 !
 !
 
 
-initializeEnvironment
-	^ environment := HLLocalEnvironment new
-!
-
 initializeSelection
 initializeSelection
 
 
 	^ selection := ''
 	^ selection := ''

+ 1 - 19
st/Helios-Workspace.st

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