Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
239d1d4
début de prototype : encore des bugs à résoudre et des ajustement…
RomainDeg Apr 25, 2023
6cf4522
methods to print MooseGroup results, more tries to make Roassal visua…
RomainDeg Apr 26, 2023
d0293f2
light refactoring
RomainDeg Apr 27, 2023
4e3c503
needToUpdate value updated and used before preview
RomainDeg Apr 27, 2023
6370892
CellModels have needToUpdate attribute, cells and preview cells are r…
RomainDeg Apr 27, 2023
88af57a
remove MooseGroup extension for Pharo compatibility
RomainDeg Apr 27, 2023
e4eac94
fix equalsTo: -> =
RomainDeg Apr 28, 2023
db0c0e8
cleaning : removing unused adding methods, and needToUpdate instance …
RomainDeg May 2, 2023
4446888
remove wrong menu item
RomainDeg May 2, 2023
07ff4c0
removing mooseModel accessor, adding a few class comments
RomainDeg May 2, 2023
8b7d090
fix canvas size not setting right
RomainDeg May 2, 2023
83ac7a8
renaming, cleaning and adding more class comments
RomainDeg May 2, 2023
6aedddb
more renaming and cleaning
RomainDeg May 3, 2023
8294219
final cleaning (for now)
RomainDeg May 3, 2023
a629a37
setting things up for the export functionnality
RomainDeg May 3, 2023
5516789
exporter works with text and roassal canvas
RomainDeg May 3, 2023
2a38d09
fix import export STON
RomainDeg May 3, 2023
14cf1a9
collection custom printing
RomainDeg May 4, 2023
9e8838b
small fixes and tests
RomainDeg May 4, 2023
e8af5a4
unfix fix + fixing string export generation
RomainDeg May 4, 2023
f1bec63
first attempt to display inspector like view for notebook
RomainDeg May 9, 2023
45a20c6
parsing of cells to create bindings
RomainDeg May 10, 2023
3f24f8e
removing useless classes and methods
RomainDeg May 11, 2023
ad6c4b3
adding a button to recalculate every cell during preview
RomainDeg May 11, 2023
777407f
fixing name of files when exporting
RomainDeg May 11, 2023
b588bab
moving previewReloaded, and calling it before any export (replacing t…
RomainDeg May 11, 2023
79c6210
Merge pull request #1 from RomainDeg/master
RomainDeg May 11, 2023
efcb102
small fixes on document export to STON
RomainDeg May 12, 2023
32bd11c
Merge pull request #2 from RomainDeg/master
RomainDeg May 12, 2023
b683ae7
added settings windows, allowing to change the view from the default …
RomainDeg May 12, 2023
e5ac120
preview updated to fit the new settings choice
RomainDeg May 12, 2023
7d82e7d
cleaning + (ugly) fix for the UI after importing a STON file
RomainDeg May 15, 2023
65d02d8
preview cells height is now slightly better
RomainDeg May 16, 2023
504e4a7
small cleaning + roassal preview fix
RomainDeg May 16, 2023
dbfda09
table size adaptable
RomainDeg May 17, 2023
f8b4d56
fix export
RomainDeg May 17, 2023
f3de9cb
cleaning class extensions
RomainDeg May 17, 2023
43c3b89
fix canvas export
RomainDeg May 17, 2023
bc1f028
deleting dead methods
RomainDeg May 17, 2023
e14f44b
dead methods were not dead, surprise
RomainDeg May 22, 2023
c569711
rewrote generation system, nested collections supported
RomainDeg May 22, 2023
feb3fac
small cleaning of icons, more generation changes
RomainDeg May 23, 2023
2e199ea
Merge pull request #3 from RomainDeg/inspector-like-view
RomainDeg May 24, 2023
1d785a9
fix preview
RomainDeg Jun 14, 2023
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
29 changes: 29 additions & 0 deletions src/InteractiveNotebookPresenter/Collection.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Extension { #name : #Collection }

{ #category : #'*InteractiveNotebookPresenter' }
Collection >> generateMicrodownListOn: aStream using: aGenerationHelper [

self do: [ :el |
(el isKindOf: self class)
ifTrue: [
aGenerationHelper listLevelIncrement.
el generateMicrodownListOn: aStream using: aGenerationHelper.
aGenerationHelper listLevelDecrement ]
ifFalse: [
0 to: aGenerationHelper listLevel do: [ :i |
aStream nextPut: Character tab ].
aStream nextPutAll: '- '.
aStream nextPutAll:
(el generateMicrodownUsingHelper: aGenerationHelper).
aStream nextPut: Character cr ] ]
]

{ #category : #'*InteractiveNotebookPresenter' }
Collection >> generateMicrodownUsingHelper: aGenerationHelper [

| text |
aGenerationHelper listLevel: 0.
text := String streamContents: [ :s |
self generateMicrodownListOn: s using: aGenerationHelper ].
^ text
]
35 changes: 0 additions & 35 deletions src/InteractiveNotebookPresenter/INAbstractReportPrinter.class.st

This file was deleted.

134 changes: 94 additions & 40 deletions src/InteractiveNotebookPresenter/INNotebookAbstractCellModel.class.st
Original file line number Diff line number Diff line change
@@ -1,40 +1,94 @@
Class {
#name : #INNotebookAbstractCellModel,
#superclass : #Object,
#instVars : [
'text',
'model'
],
#category : #InteractiveNotebookPresenter
}

{ #category : #initialization }
INNotebookAbstractCellModel >> initialize [

super initialize.
text := String empty
]

{ #category : #helpers }
INNotebookAbstractCellModel >> presenterClass [

self subclassResponsibility
]

{ #category : #printing }
INNotebookAbstractCellModel >> printContentIn: aStream withContext: aContext [

self subclassResponsibility
]

{ #category : #accessing }
INNotebookAbstractCellModel >> text [

^ text
]

{ #category : #accessing }
INNotebookAbstractCellModel >> text: anObject [

text := anObject
]
"
I am an abstract editor cell model.

I have an instance variable `needToUpdate` that is set to true if a preview cell was never created for me (i.e. if I was never compiled) or if I was modified after having created a preview cell.
It is set to false otherwise, this way I don't have to be recompiled or to create a new preview cell.

I am responsible for the compilation of the content in my presenter's text input.
"
Class {
#name : #INNotebookAbstractCellModel,
#superclass : #Object,
#instVars : [
'text',
'needToUpdate',
'previewCell'
],
#category : #InteractiveNotebookPresenter
}

{ #category : #ston }
INNotebookAbstractCellModel class >> stonAllInstVarNames [
^ super stonAllInstVarNames \ { #needToUpdate. #previewCell }
]

{ #category : #converting }
INNotebookAbstractCellModel >> beCodeModel [
^ self subclassResponsibility
]

{ #category : #converting }
INNotebookAbstractCellModel >> beTextModel [
^ self subclassResponsibility
]

{ #category : #printing }
INNotebookAbstractCellModel >> getContentwithContext: aContext [

^ self subclassResponsibility
]

{ #category : #initialization }
INNotebookAbstractCellModel >> initialize [

super initialize.
needToUpdate := true.
text := String empty
]

{ #category : #accessing }
INNotebookAbstractCellModel >> needToUpdate [
^ needToUpdate
]

{ #category : #accessing }
INNotebookAbstractCellModel >> needToUpdate: aBoolean [
needToUpdate := aBoolean
]

{ #category : #helpers }
INNotebookAbstractCellModel >> presenterClass [

self subclassResponsibility
]

{ #category : #accessing }
INNotebookAbstractCellModel >> previewCell [

^ previewCell
]

{ #category : #accessing }
INNotebookAbstractCellModel >> previewCell: anObject [

previewCell := anObject
]

{ #category : #printing }
INNotebookAbstractCellModel >> printContentIn: aStream withContext: aContext [

self subclassResponsibility
]

{ #category : #accessing }
INNotebookAbstractCellModel >> text [

^ text
]

{ #category : #accessing }
INNotebookAbstractCellModel >> text: anObject [

(text = anObject) ifFalse: [ self needToUpdate: true ].
text := anObject
]
Loading