Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

20960-Move-ExecutionDisplayPlugin-from-Reflectivity-Examples-directly-to-Nautilus- #671

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ My color (the execution indicator) fades away over time.
Class {
#name : #ExecutionDisplayMorph,
#superclass : #BorderedMorph,
#category : #'Reflectivity-Examples'
#category : #'Nautilus-Plugins-Examples'
}

{ #category : #private }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Class {
'morph',
'link'
],
#category : #'Reflectivity-Examples'
#category : #'Nautilus-Plugins-Examples'
}

{ #category : #position }
Expand Down
5 changes: 5 additions & 0 deletions src/Nautilus/NautilusUI.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -1843,6 +1843,11 @@ NautilusUI >> signatureFor: aSelector [
ifFalse: [ aSelector ]
]

{ #category : #'smart suggestions support' }
NautilusUI >> sugsContext [
^ SugsNautilusContext model: self.
]

{ #category : #'menus behavior' }
NautilusUI >> toggleBreakConditionOnEntryIn: aMethod [
"Install or uninstall a halt-on-entry breakpoint"
Expand Down
77 changes: 77 additions & 0 deletions src/Nautilus/SugsNautilusContext.class.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
"
The implementation who asumes that my model it's a nautilus object.
"
Class {
#name : #SugsNautilusContext,
#superclass : #SugsAbstractContext,
#category : #Nautilus
}

{ #category : #refactoring }
SugsNautilusContext >> browsedEnvironment [
^ model browsedEnvironment
]

{ #category : #refactoring }
SugsNautilusContext >> code [

^ self sourceTextArea getString
]

{ #category : #refactoring }
SugsNautilusContext >> contentSelection [
^ model contentSelection
]

{ #category : #refactoring }
SugsNautilusContext >> flashSourceCodeArea [
^ model flashSourceCodeArea
]

{ #category : #refactoring }
SugsNautilusContext >> formatSourceCode [
| formatted |
formatted := selectedNode formattedCode.
formatted = self code
ifTrue: [ ^ self ].
self sourceTextArea
formatSourceCodeInView;
hasUnacceptedEdits: true
]

{ #category : #refactoring }
SugsNautilusContext >> selectTheTextForTheNode [
selectionPreviousHighligth := self selectedInterval.
selectedNode ifNotNil: [ self contentSelection ]
]

{ #category : #accessing }
SugsNautilusContext >> selectedClass [
^ model selectedClass
]

{ #category : #accessing }
SugsNautilusContext >> selectedInterval [

^ model selectionInterval
]

{ #category : #refactoring }
SugsNautilusContext >> selectedMethod [
^ model selectedMethod
]

{ #category : #refactoring }
SugsNautilusContext >> selectionInterval [
^ model selectionInterval
]

{ #category : #refactoring }
SugsNautilusContext >> sourceTextArea [
^ model sourceTextModel
]

{ #category : #refactoring }
SugsNautilusContext >> window [
^ model window
]