"{ Package: 'jv:smallsense' }"
"{ NameSpace: SmallSense }"
AbstractSettingsApplication subclass:#SettingsAppl
instanceVariableNames:'smallSenseBackgroundTypingEnabled smallSenseBackgroundLintEnabled
smallSenseEnabled smallSenseElectricEditSupportEnabled
smallSenseCompleteIfUnambiguous'
classVariableNames:''
poolDictionaries:''
category:'SmallSense-Core-Interface'
!
!SettingsAppl class methodsFor:'class initialization'!
initialize
NewLauncher
addSettingsApplicationByClass: self name
withName: 'Tools/SmallSense'
icon: nil.
"Created: / 04-02-2012 / 21:50:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
"Modified: / 12-02-2014 / 14:23:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!SettingsAppl class methodsFor:'help specs'!
helpSpec
"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
"
<resource: #help>
^ super helpSpec addPairsFrom:#(
#smallSenseBackgroundLintEnabled
'When enabled, a hints on code are shown based on static code analysis (SmallLint)'
#smallSenseBackgroundTypingEnabled
'When enabled, SmallSense run a type-inferencer on the code to give a 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.'
#smallSenseEnabled
'Enable/Disable SmallSense support'
)
! !
!SettingsAppl class methodsFor:'interface specs'!
windowSpec
"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."
"
UIPainter new openOnClass:SmallSense::SettingsAppl andSelector:#windowSpec
SmallSense::SettingsAppl new openInterface:#windowSpec
SmallSense::SettingsAppl open
"
<resource: #canvas>
^
#(FullSpec
name: windowSpec
window:
(WindowSpec
label: 'SmallSense Settings'
name: 'SmallSense Settings'
min: (Point 10 10)
bounds: (Rectangle 0 0 536 651)
)
component:
(SpecCollection
collection: (
(CheckBoxSpec
label: 'Enable SmallSense '
name: 'Enable'
layout: (LayoutFrame 0 0 0 0 0 1 30 0)
activeHelpKey: smallSenseEnabled
model: smallSenseEnabled
translateLabel: true
)
(DividerSpec
name: 'Separator'
layout: (LayoutFrame 5 0 30 0 -5 1 34 0)
)
(VerticalPanelViewSpec
name: 'Panel'
layout: (LayoutFrame 0 0 37 0 0 1 0 1)
horizontalLayout: fit
verticalLayout: top
horizontalSpace: 3
verticalSpace: 3
component:
(SpecCollection
collection: (
(CheckBoxSpec
label: 'Enable Code Analysis (Lint)'
name: 'LintEnabled'
activeHelpKey: smallSenseBackgroundLintEnabled
enableChannel: smallSenseEnabled
model: smallSenseBackgroundLintEnabled
translateLabel: true
extent: (Point 536 22)
)
(CheckBoxSpec
label: 'Enable Background Type Inferencer'
name: 'CheckBox2'
activeHelpKey: smallSenseBackgroundTypingEnabled
enableChannel: smallSenseEnabled
model: smallSenseBackgroundTypingEnabled
translateLabel: true
extent: (Point 536 22)
)
(CheckBoxSpec
label: 'Enable "Electric Edit" Support'
name: 'CheckBox3'
activeHelpKey: smallSenseElectricEditSupportEnabled
model: smallSenseElectricEditSupportEnabled
translateLabel: true
extent: (Point 536 22)
)
(CheckBoxSpec
label: 'Auto-complete when Completion is Unambiguous'
name: 'CheckBox4'
model: smallSenseCompleteIfUnambiguous
extent: (Point 536 22)
)
)
)
)
)
)
)
! !
!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.
"Modified: / 04-02-2012 / 21:47:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
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.
"Modified: / 04-02-2012 / 21:48:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
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.
"Created: / 18-01-2014 / 23:36:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
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.
"Modified: / 26-07-2013 / 12:36:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
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.
"Modified: / 04-02-2012 / 21:48:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!SettingsAppl methodsFor:'protocol'!
basicAspects
^#(
smallSenseEnabled
smallSenseBackgroundLintEnabled
smallSenseBackgroundTypingEnabled
smallSenseElectricEditSupportEnabled
smallSenseCompleteIfUnambiguous
)
"Modified: / 20-01-2014 / 09:23:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
basicReadSettings
self readAspects:self basicAspects from:currentUserPrefs.
"Modified: / 19-07-2011 / 17:11:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
basicSaveSettings
self writeAspects:self basicAspects to:currentUserPrefs.
"Modified: / 26-07-2011 / 10:43:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
helpFilename
"subclasses must return the relative name of a helpFile
in the doc/online/<language>/help directory.
Or nil, if no help is available."
^ self shouldImplement
! !
!SettingsAppl methodsFor:'queries'!
hasUnsavedChanges
^ self
hasChangedAspectIn: self basicAspects
asComparedTo:currentUserPrefs
"Modified: / 19-07-2011 / 17:12:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
"Modified (format): / 25-11-2011 / 15:25:16 / cg"
! !
!SettingsAppl class methodsFor:'documentation'!
version_HG
^ '$Changeset: <not expanded> $'
!
version_SVN
^ '$Id: SmallSense__SettingsAppl.st,v 1.3 2014/02/26 15:08:29 cg Exp $'
! !
SettingsAppl initialize!