<commit_before>Class {
	#name : #PBPackageUIItem,
	#superclass : #PBAbstractUIItem,
	#instVars : [
		'package'
	],
	#category : #'CargoPackageManager-Calypso-Environment-Items'
}

{ #category : #queries }
PBPackageUIItem class >> checkCalypsoItem: aChildBrowserItem isEqualTo: anotherChildBrowserItemOrRPackage [

	^ aChildBrowserItem = anotherChildBrowserItemOrRPackage
		or: [ aChildBrowserItem isInstalled
				and: [ aChildBrowserItem systemPackage = anotherChildBrowserItemOrRPackage ] ]
]

{ #category : #converting }
PBPackageUIItem class >> convertToCalypsoBrowserItem: aUnit [
	| item |

	item := PBBrowserItem named: aUnit name with: aUnit.
	item actualObject decorate: item.
	^ item.
]

{ #category : #sorting }
PBPackageUIItem class >> on: aPackage [
	^ self new
		package: aPackage;
		yourself
]

{ #category : #queries }
PBPackageUIItem class >> prepareClassQueriesFrom: packages in: aNavigationEnvironment [
		
	^ { ClyAllClasses from: PBProjectPackageScope ofAll: packages in: aNavigationEnvironment }.

]

{ #category : #queries }
PBPackageUIItem class >> prepareProjectItemsQueryFrom: anItem in: aNavigationEnvironment [ 
		
	^ ClyAllClassGroups from: PBProjectPackageScope ofAll: {anItem} in: aNavigationEnvironment.

]

{ #category : #testing }
PBPackageUIItem >> canBeRemovedFromAssembly [<commit_msg>fix tests (update for latest calypso)<commit_after>Class {
	#name : #PBPackageUIItem,
	#superclass : #PBAbstractUIItem,
	#instVars : [
		'package'
	],
	#category : #'CargoPackageManager-Calypso-Environment-Items'
}

{ #category : #queries }
PBPackageUIItem class >> checkCalypsoItem: aChildBrowserItem isEqualTo: anotherChildBrowserItemOrRPackage [

	^ aChildBrowserItem = anotherChildBrowserItemOrRPackage
		or: [ aChildBrowserItem isInstalled
				and: [ aChildBrowserItem systemPackage = anotherChildBrowserItemOrRPackage ] ]
]

{ #category : #converting }
PBPackageUIItem class >> convertToCalypsoBrowserItem: aUnit [
	| item |

	item := PBBrowserItem named: aUnit name with: aUnit.
	item actualObject decorate: item.
	^ item.
]

{ #category : #sorting }
PBPackageUIItem class >> on: aPackage [
	^ self new
		package: aPackage;
		yourself
]

{ #category : #queries }
PBPackageUIItem class >> prepareClassQueriesFrom: packages in: aNavigationEnvironment [
		
	^ { ClyAllClassesQuery from: PBProjectPackageScope ofAll: packages in: aNavigationEnvironment }.

]

{ #category : #queries }
PBPackageUIItem class >> prepareProjectItemsQueryFrom: anItem in: aNavigationEnvironment [ 
		
	^ ClyAllClassGroupsQuery from: PBProjectPackageScope ofAll: {anItem} in: aNavigationEnvironment.

]

{ #category : #testing }
PBPackageUIItem >> canBeRemovedFromAssembly [
{'fraction_non_alphanumeric': 0.09491778774289986, 'fraction_numerical': 0.0, 'mean_word_length': 5.659203980099503, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6891671', 'n_tokens_mistral': 868, 'n_tokens_neox': 843, 'n_words': 185}