diff --git a/src/MiniDocs/GrafoscopioNode.class.st b/src/MiniDocs/GrafoscopioNode.class.st index 9202e6b..280d2f4 100644 --- a/src/MiniDocs/GrafoscopioNode.class.st +++ b/src/MiniDocs/GrafoscopioNode.class.st @@ -12,11 +12,20 @@ Class { 'created', 'nodesInPreorder', 'selected', - 'edited' + 'edited', + 'headers', + 'key', + 'output' ], #category : #MiniDocs } +{ #category : #accessing } +GrafoscopioNode class >> fromFile: aFileReference [ + + ^ (STON fromString: aFileReference contents) first parent +] + { #category : #accessing } GrafoscopioNode >> ancestors [ "I return a collection of all the nodes wich are ancestors of the receiver node" @@ -104,7 +113,9 @@ GrafoscopioNode >> created: anObject [ GrafoscopioNode >> earliestCreationDate [ | earliest | - earliest := self nodesWithCreationDates first created. + self nodesWithCreationDates ifNotEmpty: [ + earliest := self nodesWithCreationDates first created] + ifEmpty: [ earliest := self ]. self nodesWithCreationDates do: [:node | node created <= earliest ifTrue: [ earliest := node created ] ]. ^ earliest