Preliminar support for notebooks with proper

%metadata nodes to be subscribed into the main help menu.
This commit is contained in:
Offray Vladimir Luna Cárdenas 2017-11-21 19:05:35 +00:00 committed by SantiagoBragagnolo
parent 27b4469052
commit 090c62520b
1 changed files with 14 additions and 0 deletions

View File

@ -139,6 +139,20 @@ GrafoscopioDocumentation >> openNotebookAt: index [
ifFalse: [ self updateUI ]]
]
{ #category : #updating }
GrafoscopioDocumentation >> registerIntoDockingBar [
"I detect if any of the documents that are part of my collection contains any metadata
indicating if they should be registered in the main docking bar, and in such case, I add them."
self documents
do: [ :doc | | metadata currentNotebook |
currentNotebook := GrafoscopioNotebook new loadFromFile: self localPlace / doc.
metadata := currentNotebook metadata.
metadata ifNotNil: [
metadata
at: 'showOnHelp'
ifPresent: [ GrafoscopioDockingBar addToHelpMenu: currentNotebook ] ] ]
]
{ #category : #accessing }
GrafoscopioDocumentation >> repository [
^ repository