-
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.
- Loading branch information
Showing
6 changed files
with
222 additions
and
110 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
Class { | ||
#name : #PyramidAbstractColumnsBuilder, | ||
#superclass : #Object, | ||
#instVars : [ | ||
'editor' | ||
], | ||
#category : #'Pyramid-Bloc-plugin-tree-library' | ||
} | ||
|
||
{ #category : #testing } | ||
PyramidAbstractColumnsBuilder class >> isAbstract [ | ||
|
||
^ self == PyramidAbstractColumnsBuilder | ||
] | ||
|
||
{ #category : #'as yet unclassified' } | ||
PyramidAbstractColumnsBuilder >> buildOn: aPyramidTreePlugin [ | ||
"aPyramidTreePlugin addColumns: { }" | ||
self shouldBeImplemented | ||
|
||
] | ||
|
||
{ #category : #accessing } | ||
PyramidAbstractColumnsBuilder >> editor [ | ||
|
||
editor ifNil: [ Error signal: 'Editor should not be nil.' ]. | ||
^ editor | ||
] | ||
|
||
{ #category : #accessing } | ||
PyramidAbstractColumnsBuilder >> editor: anObject [ | ||
|
||
editor := anObject | ||
] |
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 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,94 @@ | ||
Class { | ||
#name : #PyramidTreeBaseColumnsBuilder, | ||
#superclass : #PyramidAbstractColumnsBuilder, | ||
#category : #'Pyramid-Bloc-plugin-tree-library' | ||
} | ||
|
||
{ #category : #'as yet unclassified' } | ||
PyramidTreeBaseColumnsBuilder >> buildOn: aPyramidTreePlugin [ | ||
|
||
aPyramidTreePlugin addColumns: { self nameAndTypeColumn . self hashColumn . self zIndexColumn . self visibilityColumn } | ||
] | ||
|
||
{ #category : #accessing } | ||
PyramidTreeBaseColumnsBuilder >> hashColumn [ | ||
|
||
^ SpStringTableColumn new | ||
title: 'Hash'; | ||
evaluated: [ :aBlElement | | ||
aBlElement identityHash printString ]; | ||
displayColor: [ :aBlElement | Color gray ]; | ||
width: 60; | ||
yourself | ||
] | ||
|
||
{ #category : #accessing } | ||
PyramidTreeBaseColumnsBuilder >> nameAndTypeColumn [ | ||
|
||
^ SpCompositeTableColumn new | ||
title: 'Elements'; | ||
addColumn: | ||
(SpImageTableColumn evaluated: [ :aBlElement | aBlElement asIcon ]); | ||
addColumn: (SpStringTableColumn new | ||
title: 'Identifier'; | ||
evaluated: [ :aBlElement | | ||
aBlElement elementId isNoId | ||
ifTrue: [ '@\no name\' ] | ||
ifFalse: [ aBlElement id asSymbol ] ]; | ||
yourself); | ||
addColumn: (SpStringTableColumn new | ||
title: 'Class'; | ||
evaluated: [ :aBlElement | aBlElement class name ]; | ||
displayColor: [ :aBlElement | Color gray ]; | ||
displayItalic: [ :aBlElement | true ]; | ||
yourself); | ||
yourself | ||
] | ||
|
||
{ #category : #initialization } | ||
PyramidTreeBaseColumnsBuilder >> setVisibility: aBlVisibility of: aBlElement onEditor: aPyramidEditor [ | ||
|
||
aPyramidEditor propertiesManager commandExecutor | ||
use: PyramidVisibilityCommand new | ||
on: { aBlElement } | ||
with: aBlVisibility | ||
] | ||
|
||
{ #category : #accessing } | ||
PyramidTreeBaseColumnsBuilder >> visibilityColumn [ | ||
|
||
^ SpCompositeTableColumn new | ||
title: 'Visibility'; | ||
width: 80; | ||
addColumn: (SpImageTableColumn evaluated: [ :aBlElement | | ||
aBlElement | ||
allParentsDetect: [ :parent | parent isVisible not ] | ||
ifFound: [ :parent | self iconNamed: #uncommentedClass ] | ||
ifNone: [ self iconNamed: #blank16 ] ]); | ||
addColumn: (SpImageTableColumn evaluated: [ :aBlElement | | ||
aBlElement visibility asIcon ]); | ||
addColumn: (SpLinkTableColumn new | ||
title: 'Visible'; | ||
url: [ :aBlElement | '' ]; | ||
action: [ :aBlElement | | ||
self | ||
setVisibility: aBlElement visibility nextVisibilityForTree | ||
of: aBlElement | ||
onEditor: self editor ]; | ||
evaluated: [ :aBlElement | aBlElement visibility asString ]; | ||
yourself); | ||
yourself | ||
] | ||
|
||
{ #category : #accessing } | ||
PyramidTreeBaseColumnsBuilder >> zIndexColumn [ | ||
|
||
^ SpStringTableColumn new | ||
title: 'z'; | ||
evaluated: [ :aBlElement | | ||
aBlElement elevation elevation = 0 | ||
ifTrue: [ '' ] | ||
ifFalse: [ aBlElement elevation elevation printString ] ]; | ||
width: 16; | ||
yourself | ||
] |
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 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
Oops, something went wrong.