On Dec 9, 2015, at 2:55 PM, Nicolai Hess <nicolaihess@gmail.com> wrote:
2015-12-09 14:45 GMT+01:00 Skip Lentz <skip.lentz@inria.fr <mailto:skip.lentz@inria.fr>>: Browse class references to the âNautilusClassSelectedâ Announcement, I see a mention of a method called #showScriptCode: when it subscribes to that announcement, perhaps thatâs the one you need? This is in contrast with #showSourceCode:, which is used in the subscription of the NautilusProtocolSelected and NautilusMethodSelected announcements. I think the difference lies between those methods.
the distinction between method and class definition highlighting is done by AbstractNautilusUI>>setStylerClass: if it is nil, it treats all code as "smalltalk expressions" if it is not-nil it treats all code as "method definitionsâ.
Ah ok.
But beware, there are multiple parts involved if you use nautilus code pane. - parser for syntax highlighting - the styler itself - completion ( you may or may not want to have NEC to popup the completion menu) - class / method selection dependent menu entries (Suggestions for example) - the acceptor (on accept, a class definition is execute, a method definition is compiled)
Yes but if he just adds his own announcement such as âNautilusIniModuleSelectedâ and subscribes to it in addition to "NautilusClassSelected" it should be fine no?
what are ini-modules?
Link: http://smalltalkhub.com/#!/~MarcoNaddeo/IniModules <http://smalltalkhub.com/#!/~MarcoNaddeo/IniModules>. But probably Marco and/or Damien can answer that better.
On Dec 9, 2015, at 2:16 PM, Damien Cassou <damien.cassou@inria.fr <mailto:damien.cassou@inria.fr>> wrote:
Hi,
in short: in which method is Nautilus adapting source-code highlighting based on the selection (class or method)?
slightly longer: With Marco Naddeo we wanted to add ini-modules to Nautilus. Because an ini-module definition is a Smalltalk expression (just like a class definition), we want Nautilus to do source-code highlighting of an ini-module the same way it does for class definitions. How is Nautilus changing the source-code highlighting process depending on the selection (class or method)?
Thank you
-- Damien Cassou http://damiencassou.seasidehosting.st <http://damiencassou.seasidehosting.st/>
"Success is the ability to go from one failure to another without losing enthusiasm." --Winston Churchill