--- a/MCRepositoryBrowser.st Fri Mar 16 12:10:40 2012 +0100
+++ b/MCRepositoryBrowser.st Tue Mar 20 17:39:47 2012 +0100
@@ -465,9 +465,14 @@
translateLabel: true
)
(MenuItem
+ label: 'Add Repository (Expression)...'
+ itemValue: repositoryAddFromExpressionString
+ translateLabel: true
+ )
+ (MenuItem
label: '-'
)
- (MenuItem
+ (MenuItem
enabled: hasRepositorySelectedHolder
label: 'Flush Cache'
itemValue: repositoryFlushCache
@@ -494,8 +499,6 @@
nil
nil
)
-
- "Modified: / 25-11-2011 / 11:32:44 / cg"
!
versionsMenu
@@ -808,8 +811,26 @@
!MCRepositoryBrowser methodsFor:'menu actions'!
+addRepository:rep
+ | files|
+
+ Error handle:[:ex |
+ ] do:[
+ files := rep allFileNames.
+ ].
+ files isNil ifTrue:[
+ Dialog warn:'repository does not exist or is inaccessable.'.
+ ^ self.
+ ].
+
+ MCRepositoryGroup default addRepository:rep.
+ self repositoriesHolder value:(MCRepositoryGroup default repositories)
+
+ "Created: / 20-03-2012 / 17:37:17 / cg"
+!
+
repositoryAdd
- |repStr rep url files|
+ |repStr rep url|
repStr := Dialog request:'Reporitory to add:'.
repStr isEmptyOrNil ifTrue:[^ self].
@@ -829,19 +850,34 @@
Dialog warn:'cannot figure out access scheme.'.
^ self.
].
+ self addRepository:rep
+
+ "Created: / 29-08-2011 / 12:25:40 / cg"
+!
+
+repositoryAddFromExpressionString
+ |repStr rep|
+
+ repStr := Dialog
+ requestText:'Reporitory to add:'
+ initialAnswer:'MCHttpRepository
+ location: ''http://www.squeaksource.com/XMLSchemaCodeGen''
+ user: ''''
+ password: ''''
+'.
+ repStr isEmptyOrNil ifTrue:[^ self].
+
Error handle:[:ex |
] do:[
- files := rep allFileNames.
+ rep := Parser evaluate:repStr.
].
- files isNil ifTrue:[
- Dialog warn:'repository does not exist or is inaccessable.'.
+ rep isNil ifTrue:[
+ Dialog warn:'cannot figure out access scheme.'.
^ self.
].
+ self addRepository:rep
- MCRepositoryGroup default addRepository:rep.
- self repositoriesHolder value:(MCRepositoryGroup default repositories)
-
- "Created: / 29-08-2011 / 12:25:40 / cg"
+ "Created: / 20-03-2012 / 17:34:33 / cg"
!
repositoryBrowseDirectory
@@ -1082,11 +1118,11 @@
!MCRepositoryBrowser class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/goodies/monticello/MCRepositoryBrowser.st,v 1.17 2012-03-16 11:10:40 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/goodies/monticello/MCRepositoryBrowser.st,v 1.18 2012-03-20 16:39:47 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/goodies/monticello/MCRepositoryBrowser.st,v 1.17 2012-03-16 11:10:40 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/goodies/monticello/MCRepositoryBrowser.st,v 1.18 2012-03-20 16:39:47 cg Exp $'
!
version_SVN