1
0
Преглед на файлове

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 години
родител
ревизия
6849f7f38e
променени са 2 файла, в които са добавени 3 реда и са изтрити 3 реда
  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'!