Skip to content

Commit

Permalink
changed UI for HiDeHo
Browse files Browse the repository at this point in the history
  • Loading branch information
tomooda committed Dec 29, 2024
1 parent 07ddeaa commit 1bdb5a8
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 56 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
Class {
#name : 'ViennaEpiLogImpactClosureMatcher',
#superclass : 'ViennaEpiLogMatcher',
#instVars : [
'closure'
],
#category : 'ViennaTalk-Browser-Core-EpiLog',
#package : 'ViennaTalk-Browser-Core',
#tag : 'EpiLog'
}

{ #category : 'instance creation' }
ViennaEpiLogImpactClosureMatcher class >> fromEpiLog: aViennaEpiLog enumerator: aViennaEpiLogEnumerator [

^ self new
initializeWithEpiLog: aViennaEpiLog
enumerator: aViennaEpiLogEnumerator;
yourself
]

{ #category : 'accessing' }
ViennaEpiLogImpactClosureMatcher >> closure [

^ closure
]

{ #category : 'accessing' }
ViennaEpiLogImpactClosureMatcher >> closure: aCollectionOfViennaEpiLog [

closure := aCollectionOfViennaEpiLog
]

{ #category : 'initialization' }
ViennaEpiLogImpactClosureMatcher >> initializeWithEpiLog: aViennaEpiLog enumerator: aViennaEpiLogEnumerator [

closure := ViennaHiDeSorter
contextualClosureFrom: aViennaEpiLog
withEnumerator: aViennaEpiLogEnumerator
]

{ #category : 'accessing' }
ViennaEpiLogImpactClosureMatcher >> name [

^ 'impact closure'
]

{ #category : 'accessing' }
ViennaEpiLogImpactClosureMatcher >> order [

^ 5
]

{ #category : 'evaluation' }
ViennaEpiLogImpactClosureMatcher >> value: aViennaEpiLog [

^ closure includes: aViennaEpiLog
]
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ ViennaEpiLogMatcher class >> identifier: aString module: anotherString [
yourself
]

{ #category : 'instance creation' }
ViennaEpiLogMatcher class >> impactClosureFrom: aViennaEpiLog enumerator: aViennaEpiLogEnumerator [

^ ViennaEpiLogImpactClosureMatcher
fromEpiLog: aViennaEpiLog
enumerator: aViennaEpiLogEnumerator
]

{ #category : 'testing' }
ViennaEpiLogMatcher class >> isAbstract [

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,7 @@ Class {
'removeEpiLogButton',
'removeEpiLogTagButton',
'addEpiLogTagButton',
'editEpiLogCommentButton',
'showsSingleEpiLogButton',
'showsSyntacticClosureButton',
'showsSemanticClosureButton',
'showsContextualClosureButton'
'editEpiLogCommentButton'
],
#classVars : [
'GreenSignalIcon',
Expand Down Expand Up @@ -1037,24 +1033,6 @@ ViennaRefactoringBrowser >> epiLogListContextMenu [
^ menu
]

{ #category : 'private' }
ViennaRefactoringBrowser >> epiLogListItemsFrom: epiLog [

showsSyntacticClosureButton state ifTrue: [
^ ViennaHiDeSorter
syntacticClosureFrom: epiLog
withEnumerator: self epiLogEnumerator ].
showsSemanticClosureButton state ifTrue: [
^ ViennaHiDeSorter
semanticClosureFrom: epiLog
withEnumerator: self epiLogEnumerator ].
showsContextualClosureButton state ifTrue: [
^ ViennaHiDeSorter
contextualClosureFrom: epiLog
withEnumerator: self epiLogEnumerator ].
^ self epiLogEnumerator arrayFrom: epiLog
]

{ #category : 'updating' }
ViennaRefactoringBrowser >> epiLogListSelectionChanged [

Expand Down Expand Up @@ -1120,13 +1098,6 @@ ViennaRefactoringBrowser >> epilogPageLayout [
add: showsConstructionLineButton;
yourself)
expand: false;
add: (SpBoxLayout newHorizontal
add: showsSingleEpiLogButton;
add: showsSyntacticClosureButton;
add: showsSemanticClosureButton;
add: showsContextualClosureButton;
yourself)
expand: false;
add: epiLogMatcherDropList expand: false;
add: epiLogList;
add: (SpBoxLayout newHorizontal
Expand Down Expand Up @@ -1482,26 +1453,6 @@ ViennaRefactoringBrowser >> initializeEpiLogPagePresenters [
whenDeactivatedDo: [
self updateEpiLogList ];
yourself.
showsSingleEpiLogButton := self newRadioButton
label: 'single';
whenDeactivatedDo: [
self updateEpiLogList ];
yourself.
showsSyntacticClosureButton := self newRadioButton
label: 'syntactic closure';
whenDeactivatedDo: [
self updateEpiLogList ];
yourself.
showsSemanticClosureButton := self newRadioButton
label: 'semantic closure';
whenDeactivatedDo: [
self updateEpiLogList ];
yourself.
showsContextualClosureButton := self newRadioButton
label: 'contextual closure';
whenDeactivatedDo: [
self updateEpiLogList ];
yourself.
epiLogMatcherDropList := self newDropList
items: { ViennaEpiLogMatcher all };
startWithSelection;
Expand Down Expand Up @@ -1565,11 +1516,7 @@ ViennaRefactoringBrowser >> initializeEpiLogPagePresenters [
action: [ self removeEpiLogTag ];
yourself.
showsTimeLineButton associatedRadioButtons:
{ showsConstructionLineButton }.
showsSingleEpiLogButton associatedRadioButtons: {
showsSyntacticClosureButton.
showsSemanticClosureButton.
showsContextualClosureButton }
{ showsConstructionLineButton }
]

{ #category : 'initialization' }
Expand Down Expand Up @@ -1927,6 +1874,7 @@ ViennaRefactoringBrowser >> modelChanged [

self model ifNotNil: [ :epiLog |
self
updateEpiLogMatcherDropList;
updateEpiLogList;
updateNamedEpiLogDropList.
self setDirty.
Expand Down Expand Up @@ -2543,7 +2491,7 @@ ViennaRefactoringBrowser >> updateEpiLogList [
epiLogList
items: ((self epiLog
ifNil: [ #( ) ]
ifNotNil: [ :epiLog | self epiLogListItemsFrom: epiLog ])
ifNotNil: [ :epiLog | self epiLogEnumerator arrayFrom: epiLog ])
select:
(epiLogMatcherDropList selectedItem ifNil: [ [ :epilog | true ] ]))
selectsFirst: true ].
Expand All @@ -2558,6 +2506,9 @@ ViennaRefactoringBrowser >> updateEpiLogMatcherDropList [
selection := epiLogMatcherDropList selectedItem.
epiLogMatcherDropList items: (Array streamContents: [ :stream |
stream nextPut: ViennaEpiLogMatcher all.
stream nextPut: (ViennaEpiLogMatcher
impactClosureFrom: self epiLog
enumerator: self epiLogEnumerator).
moduleList selectedItem ifNotNil: [ :module |
stream nextPut: (ViennaEpiLogMatcher module: module identifier) ].
definitionList selectedItem ifNotNil: [ :definition |
Expand Down

0 comments on commit 1bdb5a8

Please sign in to comment.