--- a/.hgtags Wed Oct 15 11:50:23 2014 +0100
+++ b/.hgtags Tue Nov 25 08:00:39 2014 +0000
@@ -3,3 +3,5 @@
feba6ee5c81409691496b92dabd87217d18adf11 expecco_2_7_0
feba6ee5c81409691496b92dabd87217d18adf11 expecco_2_7_0
3542abc630fa233edd1aae6244227ae417c69ea5 expecco_2_7_0
+3542abc630fa233edd1aae6244227ae417c69ea5 expecco_2_7_0
+c7340c8fe8adbd072fd8d397ea3469ab67723e5b expecco_2_7_0
--- a/Make.proto Wed Oct 15 11:50:23 2014 +0100
+++ b/Make.proto Tue Nov 25 08:00:39 2014 +0000
@@ -34,7 +34,7 @@
# add the path(es) here:,
# ********** OPTIONAL: MODIFY the next lines ***
# LOCALINCLUDES=-Ifoo -Ibar
-LOCALINCLUDES= -I$(INCLUDE_TOP)/stx/goodies/refactoryBrowser/helpers -I$(INCLUDE_TOP)/stx/goodies/refactoryBrowser/lint -I$(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser -I$(INCLUDE_TOP)/stx/goodies/regex -I$(INCLUDE_TOP)/stx/libbasic -I$(INCLUDE_TOP)/stx/libbasic2 -I$(INCLUDE_TOP)/stx/libbasic3 -I$(INCLUDE_TOP)/stx/libcomp -I$(INCLUDE_TOP)/stx/libhtml -I$(INCLUDE_TOP)/stx/libjava -I$(INCLUDE_TOP)/stx/libjava/tools -I$(INCLUDE_TOP)/stx/libtool -I$(INCLUDE_TOP)/stx/libview -I$(INCLUDE_TOP)/stx/libview2 -I$(INCLUDE_TOP)/stx/libwidg -I$(INCLUDE_TOP)/stx/libwidg2
+LOCALINCLUDES= -I$(INCLUDE_TOP)/stx/goodies/refactoryBrowser/helpers -I$(INCLUDE_TOP)/stx/goodies/refactoryBrowser/lint -I$(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser -I$(INCLUDE_TOP)/stx/goodies/regex -I$(INCLUDE_TOP)/stx/goodies/sunit -I$(INCLUDE_TOP)/stx/libbasic -I$(INCLUDE_TOP)/stx/libbasic2 -I$(INCLUDE_TOP)/stx/libbasic3 -I$(INCLUDE_TOP)/stx/libcomp -I$(INCLUDE_TOP)/stx/libhtml -I$(INCLUDE_TOP)/stx/libjava -I$(INCLUDE_TOP)/stx/libjava/tools -I$(INCLUDE_TOP)/stx/libtool -I$(INCLUDE_TOP)/stx/libview -I$(INCLUDE_TOP)/stx/libview2 -I$(INCLUDE_TOP)/stx/libwidg -I$(INCLUDE_TOP)/stx/libwidg2
# if you need any additional defines for embedded C code,
@@ -134,6 +134,7 @@
cd ../../libview && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
cd ../../libview2 && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
cd ../refactoryBrowser/browser && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
+ cd ../sunit && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
cd ../../libwidg && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
cd ../refactoryBrowser/lint && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
cd ../../libhtml && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
@@ -223,7 +224,7 @@
$(OUTDIR)SmallSense__MethodKeywordRestPO.$(O) SmallSense__MethodKeywordRestPO.$(H): SmallSense__MethodKeywordRestPO.st $(INCLUDE_TOP)/stx/goodies/smallsense/SmallSense__MethodPO.$(H) $(INCLUDE_TOP)/stx/goodies/smallsense/SmallSense__PO.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libwidg2/HierarchicalItem.$(H) $(STCHDR)
$(OUTDIR)SmallSense__JavaCompletionEngineSimple.$(O) SmallSense__JavaCompletionEngineSimple.$(H): SmallSense__JavaCompletionEngineSimple.st $(INCLUDE_TOP)/stx/goodies/smallsense/SmallSense__AbstractJavaCompletionEngine.$(H) $(INCLUDE_TOP)/stx/goodies/smallsense/SmallSense__AbstractJavaCompletionEngineSimple.$(H) $(INCLUDE_TOP)/stx/goodies/smallsense/SmallSense__CompletionEngine.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)SmallSense__GroovyCompletionEngineSimple.$(O) SmallSense__GroovyCompletionEngineSimple.$(H): SmallSense__GroovyCompletionEngineSimple.st $(INCLUDE_TOP)/stx/goodies/smallsense/SmallSense__AbstractJavaCompletionEngine.$(H) $(INCLUDE_TOP)/stx/goodies/smallsense/SmallSense__AbstractJavaCompletionEngineSimple.$(H) $(INCLUDE_TOP)/stx/goodies/smallsense/SmallSense__CompletionEngine.$(H) $(INCLUDE_TOP)/stx/goodies/smallsense/SmallSense__JavaCompletionEngineSimple.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
-$(OUTDIR)extensions.$(O): extensions.st $(INCLUDE_TOP)/stx/goodies/refactoryBrowser/lint/RBLintRule.$(H) $(INCLUDE_TOP)/stx/goodies/refactoryBrowser/lint/RBTransformationRule.$(H) $(INCLUDE_TOP)/stx/libbasic/Collection.$(H) $(INCLUDE_TOP)/stx/libbasic/CompiledCode.$(H) $(INCLUDE_TOP)/stx/libbasic/ConfigurableFeatures.$(H) $(INCLUDE_TOP)/stx/libbasic/Dictionary.$(H) $(INCLUDE_TOP)/stx/libbasic/ExecutableFunction.$(H) $(INCLUDE_TOP)/stx/libbasic/IdentityDictionary.$(H) $(INCLUDE_TOP)/stx/libbasic/Method.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/Set.$(H) $(INCLUDE_TOP)/stx/libbasic/UserPreferences.$(H) $(INCLUDE_TOP)/stx/libcomp/AssignmentNode.$(H) $(INCLUDE_TOP)/stx/libcomp/BlockNode.$(H) $(INCLUDE_TOP)/stx/libcomp/MessageNode.$(H) $(INCLUDE_TOP)/stx/libcomp/ParseErrorNode.$(H) $(INCLUDE_TOP)/stx/libcomp/ParseNode.$(H) $(INCLUDE_TOP)/stx/libcomp/PrimaryNode.$(H) $(INCLUDE_TOP)/stx/libcomp/PrimitiveNode.$(H) $(INCLUDE_TOP)/stx/libcomp/ReturnNode.$(H) $(INCLUDE_TOP)/stx/libcomp/StatementNode.$(H) $(INCLUDE_TOP)/stx/libcomp/VariableNode.$(H) $(INCLUDE_TOP)/stx/libhtml/HTMLDocumentFrame.$(H) $(INCLUDE_TOP)/stx/libhtml/HTMLDocumentView.$(H) $(INCLUDE_TOP)/stx/libtool/SystemBrowser.$(H) $(INCLUDE_TOP)/stx/libtool/Tools__BackgroundSourceProcessingService.$(H) $(INCLUDE_TOP)/stx/libtool/Tools__CodeCompletionService.$(H) $(INCLUDE_TOP)/stx/libtool/Tools__CodeHighlightingService.$(H) $(INCLUDE_TOP)/stx/libtool/Tools__CodeNavigationService.$(H) $(INCLUDE_TOP)/stx/libtool/Tools__CodeViewService.$(H) $(INCLUDE_TOP)/stx/libtool/Tools__NavigationState.$(H) $(INCLUDE_TOP)/stx/libtool/Tools__NewSystemBrowser.$(H) $(INCLUDE_TOP)/stx/libview/DisplaySurface.$(H) $(INCLUDE_TOP)/stx/libview/GraphicsMedium.$(H) $(INCLUDE_TOP)/stx/libview/SimpleView.$(H) $(INCLUDE_TOP)/stx/libview/View.$(H) $(INCLUDE_TOP)/stx/libview2/ApplicationModel.$(H) $(INCLUDE_TOP)/stx/libview2/Model.$(H) $(INCLUDE_TOP)/stx/libwidg/EditTextView.$(H) $(INCLUDE_TOP)/stx/libwidg/EditTextViewCompletionSupport.$(H) $(INCLUDE_TOP)/stx/libwidg/ListView.$(H) $(INCLUDE_TOP)/stx/libwidg/TextCollector.$(H) $(INCLUDE_TOP)/stx/libwidg/TextView.$(H) $(INCLUDE_TOP)/stx/libwidg/Workspace.$(H) $(INCLUDE_TOP)/stx/libwidg2/DoWhatIMeanSupport.$(H) $(STCHDR)
+$(OUTDIR)extensions.$(O): extensions.st $(INCLUDE_TOP)/stx/goodies/refactoryBrowser/lint/RBLintRule.$(H) $(INCLUDE_TOP)/stx/goodies/refactoryBrowser/lint/RBTransformationRule.$(H) $(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser/RBBlockNode.$(H) $(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser/RBMethodNode.$(H) $(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser/RBProgramNode.$(H) $(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser/RBStatementNode.$(H) $(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser/RBValueNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Collection.$(H) $(INCLUDE_TOP)/stx/libbasic/CompiledCode.$(H) $(INCLUDE_TOP)/stx/libbasic/ConfigurableFeatures.$(H) $(INCLUDE_TOP)/stx/libbasic/Dictionary.$(H) $(INCLUDE_TOP)/stx/libbasic/ExecutableFunction.$(H) $(INCLUDE_TOP)/stx/libbasic/IdentityDictionary.$(H) $(INCLUDE_TOP)/stx/libbasic/Method.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/Set.$(H) $(INCLUDE_TOP)/stx/libbasic/UserPreferences.$(H) $(INCLUDE_TOP)/stx/libcomp/AssignmentNode.$(H) $(INCLUDE_TOP)/stx/libcomp/BlockNode.$(H) $(INCLUDE_TOP)/stx/libcomp/MessageNode.$(H) $(INCLUDE_TOP)/stx/libcomp/ParseErrorNode.$(H) $(INCLUDE_TOP)/stx/libcomp/ParseNode.$(H) $(INCLUDE_TOP)/stx/libcomp/Parser.$(H) $(INCLUDE_TOP)/stx/libcomp/PrimaryNode.$(H) $(INCLUDE_TOP)/stx/libcomp/PrimitiveNode.$(H) $(INCLUDE_TOP)/stx/libcomp/ReturnNode.$(H) $(INCLUDE_TOP)/stx/libcomp/Scanner.$(H) $(INCLUDE_TOP)/stx/libcomp/StatementNode.$(H) $(INCLUDE_TOP)/stx/libcomp/VariableNode.$(H) $(INCLUDE_TOP)/stx/libhtml/HTMLDocumentFrame.$(H) $(INCLUDE_TOP)/stx/libhtml/HTMLDocumentView.$(H) $(INCLUDE_TOP)/stx/libtool/SystemBrowser.$(H) $(INCLUDE_TOP)/stx/libtool/Tools__BackgroundSourceProcessingService.$(H) $(INCLUDE_TOP)/stx/libtool/Tools__CodeCompletionService.$(H) $(INCLUDE_TOP)/stx/libtool/Tools__CodeHighlightingService.$(H) $(INCLUDE_TOP)/stx/libtool/Tools__CodeNavigationService.$(H) $(INCLUDE_TOP)/stx/libtool/Tools__CodeViewService.$(H) $(INCLUDE_TOP)/stx/libtool/Tools__NavigationState.$(H) $(INCLUDE_TOP)/stx/libtool/Tools__NewSystemBrowser.$(H) $(INCLUDE_TOP)/stx/libview/DisplaySurface.$(H) $(INCLUDE_TOP)/stx/libview/GraphicsMedium.$(H) $(INCLUDE_TOP)/stx/libview/SimpleView.$(H) $(INCLUDE_TOP)/stx/libview/View.$(H) $(INCLUDE_TOP)/stx/libview2/ApplicationModel.$(H) $(INCLUDE_TOP)/stx/libview2/Model.$(H) $(INCLUDE_TOP)/stx/libwidg/EditTextView.$(H) $(INCLUDE_TOP)/stx/libwidg/EditTextViewCompletionSupport.$(H) $(INCLUDE_TOP)/stx/libwidg/ListView.$(H) $(INCLUDE_TOP)/stx/libwidg/TextCollector.$(H) $(INCLUDE_TOP)/stx/libwidg/TextView.$(H) $(INCLUDE_TOP)/stx/libwidg/Workspace.$(H) $(INCLUDE_TOP)/stx/libwidg2/DoWhatIMeanSupport.$(H) $(STCHDR)
$(OUTDIR)SmallSense__ClassSearchDialog.$(O) SmallSense__ClassSearchDialog.$(H): SmallSense__ClassSearchDialog.st $(INCLUDE_TOP)/stx/goodies/smallsense/SmallSense__AbstractDIalog.$(H) $(INCLUDE_TOP)/stx/goodies/smallsense/SmallSense__AbstractSearchDialog.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview2/ApplicationModel.$(H) $(INCLUDE_TOP)/stx/libview2/Model.$(H) $(INCLUDE_TOP)/stx/libview2/SimpleDialog.$(H) $(STCHDR)
$(OUTDIR)SmallSense__MethodKeywordRestPO.$(O) SmallSense__MethodKeywordRestPO.$(H): SmallSense__MethodKeywordRestPO.st $(INCLUDE_TOP)/stx/goodies/smallsense/SmallSense__MethodPO.$(H) $(INCLUDE_TOP)/stx/goodies/smallsense/SmallSense__PO.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libwidg2/HierarchicalItem.$(H) $(STCHDR)
$(OUTDIR)SmallSense__MethodSearchDialog.$(O) SmallSense__MethodSearchDialog.$(H): SmallSense__MethodSearchDialog.st $(INCLUDE_TOP)/stx/goodies/smallsense/SmallSense__AbstractDIalog.$(H) $(INCLUDE_TOP)/stx/goodies/smallsense/SmallSense__AbstractSearchDialog.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview2/ApplicationModel.$(H) $(INCLUDE_TOP)/stx/libview2/Model.$(H) $(INCLUDE_TOP)/stx/libview2/SimpleDialog.$(H) $(STCHDR)
--- a/SmallSense__CriticsWindow.st Wed Oct 15 11:50:23 2014 +0100
+++ b/SmallSense__CriticsWindow.st Tue Nov 25 08:00:39 2014 +0000
@@ -22,7 +22,7 @@
SimpleDialog subclass:#CriticsWindow
instanceVariableNames:'ruleHolder ruleRationaleAndFixesHTMLHolder rationalView fixer
- entered codeView'
+ entered codeView closeOnLeave'
classVariableNames:''
poolDictionaries:''
category:'SmallSense-Core-Interface'
@@ -51,6 +51,32 @@
"
! !
+!CriticsWindow class methodsFor:'help specs'!
+
+flyByHelpSpec
+ "This resource specification was automatically generated
+ by the UIHelpTool of ST/X."
+
+ "Do not manually edit this!! If it is corrupted,
+ the UIHelpTool may not be able to read the specification."
+
+ "
+ UIHelpTool openOnClass:SmallSense::CriticsWindow
+ "
+
+
+
+ ^ super flyByHelpSpec addPairsFrom:#(
+
+#disableRule
+'Disable this rule in the future'
+
+#browseRule
+'Open a browser on the rule'
+
+)
+! !
+
!CriticsWindow class methodsFor:'interface specs'!
windowSpec
@@ -66,57 +92,67 @@
SmallSense::CriticsWindow open
"
- <resource: #canvas>
+
- ^
+ ^
#(FullSpec
name: windowSpec
- window:
+ window:
(WindowSpec
label: 'SmalllintRuleDetail'
name: 'SmalllintRuleDetail'
min: (Point 10 10)
- bounds: (Rectangle 0 0 418 219)
- backgroundColor: (Color 94.1176470588235 93.7254901960784 59.2156862745098)
+ bounds: (Rectangle 0 0 472 308)
+ backgroundColor: (Color 100.0 100.0 75.0)
forceRecursiveBackgroundOfDefaultBackground: true
)
- component:
+ component:
(SpecCollection
collection: (
+ (ActionButtonSpec
+ label: 'closeIcon'
+ name: 'Button4'
+ layout: (AlignmentOrigin 0 1 0 0 1 0)
+ visibilityChannel: notCloseOnLeave
+ hasCharacterOrientedLabel: false
+ translateLabel: true
+ model: closeRequest
+ )
+ (HTMLViewSpec
+ name: 'Rationale'
+ layout: (LayoutFrame 0 0 20 0 -20 1 -60 1)
+ level: 0
+ visibilityChannel: rationaleVisibleHolder
+ hasHorizontalScrollBar: true
+ hasVerticalScrollBar: true
+ htmlText: ruleRationaleAndFixesHTMLHolder
+ postBuildCallback: setupHTMLView:
+ )
(LinkButtonSpec
name: 'Button1'
- layout: (LayoutFrame -1 0 -29 1 1 1 0 1)
- activeHelpKey: ruleName
+ layout: (LayoutFrame -1 0 -59 1 -31 1 -30 1)
+ activeHelpKey: browseRule
level: 0
- backgroundColor: (Color 94.1176470588235 93.7254901960784 59.2156862745098)
translateLabel: true
labelChannel: ruleNameAspect
adjust: left
model: browseLintRule
keepSpaceForOSXResizeHandleH: true
)
- (HTMLViewSpec
- name: 'Rationale'
- layout: (LayoutFrame 0 0 0 0 0 1 -27 1)
+ (LinkButtonSpec
+ label: 'Disable this Rule'
+ name: 'Button3'
+ layout: (LayoutFrame 0 0 -29 1 -30 1 0 1)
+ activeHelpKey: disableRule
level: 0
- visibilityChannel: rationaleVisibleHolder
- hasHorizontalScrollBar: true
- hasVerticalScrollBar: true
- backgroundColor: (Color 94.1176470588235 93.7254901960784 59.2156862745098)
- htmlText: ruleRationaleAndFixesHTMLHolder
- postBuildCallback: setupHTMLView:
- )
- (ActionButtonSpec
- label: 'X'
- name: 'Button2'
- layout: (LayoutFrame -30 1 0 0 0 1 30 0)
- level: 0
- backgroundColor: (Color 94.1176470588235 93.7254901960784 59.2156862745098)
translateLabel: true
- model: closeRequest
+ labelChannel: disableRuleString
+ adjust: left
+ model: disableLintRule
+ keepSpaceForOSXResizeHandleH: true
)
)
-
+
)
)
! !
@@ -142,6 +178,22 @@
!CriticsWindow methodsFor:'accessing'!
+closeOnLeave
+ "set if used as a flyBy tooltip, which should close automatically.
+ false, if used as a modal dialog, which needs explicit close.
+ The default is false."
+
+ ^ closeOnLeave ? false
+!
+
+closeOnLeave:aBoolean
+ "set this if used as a flyBy tooltip, which should close automatically.
+ Leave false, if used as a modal dialog, which needs explicit close.
+ The default is false."
+
+ closeOnLeave := aBoolean
+!
+
codeView
^ codeView
!
@@ -150,6 +202,10 @@
codeView := aCodeView2.
!
+notCloseOnLeave:aBoolean
+ ^ self closeOnLeave not
+!
+
rule
^self ruleHolder value.
@@ -183,6 +239,16 @@
"Modified: / 31-01-2012 / 11:30:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
+disableLintRule
+ |rule|
+
+ rule := self ruleHolder value.
+ rule isNil ifTrue:[^ self].
+
+ RBBuiltinRuleSet rulesetBuiltinDefault reject:[:r | r class == rule class].
+ self close.
+!
+
doQuickFix: quickFixNo
self closeDownViews.
@@ -193,6 +259,18 @@
!CriticsWindow methodsFor:'aspects'!
+closeIcon
+ ^ ToolbarIconLibrary removeTab16x16Icon
+!
+
+disableRuleString
+
+
+ ^ 'Disable this Rule'
+ colorizeAllWith: Color blue;
+ actionForAll:[ self disableLintRule]
+!
+
ruleHolder
"return/create the 'ruleHolder' value holder (automatically generated)"
@@ -224,22 +302,24 @@
!
ruleNameAspect
- <resource: #uiAspect>
+
|holder|
(holder := builder bindingAt:#ruleNameAspect) isNil ifTrue:[
holder := BlockValue
- with:[:h |
- "/ h displayString , ' ' , (('[browse]' actionForAll:[ self browseLintRule]) colorizeAllWith:Color blue)
- 'browse ',h displayString actionForAll:[ self browseLintRule]
+ with:[:h |
+ "/ h displayString , ' ' , (('[browse]' actionForAll:[ self browseLintRule]) colorizeAllWith:Color blue)
+ ('Browse "',h name,'"-Rule (',h class name,')' "displayString")
+ colorizeAllWith: Color blue;
+ actionForAll:[ self browseLintRule]
]
argument: self ruleHolder.
builder aspectAt:#ruleNameAspect put:holder.
].
^ holder.
- "Modified: / 05-02-2010 / 12:51:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 05-02-2010 / 12:51:30 / Jan Vrany "
"Modified: / 07-09-2011 / 04:54:24 / cg"
!
@@ -296,34 +376,28 @@
processEvent: anEvent
- anEvent isKeyReleaseEvent ifTrue:[
- anEvent key == #Escape ifTrue:[
+ anEvent isKeyReleaseEvent ifTrue:[
+ anEvent key == #Escape ifTrue:[
self closeRequest. "/ closeDownViews.
- ^true.
+ ^true.
].
].
-
-
-"/ entered ifFalse:[
-"/ anEvent isPointerLeaveEvent ifTrue:[
-"/ anEvent view == self window ifTrue:[
-"/ entered := true.
-"/ ]
-"/ ]
-"/ ] ifTrue:[
+ "/ cg: if this is a modal dialog - do not exit on leave.
+ "/ if used as a flyBy, set the closeOnLeave flag.
+ self closeOnLeave ifTrue:[
anEvent isPointerLeaveEvent ifTrue:[
anEvent view == self window ifTrue:[
self closeRequest. "/ closeDownViews.
^true.
]
].
-"/ ].
+ ].
^false
- "Created: / 16-02-2012 / 14:09:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified (format): / 31-03-2014 / 16:53:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Created: / 16-02-2012 / 14:09:33 / Jan Vrany "
+ "Modified (format): / 31-03-2014 / 16:53:41 / Jan Vrany "
! !
!CriticsWindow methodsFor:'hooks'!
@@ -331,15 +405,17 @@
postBuildWith: aBuilder
super postBuildWith:aBuilder.
+ aBuilder window allViewBackground:(aBuilder window viewBackground).
+
entered := false.
self updateRationaleAndFixes.
- aBuilder window
+ aBuilder window
"windowGroup: codeView windowGroup;"
- bePopUpView;
+ bePopUpView;
beSlave.
- "Created: / 03-04-2011 / 10:45:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 16-02-2012 / 14:14:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Created: / 03-04-2011 / 10:45:10 / Jan Vrany "
+ "Modified: / 16-02-2012 / 14:14:07 / Jan Vrany "
!
postOpenWith: bldr
--- a/SmallSense__Info.st Wed Oct 15 11:50:23 2014 +0100
+++ b/SmallSense__Info.st Tue Nov 25 08:00:39 2014 +0000
@@ -21,7 +21,7 @@
"{ NameSpace: SmallSense }"
Object subclass:#Info
- instanceVariableNames:'manager'
+ instanceVariableNames:'manager errorneous'
classVariableNames:''
poolDictionaries:''
category:'SmallSense-Smalltalk-Types-Info'
@@ -50,6 +50,20 @@
"
! !
+!Info methodsFor:'accessing'!
+
+errorneous:something
+ errorneous := something.
+! !
+
+!Info methodsFor:'testing'!
+
+isErrorneous
+ ^ errorneous == true
+
+ "Created: / 21-11-2014 / 16:37:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
!Info class methodsFor:'documentation'!
version_HG
--- a/SmallSense__Manager.st Wed Oct 15 11:50:23 2014 +0100
+++ b/SmallSense__Manager.st Tue Nov 25 08:00:39 2014 +0000
@@ -21,7 +21,7 @@
"{ NameSpace: SmallSense }"
Object subclass:#Manager
- instanceVariableNames:'classes accessLock updater seqno'
+ instanceVariableNames:'classes accessLock updater updaterThread seqno'
classVariableNames:'Instance'
poolDictionaries:''
category:'SmallSense-Smalltalk-Types-Info'
@@ -55,23 +55,29 @@
flush
"flushes the cached singleton"
- Instance := nil
+ self flushSingleton
"
self flushSingleton
"
"Created: / 16-12-2011 / 01:37:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 21-11-2014 / 17:34:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
flushSingleton
"flushes the cached singleton"
+ Instance notNil ifTrue:[
+ Instance release.
+ ].
Instance := nil
"
self flushSingleton
"
+
+ "Modified: / 21-11-2014 / 17:34:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
instance
@@ -177,6 +183,20 @@
seqno := 0
"Modified: / 22-10-2013 / 10:56:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+release
+ "Invoked when a new instance is created."
+
+ classes := nil.
+ accessLock := Semaphore forMutualExclusion.
+ updater stopAndRemoveAll.
+
+ UserPreferences current smallSenseEnabled ifTrue:[
+ Smalltalk removeDependent: self.
+ ].
+
+ "Created: / 21-11-2014 / 17:36:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!Manager methodsFor:'updating'!
@@ -215,61 +235,96 @@
delayedUpdateInfoForClass: class
- | superclass info instVarNames instVarTypes probe nprobed |
+ | superclass info instVarNames instVarTypes probe nprobed sourceStream |
superclass := class superclass.
superclass notNil ifTrue:[self updateInfoForClass: superclass].
info := self infoForClass: class.
+ info isErrorneous ifTrue:[ ^ self ].
info seqno: seqno.
- instVarNames := class allInstVarNames.
- instVarTypes := instVarNames collect: [:instvar | info infoForInstvar: instvar ].
- class methodsDo:[:mthd|updater add:mthd].
-
- probe := [:instance |
- instVarTypes withIndexDo: [:instVarType :i |
- instVarType union: ((Type withClass: (instance instVarAt: i) class) type trustfullness: 70).
+ [
+ instVarNames := class allInstVarNames.
+ instVarTypes := instVarNames collect: [:instvar | info infoForInstvar: instvar ].
+ "/ Check for the source stream - if none, then do not add methods (one cannot
+ "/ infer types without a source anyway and mark the class errorneous...
+ [
+ sourceStream := class sourceStream.
+ ] on: Error do:[
+ sourceStream := nil.
+ ].
+ sourceStream isNil ifTrue:[
+ info errorneous: true.
+ ^ self.
].
- nprobed := nprobed + 1.
- nprobed > 100 ifTrue:[
- "/ Probe at most 100 instancess
- ^ self
- ].
- ].
- nprobed := 0.
- class allInstancesDo: probe.
- "/ Maube an abstract class?
- nprobed < 100 ifTrue:[
- class allSubInstancesDo: probe
- ].
+ class methodsDo:[:mthd|updater add:mthd].
+
+ probe := [:instance |
+ instVarTypes withIndexDo: [:instVarType :i |
+ instVarType union: ((Type withClass: (instance instVarAt: i) class) type trustfullness: 70).
+ ].
+ nprobed := nprobed + 1.
+ nprobed > 100 ifTrue:[
+ "/ Probe at most 100 instancess
+ ^ self
+ ].
+ ].
+ nprobed := 0.
+ class allInstancesDo: probe.
+ "/ Maube an abstract class?
+ nprobed < 100 ifTrue:[
+ class allSubInstancesDo: probe
+ ].
+ ] on: Error do:[:ex |
+ info errorneous: true.
+ Logger error:'Error when infering instvars for %1: %2' with: class name with: ex description
+ ]
"Created: / 27-11-2011 / 18:04:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 01-03-2014 / 00:44:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 21-11-2014 / 17:17:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
delayedUpdateInfoForClassOrMethod: classOrMethod
+ | currentThread |
- classOrMethod isBehavior ifTrue:[
- self delayedUpdateInfoForClass: classOrMethod.
+ currentThread := Processor activeProcess.
+ updaterThread ~~ currentThread ifTrue:[
+ updaterThread := currentThread.
+ updaterThread addExitAction:[
+ updater stopAndRemoveAll.
+ ].
].
- classOrMethod isMethod ifTrue:[
- self delayedUpdateInfoForMethod: classOrMethod.
+
+ [
+ classOrMethod isBehavior ifTrue:[
+ self delayedUpdateInfoForClass: classOrMethod.
+ ].
+ classOrMethod isMethod ifTrue:[
+ self delayedUpdateInfoForMethod: classOrMethod.
+ ]
+ ] on: Error do:[:ex|
+ Logger error: 'Error when infering for %1: %2' with: classOrMethod with: ex description.
]
"Created: / 27-11-2011 / 18:01:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 21-11-2014 / 17:39:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
delayedUpdateInfoForMethod: method
| inferencer |
- method mclass isNil ifTrue:["Obsolete method" ^ self ].
- method mclass programmingLanguage isSmalltalk ifFalse: [ ^ self ].
-"/ Transcript showCR: 'SmallSense: updating info for: ', method printString.
- inferencer := SmalltalkInferencer forMethod: method.
- inferencer process.
+ [
+ method mclass isNil ifTrue:["Obsolete method" ^ self ].
+ method mclass programmingLanguage isSmalltalk ifFalse: [ ^ self ].
+ "/ Transcript showCR: 'SmallSense: updating info for: ', method printString.
+ inferencer := SmalltalkInferencer forMethod: method.
+ inferencer process.
+ ] on: Error do:[:ex |
+ Logger error:'Error when infering for method %1: %2' with: method printString with: ex description
+ ]
"Created: / 27-11-2011 / 18:06:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 26-08-2013 / 10:20:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified (format): / 21-11-2014 / 16:55:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!Manager class methodsFor:'documentation'!
--- a/SmallSense__SelectorNode.st Wed Oct 15 11:50:23 2014 +0100
+++ b/SmallSense__SelectorNode.st Tue Nov 25 08:00:39 2014 +0000
@@ -96,9 +96,17 @@
!SelectorNode methodsFor:'navigation-SmallSense'!
navigateToUsing: navigator
- self parent navigateToUsing: navigator
+ | p |
+
+ p := self parent.
+ p notNil ifTrue:[
+ p navigateToUsing: navigator
+ ] ifFalse:[
+ self breakPoint: #jv
+ ].
"Created: / 24-09-2013 / 10:04:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 19-11-2014 / 15:47:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!SelectorNode methodsFor:'testing'!
--- a/SmallSense__SettingsAppl.st Wed Oct 15 11:50:23 2014 +0100
+++ b/SmallSense__SettingsAppl.st Tue Nov 25 08:00:39 2014 +0000
@@ -69,40 +69,43 @@
!SettingsAppl class methodsFor:'help specs'!
helpSpec
- "This resource specification was automatically generated
- by the UIHelpTool of ST/X."
+ "This resource specification was automatically generated by the UIHelpTool of ST/X."
"Do not manually edit this!! If it is corrupted,
the UIHelpTool may not be able to read the specification."
"
- UIHelpTool openOnClass:SmallSenseSettingsAppl
+ UIHelpTool openOnClass:SmallSenseSettingsAppl
"
- <resource: #help>
+
^ super helpSpec addPairsFrom:#(
#smallSenseBackgroundLintEnabled
-'When enabled, a hints on code are shown based on static code analysis (SmallLint)'
+'When enabled, a hint on code are shown next to the line number,\based on a static code analysis (SmallLint).\See the SmallLint settings for which rules are to be applied'
#smallSenseBackgroundTypingEnabled
-'When enabled, SmallSense run a type-inferencer on the code to give a more accurate type hints and completion data'
+'When enabled, SmallSense runs a type-inferencer on the code to give more accurate type hints and completion data'
#smallSenseElectricEditSupportEnabled
-'When enabled, closing brackets, blank lines and spaces are automatically inserted as soon as opening bracket or other tokens are typed. Honours formatting settings.'
+'When enabled, closing brackets, blank lines and spaces are automatically inserted,\as soon as opening bracket or other tokens are typed. Honours formatting settings.'
#smallSenseEnabled
-'Enable/Disable SmallSense support'
+'General enable/disable the SmallSense support package'
+#smallSenseCompletionEnabled
+'Enable the SmallSense completion algorithm, instead of the default one.\It is currently a matter of personal taste, which one provides better completions'
+
+#smallSenseCompleteIfUnambiguous
+'Enable automatic completion if unambigious.\Will automatically insert the completion, if there only one possible completion is found.\This may be somewhat disturbing, as it makes blind typing a little tricky.'
)
! !
!SettingsAppl class methodsFor:'interface specs'!
windowSpec
- "This resource specification was automatically generated
- by the UIPainter of ST/X."
+ "This resource specification was automatically generated by the UIPainter of ST/X."
"Do not manually edit this!! If it is corrupted,
the UIPainter may not be able to read the specification."
@@ -113,19 +116,19 @@
SmallSense::SettingsAppl open
"
- <resource: #canvas>
+
- ^
+ ^
#(FullSpec
name: windowSpec
- window:
+ window:
(WindowSpec
label: 'SmallSense Settings'
name: 'SmallSense Settings'
min: (Point 10 10)
bounds: (Rectangle 0 0 536 651)
)
- component:
+ component:
(SpecCollection
collection: (
(CheckBoxSpec
@@ -147,7 +150,7 @@
verticalLayout: top
horizontalSpace: 3
verticalSpace: 3
- component:
+ component:
(SpecCollection
collection: (
(CheckBoxSpec
@@ -183,6 +186,7 @@
enableChannel: smallSenseEnabled
model: smallSenseCompletionEnabled
extent: (Point 536 22)
+ activeHelpKey: smallSenseCompletionEnabled
)
(CheckBoxSpec
label: 'Auto-complete when Completion is Unambiguous'
@@ -190,6 +194,7 @@
enableChannel: smallSenseEnabledAndCompletionEnabled
model: smallSenseCompleteIfUnambiguous
extent: (Point 536 22)
+ activeHelpKey: smallSenseCompleteIfUnambiguous
)
(CheckBoxSpec
label: 'Enable New Dialogs'
@@ -199,11 +204,11 @@
extent: (Point 536 22)
)
)
-
+
)
)
)
-
+
)
)
! !
@@ -211,132 +216,75 @@
!SettingsAppl methodsFor:'aspects'!
smallSenseBackgroundLintEnabled
- <resource: #uiAspect>
- "automatically generated by UIPainter ..."
-
- "*** the code below creates a default model when invoked."
- "*** (which may not be the one you wanted)"
- "*** Please change as required and accept it in the browser."
- "*** (and replace this comment by something more useful ;-)"
smallSenseBackgroundLintEnabled isNil ifTrue:[
smallSenseBackgroundLintEnabled := true asValue.
-"/ if your app needs to be notified of changes, uncomment one of the lines below:
-"/ smallSenseBackgroundLintEnabled addDependent:self.
- smallSenseBackgroundLintEnabled onChangeSend:#updateModifiedChannel to:self.
+ smallSenseBackgroundLintEnabled onChangeSend:#updateModifiedChannel to:self.
].
^ smallSenseBackgroundLintEnabled.
- "Modified: / 04-02-2012 / 21:47:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 04-02-2012 / 21:47:56 / Jan Vrany "
!
smallSenseBackgroundTypingEnabled
- <resource: #uiAspect>
- "automatically generated by UIPainter ..."
-
- "*** the code below creates a default model when invoked."
- "*** (which may not be the one you wanted)"
- "*** Please change as required and accept it in the browser."
- "*** (and replace this comment by something more useful ;-)"
smallSenseBackgroundTypingEnabled isNil ifTrue:[
smallSenseBackgroundTypingEnabled := true asValue.
-"/ if your app needs to be notified of changes, uncomment one of the lines below:
-"/ smallSenseBackgroundTypingEnabled addDependent:self.
- smallSenseBackgroundTypingEnabled onChangeSend:#updateModifiedChannel to:self.
+ smallSenseBackgroundTypingEnabled onChangeSend:#updateModifiedChannel to:self.
].
^ smallSenseBackgroundTypingEnabled.
- "Modified: / 04-02-2012 / 21:48:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 04-02-2012 / 21:48:02 / Jan Vrany "
!
smallSenseCompleteIfUnambiguous
- <resource: #uiAspect>
- "automatically generated by UIPainter ..."
-
- "*** the code below creates a default model when invoked."
- "*** (which may not be the one you wanted)"
- "*** Please change as required and accept it in the browser."
- "*** (and replace this comment by something more useful ;-)"
smallSenseCompleteIfUnambiguous isNil ifTrue:[
smallSenseCompleteIfUnambiguous := true asValue.
-"/ if your app needs to be notified of changes, uncomment one of the lines below:
-"/ smallSenseBackgroundLintEnabled addDependent:self.
- smallSenseCompleteIfUnambiguous onChangeSend:#updateModifiedChannel to:self.
+ smallSenseCompleteIfUnambiguous onChangeSend:#updateModifiedChannel to:self.
].
^ smallSenseCompleteIfUnambiguous.
- "Created: / 18-01-2014 / 23:36:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Created: / 18-01-2014 / 23:36:58 / Jan Vrany "
!
smallSenseCompletionEnabled
- <resource: #uiAspect>
- "automatically generated by UIPainter ..."
-
- "*** the code below creates a default model when invoked."
- "*** (which may not be the one you wanted)"
- "*** Please change as required and accept it in the browser."
- "*** (and replace this comment by something more useful ;-)"
smallSenseCompletionEnabled isNil ifTrue:[
smallSenseCompletionEnabled := true asValue.
-"/ if your app needs to be notified of changes, uncomment one of the lines below:
-"/ smallSenseCompletionEnabled addDependent:self.
-"/ smallSenseCompletionEnabled onChangeSend:#smallSenseCompletionEnabledChanged to:self.
- smallSenseCompletionEnabled onChangeSend:#updateModifiedChannel to:self.
-
+ smallSenseCompletionEnabled onChangeSend:#updateModifiedChannel to:self.
].
^ smallSenseCompletionEnabled.
- "Modified: / 27-02-2014 / 09:33:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 27-02-2014 / 09:33:53 / Jan Vrany "
!
smallSenseElectricEditSupportEnabled
- <resource: #uiAspect>
- "automatically generated by UIPainter ..."
-
- "*** the code below creates a default model when invoked."
- "*** (which may not be the one you wanted)"
- "*** Please change as required and accept it in the browser."
- "*** (and replace this comment by something more useful ;-)"
smallSenseElectricEditSupportEnabled isNil ifTrue:[
smallSenseElectricEditSupportEnabled := true asValue.
-"/ if your app needs to be notified of changes, uncomment one of the lines below:
-"/ smallSenseElectricEditSupportEnabled addDependent:self.
- smallSenseElectricEditSupportEnabled onChangeSend:#updateModifiedChannel to:self.
-
+ smallSenseElectricEditSupportEnabled onChangeSend:#updateModifiedChannel to:self.
].
^ smallSenseElectricEditSupportEnabled.
- "Modified: / 26-07-2013 / 12:36:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 26-07-2013 / 12:36:25 / Jan Vrany "
!
smallSenseEnabled
- <resource: #uiAspect>
- "automatically generated by UIPainter ..."
-
- "*** the code below creates a default model when invoked."
- "*** (which may not be the one you wanted)"
- "*** Please change as required and accept it in the browser."
- "*** (and replace this comment by something more useful ;-)"
smallSenseEnabled isNil ifTrue:[
smallSenseEnabled := true asValue.
-"/ if your app needs to be notified of changes, uncomment one of the lines below:
-"/ smallSenseEnabled addDependent:self.
- smallSenseEnabled onChangeSend:#updateModifiedChannel to:self.
+ smallSenseEnabled onChangeSend:#updateModifiedChannel to:self.
].
^ smallSenseEnabled.
- "Modified: / 04-02-2012 / 21:48:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 04-02-2012 / 21:48:11 / Jan Vrany "
!
smallSenseEnabledAndCompletionEnabled
--- a/SmallSense__SmalltalkChecker.st Wed Oct 15 11:50:23 2014 +0100
+++ b/SmallSense__SmalltalkChecker.st Tue Nov 25 08:00:39 2014 +0000
@@ -125,11 +125,11 @@
[
each checkMethod: context.
] on: Error do:[:ex|
- Service debugging ifTrue:[
- Service debugging: false.
+ SmalltalkLintService debugging ifTrue:[
+ SmalltalkLintService debugging: false.
ex pass.
] ifFalse:[
- Errors at: each class ifAbsentPut:[ context method source ].
+ Errors at: each class ifAbsentPut:[ (context selectedClass compiledMethodAt: context selector) source ].
]
]
].
@@ -138,6 +138,7 @@
"Modified: / 24-08-2010 / 21:32:39 / Jan Vrany <enter your email here>"
"Created: / 17-02-2012 / 00:50:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified (format): / 16-10-2014 / 01:08:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!SmalltalkChecker class methodsFor:'documentation'!
--- a/SmallSense__SmalltalkInferencer.st Wed Oct 15 11:50:23 2014 +0100
+++ b/SmallSense__SmalltalkInferencer.st Tue Nov 25 08:00:39 2014 +0000
@@ -377,6 +377,10 @@
class := cls.
classInfo := clsInfo.
+ "/ Do not process if class is troublesome
+ classInfo isErrorneous ifTrue:[
+ ^ self.
+ ].
"Fill types with cached data..."
c := class.
@@ -422,7 +426,7 @@
].
"Created: / 27-11-2011 / 16:22:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified (format): / 01-03-2014 / 23:19:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified (comment): / 21-11-2014 / 17:19:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!SmalltalkInferencer::Phase1 methodsFor:'visiting'!
--- a/SmallSense__SmalltalkLintHighlighter.st Wed Oct 15 11:50:23 2014 +0100
+++ b/SmallSense__SmalltalkLintHighlighter.st Tue Nov 25 08:00:39 2014 +0000
@@ -194,19 +194,18 @@
| string |
string := text string.
- rule result isParseTreeEnvironment ifTrue:[
- formattingMethod ifTrue:[
- rule resultSelectionIntervalsForSource: string tree: tree do: [:interval|
- interval notEmptyOrNil ifTrue:[
- (interval first == 1 and:[interval last == text size]) ifTrue:[
- (OperatingSystem getLoginName = 'jv') ifTrue:[
- Transcript showCR:'>> no meaningful selection interval for ' , rule printString.
- ].
- ] ifFalse:[
- self mark: text from: interval first to: interval last for: rule.
- ]
+
+ formattingMethod ifTrue:[
+ rule resultSelectionIntervalsForSource: string tree: tree do: [:interval|
+ interval notEmptyOrNil ifTrue:[
+ (interval first == 1 and:[interval last == text size]) ifTrue:[
+ (OperatingSystem getLoginName = 'jv') ifTrue:[
+ Transcript showCR:'>> no meaningful selection interval for ' , rule printString.
+ ].
+ ] ifFalse:[
+ self mark: text from: interval first to: interval last for: rule.
]
- ].
+ ]
].
] ifFalse: [
| searches |
@@ -223,12 +222,11 @@
self mark: text from: i to: (i + search size - 1) for: rule.
i := i + search size + 1.
]
-
-
]
]
"Created: / 03-02-2012 / 10:39:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 16-10-2014 / 15:20:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!SmalltalkLintHighlighter methodsFor:'initialization'!
--- a/SmallSense__SmalltalkLintService.st Wed Oct 15 11:50:23 2014 +0100
+++ b/SmallSense__SmalltalkLintService.st Tue Nov 25 08:00:39 2014 +0000
@@ -155,9 +155,11 @@
UserPreferences current smallSenseBackgroundLintEnabled ifTrue:[
| rulesHierarchical ruleList |
+ "/xxxx
rulesHierarchical := rulesHolder value.
rulesHierarchical notNil ifTrue:[
ruleList := rulesHierarchical flattened reject:[:each| SmalltalkChecker forceDisabledRules includes: each class name].
+ ruleList := ruleList collect:[ :e | e class new ].
rules := RBCompositeLintRule rules: ruleList.
highlighter rules: ruleList.
self process.
@@ -168,7 +170,7 @@
super update:something with:aParameter from:changedObject
- "Modified: / 01-09-2013 / 09:35:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified (format): / 16-10-2014 / 23:20:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!SmalltalkLintService methodsFor:'event handling'!
@@ -227,15 +229,15 @@
| annotations |
(annotations := highlighter annotations) isEmptyOrNil ifTrue:[ ^ nil ].
- annotations do:[:a|
- | l |
+ annotations do:[:annotation|
+ | line |
- (l := a line) isNil ifTrue:[
- l := codeView lineOfCharacterPosition: a startPosition.
- a line: l.
+ (line := annotation line) isNil ifTrue:[
+ line := codeView lineOfCharacterPosition: annotation startPosition.
+ annotation line: line.
].
- l > lineNo ifTrue:[ ^ nil ].
- l == lineNo ifTrue:[ ^ a ].
+ line > lineNo ifTrue:[ ^ nil ].
+ line == lineNo ifTrue:[ ^ annotation ].
].
^nil
@@ -293,17 +295,17 @@
Screen currentScreenQuerySignal answer:codeView device
do:[
Error handle:[:ex |
- "/ |errMsg|
+ | errMsg |
Debugging == true ifTrue:[
Debugging := false.
ex pass.
].
- "/ Transcript topView raiseDeiconified.
- "/ Transcript showCR:'ParseError: ', ex description.
- "/ errMsg := ex description asStringCollection first asString.
- "/ self showInfo:(errMsg colorizeAllWith:Color red).
+"/ Transcript topView raiseDeiconified.
+"/ Transcript showCR:'ParseError: ', ex description.
+ errMsg := ex description asStringCollection first asString.
+ self showInfo:(('Smalltalk Lint: ',errMsg) colorizeAllWith:Color red).
] do:[
env := (SmallSense::SmalltalkUnacceptedMethodEnvironment onClass:cls methodSource: oldCode).
SmalltalkChecker runRule: rules onEnvironment: env
@@ -320,7 +322,7 @@
]
"Created: / 24-01-2012 / 12:44:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 26-08-2013 / 10:19:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 16-10-2014 / 01:10:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
rehighlight: delayed
@@ -377,6 +379,15 @@
"Modified: / 07-08-2013 / 00:19:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
+!SmalltalkLintService methodsFor:'registering'!
+
+unregister
+ super unregister.
+ rulesHolder removeDependent: self.
+
+ "Created: / 14-10-2014 / 22:40:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
!SmalltalkLintService class methodsFor:'documentation'!
version_HG
--- a/SmallSense__SmalltalkQuickFixer.st Wed Oct 15 11:50:23 2014 +0100
+++ b/SmallSense__SmalltalkQuickFixer.st Tue Nov 25 08:00:39 2014 +0000
@@ -143,16 +143,22 @@
^ self
].
(changes size == 1 and: [ changes anElement isMethodCodeChange ]) ifTrue: [
- | oldSource newSource |
+ "/ Only one change, modify the code directly in the editor
+
+ | oldSource newSource |
oldSource := view contents asString string.
newSource := changes anElement source asString.
oldSource ~= newSource ifTrue: [
+ | line |
+
+ line := view firstLineShown.
view contents: newSource asStringCollection clear: false.
view modified: true.
view isCodeView2 ifTrue: [
view reallyModifiedChannel value: true.
- ]
+ ].
+ view scrollToLine:line.
].
] ifFalse: [
| browser |
@@ -167,7 +173,7 @@
]
"Created: / 16-02-2012 / 14:46:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 19-09-2013 / 15:18:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 16-10-2014 / 03:05:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!SmalltalkQuickFixer::QuickFix methodsFor:'accessing'!
--- a/abbrev.stc Wed Oct 15 11:50:23 2014 +0100
+++ b/abbrev.stc Tue Nov 25 08:00:39 2014 +0000
@@ -2,6 +2,8 @@
# this file is needed for stc to be able to compile modules independently.
# it provides information about a classes filename, category and especially namespace.
SmallSense::AbstractDIalog SmallSense__AbstractDIalog jv:smallsense 'SmallSense-Core-Interface-Search' 1
+SmallSense::AbstractTestCase SmallSense__AbstractTestCase stx:goodies/smallsense 'SmallSense-Tests' 1
+SmallSense::BaseTestClass SmallSense__BaseTestClass stx:goodies/smallsense 'SmallSense-Tests-Obsolete' 1
SmallSense::CodeHighlightingService SmallSense__CodeHighlightingService stx:goodies/smallsense 'SmallSense-Core-Services' 0
SmallSense::CodeNavigationService SmallSense__CodeNavigationService stx:goodies/smallsense 'SmallSense-Core-Services' 0
SmallSense::CompletionContext SmallSense__CompletionContext stx:goodies/smallsense 'SmallSense-Core' 0
@@ -13,6 +15,7 @@
SmallSense::EditService SmallSense__EditService stx:goodies/smallsense 'SmallSense-Core-Services' 0
SmallSense::EditSupport SmallSense__EditSupport stx:goodies/smallsense 'SmallSense-Core-Services' 0
SmallSense::Info SmallSense__Info stx:goodies/smallsense 'SmallSense-Smalltalk-Types-Info' 0
+SmallSense::JavaCompletionEngineEnvironmentResource SmallSense__JavaCompletionEngineEnvironmentResource stx:goodies/smallsense 'SmallSense-Tests' 1
SmallSense::Manager SmallSense__Manager stx:goodies/smallsense 'SmallSense-Smalltalk-Types-Info' 0
SmallSense::PO SmallSense__PO stx:goodies/smallsense 'SmallSense-Core-Interface-PO' 0
SmallSense::ParseTreeIndex SmallSense__ParseTreeIndex stx:goodies/smallsense 'SmallSense-Core-Index' 0
@@ -30,7 +33,9 @@
SmallSense::SmalltalkQuickFixer SmallSense__SmalltalkQuickFixer stx:goodies/smallsense 'SmallSense-Smalltalk-Lint' 0
SmallSense::SmalltalkSyntaxHighlighter SmallSense__SmalltalkSyntaxHighlighter stx:goodies/smallsense 'SmallSense-Smalltalk' 3
SmallSense::SmalltalkUnacceptedMethodEnvironment SmallSense__SmalltalkUnacceptedMethodEnvironment stx:goodies/smallsense 'SmallSense-Smalltalk-Lint' 0
+SmallSense::TestCase SmallSense__TestCase stx:goodies/smallsense 'SmallSense-Tests-Obsolete' 1
SmallSense::TokenPatternMatcher SmallSense__TokenPatternMatcher stx:goodies/smallsense 'SmallSense-Utils-Matcher' 0
+SmallSense::TokenPatternMatcherTests SmallSense__TokenPatternMatcherTests stx:goodies/smallsense 'SmallSense-Tests' 1
SmallSense::TokenPatternParser SmallSense__TokenPatternParser stx:goodies/smallsense 'SmallSense-Utils-Matcher' 0
SmallSense::TokenPatternToken SmallSense__TokenPatternToken stx:goodies/smallsense 'SmallSense-Utils-Matcher' 0
SmallSense::TokenPatternTokenSet SmallSense__TokenPatternTokenSet stx:goodies/smallsense 'SmallSense-Utils-Matcher' 0
@@ -43,17 +48,22 @@
SmallSense::ClassInfo SmallSense__ClassInfo stx:goodies/smallsense 'SmallSense-Smalltalk-Types-Info' 0
SmallSense::ClassPO SmallSense__ClassPO stx:goodies/smallsense 'SmallSense-Core-Interface-PO' 0
SmallSense::ClassType SmallSense__ClassType stx:goodies/smallsense 'SmallSense-Smalltalk-Types' 0
+SmallSense::CompletionEngineTests SmallSense__CompletionEngineTests stx:goodies/smallsense 'SmallSense-Tests' 1
SmallSense::ConstantPO SmallSense__ConstantPO stx:goodies/smallsense 'SmallSense-Core-Interface-PO' 0
+SmallSense::EditSupportTests SmallSense__EditSupportTests stx:goodies/smallsense 'SmallSense-Tests' 1
+SmallSense::FinderTests SmallSense__FinderTests stx:goodies/smallsense 'SmallSense-Tests-Obsolete' 1
SmallSense::GenericEditSupport SmallSense__GenericEditSupport stx:goodies/smallsense 'SmallSense-Core-Services' 0
SmallSense::JavaEditSupport SmallSense__JavaEditSupport stx:goodies/smallsense 'SmallSense-Java' 0
SmallSense::JavaImportPO SmallSense__JavaImportPO stx:goodies/smallsense 'SmallSense-Java-Interface-PO' 0
SmallSense::MethodBindingPO SmallSense__MethodBindingPO stx:goodies/smallsense 'SmallSense-Java-Interface-PO' 0
SmallSense::MethodInfo SmallSense__MethodInfo stx:goodies/smallsense 'SmallSense-Smalltalk-Types-Info' 0
SmallSense::MethodPO SmallSense__MethodPO stx:goodies/smallsense 'SmallSense-Core-Interface-PO' 0
+SmallSense::RecognizerTests SmallSense__RecognizerTests stx:goodies/smallsense 'SmallSense-Tests-Obsolete' 1
SmallSense::SmalltalkCompletionEngine SmallSense__SmalltalkCompletionEngine stx:goodies/smallsense 'SmallSense-Smalltalk' 0
SmallSense::SmalltalkEditSupport SmallSense__SmalltalkEditSupport stx:goodies/smallsense 'SmallSense-Smalltalk' 0
SmallSense::SmalltalkInferencer SmallSense__SmalltalkInferencer stx:goodies/smallsense 'SmallSense-Smalltalk-Types-Inference' 0
SmallSense::SmalltalkParseNodeFinder SmallSense__SmalltalkParseNodeFinder stx:goodies/smallsense 'SmallSense-Smalltalk' 0
+SmallSense::SmalltalkParserTests SmallSense__SmalltalkParserTests stx:goodies/smallsense 'SmallSense-Tests-Obsolete' 1
SmallSense::SnippetPO SmallSense__SnippetPO stx:goodies/smallsense 'SmallSense-Core-Interface-PO' 0
SmallSense::UnionType SmallSense__UnionType stx:goodies/smallsense 'SmallSense-Smalltalk-Types' 0
SmallSense::UnknownType SmallSense__UnknownType stx:goodies/smallsense 'SmallSense-Smalltalk-Types' 1
@@ -61,27 +71,17 @@
SmallSense::VariablePO SmallSense__VariablePO stx:goodies/smallsense 'SmallSense-Core-Interface-PO' 0
SmallSense::ClassSearchDialog SmallSense__ClassSearchDialog jv:smallsense 'SmallSense-Core-Interface-Search' 3
SmallSense::AbstractJavaCompletionEngineSimple SmallSense__AbstractJavaCompletionEngineSimple stx:goodies/smallsense 'SmallSense-Java' 2
+SmallSense::AbstractJavaCompletionEngineTests SmallSense__AbstractJavaCompletionEngineTests stx:goodies/smallsense 'SmallSense-Tests' 1
SmallSense::GroovyEditSupport SmallSense__GroovyEditSupport stx:goodies/smallsense 'SmallSense-Groovy' 0
SmallSense::JavaCompletionEngine SmallSense__JavaCompletionEngine stx:goodies/smallsense 'SmallSense-Java' 0
SmallSense::JavaConstructorPO SmallSense__JavaConstructorPO stx:goodies/smallsense 'SmallSense-Java-Interface-PO' 0
-SmallSense::MethodKeywordRestPO SmallSense__MethodKeywordRestPO stx:goodies/smallsense 'SmallSense-Core-Interface-PO' 0
SmallSense::MethodSearchDialog SmallSense__MethodSearchDialog jv:smallsense 'SmallSense-Core-Interface-Search' 3
SmallSense::PackageSearchDialog SmallSense__PackageSearchDialog jv:smallsense 'SmallSense-Core-Interface-Search' 3
-SmallSense::JavaCompletionEngineSimple SmallSense__JavaCompletionEngineSimple stx:goodies/smallsense 'SmallSense-Java' 2
-SmallSense::GroovyCompletionEngineSimple SmallSense__GroovyCompletionEngineSimple stx:goodies/smallsense 'SmallSense-Groovy' 2
-SmallSense::AbstractJavaCompletionEngineTests SmallSense__AbstractJavaCompletionEngineTests stx:goodies/smallsense 'SmallSense-Tests' 1
-SmallSense::AbstractTestCase SmallSense__AbstractTestCase stx:goodies/smallsense 'SmallSense-Tests' 1
-SmallSense::BaseTestClass SmallSense__BaseTestClass stx:goodies/smallsense 'SmallSense-Tests-Obsolete' 1
-SmallSense::CompletionEngineTests SmallSense__CompletionEngineTests stx:goodies/smallsense 'SmallSense-Tests' 1
-SmallSense::EditSupportTests SmallSense__EditSupportTests stx:goodies/smallsense 'SmallSense-Tests' 1
-SmallSense::FinderTests SmallSense__FinderTests stx:goodies/smallsense 'SmallSense-Tests-Obsolete' 1
-SmallSense::GroovyCompletionEngineSimpleTests SmallSense__GroovyCompletionEngineSimpleTests stx:goodies/smallsense 'SmallSense-Tests' 1
-SmallSense::JavaCompletionEngineEnvironmentResource SmallSense__JavaCompletionEngineEnvironmentResource stx:goodies/smallsense 'SmallSense-Tests' 1
-SmallSense::JavaCompletionEngineTests SmallSense__JavaCompletionEngineTests stx:goodies/smallsense 'SmallSense-Tests' 1
SmallSense::JavaEditSupportTests SmallSense__JavaEditSupportTests stx:goodies/smallsense 'SmallSense-Tests' 1
-SmallSense::RecognizerTests SmallSense__RecognizerTests stx:goodies/smallsense 'SmallSense-Tests-Obsolete' 1
+SmallSense::MethodKeywordRestPO SmallSense__MethodKeywordRestPO stx:goodies/smallsense 'SmallSense-Core-Interface-PO' 0
SmallSense::SmalltalkCompletionEngineTests SmallSense__SmalltalkCompletionEngineTests stx:goodies/smallsense 'SmallSense-Tests' 1
SmallSense::SmalltalkEditSupportTests SmallSense__SmalltalkEditSupportTests stx:goodies/smallsense 'SmallSense-Tests' 1
-SmallSense::SmalltalkParserTests SmallSense__SmalltalkParserTests stx:goodies/smallsense 'SmallSense-Tests-Obsolete' 1
-SmallSense::TestCase SmallSense__TestCase stx:goodies/smallsense 'SmallSense-Tests-Obsolete' 1
-SmallSense::TokenPatternMatcherTests SmallSense__TokenPatternMatcherTests stx:goodies/smallsense 'SmallSense-Tests' 1
+SmallSense::GroovyCompletionEngineSimpleTests SmallSense__GroovyCompletionEngineSimpleTests stx:goodies/smallsense 'SmallSense-Tests' 1
+SmallSense::JavaCompletionEngineSimple SmallSense__JavaCompletionEngineSimple stx:goodies/smallsense 'SmallSense-Java' 2
+SmallSense::JavaCompletionEngineTests SmallSense__JavaCompletionEngineTests stx:goodies/smallsense 'SmallSense-Tests' 1
+SmallSense::GroovyCompletionEngineSimple SmallSense__GroovyCompletionEngineSimple stx:goodies/smallsense 'SmallSense-Groovy' 2
--- a/bc.mak Wed Oct 15 11:50:23 2014 +0100
+++ b/bc.mak Tue Nov 25 08:00:39 2014 +0000
@@ -34,7 +34,7 @@
-LOCALINCLUDES= -I$(INCLUDE_TOP)\stx\goodies\refactoryBrowser\helpers -I$(INCLUDE_TOP)\stx\goodies\refactoryBrowser\lint -I$(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser -I$(INCLUDE_TOP)\stx\goodies\regex -I$(INCLUDE_TOP)\stx\libbasic -I$(INCLUDE_TOP)\stx\libbasic2 -I$(INCLUDE_TOP)\stx\libbasic3 -I$(INCLUDE_TOP)\stx\libcomp -I$(INCLUDE_TOP)\stx\libhtml -I$(INCLUDE_TOP)\stx\libjava -I$(INCLUDE_TOP)\stx\libjava\tools -I$(INCLUDE_TOP)\stx\libtool -I$(INCLUDE_TOP)\stx\libview -I$(INCLUDE_TOP)\stx\libview2 -I$(INCLUDE_TOP)\stx\libwidg -I$(INCLUDE_TOP)\stx\libwidg2
+LOCALINCLUDES= -I$(INCLUDE_TOP)\stx\goodies\refactoryBrowser\helpers -I$(INCLUDE_TOP)\stx\goodies\refactoryBrowser\lint -I$(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser -I$(INCLUDE_TOP)\stx\goodies\regex -I$(INCLUDE_TOP)\stx\goodies\sunit -I$(INCLUDE_TOP)\stx\libbasic -I$(INCLUDE_TOP)\stx\libbasic2 -I$(INCLUDE_TOP)\stx\libbasic3 -I$(INCLUDE_TOP)\stx\libcomp -I$(INCLUDE_TOP)\stx\libhtml -I$(INCLUDE_TOP)\stx\libjava -I$(INCLUDE_TOP)\stx\libjava\tools -I$(INCLUDE_TOP)\stx\libtool -I$(INCLUDE_TOP)\stx\libview -I$(INCLUDE_TOP)\stx\libview2 -I$(INCLUDE_TOP)\stx\libwidg -I$(INCLUDE_TOP)\stx\libwidg2
LOCALDEFINES=
STCLOCALOPT=-package=$(PACKAGE) -I. $(LOCALINCLUDES) -headerDir=. $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALDEFINES) -varPrefix=$(LIBNAME)
@@ -61,6 +61,7 @@
pushd ..\..\libview & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
pushd ..\..\libview2 & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
pushd ..\refactoryBrowser\browser & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+ pushd ..\sunit & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
pushd ..\..\libwidg & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
pushd ..\refactoryBrowser\lint & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
pushd ..\..\libhtml & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
@@ -148,7 +149,7 @@
$(OUTDIR)SmallSense__MethodKeywordRestPO.$(O) SmallSense__MethodKeywordRestPO.$(H): SmallSense__MethodKeywordRestPO.st $(INCLUDE_TOP)\stx\goodies\smallsense\SmallSense__MethodPO.$(H) $(INCLUDE_TOP)\stx\goodies\smallsense\SmallSense__PO.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libwidg2\HierarchicalItem.$(H) $(STCHDR)
$(OUTDIR)SmallSense__JavaCompletionEngineSimple.$(O) SmallSense__JavaCompletionEngineSimple.$(H): SmallSense__JavaCompletionEngineSimple.st $(INCLUDE_TOP)\stx\goodies\smallsense\SmallSense__AbstractJavaCompletionEngine.$(H) $(INCLUDE_TOP)\stx\goodies\smallsense\SmallSense__AbstractJavaCompletionEngineSimple.$(H) $(INCLUDE_TOP)\stx\goodies\smallsense\SmallSense__CompletionEngine.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)SmallSense__GroovyCompletionEngineSimple.$(O) SmallSense__GroovyCompletionEngineSimple.$(H): SmallSense__GroovyCompletionEngineSimple.st $(INCLUDE_TOP)\stx\goodies\smallsense\SmallSense__AbstractJavaCompletionEngine.$(H) $(INCLUDE_TOP)\stx\goodies\smallsense\SmallSense__AbstractJavaCompletionEngineSimple.$(H) $(INCLUDE_TOP)\stx\goodies\smallsense\SmallSense__CompletionEngine.$(H) $(INCLUDE_TOP)\stx\goodies\smallsense\SmallSense__JavaCompletionEngineSimple.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
-$(OUTDIR)extensions.$(O): extensions.st $(INCLUDE_TOP)\stx\goodies\refactoryBrowser\lint\RBLintRule.$(H) $(INCLUDE_TOP)\stx\goodies\refactoryBrowser\lint\RBTransformationRule.$(H) $(INCLUDE_TOP)\stx\libbasic\Collection.$(H) $(INCLUDE_TOP)\stx\libbasic\CompiledCode.$(H) $(INCLUDE_TOP)\stx\libbasic\ConfigurableFeatures.$(H) $(INCLUDE_TOP)\stx\libbasic\Dictionary.$(H) $(INCLUDE_TOP)\stx\libbasic\ExecutableFunction.$(H) $(INCLUDE_TOP)\stx\libbasic\IdentityDictionary.$(H) $(INCLUDE_TOP)\stx\libbasic\Method.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\Set.$(H) $(INCLUDE_TOP)\stx\libbasic\UserPreferences.$(H) $(INCLUDE_TOP)\stx\libcomp\AssignmentNode.$(H) $(INCLUDE_TOP)\stx\libcomp\BlockNode.$(H) $(INCLUDE_TOP)\stx\libcomp\MessageNode.$(H) $(INCLUDE_TOP)\stx\libcomp\ParseErrorNode.$(H) $(INCLUDE_TOP)\stx\libcomp\ParseNode.$(H) $(INCLUDE_TOP)\stx\libcomp\PrimaryNode.$(H) $(INCLUDE_TOP)\stx\libcomp\PrimitiveNode.$(H) $(INCLUDE_TOP)\stx\libcomp\ReturnNode.$(H) $(INCLUDE_TOP)\stx\libcomp\StatementNode.$(H) $(INCLUDE_TOP)\stx\libcomp\VariableNode.$(H) $(INCLUDE_TOP)\stx\libhtml\HTMLDocumentFrame.$(H) $(INCLUDE_TOP)\stx\libhtml\HTMLDocumentView.$(H) $(INCLUDE_TOP)\stx\libtool\SystemBrowser.$(H) $(INCLUDE_TOP)\stx\libtool\Tools__BackgroundSourceProcessingService.$(H) $(INCLUDE_TOP)\stx\libtool\Tools__CodeCompletionService.$(H) $(INCLUDE_TOP)\stx\libtool\Tools__CodeHighlightingService.$(H) $(INCLUDE_TOP)\stx\libtool\Tools__CodeNavigationService.$(H) $(INCLUDE_TOP)\stx\libtool\Tools__CodeViewService.$(H) $(INCLUDE_TOP)\stx\libtool\Tools__NavigationState.$(H) $(INCLUDE_TOP)\stx\libtool\Tools__NewSystemBrowser.$(H) $(INCLUDE_TOP)\stx\libview\DisplaySurface.$(H) $(INCLUDE_TOP)\stx\libview\GraphicsMedium.$(H) $(INCLUDE_TOP)\stx\libview\SimpleView.$(H) $(INCLUDE_TOP)\stx\libview\View.$(H) $(INCLUDE_TOP)\stx\libview2\ApplicationModel.$(H) $(INCLUDE_TOP)\stx\libview2\Model.$(H) $(INCLUDE_TOP)\stx\libwidg\EditTextView.$(H) $(INCLUDE_TOP)\stx\libwidg\EditTextViewCompletionSupport.$(H) $(INCLUDE_TOP)\stx\libwidg\ListView.$(H) $(INCLUDE_TOP)\stx\libwidg\TextCollector.$(H) $(INCLUDE_TOP)\stx\libwidg\TextView.$(H) $(INCLUDE_TOP)\stx\libwidg\Workspace.$(H) $(INCLUDE_TOP)\stx\libwidg2\DoWhatIMeanSupport.$(H) $(STCHDR)
+$(OUTDIR)extensions.$(O): extensions.st $(INCLUDE_TOP)\stx\goodies\refactoryBrowser\lint\RBLintRule.$(H) $(INCLUDE_TOP)\stx\goodies\refactoryBrowser\lint\RBTransformationRule.$(H) $(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser\RBBlockNode.$(H) $(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser\RBMethodNode.$(H) $(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser\RBProgramNode.$(H) $(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser\RBStatementNode.$(H) $(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser\RBValueNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Collection.$(H) $(INCLUDE_TOP)\stx\libbasic\CompiledCode.$(H) $(INCLUDE_TOP)\stx\libbasic\ConfigurableFeatures.$(H) $(INCLUDE_TOP)\stx\libbasic\Dictionary.$(H) $(INCLUDE_TOP)\stx\libbasic\ExecutableFunction.$(H) $(INCLUDE_TOP)\stx\libbasic\IdentityDictionary.$(H) $(INCLUDE_TOP)\stx\libbasic\Method.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\Set.$(H) $(INCLUDE_TOP)\stx\libbasic\UserPreferences.$(H) $(INCLUDE_TOP)\stx\libcomp\AssignmentNode.$(H) $(INCLUDE_TOP)\stx\libcomp\BlockNode.$(H) $(INCLUDE_TOP)\stx\libcomp\MessageNode.$(H) $(INCLUDE_TOP)\stx\libcomp\ParseErrorNode.$(H) $(INCLUDE_TOP)\stx\libcomp\ParseNode.$(H) $(INCLUDE_TOP)\stx\libcomp\Parser.$(H) $(INCLUDE_TOP)\stx\libcomp\PrimaryNode.$(H) $(INCLUDE_TOP)\stx\libcomp\PrimitiveNode.$(H) $(INCLUDE_TOP)\stx\libcomp\ReturnNode.$(H) $(INCLUDE_TOP)\stx\libcomp\Scanner.$(H) $(INCLUDE_TOP)\stx\libcomp\StatementNode.$(H) $(INCLUDE_TOP)\stx\libcomp\VariableNode.$(H) $(INCLUDE_TOP)\stx\libhtml\HTMLDocumentFrame.$(H) $(INCLUDE_TOP)\stx\libhtml\HTMLDocumentView.$(H) $(INCLUDE_TOP)\stx\libtool\SystemBrowser.$(H) $(INCLUDE_TOP)\stx\libtool\Tools__BackgroundSourceProcessingService.$(H) $(INCLUDE_TOP)\stx\libtool\Tools__CodeCompletionService.$(H) $(INCLUDE_TOP)\stx\libtool\Tools__CodeHighlightingService.$(H) $(INCLUDE_TOP)\stx\libtool\Tools__CodeNavigationService.$(H) $(INCLUDE_TOP)\stx\libtool\Tools__CodeViewService.$(H) $(INCLUDE_TOP)\stx\libtool\Tools__NavigationState.$(H) $(INCLUDE_TOP)\stx\libtool\Tools__NewSystemBrowser.$(H) $(INCLUDE_TOP)\stx\libview\DisplaySurface.$(H) $(INCLUDE_TOP)\stx\libview\GraphicsMedium.$(H) $(INCLUDE_TOP)\stx\libview\SimpleView.$(H) $(INCLUDE_TOP)\stx\libview\View.$(H) $(INCLUDE_TOP)\stx\libview2\ApplicationModel.$(H) $(INCLUDE_TOP)\stx\libview2\Model.$(H) $(INCLUDE_TOP)\stx\libwidg\EditTextView.$(H) $(INCLUDE_TOP)\stx\libwidg\EditTextViewCompletionSupport.$(H) $(INCLUDE_TOP)\stx\libwidg\ListView.$(H) $(INCLUDE_TOP)\stx\libwidg\TextCollector.$(H) $(INCLUDE_TOP)\stx\libwidg\TextView.$(H) $(INCLUDE_TOP)\stx\libwidg\Workspace.$(H) $(INCLUDE_TOP)\stx\libwidg2\DoWhatIMeanSupport.$(H) $(STCHDR)
$(OUTDIR)SmallSense__MethodSearchDialog.$(O) SmallSense__MethodSearchDialog.$(H): SmallSense__MethodSearchDialog.st $(INCLUDE_TOP)\stx\goodies/smallsense\SmallSense__AbstractDIalog.$(H) $(INCLUDE_TOP)\stx\goodies/smallsense\SmallSense__AbstractSearchDialog.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview2\ApplicationModel.$(H) $(INCLUDE_TOP)\stx\libview2\Model.$(H) $(INCLUDE_TOP)\stx\libview2\SimpleDialog.$(H) $(STCHDR)
$(OUTDIR)SmallSense__PackageSearchDialog.$(O) SmallSense__PackageSearchDialog.$(H): SmallSense__PackageSearchDialog.st $(INCLUDE_TOP)\stx\goodies/smallsense\SmallSense__AbstractDIalog.$(H) $(INCLUDE_TOP)\stx\goodies/smallsense\SmallSense__AbstractSearchDialog.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview2\ApplicationModel.$(H) $(INCLUDE_TOP)\stx\libview2\Model.$(H) $(INCLUDE_TOP)\stx\libview2\SimpleDialog.$(H) $(STCHDR)
$(OUTDIR)SmallSense__JavaCompletionEngineSimple.$(O) SmallSense__JavaCompletionEngineSimple.$(H): SmallSense__JavaCompletionEngineSimple.st $(INCLUDE_TOP)\stx\goodies/smallsense\SmallSense__AbstractJavaCompletionEngine.$(H) $(INCLUDE_TOP)\stx\goodies/smallsense\SmallSense__AbstractJavaCompletionEngineSimple.$(H) $(INCLUDE_TOP)\stx\goodies/smallsense\SmallSense__CompletionEngine.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
--- a/extensions.st Wed Oct 15 11:50:23 2014 +0100
+++ b/extensions.st Tue Nov 25 08:00:39 2014 +0000
@@ -216,12 +216,35 @@
!Method methodsFor:'inspecting'!
-inspector2TabParseTreeInspector
+inspector2TabRBParseTreeInspector
+ <inspector2Tab>
+
^ (self newInspector2Tab)
- label:'Parse Tree';
+ label:'Parse Tree (RB)';
priority:35;
application:
[
+ | src node |
+
+ src := self source.
+ node := RBParser parseMethod: src.
+ SmallSense::ParseTreeInspector new node:node source:src.
+ ];
+ yourself
+
+ "Created: / 15-10-2014 / 02:37:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!Method methodsFor:'inspecting'!
+
+inspector2TabSTXParseTreeInspector
+ <inspector2Tab>
+
+ ^ (self newInspector2Tab)
+ label:'Parse Tree (ST/X)';
+ priority:36;
+ application:
+ [
| src parser |
src := self source.
@@ -230,17 +253,7 @@
];
yourself
- "Created: / 09-04-2014 / 09:31:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 10-04-2014 / 08:58:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!Method methodsFor:'inspecting'!
-
-inspector2Tabs
- ^ super inspector2Tabs , #(inspector2TabParseTreeInspector)
-
- "Created: / 09-04-2014 / 09:32:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 10-04-2014 / 08:47:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Created: / 15-10-2014 / 11:23:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!ParseErrorNode methodsFor:'enumeration'!
@@ -304,6 +317,23 @@
"Created: / 26-11-2011 / 12:37:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
+!ParseNode methodsFor:'inspecting'!
+
+inspector2TabSTXParseTreeInspector
+ <inspector2Tab>
+
+ ^ (self newInspector2Tab)
+ label:'Parse Tree (ST/X)';
+ priority:36;
+ application:
+ [
+ SmallSense::ParseTreeInspector new node:self source:nil.
+ ];
+ yourself
+
+ "Created: / 15-10-2014 / 11:23:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
!ParseNode methodsFor:'testing'!
isSelector
@@ -322,6 +352,28 @@
"Modified: / 24-09-2013 / 10:05:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
+!Parser methodsFor:'inspecting'!
+
+inspector2TabSTXParseTreeInspector
+ <inspector2Tab>
+
+ ^ (self newInspector2Tab)
+ label:'Parse Tree (ST/X)';
+ priority:36;
+ application:
+ [
+ | src parser |
+
+ source isExternalStream ifFalse:[
+ src := source collection
+ ].
+ SmallSense::ParseTreeInspector new node:tree source:src.
+ ];
+ yourself
+
+ "Created: / 15-10-2014 / 11:23:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
!PrimaryNode methodsFor:'enumeration'!
childNamesAndValuesDo:aBlock
@@ -340,6 +392,37 @@
"Created: / 08-12-2013 / 22:25:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
+!RBBlockNode methodsFor:'enumeration'!
+
+childNamesAndValuesDo:aBlock
+ arguments withIndexDo:[:statement :index |
+ aBlock value: 'argument[', index printString ,']' value: statement
+ ].
+ body statements withIndexDo:[:statement :index |
+ aBlock value: 'statement[', index printString ,']' value: statement
+ ]
+
+ "Created: / 15-10-2014 / 10:42:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!RBContainsSmalltalkXEOLCommentRule methodsFor:'accessing'!
+
+fixes: fixer
+ | changes |
+
+ changes := self changes.
+ changes notEmptyOrNil ifTrue:[
+ fixer fix
+ label:'Change EOL comments to standard Smalltalk comments';
+ action: [ fixer apply:
+ ((ChangeSet withAll:changes) name: self name)
+ ].
+ ]
+
+ "Created: / 01-02-2012 / 12:11:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified (format): / 17-10-2014 / 00:42:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
!RBLintRule methodsFor:'accessing'!
fixes: aSmallSenseQuickFixer
@@ -350,6 +433,65 @@
"Created: / 01-02-2012 / 12:09:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
+!RBMethodNode methodsFor:'enumeration'!
+
+childNamesAndValuesDo:aBlock
+ arguments withIndexDo:[:statement :index |
+ aBlock value: 'argument[', index printString ,']' value: statement
+ ].
+ body statements withIndexDo:[:statement :index |
+ aBlock value: 'statement[', index printString ,']' value: statement
+ ]
+
+ "Created: / 15-10-2014 / 09:28:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 15-10-2014 / 10:41:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!RBProgramNode methodsFor:'enumeration'!
+
+childNamesAndValuesDo:aBlock
+
+ "Enumerates all direct children and evaluates a block
+ with its name (usually instVar name) and the node itself"
+
+ self class allInstVarNames withIndexDo:[:n :i|
+ | v |
+
+ n ~~ #parent ifTrue:[
+ v := self instVarAt: i.
+ (v isKindOf: RBProgramNode) ifTrue:[
+ aBlock value: n value: v
+ ] ifFalse:[
+ (v isSequenceable) ifTrue:[
+ v withIndexDo:[ :v2 :i2|
+ (v2 isKindOf: RBProgramNode) ifTrue:[
+ aBlock value: (n, '[' , i2 printString , ']') value: v2.
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+
+ "Created: / 15-10-2014 / 10:39:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!RBProgramNode methodsFor:'accessing'!
+
+endPosition
+ ^ self stop
+
+ "Created: / 15-10-2014 / 09:34:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!RBProgramNode methodsFor:'accessing'!
+
+startPosition
+ ^ self start
+
+ "Created: / 15-10-2014 / 09:34:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
!RBTransformationRule methodsFor:'accessing'!
fixes: fixer
--- a/smallsense.rc Wed Oct 15 11:50:23 2014 +0100
+++ b/smallsense.rc Tue Nov 25 08:00:39 2014 +0000
@@ -25,7 +25,7 @@
VALUE "LegalCopyright", "Copyright Jan Vrany 2013-2014\0"
VALUE "ProductName", "SmallSense\0"
VALUE "ProductVersion", "6.2.4.0\0"
- VALUE "ProductDate", "Tue, 07 Oct 2014 14:13:45 GMT\0"
+ VALUE "ProductDate", "Wed, 15 Oct 2014 10:40:14 GMT\0"
END
END
--- a/stx_goodies_smallsense.st Wed Oct 15 11:50:23 2014 +0100
+++ b/stx_goodies_smallsense.st Tue Nov 25 08:00:39 2014 +0000
@@ -108,8 +108,10 @@
^ #(
#'stx:goodies/refactoryBrowser/helpers' "BrowserEnvironment - superclass of SmallSense::SmalltalkUnacceptedMethodEnvironment"
#'stx:goodies/refactoryBrowser/lint' "RBLintRule - extended"
+ #'stx:goodies/refactoryBrowser/parser' "RBBlockNode - extended"
#'stx:goodies/regex' "Regex::RxCharSetParser - superclass of SmallSense::TokenPatternParser::TokenSpecParser"
- #'stx:libbasic' "Autoload - superclass of SmallSense::AbstractJavaCompletionEngineTests"
+ #'stx:goodies/sunit' "TestAsserter - superclass of SmallSense::AbstractJavaCompletionEngineTests"
+ #'stx:libbasic' "Collection - extended"
#'stx:libcomp' "AbstractSyntaxHighlighter - superclass of SmallSense::SmalltalkParser"
#'stx:libhtml' "HTMLDocumentFrame - extended"
#'stx:libtool' "AbstractSettingsApplication - superclass of SmallSense::SettingsAppl"
@@ -128,7 +130,6 @@
by searching all classes (and their packages) which are referenced by my classes."
^ #(
- #'stx:goodies/refactoryBrowser/parser' "RBFormatter - referenced by SmallSense::SmalltalkEditSupport>>electricInsertSnippetAfterDoubleColon"
#'stx:libbasic2' "BackgroundQueueProcessingJob - referenced by SmallSense::Manager>>initialize"
#'stx:libbasic3' "ChangeSet - referenced by RBTransformationRule>>fixes:"
#'stx:libjava' "Java - referenced by SmallSense::JavaCompletionEngine>>complete"
@@ -172,6 +173,8 @@
^ #(
"<className> or (<className> attributes...) in load order"
#'SmallSense::AbstractDIalog'
+ (#'SmallSense::AbstractTestCase' autoload)
+ (#'SmallSense::BaseTestClass' autoload)
#'SmallSense::CodeHighlightingService'
#'SmallSense::CodeNavigationService'
#'SmallSense::CompletionContext'
@@ -183,6 +186,7 @@
#'SmallSense::EditService'
#'SmallSense::EditSupport'
#'SmallSense::Info'
+ (#'SmallSense::JavaCompletionEngineEnvironmentResource' autoload)
#'SmallSense::Manager'
#'SmallSense::PO'
#'SmallSense::ParseTreeIndex'
@@ -200,7 +204,9 @@
#'SmallSense::SmalltalkQuickFixer'
#'SmallSense::SmalltalkSyntaxHighlighter'
#'SmallSense::SmalltalkUnacceptedMethodEnvironment'
+ (#'SmallSense::TestCase' autoload)
#'SmallSense::TokenPatternMatcher'
+ (#'SmallSense::TokenPatternMatcherTests' autoload)
#'SmallSense::TokenPatternParser'
#'SmallSense::TokenPatternToken'
#'SmallSense::TokenPatternTokenSet'
@@ -213,7 +219,10 @@
#'SmallSense::ClassInfo'
#'SmallSense::ClassPO'
#'SmallSense::ClassType'
+ (#'SmallSense::CompletionEngineTests' autoload)
#'SmallSense::ConstantPO'
+ (#'SmallSense::EditSupportTests' autoload)
+ (#'SmallSense::FinderTests' autoload)
#'SmallSense::GenericEditSupport'
#'SmallSense::JavaEditSupport'
#'SmallSense::JavaImportPO'
@@ -221,10 +230,12 @@
#'SmallSense::MethodInfo'
#'SmallSense::MethodPO'
#'SmallSense::PackagePO'
+ (#'SmallSense::RecognizerTests' autoload)
#'SmallSense::SmalltalkCompletionEngine'
#'SmallSense::SmalltalkEditSupport'
#'SmallSense::SmalltalkInferencer'
#'SmallSense::SmalltalkParseNodeFinder'
+ (#'SmallSense::SmalltalkParserTests' autoload)
#'SmallSense::SnippetPO'
#'SmallSense::UnionType'
#'SmallSense::UnknownType'
@@ -232,30 +243,20 @@
#'SmallSense::VariablePO'
#'SmallSense::ClassSearchDialog'
#'SmallSense::AbstractJavaCompletionEngineSimple'
+ (#'SmallSense::AbstractJavaCompletionEngineTests' autoload)
#'SmallSense::GroovyEditSupport'
#'SmallSense::JavaCompletionEngine'
#'SmallSense::JavaConstructorPO'
- #'SmallSense::MethodKeywordRestPO'
#'SmallSense::MethodSearchDialog'
#'SmallSense::PackageSearchDialog'
- #'SmallSense::JavaCompletionEngineSimple'
- #'SmallSense::GroovyCompletionEngineSimple'
- (#'SmallSense::AbstractJavaCompletionEngineTests' autoload)
- (#'SmallSense::AbstractTestCase' autoload)
- (#'SmallSense::BaseTestClass' autoload)
- (#'SmallSense::CompletionEngineTests' autoload)
- (#'SmallSense::EditSupportTests' autoload)
- (#'SmallSense::FinderTests' autoload)
- (#'SmallSense::GroovyCompletionEngineSimpleTests' autoload)
- (#'SmallSense::JavaCompletionEngineEnvironmentResource' autoload)
- (#'SmallSense::JavaCompletionEngineTests' autoload)
(#'SmallSense::JavaEditSupportTests' autoload)
- (#'SmallSense::RecognizerTests' autoload)
+ #'SmallSense::MethodKeywordRestPO'
(#'SmallSense::SmalltalkCompletionEngineTests' autoload)
(#'SmallSense::SmalltalkEditSupportTests' autoload)
- (#'SmallSense::SmalltalkParserTests' autoload)
- (#'SmallSense::TestCase' autoload)
- (#'SmallSense::TokenPatternMatcherTests' autoload)
+ (#'SmallSense::GroovyCompletionEngineSimpleTests' autoload)
+ #'SmallSense::JavaCompletionEngineSimple'
+ (#'SmallSense::JavaCompletionEngineTests' autoload)
+ #'SmallSense::GroovyCompletionEngineSimple'
)
!
@@ -305,8 +306,6 @@
UserPreferences smallSenseCompleteIfUnambiguous:
UserPreferences smallSenseCompletionEnabled
UserPreferences smallSenseCompletionEnabled:
- Method inspector2TabParseTreeInspector
- Method inspector2Tabs
ReturnNode childNamesAndValuesDo:
'Tools::NewSystemBrowser class' #'stx_goodies_smallsense_askForClassToSearch:single:msgTail:resources:filter:forBrowser:thenDo:'
UserPreferences smallSenseNewDialogsEnabled
@@ -318,7 +317,15 @@
#'Tools::NavigationState' #'stx_goodies_smallsense_selectedClasses'
'Tools::CodeCompletionService class' #'stx_goodies_smallsense_isUsefulFor:'
'Workspace class' #'stx_goodies_smallsense_codeCompletionServiceClass'
-
+ Method inspector2TabSTXParseTreeInspector
+ ParseNode inspector2TabSTXParseTreeInspector
+ Parser inspector2TabSTXParseTreeInspector
+ Method inspector2TabRBParseTreeInspector
+ RBBlockNode childNamesAndValuesDo:
+ RBMethodNode childNamesAndValuesDo:
+ RBProgramNode childNamesAndValuesDo:
+ RBProgramNode endPosition
+ RBProgramNode startPosition
)
! !