--- a/Tools__NewSystemBrowser.st Sat Apr 25 22:49:26 2015 +0100
+++ b/Tools__NewSystemBrowser.st Sat May 02 07:04:17 2015 +0200
@@ -10524,7 +10524,7 @@
showBusyCursorWhilePerforming: true
)
(MenuItem
- enabled: hasProjectSelectedHolder
+ enabled: hasRenamableProjectSelectedHolder
label: 'Rename...'
itemValue: projectMenuRename
)
@@ -10629,6 +10629,11 @@
itemValue: projectMenuCleanUpChangeSet
)
(MenuItem
+ enabled: hasPseudoProjectChangedSelectedHolder
+ label: 'Move Unassigned Methods to their Class''s Project'
+ itemValue: projectMenuMoveUnassignedMethodsToClassProject
+ )
+ (MenuItem
label: '-'
isVisible: false
)
@@ -22539,6 +22544,14 @@
"Created: / 4.2.2000 / 22:09:02 / cg"
!
+hasPseudoProjectChangedSelected
+ ^ self selectedProjects value includes:(PackageId noProjectID)
+!
+
+hasPseudoProjectChangedSelectedHolder
+ ^ [ self hasPseudoProjectChangedSelected ]
+!
+
hasRealExtensionMethodSelected
^ self hasAnyMethodSelectedForWhich:[:aMethod |
|mPackage|
@@ -22584,6 +22597,18 @@
^ manager hasRedoableOperations
!
+hasRenamableProjectSelected
+ ^ self selectedProjects value contains:[:p |
+ (p ~= PackageId noProjectID)
+ and:[ (BrowserList isPseudoProject:p) not ]]
+!
+
+hasRenamableProjectSelectedHolder
+ ^ [ self hasRenamableProjectSelected ]
+
+ "Created: / 4.2.2000 / 22:09:02 / cg"
+!
+
hasSCMSupportFor:aManagerClassName
"is there support for the perforce source code manager?"
@@ -42710,6 +42735,24 @@
navigationState realModifiedState:false.
!
+projectMenuMoveUnassignedMethodsToClassProject
+ |noProjectID|
+
+ noProjectID := PackageId noProjectID.
+ Method
+ allInstancesForWhich:[:m | m package == noProjectID]
+ do:[:m |
+ |mclass classPackage|
+
+ (mclass := m mclass) notNil ifTrue:[
+ (classPackage := mclass package) ~= noProjectID ifTrue:[
+ Transcript show:'move '; show:m; show:' to '; showCR:classPackage.
+ "/ m package:classPackage
+ ].
+ ].
+ ].
+!
+
projectMenuNew
|projectDefinitionClass appClassName theCode appClass package category
defaultStartupClassName startupClassName startupClass change|
@@ -58175,7 +58218,7 @@
sel := methodHere selector.
- "/ these are meant to be empty nad only contain different comments...
+ "/ these are meant to be empty and only contain different comments...
( #(
documentation
version
@@ -58206,62 +58249,8 @@
onError: [:aString :position | ^ nil "ignore any error"].
treeThere isNil ifTrue:[^ nil].
- dictionary := Dictionary new.
- (treeHere body equalTo: treeThere body withMapping: dictionary) ifTrue:[
- mClass := methodHere mclass theNonMetaclass.
- "/ must try again, but remove mappings to classVariables and classInstanceVariables ...
- mClass allClassVarNames do:[:each |
- dictionary removeKey:each ifAbsent:nil.
- dictionary removeValue:each ifAbsent:nil.
- ].
-
- mClass allInstVarNames do:[:each |
-"/ dictionary removeKey:each ifAbsent:nil.
-"/ dictionary removeValue:each ifAbsent:nil.
- dictionary at:each put:each
- ].
- mClass allClassVarNames do:[:each |
- dictionary at:each put:each
- ].
-
- (treeHere body equalTo: treeThere body withMapping: dictionary) ifTrue:[
- "/ super and here mean something different in a subclass; may not ne present.
- (dictionary keys contains:[:key | (key = 'super') or:[key = 'here']]) ifFalse:[
- (dictionary values contains:[:value | value = 'super' or:[value = 'here']]) ifFalse:[
- "/ look at the mapping dictionary ..
- "/ remove equivalently mapped ones ..
- dictionary keys
- select:[:key | (dictionary at:key) = key]
- thenDo:[:key | dictionary removeKey:key].
-
- "/ now, no upper-case variables are allowed ...
- (dictionary keys contains:[:key | key isUppercaseFirst]) ifFalse:[
- "/ ignore (possibly renamed) arguments ...
- dictionary keys
- select:[:key | treeHere arguments contains:[:argVar | argVar name = key]]
- thenDo:[:eachArgHere |
- |argIndexHere argThere argIndexThere|
-
- argIndexHere := treeHere arguments findFirst:[:argVar | argVar name = eachArgHere].
- argThere := dictionary at:eachArgHere.
- argIndexThere := treeThere arguments findFirst:[:argVar | argVar name = argThere].
- argIndexHere == argIndexThere ifTrue:[
- dictionary removeKey:eachArgHere
- ].
- ].
-
- remainingRenames := dictionary keys.
- (remainingRenames contains:[:key | treeHere arguments contains:[:argVar | argVar name = key]])
- ifFalse:[
- (remainingRenames contains:[:key | treeThere arguments contains:[:argVar | argVar name = key]])
- ifFalse:[
- ^ 'This method''s functionality is already inherited from ', implClass name , '.\\You may want to remove it here.'.
- ]
- ]
- ].
- ].
- ].
- ].
+ (RBCodeDuplicationRule isParseTree:treeHere in:aClass duplicateOfTree:treeThere) ifTrue:[
+ ^ 'This method''s functionality is already inherited from ', implClass name , '.\\You may want to remove it here.'.
].
^ nil
@@ -62518,11 +62507,11 @@
!NewSystemBrowser class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/Tools__NewSystemBrowser.st,v 1.2217 2015-04-22 18:08:52 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Tools__NewSystemBrowser.st,v 1.2219 2015-05-01 14:50:21 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libtool/Tools__NewSystemBrowser.st,v 1.2217 2015-04-22 18:08:52 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Tools__NewSystemBrowser.st,v 1.2219 2015-05-01 14:50:21 cg Exp $'
!
version_HG
@@ -62531,7 +62520,7 @@
!
version_SVN
- ^ '$Id: Tools__NewSystemBrowser.st,v 1.2217 2015-04-22 18:08:52 stefan Exp $'
+ ^ '$Id: Tools__NewSystemBrowser.st,v 1.2219 2015-05-01 14:50:21 cg Exp $'
! !