Squeak services : proof of concept with the RB

Romain Robbes rrobbes at info.unicaen.fr
Wed Mar 17 18:00:03 UTC 2004


Here is a piece of code demonstrating the stuff I've come up.

As a proof of concept, I converted the refactorings as services, and
added them in the basic Browser  (bypassing the RB).

So : install the RB (Refactory-md.26.mcz) in a latest 3.7 image (5816)
install Services.mcz
evaluate :

Refactoring registerServices

to register all refactorings as services

open the browser (with alt-b on the world, else you'll got
a real RB), or a hierarchy browser / message list browser

You should see the refactoring items in various menus :
class list,
message list,
and code pane

Since the menus are inherited from the browser, you shall see
them in the hierarchy/protocol  browsers.

And you shall see the Breakpoint support menu item which I have never 
used,
since it doesn't appear in the RB, that I may use now ;-) .

The code is located in the Services-Base
and Services-RB packages, If you want to look at it .
Note that as I am in a hurry, I didn't cleaned it thoroughly,
so there are unused stuff in it ... look at the classes Service,
ServiceCategory, Requestor and subclasses, and the Refactorings
in priority.

There are a few ill-defined services for refactorings, so
some of them might act weirdly (I didn't tested them all).

I'll post a cleaned-up version soon.


> It's basically a more sophisticated version of the model that 
> OmniBrowser is using now, so it would be easy to add service support 
> to OB, which I'll do if you go ahead with this. (And even if you 
> don't, I'll probably refactor OB to used this more elegant model.)

that was one of the goals ... you can try it if you want (wait for the 
clean version though)


>
> One thing you haven't described in detail is how service types are 
> handled. I'd imagine that service providers should implement 
> #servicesOfType: rather than just #service. No?
>

yes, that's at the moments some hack around doesNotUnderstand and 
getting the name
of variables in blocks (getting names of the arguments of anonymous 
functions ... strange :-) )

By the way I join a few fixes to the rb, making it a tad more usable
(Markus will incorporate them soon)

Cheers,
	Romain
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Services-rr.16.mcz
Type: application/text
Size: 18914 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20040317/e84dc8b0/Services-rr.16.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: RBFixes-rr.12.cs
Type: application/text
Size: 7269 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20040317/e84dc8b0/RBFixes-rr.12.bin
-------------- next part --------------





> Colin
>
>
>


More information about the Squeak-dev mailing list