Tagged nodes: Support for tagging nodes at right side. Next: custom views according to tags.
This commit is contained in:
parent
0885fedfb9
commit
cd76787b0f
@ -82,6 +82,7 @@ GrafoscopioBrowser >> addTagTo: aNode [
|
||||
aNode tagAs: (tagsAvailable at: selection)
|
||||
]
|
||||
ifTrue: [self messageNoTagsAvailable].
|
||||
browser update.
|
||||
|
||||
]
|
||||
|
||||
@ -986,6 +987,11 @@ GrafoscopioBrowser >> treeOn: constructor [
|
||||
(eachNode header) isNil
|
||||
ifTrue: [ '' ]
|
||||
ifFalse: [ eachNode header ]];
|
||||
tags: [:eachNode |
|
||||
(eachNode tags) isNil
|
||||
ifFalse: [ (eachNode tags) asSymbol ]
|
||||
ifTrue: [ #() ] ];
|
||||
|
||||
"Adding nodes"
|
||||
act: [:treePresentation |
|
||||
(treePresentation selection) isNotNil
|
||||
@ -1061,13 +1067,13 @@ GrafoscopioBrowser >> treeOn: constructor [
|
||||
treePresentation update] entitled: 'Pegar nodo' categorized: 'Nodo';
|
||||
|
||||
"For tags"
|
||||
act: [self showTagsAvailable] entitled: 'Ver disponibles' categorized: 'Etiquetas';
|
||||
act: [self addToTagsAvailable] entitled: 'Agregar a disponibles' categorized: 'Etiquetas';
|
||||
act: [:treePresentation |
|
||||
(treePresentation selection isNotNil)
|
||||
ifTrue: [self addTagTo: treePresentation selection] ]
|
||||
entitled: 'Agregar al nodo' categorized: 'Etiquetas';
|
||||
act: [self messageNotImplementedYet] entitled: 'Eliminar del nodo' categorized: 'Etiquetas';
|
||||
act: [self showTagsAvailable] entitled: 'Ver disponibles' categorized: 'Etiquetas';
|
||||
act: [self addToTagsAvailable] entitled: 'Agregar a disponibles' categorized: 'Etiquetas';
|
||||
|
||||
"For projects"
|
||||
act: [self enableRepository] entitled: 'Activar' categorized: 'Proyecto';
|
||||
|
@ -453,6 +453,13 @@ GrafoscopioNode >> tagAs: aTag [
|
||||
tags := aTag.
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
GrafoscopioNode >> tags [
|
||||
"Returns the receiver tags. For the moment is just one... yes silly, but will be extenden properly"
|
||||
|
||||
^ tags
|
||||
]
|
||||
|
||||
{ #category : #'add/remove nodes' }
|
||||
GrafoscopioNode >> visitedGoTo: aCollection [
|
||||
"Stores the current node in a collection and recursively stores its children"
|
||||
|
Loading…
Reference in New Issue
Block a user