Bug hunted! (look for the comment with "REFACTORING NOTES" on the source code). I need a more modular code, with less newbie mistakes (like repeated functionality in different methods). Next commit: testing commits UI from grafoscopio.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2015-07-11 12:26:05 +00:00 committed by SantiagoBragagnolo
parent 09c8198322
commit 2840a06ebe
1 changed files with 23 additions and 9 deletions

View File

@ -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'.
]