-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from OpenSmock/Issues_0019
Issues 0019
- Loading branch information
Showing
5 changed files
with
177 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
105 changes: 105 additions & 0 deletions
105
src/Pyramid/PyramidSaveProjectConfigurationController.class.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
Class { | ||
#name : #PyramidSaveProjectConfigurationController, | ||
#superclass : #Object, | ||
#instVars : [ | ||
'view', | ||
'model', | ||
'verifier' | ||
], | ||
#category : #'Pyramid-plugin-save' | ||
} | ||
|
||
{ #category : #tests } | ||
PyramidSaveProjectConfigurationController >> browseProjectClass [ | ||
|
||
| class | | ||
class := self class environment classNamed: | ||
self model savingClassName. | ||
class ifNil: [ | ||
UIManager default inform: 'Class do not exist yet. It will be created the first time you saved it.'. | ||
^ self ]. | ||
self model isClassSide | ||
ifTrue: [ | ||
Smalltalk tools browser | ||
openOnClass: class class | ||
selector: self model savingMethodName ] | ||
ifFalse: [ | ||
Smalltalk tools browser | ||
openOnClass: class | ||
selector: self model savingMethodName ] | ||
] | ||
|
||
{ #category : #accessing } | ||
PyramidSaveProjectConfigurationController >> model [ | ||
|
||
model ifNil: [ model := PyramidSaveModel new ]. | ||
^ model | ||
] | ||
|
||
{ #category : #accessing } | ||
PyramidSaveProjectConfigurationController >> model: aPyramidSaveModel [ | ||
|
||
model := aPyramidSaveModel. | ||
self view model: aPyramidSaveModel | ||
] | ||
|
||
{ #category : #'as yet unclassified' } | ||
PyramidSaveProjectConfigurationController >> radioUpdatedOnClassSide: aBoolean [ | ||
|
||
aBoolean | ||
ifTrue: [ self model onClass ] | ||
ifFalse: [ self model onInstance ]. self updateView | ||
] | ||
|
||
{ #category : #'as yet unclassified' } | ||
PyramidSaveProjectConfigurationController >> textUpdatedFromClass: aString [ | ||
|
||
self model savingClassName: aString. | ||
self updateView | ||
] | ||
|
||
{ #category : #'as yet unclassified' } | ||
PyramidSaveProjectConfigurationController >> textUpdatedFromMethod: aString [ | ||
|
||
self model savingMethodName: aString. | ||
self updateView | ||
] | ||
|
||
{ #category : #'as yet unclassified' } | ||
PyramidSaveProjectConfigurationController >> textUpdatedFromPackage: aString [ | ||
|
||
self model savingPackageName: aString. | ||
self updateView | ||
] | ||
|
||
{ #category : #'as yet unclassified' } | ||
PyramidSaveProjectConfigurationController >> updateView [ | ||
|
||
| errors | | ||
errors := self verifier allErrors: self model. | ||
self view hideLabels. | ||
self view buttonBrowse enabled: errors isEmpty. | ||
errors do: [ :each | each showOn: self view ] | ||
] | ||
|
||
{ #category : #accessing } | ||
PyramidSaveProjectConfigurationController >> verifier [ | ||
|
||
verifier ifNil: [ | ||
verifier := PyramidSaveModelVerifier verifierNoErrorForInputsView ]. | ||
^ verifier | ||
] | ||
|
||
{ #category : #accessing } | ||
PyramidSaveProjectConfigurationController >> view [ | ||
|
||
view ifNil: [ view := PyramidSaveProjectConfigurationView new. | ||
view controller: self; model: self model ]. | ||
^ view | ||
] | ||
|
||
{ #category : #accessing } | ||
PyramidSaveProjectConfigurationController >> view: anObject [ | ||
|
||
view := anObject | ||
] |
Oops, something went wrong.