1
0
Prechádzať zdrojové kódy

Further to the fix in 9f2850c6e741, this change supports
leading spaces for class definitions in the Helios browser,
to bring it on par with the older IDE.

Srikumar K. S 11 rokov pred
rodič
commit
6849f7f38e
2 zmenil súbory, kde vykonal 3 pridanie a 3 odobranie
  1. 2 2
      js/Helios-Core.js
  2. 1 1
      st/Helios-Core.st

+ 2 - 2
js/Helios-Core.js

@@ -1050,12 +1050,12 @@ return smalltalk.withContext(function($ctx1) {
 var $1;
 $1=_st(_st(self._selectedClass())._isNil())._or_((function(){
 return smalltalk.withContext(function($ctx2) {
-return _st(aString)._match_("^[A-Z]");
+return _st(aString)._match_("^\x5cs*[A-Z]");
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"shouldCompileClassDefinition:",{aString:aString},smalltalk.HLToolModel)})},
 args: ["aString"],
-source: "shouldCompileClassDefinition: aString\x0a\x09^ self selectedClass isNil or: [\x0a\x09\x09aString match: '^[A-Z]' ]",
+source: "shouldCompileClassDefinition: aString\x0a\x09^ self selectedClass isNil or: [\x0a\x09\x09aString match: '^\x5cs*[A-Z]' ]",
 messageSends: ["or:", "isNil", "selectedClass", "match:"],
 referencedClasses: []
 }),

+ 1 - 1
st/Helios-Core.st

@@ -392,7 +392,7 @@ isToolModel
 
 shouldCompileClassDefinition: aString
 	^ self selectedClass isNil or: [
-		aString match: '^[A-Z]' ]
+		aString match: '^\s*[A-Z]' ]
 ! !
 
 !HLToolModel class methodsFor: 'actions'!