Il 08/04/2013 11:30, Holger Hans Peter Freyther ha scritto:
> From: Holger Hans Peter Freyther <[hidden email]> > > Fix two problems introduced by the RBNumberLiteralToken change. > The first one is to use >>#copyFrom:to: instead of re-positioning > the stream to fix an issue with the ConcatenatedStream and the > second is to pick the right stop for the token. > > Code like '(Delay forSeconds: 3) wait' got re-formatted to > '(Delay forSeconds: 3)) wait'. The code that extracts the > sourcecode for the RBNumberLiteralToken should have operated on > the result of >>#previousStepPosition but instead the current > position of stream was used as an end. > > Use self previousStepPosition to find the end of the number literal, > remove unused variables and remove the trimSeparators as we are now > using the right place to stop. > > 2013-02-17 Holger Hans Peter Freyther <[hidden email]> > > * RBParser.st: Fix RBScanner>>#scanNumber. > * RewriteTests.st: Add testcase for RBScanner>>#scanNumber. > * package.xml: Add the new test to the testsuite. > --- > packages/stinst/parser/ChangeLog | 6 ++++ > packages/stinst/parser/RBParser.st | 9 ++--- > packages/stinst/parser/RewriteTests.st | 57 +++++++++++++++++++++++++++++++- > packages/stinst/parser/package.xml | 1 + > 4 files changed, 66 insertions(+), 7 deletions(-) > > diff --git a/packages/stinst/parser/ChangeLog b/packages/stinst/parser/ChangeLog > index ed27e41..94dab52 100644 > --- a/packages/stinst/parser/ChangeLog > +++ b/packages/stinst/parser/ChangeLog > @@ -1,3 +1,9 @@ > +2013-02-17 Holger Hans Peter Freyther <[hidden email]> > + > + * RBParser.st: Fix RBScanner>>#scanNumber. > + * RewriteTests.st: Add testcase for RBScanner>>#scanNumber. > + * package.xml: Add the new test to the testsuite. > + > 2013-02-10 Holger Hans Peter Freyther <[hidden email]> > > * OldSyntaxExporter.st: Reformat the method node in > diff --git a/packages/stinst/parser/RBParser.st b/packages/stinst/parser/RBParser.st > index 6f2b1cb..7be57d6 100644 > --- a/packages/stinst/parser/RBParser.st > +++ b/packages/stinst/parser/RBParser.st > @@ -1320,16 +1320,13 @@ Stream subclass: RBScanner [ > ] > > scanNumber [ > - | start stop val string | > + | stop val string | > <category: 'private-scanning'> > - start := tokenStart. > val := self scanNumberValue. > - stop := stream position. > + stop := self previousStepPosition. > > "Get the parsed source" > - stream position: tokenStart - 1. > - string := (stream next: stop - start + 1) trimSeparators. > - stream position: stop. > + string := stream copyFrom: tokenStart - 1 to: stop - 1. > > ^RBNumberLiteralToken > value: val > diff --git a/packages/stinst/parser/RewriteTests.st b/packages/stinst/parser/RewriteTests.st > index 4c42cd8..d38b69b 100644 > --- a/packages/stinst/parser/RewriteTests.st > +++ b/packages/stinst/parser/RewriteTests.st > @@ -7,7 +7,7 @@ > > "====================================================================== > | > -| Copyright (C) 2007 Free Software Foundation, Inc. > +| Copyright (C) 2007,2013 Free Software Foundation, Inc. > | Written by Stephen Compall. > | > | This file is part of the GNU Smalltalk class library. > @@ -278,6 +278,61 @@ TestCase subclass: TestFormat [ > res := RBFormatter new formatAll: (Array with: inp). > self assert: res = '#(16r01 2r01 16rFF)'. > ] > + > + testParanthesis [ > + | inp | > + inp := RBParser parseExpression: '(2r1)'. > + self assert: inp formattedCode = '2r1'. > + ] > + > + testNumberLiteralFloatRewrite [ > + | inp | > + inp := RBParser parseExpression: '2q'. > + self > + assert: inp value = 2.0; > + assert: inp formattedCode = '2q'. > + > + inp := RBParser parseExpression: '2d'. > + self > + assert: inp value = 2.0; > + assert: inp formattedCode = '2d'. > + > + inp := RBParser parseExpression: '2e'. > + self > + assert: inp value = 2.0; > + assert: inp formattedCode = '2e'. > + > + inp := RBParser parseExpression: '2q-'. > + self > + assert: inp value = 2.0; > + assert: inp formattedCode = '2q-'. > + > + inp := RBParser parseExpression: '20q-1'. > + self > + assert: inp value = 2.0; > + assert: inp formattedCode = '20q-1'. > + ] > +] > + > +TestCase subclass: TestScanner [ > + <comment: 'Test aspects of the RBScanner'> > + > + testScanner [ > + | scanner num | > + scanner := RBScanner on: '3' readStream. > + num := scanner next. > + self assert: num value = 3. > + ] > + > + testScannerConcatStream [ > + | scanner num | > + "This is different to >>#testScanner by using a different kind of stream with > + a different species." > + > + scanner := RBScanner on: (Kernel.ConcatenatedStream with: '3' readStream). > + num := scanner next. > + self assert: num value = 3. > + ] > ] > > TestCase subclass: TestRewrite [ > diff --git a/packages/stinst/parser/package.xml b/packages/stinst/parser/package.xml > index b54d14a..f14f6e0 100644 > --- a/packages/stinst/parser/package.xml > +++ b/packages/stinst/parser/package.xml > @@ -30,6 +30,7 @@ > <sunit>STInST.Tests.TestStandardRewrites</sunit> > <sunit>STInST.Tests.TestFormat</sunit> > <sunit>STInST.Tests.TestRewrite</sunit> > + <sunit>STInST.Tests.TestScanner</sunit> > <sunit>STInST.Tests.TestDefaultPoolResolution</sunit> > <sunit>STInST.Tests.TestClassicPoolResolution</sunit> > <filein>RewriteTests.st</filein> > Ok. Paolo _______________________________________________ help-smalltalk mailing list [hidden email] https://lists.gnu.org/mailman/listinfo/help-smalltalk |
In reply to this post by Holger Freyther
Il 08/04/2013 11:30, Holger Hans Peter Freyther ha scritto:
> From: Holger Hans Peter Freyther <[hidden email]> > > Negative numbers are not directly parsed in the RBScanner>>#scanNumber > but are made negative from within the RBParser>>#parseNegatedNumber. This > was done to help to differentiate a binary selector from the number. Add > a testcase for the formatting, make the number negative inside the number > literal token and prepend the $- to the source. > > The start/stop of the token has been wrong before this commit and is still > wrong. This needs to be fixed in the future. > --- > packages/stinst/parser/ChangeLog | 6 ++++++ > packages/stinst/parser/RBParser.st | 2 +- > packages/stinst/parser/RBToken.st | 9 +++++++++ > packages/stinst/parser/RewriteTests.st | 17 +++++++++++++++++ > 4 files changed, 33 insertions(+), 1 deletion(-) > > diff --git a/packages/stinst/parser/ChangeLog b/packages/stinst/parser/ChangeLog > index 94dab52..24bf131 100644 > --- a/packages/stinst/parser/ChangeLog > +++ b/packages/stinst/parser/ChangeLog > @@ -1,3 +1,9 @@ > +2013-02-23 Holger Hans Peter Freyther <[hidden email]> > + > + * RBParser.st: Fix RBParser>>#parsedNegatedNumber. > + * RBToken.st: Add RBNumberLiteralToken>>#makeNegative. > + * RewriteTests.st: Add testcase for RBParser>>#parseNegatedNumber. > + > 2013-02-17 Holger Hans Peter Freyther <[hidden email]> > > * RBParser.st: Fix RBScanner>>#scanNumber. > diff --git a/packages/stinst/parser/RBParser.st b/packages/stinst/parser/RBParser.st > index 7be57d6..1877e6b 100644 > --- a/packages/stinst/parser/RBParser.st > +++ b/packages/stinst/parser/RBParser.st > @@ -544,7 +544,7 @@ Object subclass: RBParser [ > ^self parserError: 'Number expected' ]. > token value negative ifTrue: [ > ^self parserError: 'Positive number expected' ]. > - token value: token value negated. > + token makeNegative. > self step. > ^RBLiteralNode literalToken: token > ] > diff --git a/packages/stinst/parser/RBToken.st b/packages/stinst/parser/RBToken.st > index e77252d..399a6db 100644 > --- a/packages/stinst/parser/RBToken.st > +++ b/packages/stinst/parser/RBToken.st > @@ -297,6 +297,15 @@ RBLiteralToken subclass: RBNumberLiteralToken [ > source: aSource; yourself > ] > > + makeNegative [ > + <category: 'creation'> > + "Help with RBParser>>#parseNegatedNumber to make the value and the > + code match. The token start and stop is still wrong." > + self > + value: value negated; > + source: '-', self source. > + ] > + > source: aSource [ > <category: 'creation'> > source := aSource > diff --git a/packages/stinst/parser/RewriteTests.st b/packages/stinst/parser/RewriteTests.st > index d38b69b..a7005f9 100644 > --- a/packages/stinst/parser/RewriteTests.st > +++ b/packages/stinst/parser/RewriteTests.st > @@ -312,6 +312,23 @@ TestCase subclass: TestFormat [ > assert: inp value = 2.0; > assert: inp formattedCode = '20q-1'. > ] > + > + testNegativeNumbers [ > + | inp | > + inp := RBParser parseExpression: '-3'. > + self assert: inp value = -3. > + self assert: inp token source = '-3'. > + self assert: inp formattedCode = '-3'. > + ] > + > + testNumberExpressionParsing [ > + | inp | > + inp := RBParser parseExpression: '2-2'. > + self > + assert: inp receiver value = 2; > + assert: inp selector = #-; > + assert: inp arguments first value = 2. > + ] > ] > > TestCase subclass: TestScanner [ > Ok. Paolo _______________________________________________ help-smalltalk mailing list [hidden email] https://lists.gnu.org/mailman/listinfo/help-smalltalk |
In reply to this post by Holger Freyther
Il 08/04/2013 11:30, Holger Hans Peter Freyther ha scritto:
> From: Holger Hans Peter Freyther <[hidden email]> > > VisualGST has accumulated some GTK support that makes creating > widgets with GTK more easy. Begin to move these widgets from the > VisualGST package to the new GTKTools. I'm not sure I like this very much... Moving the few classes of the new package to a subdirectory is surely ok, though. Paolo > 2013-03-30 Holger Hans Peter Freyther <[hidden email]> > > * configure.ac: Introduce the GTKTools package > > 2013-03-30 Holger Hans Peter Freyther <[hidden email]> > > * GtkAbstractConcreteWidget.st: Renamed from packages/visualgst/GtkAbstractConcreteWidget.st. > * GtkConcreteWidget.st: Renamed from packages/visualgst/GtkConcreteWidget.st. > * GtkEntryDialog.st: Renamed from packages/visualgst/GtkEntryDialog.st. > * GtkMainWindow.st: Renamed from packages/visualgst/GtkMainWindow.st. > * Tests/GtkConcreteWidgetTest.st: Renamed from packages/visualgst/Tests/GtkConcreteWidgetTest.st. > * package.xml: Added. > > 2013-03-30 Holger Hans Peter Freyther <[hidden email]> > > * Commands/CategoryMenus/AddCategoryCommand.st: Use GTKTools namespace. > * Commands/CategoryMenus/RenameCategoryCommand.st: Use GTKTools namespace. > * Commands/ClassMenus/AddClassCommand.st: Use GTKTools namespace. > * Commands/ClassMenus/RenameClassCommand.st: Use GTKTools namespace. > * Commands/NamespaceMenus/AddNamespaceCommand.st: Use GTKTools namespace. > * Commands/NamespaceMenus/RenameNamespaceCommand.st: Use GTKTools namespace. > * Debugger/GtkContextWidget.st: Use GTKTools namespace. > * Debugger/GtkStackInspectorView.st: Use GTKTools namespace. > * GtkEntryWidget.st: Use GTKTools namespace. > * GtkHistoryWidget.st: Use GTKTools namespace. > * GtkNotebookWidget.st: Use GTKTools namespace. > * GtkPackageBuilderWidget.st: Use GTKTools namespace. > * GtkScrollTreeWidget.st: Use GTKTools namespace. > * GtkSidebarWidget.st: Use GTKTools namespace. > * GtkVariableTrackerWidget.st: Use GTKTools namespace. > * GtkVisualGSTTool.st: Use GTKTools namespace. > * Image/GtkImageWidget.st: Use GTKTools namespace. > * Implementors/GtkImageResultsWidget.st: Use GTKTools namespace. > * Inspector/GtkInspectorBrowserWidget.st: Use GTKTools namespace. > * Inspector/GtkInspectorWidget.st: Use GTKTools namespace. > * SUnit/GtkSUnitResultWidget.st: Use GTKTools namespace. > * StBrowser/GtkCategorizedClassWidget.st: Use GTKTools namespace. > * StBrowser/GtkCategorizedNamespaceWidget.st: Use GTKTools namespace. > * StBrowser/GtkCategoryWidget.st: Use GTKTools namespace. > * StBrowser/GtkClassBrowserWidget.st: Use GTKTools namespace. > * StBrowser/GtkClassHierarchyWidget.st: Use GTKTools namespace. > * StBrowser/GtkMethodWidget.st: Use GTKTools namespace. > * Tetris/Tetris.st: Use GTKTools namespace. > * Text/GtkTextPluginWidget.st: Use GTKTools namespace. > * Text/GtkTextWidget.st: Use GTKTools namespace. > * package.xml: Use GTKTools namespace. > * GtkAbstractConcreteWidget.st: Renamed to packages/gtktools/GtkAbstractConcreteWidget.st. > * GtkConcreteWidget.st: Renamed to packages/gtktools/GtkConcreteWidget.st. > * GtkEntryDialog.st: Renamed to packages/gtktools/GtkEntryDialog.st. > * GtkMainWindow.st: Renamed to packages/gtktools/GtkMainWindow.st. > * Tests/GtkConcreteWidgetTest.st: Renamed to packages/gtktools/Tests/GtkConcreteWidgetTest.st. > --- > .gitignore | 1 + > ChangeLog | 4 + > configure.ac | 1 + > packages/gtktools/ChangeLog | 8 + > packages/gtktools/GtkAbstractConcreteWidget.st | 5 + > packages/gtktools/GtkConcreteWidget.st | 122 +++++++++ > packages/gtktools/GtkEntryDialog.st | 65 +++++ > packages/gtktools/GtkMainWindow.st | 276 ++++++++++++++++++++ > packages/gtktools/Makefile.frag | 5 + > packages/gtktools/Tests/GtkConcreteWidgetTest.st | 42 +++ > packages/gtktools/package.xml | 17 ++ > packages/visualgst/ChangeLog | 39 +++ > .../Commands/CategoryMenus/AddCategoryCommand.st | 2 +- > .../CategoryMenus/RenameCategoryCommand.st | 2 +- > .../Commands/ClassMenus/AddClassCommand.st | 2 +- > .../Commands/ClassMenus/RenameClassCommand.st | 2 +- > .../Commands/NamespaceMenus/AddNamespaceCommand.st | 2 +- > .../NamespaceMenus/RenameNamespaceCommand.st | 2 +- > packages/visualgst/Debugger/GtkContextWidget.st | 2 +- > .../visualgst/Debugger/GtkStackInspectorView.st | 2 +- > packages/visualgst/GtkAbstractConcreteWidget.st | 6 - > packages/visualgst/GtkConcreteWidget.st | 122 --------- > packages/visualgst/GtkEntryDialog.st | 66 ----- > packages/visualgst/GtkEntryWidget.st | 2 +- > packages/visualgst/GtkHistoryWidget.st | 2 +- > packages/visualgst/GtkMainWindow.st | 276 -------------------- > packages/visualgst/GtkNotebookWidget.st | 2 +- > packages/visualgst/GtkPackageBuilderWidget.st | 2 +- > packages/visualgst/GtkScrollTreeWidget.st | 2 +- > packages/visualgst/GtkSidebarWidget.st | 4 +- > packages/visualgst/GtkVariableTrackerWidget.st | 2 +- > packages/visualgst/GtkVisualGSTTool.st | 2 +- > packages/visualgst/Image/GtkImageWidget.st | 2 +- > .../Implementors/GtkImageResultsWidget.st | 2 +- > .../Inspector/GtkInspectorBrowserWidget.st | 2 +- > packages/visualgst/Inspector/GtkInspectorWidget.st | 2 +- > packages/visualgst/Makefile.frag | 2 +- > packages/visualgst/SUnit/GtkSUnitResultWidget.st | 2 +- > .../StBrowser/GtkCategorizedClassWidget.st | 2 +- > .../StBrowser/GtkCategorizedNamespaceWidget.st | 2 +- > packages/visualgst/StBrowser/GtkCategoryWidget.st | 2 +- > .../visualgst/StBrowser/GtkClassBrowserWidget.st | 2 +- > .../visualgst/StBrowser/GtkClassHierarchyWidget.st | 2 +- > packages/visualgst/StBrowser/GtkMethodWidget.st | 2 +- > packages/visualgst/Tests/GtkConcreteWidgetTest.st | 43 --- > packages/visualgst/Tetris/Tetris.st | 2 +- > packages/visualgst/Text/GtkTextPluginWidget.st | 2 +- > packages/visualgst/Text/GtkTextWidget.st | 2 +- > packages/visualgst/package.xml | 12 +- > 49 files changed, 618 insertions(+), 556 deletions(-) > create mode 100644 packages/gtktools/ChangeLog > create mode 100644 packages/gtktools/GtkAbstractConcreteWidget.st > create mode 100644 packages/gtktools/GtkConcreteWidget.st > create mode 100644 packages/gtktools/GtkEntryDialog.st > create mode 100644 packages/gtktools/GtkMainWindow.st > create mode 100644 packages/gtktools/Makefile.frag > create mode 100644 packages/gtktools/Tests/GtkConcreteWidgetTest.st > create mode 100644 packages/gtktools/package.xml > delete mode 100644 packages/visualgst/GtkAbstractConcreteWidget.st > delete mode 100644 packages/visualgst/GtkConcreteWidget.st > delete mode 100644 packages/visualgst/GtkEntryDialog.st > delete mode 100644 packages/visualgst/GtkMainWindow.st > delete mode 100644 packages/visualgst/Tests/GtkConcreteWidgetTest.st > > diff --git a/.gitignore b/.gitignore > index d0578bc..8e8fe08 100644 > --- a/.gitignore > +++ b/.gitignore > @@ -62,6 +62,7 @@ packages/gtk/order > packages/gtk/sizeof > packages/gtk/sizeof.c > packages/gtk/structs > +packages/gtktools/stamp-classes > packages/i18n/ref-add.sed > packages/i18n/ref-del.sed > packages/net/gnutls-wrapper > diff --git a/ChangeLog b/ChangeLog > index 277302a..aa767b8 100644 > --- a/ChangeLog > +++ b/ChangeLog > @@ -1,3 +1,7 @@ > +2013-03-30 Holger Hans Peter Freyther <[hidden email]> > + > + * configure.ac: Introduce the GTKTools package > + > 2013-03-31 Holger Hans Peter Freyther <[hidden email]> > > * tests/stcompiler.ok: Update the test result. > diff --git a/configure.ac b/configure.ac > index 798a6a8..5305622 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -587,6 +587,7 @@ GST_PACKAGE_ENABLE([SUnit], [sunit]) > GST_PACKAGE_ENABLE([Swazoo], [swazoo-httpd]) > GST_PACKAGE_ENABLE([Sockets], [sockets], [], [gst_cv_sockets]) > GST_PACKAGE_ENABLE([VFSAddOns], [vfs], [], [], [Makefile]) > +GST_PACKAGE_ENABLE([GTKTools], [gtktools]) > GST_PACKAGE_ENABLE([VisualGST], [visualgst]) > GST_PACKAGE_ENABLE([XML-XMLNodeBuilder], [xml/builder]) > GST_PACKAGE_ENABLE([XML-DOM], [xml/dom]) > diff --git a/packages/gtktools/ChangeLog b/packages/gtktools/ChangeLog > new file mode 100644 > index 0000000..1299e7f > --- /dev/null > +++ b/packages/gtktools/ChangeLog > @@ -0,0 +1,8 @@ > +2013-03-30 Holger Hans Peter Freyther <[hidden email]> > + > + * GtkAbstractConcreteWidget.st: Renamed from packages/visualgst/GtkAbstractConcreteWidget.st. > + * GtkConcreteWidget.st: Renamed from packages/visualgst/GtkConcreteWidget.st. > + * GtkEntryDialog.st: Renamed from packages/visualgst/GtkEntryDialog.st. > + * GtkMainWindow.st: Renamed from packages/visualgst/GtkMainWindow.st. > + * Tests/GtkConcreteWidgetTest.st: Renamed from packages/visualgst/Tests/GtkConcreteWidgetTest.st. > + * package.xml: Added. > diff --git a/packages/gtktools/GtkAbstractConcreteWidget.st b/packages/gtktools/GtkAbstractConcreteWidget.st > new file mode 100644 > index 0000000..4354e1e > --- /dev/null > +++ b/packages/gtktools/GtkAbstractConcreteWidget.st > @@ -0,0 +1,5 @@ > +Smalltalk.Object subclass: GtkAbstractConcreteWidget [ > + > + hideAll [ > + ] > +] > diff --git a/packages/gtktools/GtkConcreteWidget.st b/packages/gtktools/GtkConcreteWidget.st > new file mode 100644 > index 0000000..4880921 > --- /dev/null > +++ b/packages/gtktools/GtkConcreteWidget.st > @@ -0,0 +1,122 @@ > +GtkAbstractConcreteWidget subclass: GtkConcreteWidget [ > + | child parentWindow popupMenu | > + > + GtkConcreteWidget class >> parentWindow: aGtkWindow [ > + <category: 'instance creation'> > + > + ^ self new > + parentWindow: aGtkWindow; > + initialize; > + yourself > + ] > + > + GtkConcreteWidget class >> showAll [ > + <category: 'instance creation'> > + > + ^ self new > + initialize; > + showAll; > + yourself > + ] > + > + initialize [ > + <category: 'initialize'> > + > + ] > + > + parentWindow: aGtkWindow [ > + <category: 'accessing'> > + > + parentWindow := aGtkWindow > + ] > + > + parentWindow [ > + <category: 'accessing'> > + > + ^ parentWindow > + ] > + > + mainWidget [ > + <category: 'accessing'> > + > + ^ child > + ] > + > + mainWidget: aGtkWidget [ > + <category: 'accessing'> > + > + child ifNotNil: [ child hideAll ]. > + child := aGtkWidget > + ] > + > + showAll [ > + <category: 'user interface'> > + > + child showAll > + ] > + > + hideAll [ > + <category: 'user interface'> > + > + child hideAll > + ] > + > + isVisible [ > + <category: 'testing'> > + > + ^ child getVisible > + ] > + > + hasFocus [ > + <category: 'testing'> > + > + | parent current | > + parent := child. > + [ (current := parent getFocusChild) notNil ] whileTrue: [ > + parent := current ]. > + ^ self parentWindow getFocus = parent > + > + ] > + > + focusedWidget [ > + <category: 'focus'> > + > + self hasFocus ifTrue: [ ^ self ]. > + ^ nil > + ] > + > + onFocusPerform: aSymbol [ > + <category: 'widget'> > + > + ^ self focusedWidget perform: aSymbol > + ] > + > + onPress: aGtkWidget event: aGdkEvent [ > + <category: 'button event'> > + > + | menu aGdkButtonEvent | > + aGdkButtonEvent := aGdkEvent castTo: GTK.GdkEventButton type. > + aGdkButtonEvent button value = 3 ifFalse: [ ^ false ]. > + menu := popupMenu asPopupMenu. > + menu attachToWidget: self treeView detacher: nil. > + menu popup: nil parentMenuItem: nil func: nil data: nil button: 3 activateTime: aGdkButtonEvent time value. > + menu showAll. > + ^ true > + ] > + > + connectToWhenPopupMenu: aMenuBuilder [ > + <category: 'user interface'> > + > + popupMenu := aMenuBuilder. > + ^ self treeView connectSignal: 'button-press-event' to: self selector: #'onPress:event:' > + ] > + > + grabFocus [ > + <category: 'user interface'> > + > + ] > + > + close [ > + <category: 'user interface'> > + ] > +] > diff --git a/packages/gtktools/GtkEntryDialog.st b/packages/gtktools/GtkEntryDialog.st > new file mode 100644 > index 0000000..b45c779 > --- /dev/null > +++ b/packages/gtktools/GtkEntryDialog.st > @@ -0,0 +1,65 @@ > +Object subclass: GtkEntryDialog [ > + | dialog labelWidget entryWidget hasPressedOk buttons defaultButton | > + > + GtkEntryDialog class >> title: aTitle text: aDescription [ > + <category: 'instance creation'> > + > + ^ (self new) > + title: aTitle text: aDescription; > + yourself > + ] > + > + beOkCancel [ > + buttons := #( ('Ok' #gtkResponseOk) ('Cancel' #gtkResponseCancel)) > + ] > + > + beYesNo [ > + buttons := #( ('Yes' #gtkResponseYes) ('No' #gtkResponseNo)) > + ] > + > + title: aTitle text: aDescription [ > + <category: 'initialization'> > + > + hasPressedOk := false. > + dialog := GTK.GtkDialog newWithButtons: aTitle parent: nil flags: 0 varargs: {nil}. > + self buildCentralWidget: aDescription on: dialog. > + "dialog showModalOnAnswer: [ :dlg :res | > + res = GTK.Gtk gtkResponseYes ifTrue: [ hasPressedOk := true ]. > + dlg destroy ]" > + ] > + > + hasPressedOk: aBlock [ > + <category: 'testing'> > + > + dialog showModalOnAnswer: [ :dlg :res | > + res = defaultButton ifTrue: [ aBlock value ]. > + dlg destroy ] > + ] > + > + result [ > + <category: 'accessing'> > + > + ^ entryWidget getText > + ] > + > + buildCentralWidget: aString on: aGtkDialog [ > + <category: 'user interface'> > + > + | hbox | > + buttons isNil ifTrue: [ self beOkCancel ]. > + buttons do: [ :each | > + aGtkDialog addButton: each first responseId: (GTK.Gtk perform: each second) ]. > + > + defaultButton := GTK.Gtk perform: buttons first second. > + aGtkDialog setDefaultResponse: defaultButton. > + hbox := GTK.GtkHBox new: true spacing: 0. > + labelWidget := GTK.GtkLabel new: aString. > + entryWidget := GTK.GtkEntry new. > + entryWidget setActivatesDefault: true. > + hbox > + add: labelWidget; > + add: entryWidget; > + showAll. > + aGtkDialog getVBox add: hbox > + ] > +] > diff --git a/packages/gtktools/GtkMainWindow.st b/packages/gtktools/GtkMainWindow.st > new file mode 100644 > index 0000000..6e59e2a > --- /dev/null > +++ b/packages/gtktools/GtkMainWindow.st > @@ -0,0 +1,276 @@ > +Object subclass: GtkMainWindow [ > + | window container menuBar toolBar centralWidget statusBar accelGroup | > + > + GtkMainWindow class >> open [ > + <category: 'user interface'> > + > + ^ (self new) > + initialize; > + showAll; > + postInitialize; > + yourself > + ] > + > + GtkMainWindow class >> openSized: aPoint [ > + <category: 'user interface'> > + > + ^ (self new) > + initialize; > + resize: aPoint; > + showAll; > + postInitialize; > + yourself > + ] > + > + centralWidget [ > + <category: 'accessing'> > + > + ^ centralWidget > + ] > + > + centralWidget: aGtkWidget [ > + <category: 'accessing'> > + > + centralWidget := aGtkWidget > + ] > + > + container [ > + <category: 'accessing'> > + > + ^ container ifNil: [ container := GTK.GtkVBox new: false spacing: 0 ] > + ] > + > + accelGroup [ > + <category: 'accessing'> > + > + ^ accelGroup ifNil: [ accelGroup := GTK.GtkAccelGroup new ] > + ] > + > + menuBar [ > + <category: 'accessing'> > + > + ^ menuBar ifNil: [ menuBar := GTK.GtkMenuBar new ] > + ] > + > + menuBar: aGtkMenuBar [ > + <category: 'accessing'> > + > + menuBar := aGtkMenuBar > + ] > + > + statusBar [ > + <category: 'accessing'> > + > + ^ statusBar ifNil: [ statusBar := GTK.GtkStatusbar new ] > + ] > + > + statusBar: aGtkStatusBar [ > + <category: 'accessing'> > + > + statusBar := aGtkStatusBar > + ] > + > + title [ > + <category: 'accessing'> > + > + ^ window title > + ] > + > + title: aString [ > + <category: 'accessing'> > + > + window setTitle: aString > + ] > + > + toolBar [ > + <category: 'accessing'> > + > + ^ toolBar ifNil: [ toolBar := GTK.GtkToolbar new ] > + ] > + > + toolBar: aGtkToolBar [ > + <category: 'accessing'> > + > + toolBar := aGtkToolBar > + ] > + > + aboutGst [ > + <category: 'events'> > + > + (GTK.GtkAboutDialog new) > + setProgramName: 'GNU Smalltalk'; > + setVersion: (Smalltalk version =~ 'version (.*)' at: 1); > + setLicense: 'GNU Smalltalk is free software; you can redistribute it and/or modify it > +under the terms of the GNU General Public License as published by the Free > +Software Foundation; either version 2, or (at your option) any later version. > + > +GNU Smalltalk is distributed in the hope that it will be useful, but WITHOUT > +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS > +FOR A PARTICULAR PURPOSE. See the GNU General Public License for more > +details. > + > +You should have received a copy of the GNU General Public License along with > +GNU Smalltalk; see the file COPYING. If not, write to the Free Software > +Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. > + > +Please consult the GNU Smalltalk source code for additional permissions > +that are specific to this version of GNU Smalltalk.'; > + setWebsite: 'http://smalltalk.gnu.org/'; > + showModalDestroy > + ] > + > + close [ > + <category: 'events'> > + > + window hideAll > + ] > + > + initialize [ > + <category: 'intialization'> > + > + window := GTK.GtkWindow new: GTK.Gtk gtkWindowToplevel. > + window addAccelGroup: self accelGroup. > + self > + title: self windowTitle; > + createMenus; > + createToolbar; > + createStatusBar; > + centralWidget: self buildCentralWidget. > + ] > + > + buildCentralWidget [ > + <category: 'initialization'> > + ^nil > + ] > + > + createStatusBar [ > + <category: 'user interface'> > + > + self statusMessage: self windowTitle > + ] > + > + windowTitle [ > + <category: 'initialization'> > + ^self class name > + ] > + > + createToolbar [ > + <category: 'initialization'> > + ] > + > + createMenus [ > + <category: 'initialization'> > + ] > + > + postInitialize [ > + <category: 'initialization'> > + > + window > + connectSignal: 'delete-event' to: self selector: #'onDelete:event:' > + ] > + > + onDelete: aGtkWidget event: aGdkEvent [ > + <category: 'events'> > + > + window hideAll. > + ^ true > + ] > + > + addMenuItem: aString [ > + <category: 'menubar'> > + > + self menuBar append: (GTK.GtkMenuItem newWithLabel: aString) > + ] > + > + addMenuItem: aString withSubmenu: aGtkMenuItemArray [ > + <category: 'menubar'> > + > + self menuBar append: > + ((GTK.GtkMenuItem newWithLabel: aString) > + setSubmenu: (self createNewMenuEntry: aGtkMenuItemArray)) > + ] > + > + createMainMenu: anArray [ > + <category: 'menubar'> > + > + anArray do: [ :each | > + self addMenuItem: each first withSubmenu: (self perform: each second) ] > + ] > + > + createNewMenuEntry: anArray [ > + <category: 'menubar'> > + > + | menu | > + menu := (GTK.GtkMenu new) > + setAccelGroup: self accelGroup; > + yourself. > + anArray do: [ :each | > + menu append: each ]. > + ^ menu > + ] > + > + statusMessage: aString [ > + <category: 'statusbar'> > + > + self statusBar > + push: 0 text: aString > + ] > + > + appendSeparator [ > + <category: 'toolbar'> > + > + self appendToolItem: GTK.GtkSeparatorToolItem new > + ] > + > + appendToolItem: aGtkToolItem [ > + <category: 'toolbar'> > + > + self toolBar insert: aGtkToolItem pos: -1 > + ] > + > + appendWidget: aGtkWidget [ > + <category: 'toolbar'> > + > + self appendToolItem: ((GTK.GtkToolItem new) add: aGtkWidget) > + ] > + > + resize: aPoint [ > + <category: 'user interface'> > + > + window resize: aPoint x height: aPoint y > + ] > + > + showAll [ > + {menuBar->false. toolBar->false. centralWidget->true. statusBar->false} do: [ :each | > + each key ifNotNil: [ self container > + packStart: each key expand: each value fill: true padding: 0 ] ]. > + > + window > + add: self container; > + showAll > + ] > + > + focusedWidget [ > + <category: 'focus'> > + > + self subclassResponsibility > + ] > + > + onFocusPerform: aSymbol [ > + <category: 'widget'> > + > + | widget | > + widget := self focusedWidget. > + widget isNil ifTrue: [ ^ self ]. > + ^ widget perform: aSymbol > + ] > + > + onFocusPerform: aSymbol with: anObject [ > + <category: 'widget'> > + > + | widget | > + widget := self focusedWidget. > + widget isNil ifTrue: [ ^ self ]. > + ^ widget perform: aSymbol with: anObject > + ] > +] > diff --git a/packages/gtktools/Makefile.frag b/packages/gtktools/Makefile.frag > new file mode 100644 > index 0000000..e758dbc > --- /dev/null > +++ b/packages/gtktools/Makefile.frag > @@ -0,0 +1,5 @@ > +GTKTools_FILES = \ > +packages/gtktools/GtkMainWindow.st packages/gtktools/GtkAbstractConcreteWidget.st packages/gtktools/GtkConcreteWidget.st packages/gtktools/GtkEntryDialog.st packages/gtktools/Tests/GtkConcreteWidgetTest.st > +$(GTKTools_FILES): > +$(srcdir)/packages/gtktools/stamp-classes: $(GTKTools_FILES) > + touch $(srcdir)/packages/gtktools/stamp-classes > diff --git a/packages/gtktools/Tests/GtkConcreteWidgetTest.st b/packages/gtktools/Tests/GtkConcreteWidgetTest.st > new file mode 100644 > index 0000000..7fce2e4 > --- /dev/null > +++ b/packages/gtktools/Tests/GtkConcreteWidgetTest.st > @@ -0,0 +1,42 @@ > +TestCase subclass: GtkConcreteWidgetTest [ > + > + | show | > + > + showAll [ > + > + show := true > + ] > + > + hideAll [ > + > + show := false > + ] > + > + getVisible [ > + > + ^ false > + ] > + > + testAbstractWidget [ > + <category: 'testing'> > + > + self should: [ GtkAbstractConcreteWidget new hideAll. true ] > + ] > + > + testConcreteWidget [ > + <category: 'testing'> > + > + | widget | > + widget := GtkConcreteWidget parentWindow: #foo. > + self assert: widget parentWindow = #foo. > + widget mainWidget: self. > + self assert: widget mainWidget = self. > + widget showAll. > + self assert: show. > + widget hideAll. > + self assert: show not. > + self assert: widget isVisible not. > + self should: [ widget grabFocus. true ]. > + self should: [ widget close. true]. > + ] > +] > diff --git a/packages/gtktools/package.xml b/packages/gtktools/package.xml > new file mode 100644 > index 0000000..35c3414 > --- /dev/null > +++ b/packages/gtktools/package.xml > @@ -0,0 +1,17 @@ > +<package> > + <name>GTKTools</name> > + <namespace>GTKTools</namespace> > + <prereq>GTK</prereq> > + > + <filein>GtkMainWindow.st</filein> > + <filein>GtkAbstractConcreteWidget.st</filein> > + <filein>GtkConcreteWidget.st</filein> > + <filein>GtkEntryDialog.st</filein> > + > + <test> > + <sunit> > + GTKTools.GtkConcreteWidgetTest > + </sunit> > + <filein>Tests/GtkConcreteWidgetTest.st</filein> > + </test> > +</package> > diff --git a/packages/visualgst/ChangeLog b/packages/visualgst/ChangeLog > index a12113b..a2d935f 100644 > --- a/packages/visualgst/ChangeLog > +++ b/packages/visualgst/ChangeLog > @@ -1,3 +1,42 @@ > +2013-03-30 Holger Hans Peter Freyther <[hidden email]> > + > + * Commands/CategoryMenus/AddCategoryCommand.st: Use GTKTools namespace. > + * Commands/CategoryMenus/RenameCategoryCommand.st: Use GTKTools namespace. > + * Commands/ClassMenus/AddClassCommand.st: Use GTKTools namespace. > + * Commands/ClassMenus/RenameClassCommand.st: Use GTKTools namespace. > + * Commands/NamespaceMenus/AddNamespaceCommand.st: Use GTKTools namespace. > + * Commands/NamespaceMenus/RenameNamespaceCommand.st: Use GTKTools namespace. > + * Debugger/GtkContextWidget.st: Use GTKTools namespace. > + * Debugger/GtkStackInspectorView.st: Use GTKTools namespace. > + * GtkEntryWidget.st: Use GTKTools namespace. > + * GtkHistoryWidget.st: Use GTKTools namespace. > + * GtkNotebookWidget.st: Use GTKTools namespace. > + * GtkPackageBuilderWidget.st: Use GTKTools namespace. > + * GtkScrollTreeWidget.st: Use GTKTools namespace. > + * GtkSidebarWidget.st: Use GTKTools namespace. > + * GtkVariableTrackerWidget.st: Use GTKTools namespace. > + * GtkVisualGSTTool.st: Use GTKTools namespace. > + * Image/GtkImageWidget.st: Use GTKTools namespace. > + * Implementors/GtkImageResultsWidget.st: Use GTKTools namespace. > + * Inspector/GtkInspectorBrowserWidget.st: Use GTKTools namespace. > + * Inspector/GtkInspectorWidget.st: Use GTKTools namespace. > + * SUnit/GtkSUnitResultWidget.st: Use GTKTools namespace. > + * StBrowser/GtkCategorizedClassWidget.st: Use GTKTools namespace. > + * StBrowser/GtkCategorizedNamespaceWidget.st: Use GTKTools namespace. > + * StBrowser/GtkCategoryWidget.st: Use GTKTools namespace. > + * StBrowser/GtkClassBrowserWidget.st: Use GTKTools namespace. > + * StBrowser/GtkClassHierarchyWidget.st: Use GTKTools namespace. > + * StBrowser/GtkMethodWidget.st: Use GTKTools namespace. > + * Tetris/Tetris.st: Use GTKTools namespace. > + * Text/GtkTextPluginWidget.st: Use GTKTools namespace. > + * Text/GtkTextWidget.st: Use GTKTools namespace. > + * package.xml: Use GTKTools namespace. > + * GtkAbstractConcreteWidget.st: Renamed to packages/gtktools/GtkAbstractConcreteWidget.st. > + * GtkConcreteWidget.st: Renamed to packages/gtktools/GtkConcreteWidget.st. > + * GtkEntryDialog.st: Renamed to packages/gtktools/GtkEntryDialog.st. > + * GtkMainWindow.st: Renamed to packages/gtktools/GtkMainWindow.st. > + * Tests/GtkConcreteWidgetTest.st: Renamed to packages/gtktools/Tests/GtkConcreteWidgetTest.st. > + > 2013-01-29 Holger Hans Peter Freyther <[hidden email]> > > * Notification/Kernel/Metaclass.st: Remove usages of #isUntrusted > diff --git a/packages/visualgst/Commands/CategoryMenus/AddCategoryCommand.st b/packages/visualgst/Commands/CategoryMenus/AddCategoryCommand.st > index ef31ce2..8cbc060 100644 > --- a/packages/visualgst/Commands/CategoryMenus/AddCategoryCommand.st > +++ b/packages/visualgst/Commands/CategoryMenus/AddCategoryCommand.st > @@ -9,7 +9,7 @@ ClassCommand subclass: AddCategoryCommand [ > <category: 'command'> > > | dlg | > - dlg := GtkEntryDialog title: 'Add a category' text: 'Name of the category'. > + dlg := GTKTools.GtkEntryDialog title: 'Add a category' text: 'Name of the category'. > dlg hasPressedOk: [ > self addCategory: dlg result onWidget: target viewedCategoryWidget ] > > diff --git a/packages/visualgst/Commands/CategoryMenus/RenameCategoryCommand.st b/packages/visualgst/Commands/CategoryMenus/RenameCategoryCommand.st > index fc27f7e..c577adf 100644 > --- a/packages/visualgst/Commands/CategoryMenus/RenameCategoryCommand.st > +++ b/packages/visualgst/Commands/CategoryMenus/RenameCategoryCommand.st > @@ -9,7 +9,7 @@ CategoryCommand subclass: RenameCategoryCommand [ > <category: 'command'> > > | dlg | > - dlg := GtkEntryDialog title: 'Rename a category' text: 'Name of the category'. > + dlg := GTKTools.GtkEntryDialog title: 'Rename a category' text: 'Name of the category'. > dlg hasPressedOk: [ > (RenameCategoryUndoCommand rename: target state category in: target state classOrMeta as: dlg result onModel: target viewedCategoryModel) push ] > ] > diff --git a/packages/visualgst/Commands/ClassMenus/AddClassCommand.st b/packages/visualgst/Commands/ClassMenus/AddClassCommand.st > index 6d011a0..b000027 100644 > --- a/packages/visualgst/Commands/ClassMenus/AddClassCommand.st > +++ b/packages/visualgst/Commands/ClassMenus/AddClassCommand.st > @@ -12,7 +12,7 @@ NamespaceCommand subclass: AddClassCommand [ > superclass := target state hasSelectedClass > ifTrue: [ target state classOrMeta ] > ifFalse: [ Object ]. > - dlg := GtkEntryDialog title: 'Add a class' text: 'Name of the new class'. > + dlg := GTKTools.GtkEntryDialog title: 'Add a class' text: 'Name of the new class'. > dlg hasPressedOk: [ > (AddClassUndoCommand > add: dlg result asSymbol > diff --git a/packages/visualgst/Commands/ClassMenus/RenameClassCommand.st b/packages/visualgst/Commands/ClassMenus/RenameClassCommand.st > index b80aa86..9ee81c3 100644 > --- a/packages/visualgst/Commands/ClassMenus/RenameClassCommand.st > +++ b/packages/visualgst/Commands/ClassMenus/RenameClassCommand.st > @@ -9,7 +9,7 @@ ClassCommand subclass: RenameClassCommand [ > <category: 'command'> > > | dlg | > - dlg := GtkEntryDialog title: 'Rename a class' text: 'Name of the class'. > + dlg := GTKTools.GtkEntryDialog title: 'Rename a class' text: 'Name of the class'. > dlg hasPressedOk: [ > (RenameClassUndoCommand rename: target state classOrMeta as: dlg result asSymbol) push ] > ] > diff --git a/packages/visualgst/Commands/NamespaceMenus/AddNamespaceCommand.st b/packages/visualgst/Commands/NamespaceMenus/AddNamespaceCommand.st > index 8b87546..f899fb3 100644 > --- a/packages/visualgst/Commands/NamespaceMenus/AddNamespaceCommand.st > +++ b/packages/visualgst/Commands/NamespaceMenus/AddNamespaceCommand.st > @@ -9,7 +9,7 @@ NamespaceCommand subclass: AddNamespaceCommand [ > <category: 'command'> > > | dlg | > - dlg := GtkEntryDialog title: 'Add a namespace' text: 'Name of the new namespace'. > + dlg := GTKTools.GtkEntryDialog title: 'Add a namespace' text: 'Name of the new namespace'. > dlg hasPressedOk: [ > (AddNamespaceUndoCommand add: dlg result asSymbol to: target state namespace) push ] > ] > diff --git a/packages/visualgst/Commands/NamespaceMenus/RenameNamespaceCommand.st b/packages/visualgst/Commands/NamespaceMenus/RenameNamespaceCommand.st > index b2b8e6c..d9daca4 100644 > --- a/packages/visualgst/Commands/NamespaceMenus/RenameNamespaceCommand.st > +++ b/packages/visualgst/Commands/NamespaceMenus/RenameNamespaceCommand.st > @@ -9,7 +9,7 @@ NamespaceCommand subclass: RenameNamespaceCommand [ > <category: 'command'> > > | dlg | > - dlg := GtkEntryDialog title: 'Rename a namespace' text: 'Name of the new namespace'. > + dlg := GTKTools.GtkEntryDialog title: 'Rename a namespace' text: 'Name of the new namespace'. > dlg hasPressedOk: [ > (RenameNamespaceUndoCommand rename: target state namespace as: dlg result asSymbol) push ] > ] > diff --git a/packages/visualgst/Debugger/GtkContextWidget.st b/packages/visualgst/Debugger/GtkContextWidget.st > index db47adb..86bd2d9 100644 > --- a/packages/visualgst/Debugger/GtkContextWidget.st > +++ b/packages/visualgst/Debugger/GtkContextWidget.st > @@ -1,4 +1,4 @@ > -GtkConcreteWidget subclass: GtkContextWidget [ > +GTKTools.GtkConcreteWidget subclass: GtkContextWidget [ > | column contextTree model context contextList | > > GtkContextWidget class >> on: aContext [ > diff --git a/packages/visualgst/Debugger/GtkStackInspectorView.st b/packages/visualgst/Debugger/GtkStackInspectorView.st > index dfb3436..45d2bdd 100644 > --- a/packages/visualgst/Debugger/GtkStackInspectorView.st > +++ b/packages/visualgst/Debugger/GtkStackInspectorView.st > @@ -1,4 +1,4 @@ > -GtkConcreteWidget subclass: GtkStackInspectorView [ > +GTKTools.GtkConcreteWidget subclass: GtkStackInspectorView [ > | object variables | > > GtkStackInspectorView class >> openOn: aContext [ > diff --git a/packages/visualgst/GtkAbstractConcreteWidget.st b/packages/visualgst/GtkAbstractConcreteWidget.st > deleted file mode 100644 > index 47f5c26..0000000 > --- a/packages/visualgst/GtkAbstractConcreteWidget.st > +++ /dev/null > @@ -1,6 +0,0 @@ > -Smalltalk.Object subclass: GtkAbstractConcreteWidget [ > - > - hideAll [ > - ] > -] > - > diff --git a/packages/visualgst/GtkConcreteWidget.st b/packages/visualgst/GtkConcreteWidget.st > deleted file mode 100644 > index 3c72f57..0000000 > --- a/packages/visualgst/GtkConcreteWidget.st > +++ /dev/null > @@ -1,122 +0,0 @@ > -GtkAbstractConcreteWidget subclass: GtkConcreteWidget [ > - | child parentWindow popupMenu | > - > - GtkConcreteWidget class >> parentWindow: aGtkWindow [ > - <category: 'instance creation'> > - > - ^ self new > - parentWindow: aGtkWindow; > - initialize; > - yourself > - ] > - > - GtkConcreteWidget class >> showAll [ > - <category: 'instance creation'> > - > - ^ self new > - initialize; > - showAll; > - yourself > - ] > - > - initialize [ > - <category: 'initialize'> > - > - ] > - > - parentWindow: aGtkWindow [ > - <category: 'accessing'> > - > - parentWindow := aGtkWindow > - ] > - > - parentWindow [ > - <category: 'accessing'> > - > - ^ parentWindow > - ] > - > - mainWidget [ > - <category: 'accessing'> > - > - ^ child > - ] > - > - mainWidget: aGtkWidget [ > - <category: 'accessing'> > - > - child ifNotNil: [ child hideAll ]. > - child := aGtkWidget > - ] > - > - showAll [ > - <category: 'user interface'> > - > - child showAll > - ] > - > - hideAll [ > - <category: 'user interface'> > - > - child hideAll > - ] > - > - isVisible [ > - <category: 'testing'> > - > - ^ child getVisible > - ] > - > - hasFocus [ > - <category: 'testing'> > - > - | parent current | > - parent := child. > - [ (current := parent getFocusChild) notNil ] whileTrue: [ > - parent := current ]. > - ^ self parentWindow getFocus = parent > - > - ] > - > - focusedWidget [ > - <category: 'focus'> > - > - self hasFocus ifTrue: [ ^ self ]. > - ^ nil > - ] > - > - onFocusPerform: aSymbol [ > - <category: 'widget'> > - > - ^ self focusedWidget perform: aSymbol > - ] > - > - onPress: aGtkWidget event: aGdkEvent [ > - <category: 'button event'> > - > - | menu aGdkButtonEvent | > - aGdkButtonEvent := aGdkEvent castTo: GTK.GdkEventButton type. > - aGdkButtonEvent button value = 3 ifFalse: [ ^ false ]. > - menu := popupMenu asPopupMenu. > - menu attachToWidget: self treeView detacher: nil. > - menu popup: nil parentMenuItem: nil func: nil data: nil button: 3 activateTime: aGdkButtonEvent time value. > - menu showAll. > - ^ true > - ] > - > - connectToWhenPopupMenu: aMenuBuilder [ > - <category: 'user interface'> > - > - popupMenu := aMenuBuilder. > - ^ self treeView connectSignal: 'button-press-event' to: self selector: #'onPress:event:' > - ] > - > - grabFocus [ > - <category: 'user interface'> > - > - ] > - > - close [ > - <category: 'user interface'> > - ] > -] > diff --git a/packages/visualgst/GtkEntryDialog.st b/packages/visualgst/GtkEntryDialog.st > deleted file mode 100644 > index 55827f5..0000000 > --- a/packages/visualgst/GtkEntryDialog.st > +++ /dev/null > @@ -1,66 +0,0 @@ > -Object subclass: GtkEntryDialog [ > - | dialog labelWidget entryWidget hasPressedOk buttons defaultButton | > - > - GtkEntryDialog class >> title: aTitle text: aDescription [ > - <category: 'instance creation'> > - > - ^ (self new) > - title: aTitle text: aDescription; > - yourself > - ] > - > - beOkCancel [ > - buttons := #( ('Ok' #gtkResponseOk) ('Cancel' #gtkResponseCancel)) > - ] > - > - beYesNo [ > - buttons := #( ('Yes' #gtkResponseYes) ('No' #gtkResponseNo)) > - ] > - > - title: aTitle text: aDescription [ > - <category: 'initialization'> > - > - hasPressedOk := false. > - dialog := GTK.GtkDialog newWithButtons: aTitle parent: nil flags: 0 varargs: {nil}. > - self buildCentralWidget: aDescription on: dialog. > - "dialog showModalOnAnswer: [ :dlg :res | > - res = GTK.Gtk gtkResponseYes ifTrue: [ hasPressedOk := true ]. > - dlg destroy ]" > - ] > - > - hasPressedOk: aBlock [ > - <category: 'testing'> > - > - dialog showModalOnAnswer: [ :dlg :res | > - res = defaultButton ifTrue: [ aBlock value ]. > - dlg destroy ] > - ] > - > - result [ > - <category: 'accessing'> > - > - ^ entryWidget getText > - ] > - > - buildCentralWidget: aString on: aGtkDialog [ > - <category: 'user interface'> > - > - | hbox | > - buttons isNil ifTrue: [ self beOkCancel ]. > - buttons do: [ :each | > - aGtkDialog addButton: each first responseId: (GTK.Gtk perform: each second) ]. > - > - defaultButton := GTK.Gtk perform: buttons first second. > - aGtkDialog setDefaultResponse: defaultButton. > - hbox := GTK.GtkHBox new: true spacing: 0. > - labelWidget := GTK.GtkLabel new: aString. > - entryWidget := GTK.GtkEntry new. > - entryWidget setActivatesDefault: true. > - hbox > - add: labelWidget; > - add: entryWidget; > - showAll. > - aGtkDialog getVBox add: hbox > - ] > -] > - > diff --git a/packages/visualgst/GtkEntryWidget.st b/packages/visualgst/GtkEntryWidget.st > index d637d74..5ce6f17 100644 > --- a/packages/visualgst/GtkEntryWidget.st > +++ b/packages/visualgst/GtkEntryWidget.st > @@ -1,4 +1,4 @@ > -GtkConcreteWidget subclass: GtkEntryWidget [ > +GTKTools.GtkConcreteWidget subclass: GtkEntryWidget [ > > GtkEntryWidget class >> labeled: aString [ > <category: 'instance creation'> > diff --git a/packages/visualgst/GtkHistoryWidget.st b/packages/visualgst/GtkHistoryWidget.st > index 3709bdb..571548b 100644 > --- a/packages/visualgst/GtkHistoryWidget.st > +++ b/packages/visualgst/GtkHistoryWidget.st > @@ -1,4 +1,4 @@ > -GtkConcreteWidget subclass: GtkHistoryWidget [ > +GTKTools.GtkConcreteWidget subclass: GtkHistoryWidget [ > | browser model widget | > > GtkHistoryWidget class >> new [ > diff --git a/packages/visualgst/GtkMainWindow.st b/packages/visualgst/GtkMainWindow.st > deleted file mode 100644 > index 4f15871..0000000 > --- a/packages/visualgst/GtkMainWindow.st > +++ /dev/null > @@ -1,276 +0,0 @@ > -Smalltalk.Object subclass: GtkMainWindow [ > - | window container menuBar toolBar centralWidget statusBar accelGroup | > - > - GtkMainWindow class >> open [ > - <category: 'user interface'> > - > - ^ (self new) > - initialize; > - showAll; > - postInitialize; > - yourself > - ] > - > - GtkMainWindow class >> openSized: aPoint [ > - <category: 'user interface'> > - > - ^ (self new) > - initialize; > - resize: aPoint; > - showAll; > - postInitialize; > - yourself > - ] > - > - centralWidget [ > - <category: 'accessing'> > - > - ^ centralWidget > - ] > - > - centralWidget: aGtkWidget [ > - <category: 'accessing'> > - > - centralWidget := aGtkWidget > - ] > - > - container [ > - <category: 'accessing'> > - > - ^ container ifNil: [ container := GTK.GtkVBox new: false spacing: 0 ] > - ] > - > - accelGroup [ > - <category: 'accessing'> > - > - ^ accelGroup ifNil: [ accelGroup := GTK.GtkAccelGroup new ] > - ] > - > - menuBar [ > - <category: 'accessing'> > - > - ^ menuBar ifNil: [ menuBar := GTK.GtkMenuBar new ] > - ] > - > - menuBar: aGtkMenuBar [ > - <category: 'accessing'> > - > - menuBar := aGtkMenuBar > - ] > - > - statusBar [ > - <category: 'accessing'> > - > - ^ statusBar ifNil: [ statusBar := GTK.GtkStatusbar new ] > - ] > - > - statusBar: aGtkStatusBar [ > - <category: 'accessing'> > - > - statusBar := aGtkStatusBar > - ] > - > - title [ > - <category: 'accessing'> > - > - ^ window title > - ] > - > - title: aString [ > - <category: 'accessing'> > - > - window setTitle: aString > - ] > - > - toolBar [ > - <category: 'accessing'> > - > - ^ toolBar ifNil: [ toolBar := GTK.GtkToolbar new ] > - ] > - > - toolBar: aGtkToolBar [ > - <category: 'accessing'> > - > - toolBar := aGtkToolBar > - ] > - > - aboutGst [ > - <category: 'events'> > - > - (GTK.GtkAboutDialog new) > - setProgramName: 'GNU Smalltalk'; > - setVersion: (Smalltalk version =~ 'version (.*)' at: 1); > - setLicense: 'GNU Smalltalk is free software; you can redistribute it and/or modify it > -under the terms of the GNU General Public License as published by the Free > -Software Foundation; either version 2, or (at your option) any later version. > - > -GNU Smalltalk is distributed in the hope that it will be useful, but WITHOUT > -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS > -FOR A PARTICULAR PURPOSE. See the GNU General Public License for more > -details. > - > -You should have received a copy of the GNU General Public License along with > -GNU Smalltalk; see the file COPYING. If not, write to the Free Software > -Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. > - > -Please consult the GNU Smalltalk source code for additional permissions > -that are specific to this version of GNU Smalltalk.'; > - setWebsite: 'http://smalltalk.gnu.org/'; > - showModalDestroy > - ] > - > - close [ > - <category: 'events'> > - > - window hideAll > - ] > - > - initialize [ > - <category: 'intialization'> > - > - window := GTK.GtkWindow new: GTK.Gtk gtkWindowToplevel. > - window addAccelGroup: self accelGroup. > - self > - title: self windowTitle; > - createMenus; > - createToolbar; > - createStatusBar; > - centralWidget: self buildCentralWidget. > - ] > - > - buildCentralWidget [ > - <category: 'initialization'> > - ^nil > - ] > - > - createStatusBar [ > - <category: 'user interface'> > - > - self statusMessage: self windowTitle > - ] > - > - windowTitle [ > - <category: 'initialization'> > - ^self class name > - ] > - > - createToolbar [ > - <category: 'initialization'> > - ] > - > - createMenus [ > - <category: 'initialization'> > - ] > - > - postInitialize [ > - <category: 'initialization'> > - > - window > - connectSignal: 'delete-event' to: self selector: #'onDelete:event:' > - ] > - > - onDelete: aGtkWidget event: aGdkEvent [ > - <category: 'events'> > - > - window hideAll. > - ^ true > - ] > - > - addMenuItem: aString [ > - <category: 'menubar'> > - > - self menuBar append: (GTK.GtkMenuItem newWithLabel: aString) > - ] > - > - addMenuItem: aString withSubmenu: aGtkMenuItemArray [ > - <category: 'menubar'> > - > - self menuBar append: > - ((GTK.GtkMenuItem newWithLabel: aString) > - setSubmenu: (self createNewMenuEntry: aGtkMenuItemArray)) > - ] > - > - createMainMenu: anArray [ > - <category: 'menubar'> > - > - anArray do: [ :each | > - self addMenuItem: each first withSubmenu: (self perform: each second) ] > - ] > - > - createNewMenuEntry: anArray [ > - <category: 'menubar'> > - > - | menu | > - menu := (GTK.GtkMenu new) > - setAccelGroup: self accelGroup; > - yourself. > - anArray do: [ :each | > - menu append: each ]. > - ^ menu > - ] > - > - statusMessage: aString [ > - <category: 'statusbar'> > - > - self statusBar > - push: 0 text: aString > - ] > - > - appendSeparator [ > - <category: 'toolbar'> > - > - self appendToolItem: GTK.GtkSeparatorToolItem new > - ] > - > - appendToolItem: aGtkToolItem [ > - <category: 'toolbar'> > - > - self toolBar insert: aGtkToolItem pos: -1 > - ] > - > - appendWidget: aGtkWidget [ > - <category: 'toolbar'> > - > - self appendToolItem: ((GTK.GtkToolItem new) add: aGtkWidget) > - ] > - > - resize: aPoint [ > - <category: 'user interface'> > - > - window resize: aPoint x height: aPoint y > - ] > - > - showAll [ > - {menuBar->false. toolBar->false. centralWidget->true. statusBar->false} do: [ :each | > - each key ifNotNil: [ self container > - packStart: each key expand: each value fill: true padding: 0 ] ]. > - > - window > - add: self container; > - showAll > - ] > - > - focusedWidget [ > - <category: 'focus'> > - > - self subclassResponsibility > - ] > - > - onFocusPerform: aSymbol [ > - <category: 'widget'> > - > - | widget | > - widget := self focusedWidget. > - widget isNil ifTrue: [ ^ self ]. > - ^ widget perform: aSymbol > - ] > - > - onFocusPerform: aSymbol with: anObject [ > - <category: 'widget'> > - > - | widget | > - widget := self focusedWidget. > - widget isNil ifTrue: [ ^ self ]. > - ^ widget perform: aSymbol with: anObject > - ] > -] > diff --git a/packages/visualgst/GtkNotebookWidget.st b/packages/visualgst/GtkNotebookWidget.st > index d1a42bb..4916c65 100644 > --- a/packages/visualgst/GtkNotebookWidget.st > +++ b/packages/visualgst/GtkNotebookWidget.st > @@ -1,4 +1,4 @@ > -GtkConcreteWidget subclass: GtkNotebookWidget [ > +GTKTools.GtkConcreteWidget subclass: GtkNotebookWidget [ > | currentWidget selectMessage notebook pages labels | > > initialize [ > diff --git a/packages/visualgst/GtkPackageBuilderWidget.st b/packages/visualgst/GtkPackageBuilderWidget.st > index 143c1f8..c06a308 100644 > --- a/packages/visualgst/GtkPackageBuilderWidget.st > +++ b/packages/visualgst/GtkPackageBuilderWidget.st > @@ -1,4 +1,4 @@ > -GtkConcreteWidget subclass: GtkPackageBuilderWidget [ > +GTKTools.GtkConcreteWidget subclass: GtkPackageBuilderWidget [ > > | classList ressourceList packName namespace provide provideList test classCategory prereq prereqList entries | > > diff --git a/packages/visualgst/GtkScrollTreeWidget.st b/packages/visualgst/GtkScrollTreeWidget.st > index 6099a9c..5adb618 100644 > --- a/packages/visualgst/GtkScrollTreeWidget.st > +++ b/packages/visualgst/GtkScrollTreeWidget.st > @@ -1,4 +1,4 @@ > -GtkConcreteWidget subclass: GtkScrollTreeWidget [ > +GTKTools.GtkConcreteWidget subclass: GtkScrollTreeWidget [ > > GtkScrollTreeWidget class >> createListWithModel: anObject [ > <category: 'instance creation'> > diff --git a/packages/visualgst/GtkSidebarWidget.st b/packages/visualgst/GtkSidebarWidget.st > index c5f1eb7..3667e86 100644 > --- a/packages/visualgst/GtkSidebarWidget.st > +++ b/packages/visualgst/GtkSidebarWidget.st > @@ -1,4 +1,4 @@ > -GtkConcreteWidget subclass: GtkSidebarWidget [ > +GTKTools.GtkConcreteWidget subclass: GtkSidebarWidget [ > | activeWidget widgets widgetEvents paned | > > initialize [ > @@ -10,7 +10,7 @@ GtkConcreteWidget subclass: GtkSidebarWidget [ > yourself. > self mainWidget: paned. > widgetEvents := Dictionary new. > - activeWidget := GtkAbstractConcreteWidget new. > + activeWidget := GTKTools.GtkAbstractConcreteWidget new. > widgets := OrderedCollection new > ] > > diff --git a/packages/visualgst/GtkVariableTrackerWidget.st b/packages/visualgst/GtkVariableTrackerWidget.st > index ff5b6b2..041162a 100644 > --- a/packages/visualgst/GtkVariableTrackerWidget.st > +++ b/packages/visualgst/GtkVariableTrackerWidget.st > @@ -1,4 +1,4 @@ > -GtkConcreteWidget subclass: GtkVariableTrackerWidget [ > +GTKTools.GtkConcreteWidget subclass: GtkVariableTrackerWidget [ > | model object widget | > > GtkVariableTrackerWidget class >> on: anObject [ > diff --git a/packages/visualgst/GtkVisualGSTTool.st b/packages/visualgst/GtkVisualGSTTool.st > index 3859b39..a08f9a5 100644 > --- a/packages/visualgst/GtkVisualGSTTool.st > +++ b/packages/visualgst/GtkVisualGSTTool.st > @@ -1,4 +1,4 @@ > -GtkMainWindow subclass: GtkVisualGSTTool [ > +GTKTools.GtkMainWindow subclass: GtkVisualGSTTool [ > <comment: 'I am the base for various tools of VisualGST.'> > > GtkVisualGSTTool class >> version [ > diff --git a/packages/visualgst/Image/GtkImageWidget.st b/packages/visualgst/Image/GtkImageWidget.st > index e1e7865..6b5dc78 100644 > --- a/packages/visualgst/Image/GtkImageWidget.st > +++ b/packages/visualgst/Image/GtkImageWidget.st > @@ -1,4 +1,4 @@ > -GtkConcreteWidget subclass: GtkImageWidget [ > +GTKTools.GtkConcreteWidget subclass: GtkImageWidget [ > > | imageTree image model searchEntry | > > diff --git a/packages/visualgst/Implementors/GtkImageResultsWidget.st b/packages/visualgst/Implementors/GtkImageResultsWidget.st > index 9a7efbb..0901c53 100644 > --- a/packages/visualgst/Implementors/GtkImageResultsWidget.st > +++ b/packages/visualgst/Implementors/GtkImageResultsWidget.st > @@ -1,4 +1,4 @@ > -GtkConcreteWidget subclass: GtkImageResultsWidget [ > +GTKTools.GtkConcreteWidget subclass: GtkImageResultsWidget [ > | result resultTree model | > > initialize [ > diff --git a/packages/visualgst/Inspector/GtkInspectorBrowserWidget.st b/packages/visualgst/Inspector/GtkInspectorBrowserWidget.st > index e4e3f3e..04a72ab 100644 > --- a/packages/visualgst/Inspector/GtkInspectorBrowserWidget.st > +++ b/packages/visualgst/Inspector/GtkInspectorBrowserWidget.st > @@ -1,4 +1,4 @@ > -GtkConcreteWidget subclass: GtkInspectorBrowserWidget [ > +GTKTools.GtkConcreteWidget subclass: GtkInspectorBrowserWidget [ > | checkCode namespaceWidget classHierarchyWidget classHierarchyUpdate iCategoryWidget iMethodWidget cCategoryWidget cMethodWidget codeWidget state | > > GtkInspectorBrowserWidget class >> title [ > diff --git a/packages/visualgst/Inspector/GtkInspectorWidget.st b/packages/visualgst/Inspector/GtkInspectorWidget.st > index 99b6412..83a2364 100644 > --- a/packages/visualgst/Inspector/GtkInspectorWidget.st > +++ b/packages/visualgst/Inspector/GtkInspectorWidget.st > @@ -1,4 +1,4 @@ > -GtkConcreteWidget subclass: GtkInspectorWidget [ > +GTKTools.GtkConcreteWidget subclass: GtkInspectorWidget [ > | inspector model object inspectorTree workspaceWidget objectView stack | > > GtkInspectorWidget >> openOn: anObject [ > diff --git a/packages/visualgst/Makefile.frag b/packages/visualgst/Makefile.frag > index a6686a4..a6487e6 100644 > --- a/packages/visualgst/Makefile.frag > +++ b/packages/visualgst/Makefile.frag > @@ -1,5 +1,5 @@ > VisualGST_FILES = \ > -packages/visualgst/Notification/AbstractEvent.st packages/visualgst/Notification/AddedEvent.st packages/visualgst/Notification/CommentedEvent.st packages/visualgst/Notification/DoItEvent.st packages/visualgst/Notification/SystemEventManager.st packages/visualgst/Notification/EventMultiplexer.st packages/visualgst/Notification/EventDispatcher.st packages/visualgst/Notification/ModifiedEvent.st packages/visualgst/Notification/ModifiedClassDefinitionEvent.st packages/visualgst/Notification/RecategorizedEvent.st packages/visualgst/Notification/RemovedEvent.st packages/visualgst/Notification/RenamedEvent.st packages/visualgst/Notification/ReorganizedEvent.st packages/visualgst/Notification/SystemChangeNotifier.st packages/visualgst/GtkAnnouncer.st packages/visualgst/GtkNamespaceSelectionChange > d.st packages/visualgst/GtkClassSelectionChanged.st packages/visualgst/Commands/Command.st packages/visualgst/Commands/SmalltalkMenus/DoItCommand.st packages/visualgst/Commands/SmalltalkMenus/DebugI > tCommand.st packages/visualgst/Commands/SmalltalkMenus/PrintItCommand.st packages/visualgst/Commands/SmalltalkMenus/InspectItCommand.st packages/visualgst/Commands/SmalltalkMenus/AcceptItCommand.st packages/visualgst/Commands/SmalltalkMenus/CancelCommand.st packages/visualgst/Commands/HistoryCommands/HistoryBackCommand.st packages/visualgst/Commands/HistoryCommands/HistoryDisplayCommand.st packages/visualgst/Commands/HistoryCommands/HistoryForwardCommand.st packages/visualgst/Commands/TabsMenus/CloseTabCommand.st packages/visualgst/Commands/TabsMenus/NextTabCommand.st packages/visualgst/Commands/TabsMenus/PreviousTabCommand.st packages/visualgst/Commands/NamespaceMenus/NamespaceCommand.st packages/visualgst/Commands/NamespaceMenus/InspectNamespaceCommand.st packages/visualgst/Commands/Nam > espaceMenus/FileoutNamespaceCommand.st packages/visualgst/Commands/NamespaceMenus/AddNamespaceCommand.st packages/visualgst/Commands/NamespaceMenus/DeleteNamespaceCommand.st packages/visualgst/Comma > nds/NamespaceMenus/RenameNamespaceCommand.st packages/visualgst/Commands/ClassMenus/ClassCommand.st packages/visualgst/Commands/ClassMenus/InspectClassCommand.st packages/visualgst/Commands/ClassMenus/FileoutClassCommand.st packages/visualgst/Commands/ClassMenus/AddClassCommand.st packages/visualgst/Commands/ClassMenus/DeleteClassCommand.st packages/visualgst/Commands/ClassMenus/RenameClassCommand.st packages/visualgst/Commands/CategoryMenus/CategoryCommand.st packages/visualgst/Commands/CategoryMenus/FileoutCategoryCommand.st packages/visualgst/Commands/CategoryMenus/AddCategoryCommand.st packages/visualgst/Commands/CategoryMenus/RenameCategoryCommand.st packages/visualgst/Commands/MethodMenus/MethodCommand.st packages/visualgst/Commands/MethodMenus/FileoutMethodCommand.st packages/visua > lgst/Commands/MethodMenus/InspectMethodCommand.st packages/visualgst/Commands/MethodMenus/DeleteMethodCommand.st packages/visualgst/Commands/MethodMenus/DebugTestCommand.st packages/visualgst/Comman > ds/ToolsMenus/OpenAssistantCommand.st packages/visualgst/Commands/ToolsMenus/OpenWebBrowserCommand.st packages/visualgst/Commands/EditMenus/CancelEditCommand.st packages/visualgst/Commands/EditMenus/UndoEditCommand.st packages/visualgst/Commands/EditMenus/RedoEditCommand.st packages/visualgst/Commands/EditMenus/CutEditCommand.st packages/visualgst/Commands/EditMenus/CopyEditCommand.st packages/visualgst/Commands/EditMenus/PasteEditCommand.st packages/visualgst/Commands/EditMenus/SelectAllEditCommand.st packages/visualgst/Commands/EditMenus/FindEditCommand.st packages/visualgst/Commands/EditMenus/ReplaceEditCommand.st packages/visualgst/Commands/DebugMenus/DebugCommand.st packages/visualgst/Commands/DebugMenus/ContinueDebugCommand.st packages/visualgst/Commands/DebugMenus/StepIntoDebugComm > and.st packages/visualgst/Commands/DebugMenus/StepToDebugCommand.st packages/visualgst/Menus/MenuBuilder.st packages/visualgst/Menus/MenuSeparator.st packages/visualgst/Menus/ToolbarSeparator.st pac > kages/visualgst/Menus/LauncherToolbar.st packages/visualgst/Menus/DebuggerToolbar.st packages/visualgst/Menus/NamespaceMenus.st packages/visualgst/Menus/ClassMenus.st packages/visualgst/Menus/CategoryMenus.st packages/visualgst/Menus/ContextMenus.st packages/visualgst/Menus/MethodMenus.st packages/visualgst/Menus/EditMenus.st packages/visualgst/Menus/SmalltalkMenus.st packages/visualgst/Menus/ToolsMenus.st packages/visualgst/Menus/HistoryMenus.st packages/visualgst/Menus/TabsMenus.st packages/visualgst/Menus/InspectorMenus.st packages/visualgst/Menus/TextMenus.st packages/visualgst/Menus/WorkspaceVariableMenus.st packages/visualgst/Menus/SimpleWorkspaceMenus.st packages/visualgst/Menus/WorkspaceMenus.st packages/visualgst/FakeNamespace.st packages/visualgst/Category/ClassCategory.st packa > ges/visualgst/Category/AbstractNamespace.st packages/visualgst/Category/Class.st packages/visualgst/GtkAbstractConcreteWidget.st packages/visualgst/GtkConcreteWidget.st packages/visualgst/GtkScrollT > reeWidget.st packages/visualgst/GtkSimpleListWidget.st packages/visualgst/GtkEntryWidget.st packages/visualgst/GtkSidebarWidget.st packages/visualgst/GtkHSidebarWidget.st packages/visualgst/GtkVSidebarWidget.st packages/visualgst/Model/GtkColumnType.st packages/visualgst/Model/GtkColumnTextType.st packages/visualgst/Model/GtkColumnPixbufType.st packages/visualgst/Model/GtkColumnOOPType.st packages/visualgst/GtkListModel.st packages/visualgst/GtkTreeModel.st packages/visualgst/Text/GtkTextWidget.st packages/visualgst/GtkPackageBuilderWidget.st packages/visualgst/GtkMainWindow.st packages/visualgst/GtkVisualGSTTool.st packages/visualgst/GtkBrowsingTool.st packages/visualgst/GtkLauncher.st packages/visualgst/Text/GtkTextPluginWidget.st packages/visualgst/Text/GtkFindWidget.st packages/visual > gst/Text/GtkReplaceWidget.st packages/visualgst/Text/GtkSaveTextWidget.st packages/visualgst/GtkNotebookWidget.st packages/visualgst/Image/GtkImageModel.st packages/visualgst/Image/GtkImageWidget.st > packages/visualgst/Debugger/GtkContextWidget.st packages/visualgst/Debugger/GtkDebugger.st packages/visualgst/State/BrowserState.st packages/visualgst/State/NamespaceState.st packages/visualgst/State/ClassState.st packages/visualgst/State/CategoryState.st packages/visualgst/State/MethodState.st packages/visualgst/GtkWorkspaceWidget.st packages/visualgst/GtkTranscriptWidget.st packages/visualgst/StBrowser/GtkCategorizedNamespaceWidget.st packages/visualgst/StBrowser/GtkCategorizedClassWidget.st packages/visualgst/StBrowser/GtkCategoryWidget.st packages/visualgst/StBrowser/GtkMethodWidget.st packages/visualgst/Text/GtkSourceCodeWidget.st packages/visualgst/StBrowser/GtkClassHierarchyWidget.st packages/visualgst/GtkHistoryWidget.st packages/visualgst/Inspector/GtkInspector.st packages/visua > lgst/StBrowser/GtkClassBrowserWidget.st packages/visualgst/GtkEntryDialog.st packages/visualgst/HistoryStack.st packages/visualgst/Undo/UndoStack.st packages/visualgst/Undo/UndoCommand.st packages/v > isualgst/Undo/AddNamespaceUndoCommand.st packages/visualgst/Undo/RenameNamespaceUndoCommand.st packages/visualgst/Undo/DeleteNamespaceUndoCommand.st packages/visualgst/Source/SourceFormatter.st packages/visualgst/Source/NamespaceHeaderSource.st packages/visualgst/Source/NamespaceSource.st packages/visualgst/Source/ClassHeaderSource.st packages/visualgst/Source/ClassSource.st packages/visualgst/Source/CategorySource.st packages/visualgst/Source/MethodSource.st packages/visualgst/Source/PackageSource.st packages/visualgst/Source/BrowserMethodSource.st packages/visualgst/Undo/AddClassUndoCommand.st packages/visualgst/Undo/RenameClassUndoCommand.st packages/visualgst/Undo/DeleteClassUndoCommand.st packages/visualgst/AbstractFinder.st packages/visualgst/NamespaceFinder.st packages/visualgst/Cl > assFinder.st packages/visualgst/MethodFinder.st packages/visualgst/GtkWebBrowser.st packages/visualgst/GtkWebView.st packages/visualgst/Extensions.st packages/visualgst/GtkAssistant.st packages/visu > algst/Undo/RenameCategoryUndoCommand.st packages/visualgst/Undo/AddMethodUndoCommand.st packages/visualgst/Undo/DeleteMethodUndoCommand.st packages/visualgst/WorkspaceVariableTracker.st packages/visualgst/GtkVariableTrackerWidget.st packages/visualgst/SyntaxHighlighter.st packages/visualgst/Undo/Text/InsertTextCommand.st packages/visualgst/Undo/Text/DeleteTextCommand.st packages/visualgst/Undo/Text/ReplaceTextCommand.st packages/visualgst/Clock/GtkClock.st packages/visualgst/Inspector/GtkInspectorSourceWidget.st packages/visualgst/Inspector/GtkInspectorBrowserWidget.st packages/visualgst/Inspector/GtkInspectorWidget.st packages/visualgst/Inspector/GtkObjectInspectorView.st packages/visualgst/Inspector/GtkCompiledMethodInspectorView.st packages/visualgst/Inspector/GtkCompiledBlockInspector > View.st packages/visualgst/Inspector/GtkSequenceableCollectionInspectorView.st packages/visualgst/Inspector/GtkSetInspectorView.st packages/visualgst/Inspector/GtkDictionaryInspectorView.st packages > /visualgst/Inspector/GtkCharacterInspectorView.st packages/visualgst/Inspector/GtkIntegerInspectorView.st packages/visualgst/Inspector/GtkFloatInspectorView.st packages/visualgst/Implementors/GtkImageResultsWidget.st packages/visualgst/Implementors/GtkImplementorResultsWidget.st packages/visualgst/Implementors/GtkSenderResultsWidget.st packages/visualgst/Notification/Kernel/AbstractNamespace.st packages/visualgst/Notification/Kernel/Metaclass.st packages/visualgst/Notification/Kernel/Class.st packages/visualgst/Notification/Kernel/MethodDictionary.st packages/visualgst/Debugger/GtkStackInspectorView.st packages/visualgst/Debugger/GtkStackInspector.st packages/visualgst/Tetris/HighScores.st packages/visualgst/Tetris/Score.st packages/visualgst/Tetris/TetrisPieceWidget.st packages/visualgst > /Tetris/BlockWidget.st packages/visualgst/Tetris/TetrisField.st packages/visualgst/Tetris/TetrisPiece.st packages/visualgst/Tetris/TetrisPieceI.st packages/visualgst/Tetris/TetrisPieceJ.st packages/ > visualgst/Tetris/TetrisPieceL.st packages/visualgst/Tetris/TetrisPieceO.st packages/visualgst/Tetris/TetrisPieceS.st packages/visualgst/Tetris/TetrisPieceT.st packages/visualgst/Tetris/TetrisPieceZ.st packages/visualgst/Tetris/Tetris.st packages/visualgst/SUnit/TestBacktraceLog.st packages/visualgst/SUnit/GtkSUnitResultWidget.st packages/visualgst/GtkClassSUnitWidget.st packages/visualgst/GtkMethodSUnitWidget.st packages/visualgst/SUnit/GtkSUnit.st packages/visualgst/Commands/OpenBrowserCommand.st packages/visualgst/Commands/OpenTabbedBrowserCommand.st packages/visualgst/Commands/ToolsMenus/OpenSUnitCommand.st packages/visualgst/Commands/ToolsMenus/OpenBottomPaneCommand.st packages/visualgst/Commands/OpenWorkspaceCommand.st packages/visualgst/Commands/ToolsMenus/OpenImplementorCommand.st > packages/visualgst/Commands/ToolsMenus/OpenSenderCommand.st packages/visualgst/Commands/ToolsMenus/OpenPackageBuilderCommand.st packages/visualgst/Commands/SaveImageCommand.st packages/visualgst/Com > mands/SaveImageAsCommand.st packages/visualgst/Commands/InspectorMenus/InspectorBackCommand.st packages/visualgst/Commands/InspectorMenus/InspectorDiveCommand.st packages/visualgst/Commands/WorkspaceMenus/DeleteItemCommand.st packages/visualgst/Commands/WorkspaceMenus/InspectItemCommand.st packages/visualgst/Commands/WorkspaceMenus/WorkspaceVariableCommand.st packages/visualgst/Icons/category.gif packages/visualgst/Icons/namespace.gif packages/visualgst/Icons/go-bottom.png packages/visualgst/Icons/go-down.png packages/visualgst/Icons/go-first.png packages/visualgst/Icons/go-home.png packages/visualgst/Icons/go-jump.png packages/visualgst/Icons/go-last.png packages/visualgst/Icons/go-next.png packages/visualgst/Icons/go-previous.png packages/visualgst/Icons/go-run.png packages/visualgst/Ic > ons/go-top.png packages/visualgst/Icons/go-up.png packages/visualgst/Icons/NUnit.Failed.png packages/visualgst/Icons/NUnit.Loading.png packages/visualgst/Icons/NUnit.None.png packages/visualgst/Icon > s/NUnit.NotRun.png packages/visualgst/Icons/NUnit.Running.png packages/visualgst/Icons/NUnit.SuccessAndFailed.png packages/visualgst/Icons/NUnit.Success.png packages/visualgst/Icons/extension.png packages/visualgst/Icons/overridden.png packages/visualgst/Icons/override.png packages/visualgst/Icons/visualgst.png packages/visualgst/Tests/AddNamespaceUndoCommandTest.st packages/visualgst/Tests/GtkMethodWidgetTest.st packages/visualgst/Tests/CompiledMethodTest.st packages/visualgst/Tests/ExtractLiteralsTest.st packages/visualgst/Tests/CategoryTest.st packages/visualgst/Tests/GtkScrollTreeWidgetTest.st packages/visualgst/Tests/MenuBuilderTest.st packages/visualgst/Tests/GtkAssistantTest.st packages/visualgst/Tests/GtkSimpleListWidgetTest.st packages/visualgst/Tests/EmptyTest.st packages/visual > gst/Tests/AddClassUndoCommandTest.st packages/visualgst/Tests/GtkCategoryWidgetTest.st packages/visualgst/Tests/StateTest.st packages/visualgst/Tests/FinderTest.st packages/visualgst/Tests/PragmaTes > t.st packages/visualgst/Tests/GtkCategorizedNamespaceWidgetTest.st packages/visualgst/Tests/GtkCategorizedClassWidgetTest.st packages/visualgst/Tests/GtkConcreteWidgetTest.st > +packages/visualgst/Notification/AbstractEvent.st packages/visualgst/Notification/AddedEvent.st packages/visualgst/Notification/CommentedEvent.st packages/visualgst/Notification/DoItEvent.st packages/visualgst/Notification/SystemEventManager.st packages/visualgst/Notification/EventMultiplexer.st packages/visualgst/Notification/EventDispatcher.st packages/visualgst/Notification/ModifiedEvent.st packages/visualgst/Notification/ModifiedClassDefinitionEvent.st packages/visualgst/Notification/RecategorizedEvent.st packages/visualgst/Notification/RemovedEvent.st packages/visualgst/Notification/RenamedEvent.st packages/visualgst/Notification/ReorganizedEvent.st packages/visualgst/Notification/SystemChangeNotifier.st packages/visualgst/GtkAnnouncer.st packages/visualgst/GtkNamespaceSelectionChange > d.st packages/visualgst/GtkClassSelectionChanged.st packages/visualgst/Commands/Command.st packages/visualgst/Commands/SmalltalkMenus/DoItCommand.st packages/visualgst/Commands/SmalltalkMenus/DebugI > tCommand.st packages/visualgst/Commands/SmalltalkMenus/PrintItCommand.st packages/visualgst/Commands/SmalltalkMenus/InspectItCommand.st packages/visualgst/Commands/SmalltalkMenus/AcceptItCommand.st packages/visualgst/Commands/SmalltalkMenus/CancelCommand.st packages/visualgst/Commands/HistoryCommands/HistoryBackCommand.st packages/visualgst/Commands/HistoryCommands/HistoryDisplayCommand.st packages/visualgst/Commands/HistoryCommands/HistoryForwardCommand.st packages/visualgst/Commands/TabsMenus/CloseTabCommand.st packages/visualgst/Commands/TabsMenus/NextTabCommand.st packages/visualgst/Commands/TabsMenus/PreviousTabCommand.st packages/visualgst/Commands/NamespaceMenus/NamespaceCommand.st packages/visualgst/Commands/NamespaceMenus/InspectNamespaceCommand.st packages/visualgst/Commands/Nam > espaceMenus/FileoutNamespaceCommand.st packages/visualgst/Commands/NamespaceMenus/AddNamespaceCommand.st packages/visualgst/Commands/NamespaceMenus/DeleteNamespaceCommand.st packages/visualgst/Comma > nds/NamespaceMenus/RenameNamespaceCommand.st packages/visualgst/Commands/ClassMenus/ClassCommand.st packages/visualgst/Commands/ClassMenus/InspectClassCommand.st packages/visualgst/Commands/ClassMenus/FileoutClassCommand.st packages/visualgst/Commands/ClassMenus/AddClassCommand.st packages/visualgst/Commands/ClassMenus/DeleteClassCommand.st packages/visualgst/Commands/ClassMenus/RenameClassCommand.st packages/visualgst/Commands/CategoryMenus/CategoryCommand.st packages/visualgst/Commands/CategoryMenus/FileoutCategoryCommand.st packages/visualgst/Commands/CategoryMenus/AddCategoryCommand.st packages/visualgst/Commands/CategoryMenus/RenameCategoryCommand.st packages/visualgst/Commands/MethodMenus/MethodCommand.st packages/visualgst/Commands/MethodMenus/FileoutMethodCommand.st packages/visua > lgst/Commands/MethodMenus/InspectMethodCommand.st packages/visualgst/Commands/MethodMenus/DeleteMethodCommand.st packages/visualgst/Commands/MethodMenus/DebugTestCommand.st packages/visualgst/Comman > ds/ToolsMenus/OpenAssistantCommand.st packages/visualgst/Commands/ToolsMenus/OpenWebBrowserCommand.st packages/visualgst/Commands/EditMenus/CancelEditCommand.st packages/visualgst/Commands/EditMenus/UndoEditCommand.st packages/visualgst/Commands/EditMenus/RedoEditCommand.st packages/visualgst/Commands/EditMenus/CutEditCommand.st packages/visualgst/Commands/EditMenus/CopyEditCommand.st packages/visualgst/Commands/EditMenus/PasteEditCommand.st packages/visualgst/Commands/EditMenus/SelectAllEditCommand.st packages/visualgst/Commands/EditMenus/FindEditCommand.st packages/visualgst/Commands/EditMenus/ReplaceEditCommand.st packages/visualgst/Commands/DebugMenus/DebugCommand.st packages/visualgst/Commands/DebugMenus/ContinueDebugCommand.st packages/visualgst/Commands/DebugMenus/StepIntoDebugComm > and.st packages/visualgst/Commands/DebugMenus/StepToDebugCommand.st packages/visualgst/Menus/MenuBuilder.st packages/visualgst/Menus/MenuSeparator.st packages/visualgst/Menus/ToolbarSeparator.st pac > kages/visualgst/Menus/LauncherToolbar.st packages/visualgst/Menus/DebuggerToolbar.st packages/visualgst/Menus/NamespaceMenus.st packages/visualgst/Menus/ClassMenus.st packages/visualgst/Menus/CategoryMenus.st packages/visualgst/Menus/ContextMenus.st packages/visualgst/Menus/MethodMenus.st packages/visualgst/Menus/EditMenus.st packages/visualgst/Menus/SmalltalkMenus.st packages/visualgst/Menus/ToolsMenus.st packages/visualgst/Menus/HistoryMenus.st packages/visualgst/Menus/TabsMenus.st packages/visualgst/Menus/InspectorMenus.st packages/visualgst/Menus/TextMenus.st packages/visualgst/Menus/WorkspaceVariableMenus.st packages/visualgst/Menus/SimpleWorkspaceMenus.st packages/visualgst/Menus/WorkspaceMenus.st packages/visualgst/FakeNamespace.st packages/visualgst/Category/ClassCategory.st packa > ges/visualgst/Category/AbstractNamespace.st packages/visualgst/Category/Class.st packages/visualgst/GtkScrollTreeWidget.st packages/visualgst/GtkSimpleListWidget.st packages/visualgst/GtkEntryWidget > .st packages/visualgst/GtkSidebarWidget.st packages/visualgst/GtkHSidebarWidget.st packages/visualgst/GtkVSidebarWidget.st packages/visualgst/Model/GtkColumnType.st packages/visualgst/Model/GtkColumnTextType.st packages/visualgst/Model/GtkColumnPixbufType.st packages/visualgst/Model/GtkColumnOOPType.st packages/visualgst/GtkListModel.st packages/visualgst/GtkTreeModel.st packages/visualgst/Text/GtkTextWidget.st packages/visualgst/GtkPackageBuilderWidget.st packages/visualgst/GtkVisualGSTTool.st packages/visualgst/GtkBrowsingTool.st packages/visualgst/GtkLauncher.st packages/visualgst/Text/GtkTextPluginWidget.st packages/visualgst/Text/GtkFindWidget.st packages/visualgst/Text/GtkReplaceWidget.st packages/visualgst/Text/GtkSaveTextWidget.st packages/visualgst/GtkNotebookWidget.st packages/v > isualgst/Image/GtkImageModel.st packages/visualgst/Image/GtkImageWidget.st packages/visualgst/Debugger/GtkContextWidget.st packages/visualgst/Debugger/GtkDebugger.st packages/visualgst/State/Browser > State.st packages/visualgst/State/NamespaceState.st packages/visualgst/State/ClassState.st packages/visualgst/State/CategoryState.st packages/visualgst/State/MethodState.st packages/visualgst/GtkWorkspaceWidget.st packages/visualgst/GtkTranscriptWidget.st packages/visualgst/StBrowser/GtkCategorizedNamespaceWidget.st packages/visualgst/StBrowser/GtkCategorizedClassWidget.st packages/visualgst/StBrowser/GtkCategoryWidget.st packages/visualgst/StBrowser/GtkMethodWidget.st packages/visualgst/Text/GtkSourceCodeWidget.st packages/visualgst/StBrowser/GtkClassHierarchyWidget.st packages/visualgst/GtkHistoryWidget.st packages/visualgst/Inspector/GtkInspector.st packages/visualgst/StBrowser/GtkClassBrowserWidget.st packages/visualgst/HistoryStack.st packages/visualgst/Undo/UndoStack.st packages/vis > ualgst/Undo/UndoCommand.st packages/visualgst/Undo/AddNamespaceUndoCommand.st packages/visualgst/Undo/RenameNamespaceUndoCommand.st packages/visualgst/Undo/DeleteNamespaceUndoCommand.st packages/vis > ualgst/Source/SourceFormatter.st packages/visualgst/Source/NamespaceHeaderSource.st packages/visualgst/Source/NamespaceSource.st packages/visualgst/Source/ClassHeaderSource.st packages/visualgst/Source/ClassSource.st packages/visualgst/Source/CategorySource.st packages/visualgst/Source/MethodSource.st packages/visualgst/Source/PackageSource.st packages/visualgst/Source/BrowserMethodSource.st packages/visualgst/Undo/AddClassUndoCommand.st packages/visualgst/Undo/RenameClassUndoCommand.st packages/visualgst/Undo/DeleteClassUndoCommand.st packages/visualgst/AbstractFinder.st packages/visualgst/NamespaceFinder.st packages/visualgst/ClassFinder.st packages/visualgst/MethodFinder.st packages/visualgst/GtkWebBrowser.st packages/visualgst/GtkWebView.st packages/visualgst/Extensions.st packages/vi > sualgst/GtkAssistant.st packages/visualgst/Undo/RenameCategoryUndoCommand.st packages/visualgst/Undo/AddMethodUndoCommand.st packages/visualgst/Undo/DeleteMethodUndoCommand.st packages/visualgst/Wor > kspaceVariableTracker.st packages/visualgst/GtkVariableTrackerWidget.st packages/visualgst/SyntaxHighlighter.st packages/visualgst/Undo/Text/InsertTextCommand.st packages/visualgst/Undo/Text/DeleteTextCommand.st packages/visualgst/Undo/Text/ReplaceTextCommand.st packages/visualgst/Clock/GtkClock.st packages/visualgst/Inspector/GtkInspectorSourceWidget.st packages/visualgst/Inspector/GtkInspectorBrowserWidget.st packages/visualgst/Inspector/GtkInspectorWidget.st packages/visualgst/Inspector/GtkObjectInspectorView.st packages/visualgst/Inspector/GtkCompiledMethodInspectorView.st packages/visualgst/Inspector/GtkCompiledBlockInspectorView.st packages/visualgst/Inspector/GtkSequenceableCollectionInspectorView.st packages/visualgst/Inspector/GtkSetInspectorView.st packages/visualgst/Inspector/G > tkDictionaryInspectorView.st packages/visualgst/Inspector/GtkCharacterInspectorView.st packages/visualgst/Inspector/GtkIntegerInspectorView.st packages/visualgst/Inspector/GtkFloatInspectorView.st p > ackages/visualgst/Implementors/GtkImageResultsWidget.st packages/visualgst/Implementors/GtkImplementorResultsWidget.st packages/visualgst/Implementors/GtkSenderResultsWidget.st packages/visualgst/Notification/Kernel/AbstractNamespace.st packages/visualgst/Notification/Kernel/Metaclass.st packages/visualgst/Notification/Kernel/Class.st packages/visualgst/Notification/Kernel/MethodDictionary.st packages/visualgst/Debugger/GtkStackInspectorView.st packages/visualgst/Debugger/GtkStackInspector.st packages/visualgst/Tetris/HighScores.st packages/visualgst/Tetris/Score.st packages/visualgst/Tetris/TetrisPieceWidget.st packages/visualgst/Tetris/BlockWidget.st packages/visualgst/Tetris/TetrisField.st packages/visualgst/Tetris/TetrisPiece.st packages/visualgst/Tetris/TetrisPieceI.st packages/visua > lgst/Tetris/TetrisPieceJ.st packages/visualgst/Tetris/TetrisPieceL.st packages/visualgst/Tetris/TetrisPieceO.st packages/visualgst/Tetris/TetrisPieceS.st packages/visualgst/Tetris/TetrisPieceT.st pa > ckages/visualgst/Tetris/TetrisPieceZ.st packages/visualgst/Tetris/Tetris.st packages/visualgst/SUnit/TestBacktraceLog.st packages/visualgst/SUnit/GtkSUnitResultWidget.st packages/visualgst/GtkClassSUnitWidget.st packages/visualgst/GtkMethodSUnitWidget.st packages/visualgst/SUnit/GtkSUnit.st packages/visualgst/Commands/OpenBrowserCommand.st packages/visualgst/Commands/OpenTabbedBrowserCommand.st packages/visualgst/Commands/ToolsMenus/OpenSUnitCommand.st packages/visualgst/Commands/ToolsMenus/OpenBottomPaneCommand.st packages/visualgst/Commands/OpenWorkspaceCommand.st packages/visualgst/Commands/ToolsMenus/OpenImplementorCommand.st packages/visualgst/Commands/ToolsMenus/OpenSenderCommand.st packages/visualgst/Commands/ToolsMenus/OpenPackageBuilderCommand.st packages/visualgst/Commands/SaveI > mageCommand.st packages/visualgst/Commands/SaveImageAsCommand.st packages/visualgst/Commands/InspectorMenus/InspectorBackCommand.st packages/visualgst/Commands/InspectorMenus/InspectorDiveCommand.st > packages/visualgst/Commands/WorkspaceMenus/DeleteItemCommand.st packages/visualgst/Commands/WorkspaceMenus/InspectItemCommand.st packages/visualgst/Commands/WorkspaceMenus/WorkspaceVariableCommand.st packages/visualgst/Icons/category.gif packages/visualgst/Icons/namespace.gif packages/visualgst/Icons/go-bottom.png packages/visualgst/Icons/go-down.png packages/visualgst/Icons/go-first.png packages/visualgst/Icons/go-home.png packages/visualgst/Icons/go-jump.png packages/visualgst/Icons/go-last.png packages/visualgst/Icons/go-next.png packages/visualgst/Icons/go-previous.png packages/visualgst/Icons/go-run.png packages/visualgst/Icons/go-top.png packages/visualgst/Icons/go-up.png packages/visualgst/Icons/NUnit.Failed.png packages/visualgst/Icons/NUnit.Loading.png packages/visualgst/Icons/N > Unit.None.png packages/visualgst/Icons/NUnit.NotRun.png packages/visualgst/Icons/NUnit.Running.png packages/visualgst/Icons/NUnit.SuccessAndFailed.png packages/visualgst/Icons/NUnit.Success.png pack > ages/visualgst/Icons/extension.png packages/visualgst/Icons/overridden.png packages/visualgst/Icons/override.png packages/visualgst/Icons/visualgst.png packages/visualgst/Tests/AddNamespaceUndoCommandTest.st packages/visualgst/Tests/GtkMethodWidgetTest.st packages/visualgst/Tests/CompiledMethodTest.st packages/visualgst/Tests/ExtractLiteralsTest.st packages/visualgst/Tests/CategoryTest.st packages/visualgst/Tests/GtkScrollTreeWidgetTest.st packages/visualgst/Tests/MenuBuilderTest.st packages/visualgst/Tests/GtkAssistantTest.st packages/visualgst/Tests/GtkSimpleListWidgetTest.st packages/visualgst/Tests/EmptyTest.st packages/visualgst/Tests/AddClassUndoCommandTest.st packages/visualgst/Tests/GtkCategoryWidgetTest.st packages/visualgst/Tests/StateTest.st packages/visualgst/Tests/FinderTest. > st packages/visualgst/Tests/PragmaTest.st packages/visualgst/Tests/GtkCategorizedNamespaceWidgetTest.st packages/visualgst/Tests/GtkCategorizedClassWidgetTest.st > $(VisualGST_FILES): > $(srcdir)/packages/visualgst/stamp-classes: $(VisualGST_FILES) > touch $(srcdir)/packages/visualgst/stamp-classes > diff --git a/packages/visualgst/SUnit/GtkSUnitResultWidget.st b/packages/visualgst/SUnit/GtkSUnitResultWidget.st > index 9a9122e..9357e49 100644 > --- a/packages/visualgst/SUnit/GtkSUnitResultWidget.st > +++ b/packages/visualgst/SUnit/GtkSUnitResultWidget.st > @@ -1,4 +1,4 @@ > -GtkConcreteWidget subclass: GtkSUnitResult [ > +GTKTools.GtkConcreteWidget subclass: GtkSUnitResult [ > | model resultTree results | > initialize [ > <category: 'initialization'> > diff --git a/packages/visualgst/StBrowser/GtkCategorizedClassWidget.st b/packages/visualgst/StBrowser/GtkCategorizedClassWidget.st > index 270db8c..351532e 100644 > --- a/packages/visualgst/StBrowser/GtkCategorizedClassWidget.st > +++ b/packages/visualgst/StBrowser/GtkCategorizedClassWidget.st > @@ -6,7 +6,7 @@ Smalltalk.String extend [ > ] > ] > > -GtkConcreteWidget subclass: GtkCategorizedClassWidget [ > +GTKTools.GtkConcreteWidget subclass: GtkCategorizedClassWidget [ > | classesTree column model namespace category | > > GtkCategorizedClassWidget >> on: aNamespace [ > diff --git a/packages/visualgst/StBrowser/GtkCategorizedNamespaceWidget.st b/packages/visualgst/StBrowser/GtkCategorizedNamespaceWidget.st > index 62f4ca0..5498756 100644 > --- a/packages/visualgst/StBrowser/GtkCategorizedNamespaceWidget.st > +++ b/packages/visualgst/StBrowser/GtkCategorizedNamespaceWidget.st > @@ -1,4 +1,4 @@ > -GtkConcreteWidget subclass: GtkCategorizedNamespaceWidget [ > +GTKTools.GtkConcreteWidget subclass: GtkCategorizedNamespaceWidget [ > | namespaceTree model | > > initialize [ > diff --git a/packages/visualgst/StBrowser/GtkCategoryWidget.st b/packages/visualgst/StBrowser/GtkCategoryWidget.st > index 4f1288b..8a0196c 100644 > --- a/packages/visualgst/StBrowser/GtkCategoryWidget.st > +++ b/packages/visualgst/StBrowser/GtkCategoryWidget.st > @@ -1,4 +1,4 @@ > -GtkConcreteWidget subclass: GtkCategoryWidget [ > +GTKTools.GtkConcreteWidget subclass: GtkCategoryWidget [ > | categoryTree categories model class | > > GtkCategoryWidget >> on: aClass [ > diff --git a/packages/visualgst/StBrowser/GtkClassBrowserWidget.st b/packages/visualgst/StBrowser/GtkClassBrowserWidget.st > index b491940..ba23e86 100644 > --- a/packages/visualgst/StBrowser/GtkClassBrowserWidget.st > +++ b/packages/visualgst/StBrowser/GtkClassBrowserWidget.st > @@ -1,4 +1,4 @@ > -GtkConcreteWidget subclass: GtkClassBrowserWidget [ > +GTKTools.GtkConcreteWidget subclass: GtkClassBrowserWidget [ > GtkClassBrowserWidget class [ | Undo | ] > > | launcher checkCode namespaceWidget classWidget classHierarchyWidget classHierarchyUpdate iCategoryWidget iMethodWidget cCategoryWidget cMethodWidget classAndInstanceSide codeWidget historyStack state | > diff --git a/packages/visualgst/StBrowser/GtkClassHierarchyWidget.st b/packages/visualgst/StBrowser/GtkClassHierarchyWidget.st > index 1b85188..0f947ef 100644 > --- a/packages/visualgst/StBrowser/GtkClassHierarchyWidget.st > +++ b/packages/visualgst/StBrowser/GtkClassHierarchyWidget.st > @@ -1,4 +1,4 @@ > -GtkConcreteWidget subclass: GtkClassHierarchyWidget [ > +GTKTools.GtkConcreteWidget subclass: GtkClassHierarchyWidget [ > | root dic classesTree model classOrMeta | > > GtkClassHierarchyWidget >> on: aClass [ > diff --git a/packages/visualgst/StBrowser/GtkMethodWidget.st b/packages/visualgst/StBrowser/GtkMethodWidget.st > index f230175..3b4cd4f 100644 > --- a/packages/visualgst/StBrowser/GtkMethodWidget.st > +++ b/packages/visualgst/StBrowser/GtkMethodWidget.st > @@ -1,4 +1,4 @@ > -GtkConcreteWidget subclass: GtkMethodWidget [ > +GTKTools.GtkConcreteWidget subclass: GtkMethodWidget [ > | browser model methodTree class category | > > GtkMethodWidget >> on: aClass withCategory: aCategory [ > diff --git a/packages/visualgst/Tests/GtkConcreteWidgetTest.st b/packages/visualgst/Tests/GtkConcreteWidgetTest.st > deleted file mode 100644 > index 37fd7be..0000000 > --- a/packages/visualgst/Tests/GtkConcreteWidgetTest.st > +++ /dev/null > @@ -1,43 +0,0 @@ > -TestCase subclass: GtkConcreteWidgetTest [ > - > - | show | > - > - showAll [ > - > - show := true > - ] > - > - hideAll [ > - > - show := false > - ] > - > - getVisible [ > - > - ^ false > - ] > - > - testAbstractWidget [ > - <category: 'testing'> > - > - self should: [ GtkAbstractConcreteWidget new hideAll. true ] > - ] > - > - testConcreteWidget [ > - <category: 'testing'> > - > - | widget | > - widget := GtkConcreteWidget parentWindow: #foo. > - self assert: widget parentWindow = #foo. > - widget mainWidget: self. > - self assert: widget mainWidget = self. > - widget showAll. > - self assert: show. > - widget hideAll. > - self assert: show not. > - self assert: widget isVisible not. > - self should: [ widget grabFocus. true ]. > - self should: [ widget close. true]. > - ] > -] > - > diff --git a/packages/visualgst/Tetris/Tetris.st b/packages/visualgst/Tetris/Tetris.st > index 04856fb..c0c50de 100644 > --- a/packages/visualgst/Tetris/Tetris.st > +++ b/packages/visualgst/Tetris/Tetris.st > @@ -27,7 +27,7 @@ > | > ======================================================================" > > -GtkMainWindow subclass: Tetris [ > +GTKTools.GtkMainWindow subclass: Tetris [ > | canvasWidget canvas process pause delay grid movingBlocks level score level lines | > > <category: 'Graphics-Tetris'> > diff --git a/packages/visualgst/Text/GtkTextPluginWidget.st b/packages/visualgst/Text/GtkTextPluginWidget.st > index 88068c5..1dbb200 100644 > --- a/packages/visualgst/Text/GtkTextPluginWidget.st > +++ b/packages/visualgst/Text/GtkTextPluginWidget.st > @@ -1,4 +1,4 @@ > -GtkConcreteWidget subclass: GtkTextPluginWidget [ > +GTKTools.GtkConcreteWidget subclass: GtkTextPluginWidget [ > | textWidget closeButton | > > GtkTextPluginWidget class >> on: aTextWidget [ > diff --git a/packages/visualgst/Text/GtkTextWidget.st b/packages/visualgst/Text/GtkTextWidget.st > index 4c08498..8559c04 100644 > --- a/packages/visualgst/Text/GtkTextWidget.st > +++ b/packages/visualgst/Text/GtkTextWidget.st > @@ -1,4 +1,4 @@ > -GtkConcreteWidget subclass: GtkTextWidget [ > +GTKTools.GtkConcreteWidget subclass: GtkTextWidget [ > | findWidget replaceWidget textWidget userAction undoStack lastCommand cut textSaved lastSavedCommand | > > GtkTextWidget class >> newWithBuffer: aGtkTextBuffer [ > diff --git a/packages/visualgst/package.xml b/packages/visualgst/package.xml > index 4267d1d..91a2415 100644 > --- a/packages/visualgst/package.xml > +++ b/packages/visualgst/package.xml > @@ -3,6 +3,7 @@ > <namespace>VisualGST</namespace> > <prereq>Parser</prereq> > <prereq>GTK</prereq> > + <prereq>GTKTools</prereq> > <prereq>Cairo</prereq> > <prereq>SUnit</prereq> > <prereq>DebugTools</prereq> > @@ -26,7 +27,6 @@ > <filein>Tests/PragmaTest.st</filein> > <filein>Tests/GtkCategorizedNamespaceWidgetTest.st</filein> > <filein>Tests/GtkCategorizedClassWidgetTest.st</filein> > - <filein>Tests/GtkConcreteWidgetTest.st</filein> > <file>Tests/AddNamespaceUndoCommandTest.st</file> > <file>Tests/GtkMethodWidgetTest.st</file> > <file>Tests/CompiledMethodTest.st</file> > @@ -44,7 +44,6 @@ > <file>Tests/PragmaTest.st</file> > <file>Tests/GtkCategorizedNamespaceWidgetTest.st</file> > <file>Tests/GtkCategorizedClassWidgetTest.st</file> > - <file>Tests/GtkConcreteWidgetTest.st</file> > <sunit> > VisualGST.AddNamespaceUndoCommandTest > VisualGST.GtkMethodWidgetTest > @@ -65,7 +64,6 @@ > VisualGST.GtkCategorizedNamespaceWidgetTest > VisualGST.GtkCategorizedClassWidgetTest > VisualGST.#Test > - VisualGST.GtkConcreteWidgetTest > </sunit> > </test> > <filein>Extensions.st</filein> > @@ -159,8 +157,6 @@ > <filein>Category/ClassCategory.st</filein> > <filein>Category/AbstractNamespace.st</filein> > <filein>Category/Class.st</filein> > - <filein>GtkAbstractConcreteWidget.st</filein> > - <filein>GtkConcreteWidget.st</filein> > <filein>GtkScrollTreeWidget.st</filein> > <filein>GtkSimpleListWidget.st</filein> > <filein>GtkEntryWidget.st</filein> > @@ -175,7 +171,6 @@ > <filein>GtkTreeModel.st</filein> > <filein>Text/GtkTextWidget.st</filein> > <filein>GtkPackageBuilderWidget.st</filein> > - <filein>GtkMainWindow.st</filein> > <filein>GtkVisualGSTTool.st</filein> > <filein>GtkBrowsingTool.st</filein> > <filein>GtkLauncher.st</filein> > @@ -204,7 +199,6 @@ > <filein>GtkHistoryWidget.st</filein> > <filein>Inspector/GtkInspector.st</filein> > <filein>StBrowser/GtkClassBrowserWidget.st</filein> > - <filein>GtkEntryDialog.st</filein> > <filein>HistoryStack.st</filein> > <filein>Undo/UndoStack.st</filein> > <filein>Undo/UndoCommand.st</filein> > @@ -385,8 +379,6 @@ > <file>Category/ClassCategory.st</file> > <file>Category/AbstractNamespace.st</file> > <file>Category/Class.st</file> > - <file>GtkAbstractConcreteWidget.st</file> > - <file>GtkConcreteWidget.st</file> > <file>GtkScrollTreeWidget.st</file> > <file>GtkSimpleListWidget.st</file> > <file>GtkEntryWidget.st</file> > @@ -401,7 +393,6 @@ > <file>GtkTreeModel.st</file> > <file>Text/GtkTextWidget.st</file> > <file>GtkPackageBuilderWidget.st</file> > - <file>GtkMainWindow.st</file> > <file>GtkVisualGSTTool.st</file> > <file>GtkBrowsingTool.st</file> > <file>GtkLauncher.st</file> > @@ -430,7 +421,6 @@ > <file>GtkHistoryWidget.st</file> > <file>Inspector/GtkInspector.st</file> > <file>StBrowser/GtkClassBrowserWidget.st</file> > - <file>GtkEntryDialog.st</file> > <file>HistoryStack.st</file> > <file>Undo/UndoStack.st</file> > <file>Undo/UndoCommand.st</file> > _______________________________________________ help-smalltalk mailing list [hidden email] https://lists.gnu.org/mailman/listinfo/help-smalltalk |
In reply to this post by Holger Freyther
Il 08/04/2013 11:30, Holger Hans Peter Freyther ha scritto:
> (STInST.STClassLoaderObjects.ProxyNamespace > on: Smalltalk for: STInST.STClassLoader new) displayString > > triggered a DNU and after fixing that it ended with an infinite > recursion as the value is self. Avoid the recursion but this is > probably not the right fix. Actually it's ok, but please add a comment. Paolo > 2013-03-31 Holger Hans Peter Freyther <[hidden email]> > > * tests/stcompiler.ok: Update the test result. > * tests/stcompiler.st: Add a testcase for ProxyNamespace>>#printOn:. > > 2013-03-31 Holger Hans Peter Freyther <[hidden email]> > > * STLoaderObjs.st: Change ProxyNamespace>>#printOn to avoid > recursion into self. > --- > ChangeLog | 5 +++++ > packages/stinst/parser/ChangeLog | 5 +++++ > packages/stinst/parser/STLoaderObjs.st | 15 +++++++++------ > tests/stcompiler.ok | 5 +++++ > tests/stcompiler.st | 7 +++++++ > 5 files changed, 31 insertions(+), 6 deletions(-) > > diff --git a/ChangeLog b/ChangeLog > index 8a3085d..277302a 100644 > --- a/ChangeLog > +++ b/ChangeLog > @@ -1,3 +1,8 @@ > +2013-03-31 Holger Hans Peter Freyther <[hidden email]> > + > + * tests/stcompiler.ok: Update the test result. > + * tests/stcompiler.st: Add a testcase for ProxyNamespace>>#printOn:. > + > 2013-03-24 Holger Hans Peter Freyther <[hidden email]> > > * libgst/files.c: Add DirPackage.st to the bootstrap. > diff --git a/packages/stinst/parser/ChangeLog b/packages/stinst/parser/ChangeLog > index 24bf131..0bc8d23 100644 > --- a/packages/stinst/parser/ChangeLog > +++ b/packages/stinst/parser/ChangeLog > @@ -1,3 +1,8 @@ > +2013-03-31 Holger Hans Peter Freyther <[hidden email]> > + > + * STLoaderObjs.st: Change ProxyNamespace>>#printOn to avoid > + recursion into self. > + > 2013-02-23 Holger Hans Peter Freyther <[hidden email]> > > * RBParser.st: Fix RBParser>>#parsedNegatedNumber. > diff --git a/packages/stinst/parser/STLoaderObjs.st b/packages/stinst/parser/STLoaderObjs.st > index 195ceef..076b1ef 100644 > --- a/packages/stinst/parser/STLoaderObjs.st > +++ b/packages/stinst/parser/STLoaderObjs.st > @@ -1507,13 +1507,16 @@ name > > printOn: aStream > "Print a representation of the receiver on aStream" > - aStream nextPutAll: self classNameString , '[', proxy name, '] (' ; nl. > + aStream nextPutAll: self class storeString , '[', proxy name, '] (' ; nl. > self myKeysAndValuesDo: > - [ :key :value | aStream tab; > - print: key; > - nextPutAll: '->'; > - print: value; > - nl ]. > + [ :key :value | > + value == self ifFalse: [ > + aStream tab; > + print: key; > + nextPutAll: '->'; > + print: value; > + nl ]. > + ]. > aStream nextPut: $) > ! > > diff --git a/tests/stcompiler.ok b/tests/stcompiler.ok > index 4222e50..a0cebf4 100644 > --- a/tests/stcompiler.ok > +++ b/tests/stcompiler.ok > @@ -52,6 +52,11 @@ Execution begins... > returned value is 'an' > > Execution begins... > +STInST.STClassLoaderObjects.ProxyNamespace[Smalltalk] ( > +) > +returned value is ProxyNamespace new: 32 "<0>" > + > +Execution begins... > true > true > returned value is true > diff --git a/tests/stcompiler.st b/tests/stcompiler.st > index 36b48a7..5605a6e 100644 > --- a/tests/stcompiler.st > +++ b/tests/stcompiler.st > @@ -118,6 +118,13 @@ Eval [ > ] > > Eval [ > + | proxy | > + proxy := STInST.STClassLoaderObjects.ProxyNamespace > + on: Smalltalk for: STInST.STClassLoader new. > + proxy printNl. > +] > + > +Eval [ > | classes bla | > "Check class variable parsing.." > > _______________________________________________ help-smalltalk mailing list [hidden email] https://lists.gnu.org/mailman/listinfo/help-smalltalk |
In reply to this post by Holger Freyther
Il 08/04/2013 11:30, Holger Hans Peter Freyther ha scritto:
> This will hold non UI tools to help with tooling. This can be linters, > the converter, package related tools. Beging with moving parts of the > gst-convert code into this package. Please rename to SourceEntity/SourceEval/SourceClass/SourceComments, and rename Loader to SourceProcessor. Please make this part of STInST. Also, please make scripts/Convert.st use it. Paolo > 2013-03-30 Holger Hans Peter Freyther <[hidden email]> > > * configure.ac: Introduce the Tooling package. > > 2013-03-30 Holger Hans Peter Freyther <[hidden email]> > > * Makefile.frag: Added. > * Parser/EmittedClass.st: Added from scripts/Convert.st. > * Parser/EmittedComments.st: Added from scripts/Convert.st. > * Parser/EmittedEntity.st: Added from scripts/Convert.st. > * Parser/EmittedEval.st: Added from scripts/Convert.st. > * Parser/Loader.st: Added from scripts/Convert.st. > * README: Added. > * TODO: Added. > * package.xml: Added. > --- > .gitignore | 1 + > ChangeLog | 4 + > configure.ac | 1 + > packages/tooling/ChangeLog | 11 ++ > packages/tooling/Makefile.frag | 5 + > packages/tooling/Parser/EmittedClass.st | 85 ++++++++++ > packages/tooling/Parser/EmittedComments.st | 51 ++++++ > packages/tooling/Parser/EmittedEntity.st | 39 +++++ > packages/tooling/Parser/EmittedEval.st | 72 +++++++++ > packages/tooling/Parser/Loader.st | 235 ++++++++++++++++++++++++++++ > packages/tooling/README | 2 + > packages/tooling/TODO | 2 + > packages/tooling/package.xml | 11 ++ > 13 files changed, 519 insertions(+) > create mode 100644 packages/tooling/ChangeLog > create mode 100644 packages/tooling/Makefile.frag > create mode 100644 packages/tooling/Parser/EmittedClass.st > create mode 100644 packages/tooling/Parser/EmittedComments.st > create mode 100644 packages/tooling/Parser/EmittedEntity.st > create mode 100644 packages/tooling/Parser/EmittedEval.st > create mode 100644 packages/tooling/Parser/Loader.st > create mode 100644 packages/tooling/README > create mode 100644 packages/tooling/TODO > create mode 100644 packages/tooling/package.xml > > diff --git a/.gitignore b/.gitignore > index d7a3ac0..dc2aca2 100644 > --- a/.gitignore > +++ b/.gitignore > @@ -69,6 +69,7 @@ packages/i18n/ref-add.sed > packages/i18n/ref-del.sed > packages/net/gnutls-wrapper > packages/object-dumper/stamp-classes > +packages/tooling/stamp-classes > snprintfv/snprintfv/compat.stamp > > tests/gst.im > diff --git a/ChangeLog b/ChangeLog > index aa767b8..f162b3d 100644 > --- a/ChangeLog > +++ b/ChangeLog > @@ -1,5 +1,9 @@ > 2013-03-30 Holger Hans Peter Freyther <[hidden email]> > > + * configure.ac: Introduce the Tooling package. > + > +2013-03-30 Holger Hans Peter Freyther <[hidden email]> > + > * configure.ac: Introduce the GTKTools package > > 2013-03-31 Holger Hans Peter Freyther <[hidden email]> > diff --git a/configure.ac b/configure.ac > index c447b1c..e6ef587 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -586,6 +586,7 @@ GST_PACKAGE_ENABLE([Sport], [sport]) > GST_PACKAGE_ENABLE([SUnit], [sunit]) > GST_PACKAGE_ENABLE([Swazoo], [swazoo-httpd]) > GST_PACKAGE_ENABLE([Sockets], [sockets], [], [gst_cv_sockets]) > +GST_PACKAGE_ENABLE([Tooling], [tooling]) > GST_PACKAGE_ENABLE([VFSAddOns], [vfs], [], [], [Makefile]) > GST_PACKAGE_ENABLE([GTKTools], [gtktools]) > GST_PACKAGE_ENABLE([GTKTools-Example-Clock], [gtktools/Examples/Clock]) > diff --git a/packages/tooling/ChangeLog b/packages/tooling/ChangeLog > new file mode 100644 > index 0000000..8c85f31 > --- /dev/null > +++ b/packages/tooling/ChangeLog > @@ -0,0 +1,11 @@ > +2013-03-30 Holger Hans Peter Freyther <[hidden email]> > + > + * Makefile.frag: Added. > + * Parser/EmittedClass.st: Added from scripts/Convert.st. > + * Parser/EmittedComments.st: Added from scripts/Convert.st. > + * Parser/EmittedEntity.st: Added from scripts/Convert.st. > + * Parser/EmittedEval.st: Added from scripts/Convert.st. > + * Parser/Loader.st: Added from scripts/Convert.st. > + * README: Added. > + * TODO: Added. > + * package.xml: Added. > diff --git a/packages/tooling/Makefile.frag b/packages/tooling/Makefile.frag > new file mode 100644 > index 0000000..01d8d86 > --- /dev/null > +++ b/packages/tooling/Makefile.frag > @@ -0,0 +1,5 @@ > +Tooling_FILES = \ > +packages/tooling/Parser/EmittedEntity.st packages/tooling/Parser/EmittedClass.st packages/tooling/Parser/EmittedComments.st packages/tooling/Parser/EmittedEval.st packages/tooling/Parser/Loader.st packages/tooling/Lint/Monticello.st > +$(Tooling_FILES): > +$(srcdir)/packages/tooling/stamp-classes: $(Tooling_FILES) > + touch $(srcdir)/packages/tooling/stamp-classes > diff --git a/packages/tooling/Parser/EmittedClass.st b/packages/tooling/Parser/EmittedClass.st > new file mode 100644 > index 0000000..9a2cb13 > --- /dev/null > +++ b/packages/tooling/Parser/EmittedClass.st > @@ -0,0 +1,85 @@ > +"====================================================================== > +| > +| Smalltalk syntax conversion tool > +| > +| > + ======================================================================" > + > + > +"====================================================================== > +| > +| Copyright 2007, 2008, 2009 Free Software Foundation, Inc. > +| Written by Daniele Sciascia. > +| > +| This file is part of the GNU Smalltalk class library. > +| > +| The GNU Smalltalk class library is free software; you can redistribute it > +| and/or modify it under the terms of the GNU Lesser General Public License > +| as published by the Free Software Foundation; either version 2.1, or (at > +| your option) any later version. > +| > +| The GNU Smalltalk class library is distributed in the hope that it will be > +| useful, but WITHOUT ANY WARRANTY; without even the implied warranty of > +| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser > +| General Public License for more details. > +| > +| You should have received a copy of the GNU Lesser General Public License > +| along with the GNU Smalltalk class library; see the file COPYING.LIB. > +| If not, write to the Free Software Foundation, 59 Temple Place - Suite > +| 330, Boston, MA 02110-1301, USA. > +| > + ======================================================================" > + > +EmittedEntity subclass: EmittedClass [ > + | class methodsToEmit classMethodsToEmit isComplete | > + > + <category: 'Tooling-Parser-Core'> > + <comment: 'This class is responsible for emitting a class > + by using a FormattingExporter.'> > + > + EmittedClass class >> forClass: aClass [ > + (aClass superclass notNil and: [ > + aClass superclass isDefined not ]) ifTrue: [ > + Warning signal: > + ('superclass %1 is undefined' % {aClass superclass}) ]. > + ^super new initializeWithClass: aClass complete: true > + ] > + > + EmittedClass class >> forExtension: aClass [ > + aClass isDefined ifFalse: [ > + Warning signal: > + ('extensions for undefined class %1' % {aClass}) ]. > + ^super new initializeWithClass: aClass complete: false > + ] > + > + initializeWithClass: aClass complete: aBoolean [ > + class := aClass. > + methodsToEmit := STInST.OrderedSet new. > + classMethodsToEmit := STInST.OrderedSet new. > + isComplete := aBoolean > + ] > + > + forClass [ > + ^class > + ] > + > + addMethod: aMethod [ > + methodsToEmit add: aMethod selector asSymbol. > + ] > + > + addClassMethod: aMethod [ > + classMethodsToEmit add: aMethod selector asSymbol. > + ] > + > + emitTo: aStream filteredBy: aBlock [ > + (aBlock value: class) > + ifFalse: [ > + Notification signal: ('Skipping %1' % {class}). > + ^self ]. > + > + Notification signal: ('Converting %1...' % {class}). > + (STInST.FileOutExporter defaultExporter on: class to: aStream) > + completeFileOut: isComplete; > + fileOutSelectors: methodsToEmit classSelectors: classMethodsToEmit. > + ] > +] > diff --git a/packages/tooling/Parser/EmittedComments.st b/packages/tooling/Parser/EmittedComments.st > new file mode 100644 > index 0000000..fb09552 > --- /dev/null > +++ b/packages/tooling/Parser/EmittedComments.st > @@ -0,0 +1,51 @@ > +"====================================================================== > +| > +| Smalltalk syntax conversion tool > +| > +| > + ======================================================================" > + > + > +"====================================================================== > +| > +| Copyright 2007, 2008, 2009 Free Software Foundation, Inc. > +| Written by Daniele Sciascia. > +| > +| This file is part of the GNU Smalltalk class library. > +| > +| The GNU Smalltalk class library is free software; you can redistribute it > +| and/or modify it under the terms of the GNU Lesser General Public License > +| as published by the Free Software Foundation; either version 2.1, or (at > +| your option) any later version. > +| > +| The GNU Smalltalk class library is distributed in the hope that it will be > +| useful, but WITHOUT ANY WARRANTY; without even the implied warranty of > +| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser > +| General Public License for more details. > +| > +| You should have received a copy of the GNU Lesser General Public License > +| along with the GNU Smalltalk class library; see the file COPYING.LIB. > +| If not, write to the Free Software Foundation, 59 Temple Place - Suite > +| 330, Boston, MA 02110-1301, USA. > +| > + ======================================================================" > + > +EmittedEntity subclass: EmittedComments [ > + | comments | > + <category: 'Tooling-Parser-Core'> > + > + EmittedComments class >> comments: aCollection source: aString [ > + ^self new comments: (aCollection collect: [ :c | > + aString copyFrom: c first to: c last ]) > + ] > + > + emitTo: outStream filteredBy: aBlock [ > + comments do: [ :c | > + STInST.FileOutExporter defaultExporter fileOutComment: c to: outStream. > + outStream nl; nl] > + ] > + > + comments: anArray [ > + comments := anArray > + ] > +] > diff --git a/packages/tooling/Parser/EmittedEntity.st b/packages/tooling/Parser/EmittedEntity.st > new file mode 100644 > index 0000000..aeb6928 > --- /dev/null > +++ b/packages/tooling/Parser/EmittedEntity.st > @@ -0,0 +1,39 @@ > +"====================================================================== > +| > +| Parsing helper routines > +| > +| > + ======================================================================" > + > + > +"====================================================================== > +| > +| Copyright 2007, 2008, 2009 Free Software Foundation, Inc. > +| Written by Daniele Sciascia. > +| > +| This file is part of the GNU Smalltalk class library. > +| > +| The GNU Smalltalk class library is free software; you can redistribute it > +| and/or modify it under the terms of the GNU Lesser General Public License > +| as published by the Free Software Foundation; either version 2.1, or (at > +| your option) any later version. > +| > +| The GNU Smalltalk class library is distributed in the hope that it will be > +| useful, but WITHOUT ANY WARRANTY; without even the implied warranty of > +| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser > +| General Public License for more details. > +| > +| You should have received a copy of the GNU Lesser General Public License > +| along with the GNU Smalltalk class library; see the file COPYING.LIB. > +| If not, write to the Free Software Foundation, 59 Temple Place - Suite > +| 330, Boston, MA 02110-1301, USA. > +| > + ======================================================================" > + > +Object subclass: EmittedEntity [ > + <category: 'Tooling-Parser-Core'> > + > + emitTo: aStream filteredBy: aBlock [ > + self subclassResponsibility > + ] > +] > diff --git a/packages/tooling/Parser/EmittedEval.st b/packages/tooling/Parser/EmittedEval.st > new file mode 100644 > index 0000000..2b82158 > --- /dev/null > +++ b/packages/tooling/Parser/EmittedEval.st > @@ -0,0 +1,72 @@ > +"====================================================================== > +| > +| Smalltalk syntax conversion tool > +| > +| > + ======================================================================" > + > + > +"====================================================================== > +| > +| Copyright 2007, 2008, 2009 Free Software Foundation, Inc. > +| Written by Daniele Sciascia. > +| > +| This file is part of the GNU Smalltalk class library. > +| > +| The GNU Smalltalk class library is free software; you can redistribute it > +| and/or modify it under the terms of the GNU Lesser General Public License > +| as published by the Free Software Foundation; either version 2.1, or (at > +| your option) any later version. > +| > +| The GNU Smalltalk class library is distributed in the hope that it will be > +| useful, but WITHOUT ANY WARRANTY; without even the implied warranty of > +| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser > +| General Public License for more details. > +| > +| You should have received a copy of the GNU Lesser General Public License > +| along with the GNU Smalltalk class library; see the file COPYING.LIB. > +| If not, write to the Free Software Foundation, 59 Temple Place - Suite > +| 330, Boston, MA 02110-1301, USA. > +| > + ======================================================================" > + > +EmittedEntity subclass: EmittedEval [ > + | statements comments namespace | > + > + <category: 'Tooling-Parser-Core'> > + <comment: 'This class is responsible for emitting a set of > + statements that should be inside an Eval declaration.'> > + > + EmittedEval class >> new [ > + ^super new initialize > + ] > + > + initialize [ > + statements := OrderedCollection new > + ] > + > + namespace [ > + ^namespace > + ] > + > + namespace: aNamespace [ > + namespace := aNamespace > + ] > + > + addStatement: aStatement [ > + statements add: aStatement > + ] > + > + emitTo: aStream filteredBy: aBlock [ > + statements isEmpty ifTrue: [ ^self ]. > + STInST.FileOutExporter defaultExporter > + emitEval: [ > + | formatter | > + formatter := STInST.RBFormatter new. > + formatter indent: 1 while: [ > + formatter indent. > + aStream nextPutAll: (formatter formatAll: statements) ]] > + to: aStream > + for: namespace. > + ] > +] > diff --git a/packages/tooling/Parser/Loader.st b/packages/tooling/Parser/Loader.st > new file mode 100644 > index 0000000..6b64301 > --- /dev/null > +++ b/packages/tooling/Parser/Loader.st > @@ -0,0 +1,235 @@ > +"====================================================================== > +| > +| Smalltalk syntax conversion tool > +| > +| > + ======================================================================" > + > + > +"====================================================================== > +| > +| Copyright 2007, 2008, 2009 Free Software Foundation, Inc. > +| Written by Daniele Sciascia. > +| > +| This file is part of the GNU Smalltalk class library. > +| > +| The GNU Smalltalk class library is free software; you can redistribute it > +| and/or modify it under the terms of the GNU Lesser General Public License > +| as published by the Free Software Foundation; either version 2.1, or (at > +| your option) any later version. > +| > +| The GNU Smalltalk class library is distributed in the hope that it will be > +| useful, but WITHOUT ANY WARRANTY; without even the implied warranty of > +| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser > +| General Public License for more details. > +| > +| You should have received a copy of the GNU Lesser General Public License > +| along with the GNU Smalltalk class library; see the file COPYING.LIB. > +| If not, write to the Free Software Foundation, 59 Temple Place - Suite > +| 330, Boston, MA 02110-1301, USA. > +| > + ======================================================================" > + > +STInST.STClassLoader subclass: Loader [ > + | stuffToEmit classesToEmit createdNamespaces filter outStream rewriter | > + > + <category: 'Tooling-Parser-Core'> > + <comment: 'A class loader that creates a set of "EmittedEntity" > + based on the contents of the given file being loaded. > + When the contents of the file are loaded, the responsibilty of > + emitting code using the new syntax belongs to those various > + entities that have been constructed. > + > + TODO: Split the loading and converting'> > + > + > + Loader class >> convertSqueakStream: in to: out [ > + <category: 'instance creation'> > + ^self convertStream: in with: STInST.SqueakFileInParser to: out > + ] > + > + Loader class >> convertSIFStream: in to: out [ > + <category: 'instance creation'> > + ^self convertStream: in with: STInST.SIFFileInParser to: out > + ] > + > + Loader class >> convertStream: in to: out [ > + <category: 'instance creation'> > + ^self convertStream: in with: STInST.STFileInParser to: out > + ] > + > + Loader class >> convertStream: in with: aParserClass to: out [ > + <category: 'instance creation'> > + ^self new convertStream: in with: aParserClass to: out > + ] > + > + initialize [ > + <category: 'initialization'> > + super initialize. > + filter := [ :class | [true] ]. > + stuffToEmit := OrderedSet new. > + classesToEmit := Dictionary new. > + createdNamespaces := OrderedSet new. > + ] > + > + convertStream: in with: aParserClass to: out onError: aBlock [ > + <category: 'operation'> > + self > + outStream: out; > + parseSmalltalkStream: in with: aParserClass onError: aBlock; > + doEmitStuff. > + ] > + > + convertStream: in with: aParserClass to: out [ > + <category: 'operation'> > + self > + outStream: out; > + parseSmalltalkStream: in with: aParserClass; > + doEmitStuff. > + ] > + > + filter: aBlock [ > + <category: 'accessing'> > + filter := aBlock. > + ] > + > + outStream: out [ > + <category: 'accessing'> > + outStream := out. > + ] > + > + rewrite: node [ > + ^rewriter isNil > + ifTrue: [ node ] > + ifFalse: [ rewriter executeTree: node; tree ]. > + ] > + > + evaluate: node [ > + <category: 'overrides'> > + > + | rewritten | > + rewritten := self rewrite: node. > + node comments isEmpty ifFalse: [ > + stuffToEmit add: (EmittedComments comments: node comments source: node source) ]. > + > + ^super evaluate: rewritten > + ] > + > + addRule: searchString parser: aParserClass [ > + | tree rule | > + tree := aParserClass parseRewriteExpression: searchString. > + tree isMessage ifFalse: [ self error: 'expected ->' ]. > + tree selector = #-> ifFalse: [ self error: 'expected ->' ]. > + rule := RBStringReplaceRule > + searchForTree: tree receiver > + replaceWith: tree arguments first. > + > + rewriter isNil ifTrue: [ rewriter := ParseTreeRewriter new ]. > + rewriter addRule: rule > + ] > + > + compile: node [ > + <category: 'collecting entities'> > + > + | rewritten method | > + > + rewritten := self rewrite: node. > + method := self defineMethod: rewritten. > + (classesToEmit includesKey: currentClass asClass) > + ifTrue: [ self addMethod: method toLoadedClass: currentClass ] > + ifFalse: [ self addMethod: method toExtensionClass: currentClass ]. > + ^method > + ] > + > + lastEval [ > + <category: 'collecting entities'> > + > + | lastIsEval evalNamespace | > + > + evalNamespace := currentNamespace = self defaultNamespace > + ifTrue: [ nil ] > + ifFalse: [ currentNamespace ]. > + > + lastIsEval := stuffToEmit notEmpty > + and: [ (stuffToEmit last isKindOf: EmittedEval) > + and: [ stuffToEmit last namespace = evalNamespace ]]. > + > + ^lastIsEval > + ifTrue: [ stuffToEmit last ] > + ifFalse: [ stuffToEmit add: (EmittedEval new namespace: evalNamespace) ] > + ] > + > + createNamespaces [ > + createdNamespaces do: [ :each || stmt | > + stmt := RBMessageNode > + receiver: (RBVariableNode named: (each superspace nameIn: self currentNamespace)) > + selector: #addSubspace: > + arguments: { RBLiteralNode value: each name asSymbol }. > + self lastEval addStatement: stmt > + ]. > + createdNamespaces := OrderedSet new > + ] > + > + unknown: node [ > + <category: 'collecting entities'> > + > + self createNamespaces. > + self lastEval addStatement: node. > + ^false > + ] > + > + doSubclass: receiver selector: selector arguments: argumentNodes [ > + <category: 'evaluating statements'> > + > + | class emittedClass | > + > + createdNamespaces remove: self currentNamespace ifAbsent: [ ]. > + self createNamespaces. > + > + class := super defineSubclass: receiver > + selector: selector > + arguments: argumentNodes. > + > + Notification signal: ('Parsing %1' % {class}). > + emittedClass := EmittedClass forClass: class. > + > + classesToEmit at: class put: emittedClass. > + stuffToEmit add: emittedClass. > + > + ^false > + ] > + > + doAddNamespace: receiver selector: selector arguments: argumentNodes [ > + | ns | > + super doAddNamespace: receiver selector: selector arguments: argumentNodes. > + > + ns := (self resolveNamespace: receiver) at: argumentNodes first value. > + createdNamespaces add: ns. > + ^false > + ] > + > + doEmitStuff [ > + <category: 'emitting'> > + > + stuffToEmit > + do: [ :each | each emitTo: outStream filteredBy: filter ] > + separatedBy: [ outStream nl; nextPut: 12 asCharacter; nl ]. > + ] > + > + addMethod: aMethod toLoadedClass: aClass [ > + <category: 'collecting entities'> > + > + (aClass isMetaclass) > + ifTrue: [ (classesToEmit at: currentClass asClass) addClassMethod: aMethod ] > + ifFalse: [ (classesToEmit at: currentClass) addMethod: aMethod ] > + ] > + > + addMethod: aMethod toExtensionClass: aClass [ > + <category: 'collecting entities'> > + > + ((stuffToEmit size > 0) > + and: [ (stuffToEmit last isKindOf: EmittedClass) and: [ stuffToEmit last forClass = aClass ] ]) > + ifTrue: [ stuffToEmit last addMethod: aMethod ] > + ifFalse: [ stuffToEmit add: ((EmittedClass forExtension: currentClass) addMethod: aMethod) ] > + ] > +] > diff --git a/packages/tooling/README b/packages/tooling/README > new file mode 100644 > index 0000000..9c11254 > --- /dev/null > +++ b/packages/tooling/README > @@ -0,0 +1,2 @@ > +Random collection of tooling classes for GST. Used for import/export > +of GST to other dialects and the base for IDEs and similiar utilities. > diff --git a/packages/tooling/TODO b/packages/tooling/TODO > new file mode 100644 > index 0000000..bc29fe6 > --- /dev/null > +++ b/packages/tooling/TODO > @@ -0,0 +1,2 @@ > +* Make the Loader have a Converter subclass and use a Visitor instead > + of the calls to emitTo:. > diff --git a/packages/tooling/package.xml b/packages/tooling/package.xml > new file mode 100644 > index 0000000..ff3c23f > --- /dev/null > +++ b/packages/tooling/package.xml > @@ -0,0 +1,11 @@ > +<package> > + <name>Tooling</name> > + <namespace>Tooling</namespace> > + <prereq>Parser</prereq> > + > + <filein>Parser/EmittedEntity.st</filein> > + <filein>Parser/EmittedClass.st</filein> > + <filein>Parser/EmittedComments.st</filein> > + <filein>Parser/EmittedEval.st</filein> > + <filein>Parser/Loader.st</filein> > +</package> > _______________________________________________ help-smalltalk mailing list [hidden email] https://lists.gnu.org/mailman/listinfo/help-smalltalk |
In reply to this post by Holger Freyther
Il 08/04/2013 11:30, Holger Hans Peter Freyther ha scritto:
> The category of classes and extensions should match the package > name. Create a small class that is checking this on a package and > print the errors. I think this should be a new tool, not part of the package. You can create "gst-lint --monticello" and we can later add more lint modules. Paolo > 2013-03-30 Holger Hans Peter Freyther <[hidden email]> > > * Lint/Monticello.st: Added Monticello class for linting. > * Parser/EmittedClass.st: Reimplement >>#isEmittedClass, >>#methodsToEmit, > >>#classMethodsToEmit, #>>isComplete. > * Parser/EmittedEntity.st: Added >>#isEmittedClass. > * Parser/Loader.st: Add >>#stuffToEmit selector. > * TODO: Add work item. > * package.xml: Add the Lint/Monticello.st. > --- > packages/tooling/ChangeLog | 10 ++ > packages/tooling/Lint/Monticello.st | 151 ++++++++++++++++++++++++++++++ > packages/tooling/Makefile.frag | 2 +- > packages/tooling/Parser/EmittedClass.st | 20 ++++ > packages/tooling/Parser/EmittedEntity.st | 4 + > packages/tooling/Parser/Loader.st | 5 + > packages/tooling/TODO | 11 +++ > packages/tooling/package.xml | 2 + > 8 files changed, 204 insertions(+), 1 deletion(-) > create mode 100644 packages/tooling/Lint/Monticello.st > > diff --git a/packages/tooling/ChangeLog b/packages/tooling/ChangeLog > index 8c85f31..a1a8760 100644 > --- a/packages/tooling/ChangeLog > +++ b/packages/tooling/ChangeLog > @@ -1,5 +1,15 @@ > 2013-03-30 Holger Hans Peter Freyther <[hidden email]> > > + * Lint/Monticello.st: Added Monticello class for linting. > + * Parser/EmittedClass.st: Reimplement >>#isEmittedClass, >>#methodsToEmit, > + >>#classMethodsToEmit, #>>isComplete. > + * Parser/EmittedEntity.st: Added >>#isEmittedClass. > + * Parser/Loader.st: Add >>#stuffToEmit selector. > + * TODO: Add work item. > + * package.xml: Add the Lint/Monticello.st. > + > +2013-03-30 Holger Hans Peter Freyther <[hidden email]> > + > * Makefile.frag: Added. > * Parser/EmittedClass.st: Added from scripts/Convert.st. > * Parser/EmittedComments.st: Added from scripts/Convert.st. > diff --git a/packages/tooling/Lint/Monticello.st b/packages/tooling/Lint/Monticello.st > new file mode 100644 > index 0000000..3c7a45c > --- /dev/null > +++ b/packages/tooling/Lint/Monticello.st > @@ -0,0 +1,151 @@ > +"====================================================================== > +| > +| Linting for Monticello export > +| > +| > + ======================================================================" > + > +"====================================================================== > +| > +| Copyright 2013 Free Software Foundation, Inc. > +| Written by Holger Hans Peter Freyther. > +| > +| This file is part of the GNU Smalltalk class library. > +| > +| The GNU Smalltalk class library is free software; you can redistribute it > +| and/or modify it under the terms of the GNU Lesser General Public License > +| as published by the Free Software Foundation; either version 2.1, or (at > +| your option) any later version. > +| > +| The GNU Smalltalk class library is distributed in the hope that it will be > +| useful, but WITHOUT ANY WARRANTY; without even the implied warranty of > +| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser > +| General Public License for more details. > +| > +| You should have received a copy of the GNU Lesser General Public License > +| along with the GNU Smalltalk class library; see the file COPYING.LIB. > +| If not, write to the Free Software Foundation, 59 Temple Place - Suite > +| 330, Boston, MA 02110-1301, USA. > +| > + ======================================================================" > + > + > +Tooling.EmittedClass extend [ > + isComplete [ > + <category: 'accessing'> > + ^ isComplete > + ] > + > + methodsToEmit [ > + <category: 'accessing'> > + ^ methodsToEmit > + ] > + > + classMethodsToEmit [ > + <category: 'accessing'> > + ^ classMethodsToEmit > + ] > + > + isComplete [ > + <category: 'accessing'> > + ^ isComplete > + ] > +] > + > +Object subclass: Monticello [ > + | loader package errors | > + <category: 'Tooling-Lint-Monticello'> > + > + Monticello class >> lint: aPackage [ > + "Work on a given package." > + ^ self new > + loadPackage: aPackage; > + lint. > + ] > + > + loadPackage: aPackage [ > + package := aPackage. > + loader := Tooling.Loader new. > + > + self lintFiles: aPackage fileIns. > + aPackage test ifNotNil: [ > + self lintFiles: aPackage test fileIns]. > + ] > + > + lintFiles: aList [ > + | files | > + > + files := package fullPathsOf: aList. > + files do: [:each | | file | > + file := each open: FileStream read. > + loader parseSmalltalkStream: file with: STInST.GSTFileInParser. > + file close. > + ] > + ] > + > + loader [ > + <category: 'private'> > + ^ loader > + ] > + > + lint [ > + <category: 'lint'> > + "TODO: this should use the visitor..." > + loader stuffToEmit do: [:each | > + each isEmittedClass ifTrue: [self lintClass: each]]. > + ] > + > + lintClass: aClass [ > + <category: 'lint'> > + aClass isComplete > + ifTrue: [self lintCompleteClass: aClass] > + ifFalse: [self lintExtension: aClass]. > + ] > + > + lintCompleteClass: aClass [ > + <category: 'lint'> > + "Check if the package name is in the category" > + (aClass forClass category startsWith: package name) > + ifFalse: [self addError: 'Class does not begin with package name' > + for: aClass forClass]. > + ] > + > + lintExtension: aClass [ > + <category: 'lint'> > + > + aClass methodsToEmit do: [:each | > + self lintExtensionMethod: each on: aClass]. > + aClass classMethodsToEmit do: [:each | > + self lintExtensionMethod: each on: aClass ]. > + ] > + > + lintExtensionMethod: aSymbol on: aClass [ > + | method | > + <category: 'lint'> > + method := aClass forClass >> aSymbol. > + (method methodCategory startsWith: ('*', package name)) > + ifFalse: [self addError: 'Method does not beging with *package-name' > + for: aClass forClass method: aSymbol]. > + ] > + > + addError: aString for: aClass method: aMethod [ > + <category: 'error-handling'> > + self errors add: '%1 on %2>>%3' % {aString. aClass name asString. aMethod}. > + ] > + > + addError: aString for: aClass [ > + <category: 'error-handling'> > + self errors add: '%1 on %2' % {aString. aClass name asString}. > + ] > + > + errors [ > + <category: 'error-handling'> > + ^ errors ifNil: [errors := OrderedCollection new]. > + ] > + > + printErrors [ > + <category: 'error-handling'> > + self errors do: [:each | > + Transcript nextPutAll: each; nl.] > + ] > +] > diff --git a/packages/tooling/Makefile.frag b/packages/tooling/Makefile.frag > index 01d8d86..0083a52 100644 > --- a/packages/tooling/Makefile.frag > +++ b/packages/tooling/Makefile.frag > @@ -1,5 +1,5 @@ > Tooling_FILES = \ > -packages/tooling/Parser/EmittedEntity.st packages/tooling/Parser/EmittedClass.st packages/tooling/Parser/EmittedComments.st packages/tooling/Parser/EmittedEval.st packages/tooling/Parser/Loader.st packages/tooling/Lint/Monticello.st > +packages/tooling/Parser/EmittedEntity.st packages/tooling/Parser/EmittedClass.st packages/tooling/Parser/EmittedComments.st packages/tooling/Parser/EmittedEval.st packages/tooling/Parser/Loader.st packages/tooling/Lint/Monticello.st > $(Tooling_FILES): > $(srcdir)/packages/tooling/stamp-classes: $(Tooling_FILES) > touch $(srcdir)/packages/tooling/stamp-classes > diff --git a/packages/tooling/Parser/EmittedClass.st b/packages/tooling/Parser/EmittedClass.st > index 9a2cb13..0db74eb 100644 > --- a/packages/tooling/Parser/EmittedClass.st > +++ b/packages/tooling/Parser/EmittedClass.st > @@ -82,4 +82,24 @@ EmittedEntity subclass: EmittedClass [ > completeFileOut: isComplete; > fileOutSelectors: methodsToEmit classSelectors: classMethodsToEmit. > ] > + > + isEmittedClass [ > + <category: 'accessing'> > + ^ true > + ] > + > + methodsToEmit [ > + <category: 'accessing'> > + ^ methodsToEmit > + ] > + > + classMethodsToEmit [ > + <category: 'accessing'> > + ^ classMethodsToEmit > + ] > + > + isComplete [ > + <category: 'accessing'> > + ^ isComplete > + ] > ] > diff --git a/packages/tooling/Parser/EmittedEntity.st b/packages/tooling/Parser/EmittedEntity.st > index aeb6928..9bdcf73 100644 > --- a/packages/tooling/Parser/EmittedEntity.st > +++ b/packages/tooling/Parser/EmittedEntity.st > @@ -36,4 +36,8 @@ Object subclass: EmittedEntity [ > emitTo: aStream filteredBy: aBlock [ > self subclassResponsibility > ] > + > + isEmittedClass [ > + ^ false > + ] > ] > diff --git a/packages/tooling/Parser/Loader.st b/packages/tooling/Parser/Loader.st > index 6b64301..c8fb0ec 100644 > --- a/packages/tooling/Parser/Loader.st > +++ b/packages/tooling/Parser/Loader.st > @@ -232,4 +232,9 @@ STInST.STClassLoader subclass: Loader [ > ifTrue: [ stuffToEmit last addMethod: aMethod ] > ifFalse: [ stuffToEmit add: ((EmittedClass forExtension: currentClass) addMethod: aMethod) ] > ] > + > + stuffToEmit [ > + <category: 'accessing'> > + ^ stuffToEmit > + ] > ] > diff --git a/packages/tooling/TODO b/packages/tooling/TODO > index bc29fe6..193c08a 100644 > --- a/packages/tooling/TODO > +++ b/packages/tooling/TODO > @@ -1,2 +1,13 @@ > * Make the Loader have a Converter subclass and use a Visitor instead > of the calls to emitTo:. > + > +* The following is shown as a a single class > + Object subclass: Foo [ > + signal [] > + ] > + > + Foo extend [ > + signalTwo [] > + ] > + > + It should be two EmittedClass > diff --git a/packages/tooling/package.xml b/packages/tooling/package.xml > index ff3c23f..2bda19d 100644 > --- a/packages/tooling/package.xml > +++ b/packages/tooling/package.xml > @@ -8,4 +8,6 @@ > <filein>Parser/EmittedComments.st</filein> > <filein>Parser/EmittedEval.st</filein> > <filein>Parser/Loader.st</filein> > + > + <filein>Lint/Monticello.st</filein> > </package> > _______________________________________________ help-smalltalk mailing list [hidden email] https://lists.gnu.org/mailman/listinfo/help-smalltalk |
In reply to this post by Paolo Bonzini-2
On Sun, Apr 14, 2013 at 03:41:18PM +0200, Paolo Bonzini wrote:
> > I'm not sure why this class is needed. Also, why adding ".dir"? It > seems to me that this is the real reason why you cannot use #fileIn. > > > + DirPackageContainer class >> on: aPackage [ How do we define the order/precedence of packages? E.g. when I am developing on a package that is already installed. Depending on certain things I want to either have: * the original package * the "newest" (if we would have version numbers) * or the local files The ".dir" makes that possible. > If this is really needed, please put the Kernel.DirPackageContainer > instance in DirPackageContainer, and call this > DirPackageContainer>>#uniqueInstance. okay. _______________________________________________ help-smalltalk mailing list [hidden email] https://lists.gnu.org/mailman/listinfo/help-smalltalk |
In reply to this post by Paolo Bonzini-2
On Sun, Apr 14, 2013 at 03:43:16PM +0200, Paolo Bonzini wrote:
> Il 08/04/2013 11:30, Holger Hans Peter Freyther ha scritto: > > From: Holger Hans Peter Freyther <[hidden email]> > > > > VisualGST has accumulated some GTK support that makes creating > > widgets with GTK more easy. Begin to move these widgets from the > > VisualGST package to the new GTKTools. > > I'm not sure I like this very much... Moving the few classes of the new > package to a subdirectory is surely ok, though. They don't belong into VisualGST and they are useful to write GTK applications. E.g. I plan to add some event looper helper to GTKTools. This way multiple GTKTools users can make sure that there is exactly one event loop running. E.g. for a visual Object>>#inspect implementation. Do you know why you don't like this very much? E.g. is this something that you would think is obsolete if we move forward with gir? holger _______________________________________________ help-smalltalk mailing list [hidden email] https://lists.gnu.org/mailman/listinfo/help-smalltalk |
In reply to this post by Paolo Bonzini-2
(STInST.STClassLoaderObjects.ProxyNamespace
on: Smalltalk for: STInST.STClassLoader new) displayString triggered a DNU for classNameString and after fixing that it ended with an infinite recursion as the value is self. Avoid the recursion. 2013-03-31 Holger Hans Peter Freyther <[hidden email]> * tests/stcompiler.ok: Update the test result. * tests/stcompiler.st: Add a testcase for ProxyNamespace>>#printOn:. 2013-03-31 Holger Hans Peter Freyther <[hidden email]> * STLoaderObjs.st: Change ProxyNamespace>>#printOn to avoid recursion into self. --- ChangeLog | 5 +++++ packages/stinst/parser/ChangeLog | 5 +++++ packages/stinst/parser/STLoaderObjs.st | 18 ++++++++++++------ tests/stcompiler.ok | 5 +++++ tests/stcompiler.st | 7 +++++++ 5 files changed, 34 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8a3085d..277302a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-03-31 Holger Hans Peter Freyther <[hidden email]> + + * tests/stcompiler.ok: Update the test result. + * tests/stcompiler.st: Add a testcase for ProxyNamespace>>#printOn:. + 2013-03-24 Holger Hans Peter Freyther <[hidden email]> * libgst/files.c: Add DirPackage.st to the bootstrap. diff --git a/packages/stinst/parser/ChangeLog b/packages/stinst/parser/ChangeLog index 24bf131..0bc8d23 100644 --- a/packages/stinst/parser/ChangeLog +++ b/packages/stinst/parser/ChangeLog @@ -1,3 +1,8 @@ +2013-03-31 Holger Hans Peter Freyther <[hidden email]> + + * STLoaderObjs.st: Change ProxyNamespace>>#printOn to avoid + recursion into self. + 2013-02-23 Holger Hans Peter Freyther <[hidden email]> * RBParser.st: Fix RBParser>>#parsedNegatedNumber. diff --git a/packages/stinst/parser/STLoaderObjs.st b/packages/stinst/parser/STLoaderObjs.st index 195ceef..9bbb0ea 100644 --- a/packages/stinst/parser/STLoaderObjs.st +++ b/packages/stinst/parser/STLoaderObjs.st @@ -1507,13 +1507,19 @@ name printOn: aStream "Print a representation of the receiver on aStream" - aStream nextPutAll: self classNameString , '[', proxy name, '] (' ; nl. + aStream nextPutAll: self class storeString , '[', proxy name, '] (' ; nl. self myKeysAndValuesDo: - [ :key :value | aStream tab; - print: key; - nextPutAll: '->'; - print: value; - nl ]. + [ :key :value | + "The ProxyNamespace is linked to itself in + ProxyNamespace class>>#on:for: so we need to skip ourself + here or we will loop forever." + value == self ifFalse: [ + aStream tab; + print: key; + nextPutAll: '->'; + print: value; + nl ]. + ]. aStream nextPut: $) ! diff --git a/tests/stcompiler.ok b/tests/stcompiler.ok index 4222e50..a0cebf4 100644 --- a/tests/stcompiler.ok +++ b/tests/stcompiler.ok @@ -52,6 +52,11 @@ Execution begins... returned value is 'an' Execution begins... +STInST.STClassLoaderObjects.ProxyNamespace[Smalltalk] ( +) +returned value is ProxyNamespace new: 32 "<0>" + +Execution begins... true true returned value is true diff --git a/tests/stcompiler.st b/tests/stcompiler.st index 36b48a7..5605a6e 100644 --- a/tests/stcompiler.st +++ b/tests/stcompiler.st @@ -118,6 +118,13 @@ Eval [ ] Eval [ + | proxy | + proxy := STInST.STClassLoaderObjects.ProxyNamespace + on: Smalltalk for: STInST.STClassLoader new. + proxy printNl. +] + +Eval [ | classes bla | "Check class variable parsing.." -- 1.7.10.4 _______________________________________________ help-smalltalk mailing list [hidden email] https://lists.gnu.org/mailman/listinfo/help-smalltalk |
In reply to this post by Paolo Bonzini-2
On Sun, Apr 14, 2013 at 03:46:51PM +0200, Paolo Bonzini wrote:
> Please make this part of STInST. as part of parser or into another package? > > Also, please make scripts/Convert.st use it. yes. > > +* Make the Loader have a Converter subclass and use a Visitor instead > > + of the calls to emitTo:. I would like to move Convert.st to it once I have a visitor? But I can do it earlier to make sure we are porting convert. _______________________________________________ help-smalltalk mailing list [hidden email] https://lists.gnu.org/mailman/listinfo/help-smalltalk |
In reply to this post by Paolo Bonzini-2
On Sun, Apr 14, 2013 at 03:47:58PM +0200, Paolo Bonzini wrote:
> I think this should be a new tool, not part of the package. You can > create "gst-lint --monticello" and we can later add more lint modules. I would like to have the code in the package (and some more). So we could use them from VisualGST/Shampoo/*Tool. But having a gst-lint --monticello is on the list. I would somehow like to have it integrated with gst-package as well. _______________________________________________ help-smalltalk mailing list [hidden email] https://lists.gnu.org/mailman/listinfo/help-smalltalk |
Free forum by Nabble | Edit this page |