diff --git a/repository/Grafoscopio/GrafoscopioBrowser.class.st b/repository/Grafoscopio/GrafoscopioBrowser.class.st index 486d4b7..ed5ddbe 100644 --- a/repository/Grafoscopio/GrafoscopioBrowser.class.st +++ b/repository/Grafoscopio/GrafoscopioBrowser.class.st @@ -726,6 +726,17 @@ GrafoscopioBrowser >> commitToRepository [ self inform: 'Archivo adicionado al repositorio'] ] +{ #category : #'persistance / repositories' } +GrafoscopioBrowser >> commitToRepositoryDebug [ + "Commits to the associated repository for the current document tree" + | commitMessage | + commitMessage := UIManager default + textEntry: 'Ingrese el mensaje asociado a este envío al historial' + title: 'Mensaje para el historial'. + commitMessage isNil ifTrue: [ ^nil ]. + self inform: (mainTree metadata at: 'localRepository') asString +] + { #category : #'system-support' } GrafoscopioBrowser >> configureInitialTags [ "Configures a list of predefined tags available to use. More tags should be added from a repository. @@ -947,9 +958,10 @@ GrafoscopioBrowser >> openFromFile: aFileName [ currentChildren := (STON fromString: aFileName contents). self buildBrowserNamed: aFileName basenameWithIndicator. mainTree := GrafoscopioNode new - header: 'Arbol principal'; - level: 0. - mainTree children: currentChildren. + header: (currentChildren at: 1) parent header; + level: (currentChildren at: 1) parent level; + metadata: (currentChildren at: 1) parent metadata; + children: currentChildren. browser openOn: mainTree children. ] @@ -973,8 +985,9 @@ GrafoscopioBrowser >> openFromFile: aFileName inMode: aModeName [ { #category : #persistence } GrafoscopioBrowser >> openFromFileSelector [ -"Opens a tree from a file by using the file selector GUI." - + "Opens a tree from a file by using the file selector GUI." + "REFACTORING NOTES: This sould call openFromFile, instead of having the code repeated here. + This creates errors on debugging and worse on proper behaviour" | fileStream currentChildren | GrafoscopioBrowser configureSettings. fileStream := UITheme builder @@ -990,9 +1003,10 @@ GrafoscopioBrowser >> openFromFileSelector [ "recentTrees detect: workingFile ifFound: [recentTrees add: workingFile]." recentTrees add: workingFile. mainTree := GrafoscopioNode new - header: 'Arbol principal'; - level: 0. - mainTree children: currentChildren. + header: (currentChildren at: 1) parent header; + level: (currentChildren at: 1) parent level; + metadata: (currentChildren at: 1) parent metadata; + children: currentChildren. browser openOn: mainTree children. ] @@ -1404,7 +1418,7 @@ GrafoscopioBrowser >> treeOn: constructor [ act: [self enableLocalRepository] entitled: 'Activar repositorio local...' categorized: 'Proyecto'; act: [self addFileToRepository] entitled: 'Agregar archivo...' categorized: 'Proyecto'; act: [self messageNotImplementedYet] entitled: 'Eliminar archivo...' categorized: 'Proyecto'; - act: [self commitToRepository] entitled: 'Enviar al histórico' categorized: 'Proyecto'; + act: [self commitToRepositoryDebug] entitled: 'Enviar al histórico' categorized: 'Proyecto'; act: [self messageNotImplementedYet "repositoryCredentials"] entitled: 'Acreditarse' categorized: 'Proyecto'. ]