Comment in OB

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Comment in OB

Alexandre Bergel-2
Hi Colin,

One thing that I missed with OB was the displaying of comment when I  
select a class.

What do you think about a method:

OBClassDefinition>>comment
        ^ self selectedClass notNil
                ifTrue: [
                        String cr, String cr, String cr,'"',
                        self selectedClass theNonMetaClass comment,
                        String cr, '"']
                ifFalse: ['']
       
and

OBClassDefinition>>text
        ^ template, self comment

It is a hack, but this is terribly useful...

I feel that it is currently not possible in OB to have a second pane  
when I select a class. The model needs to be extended I guess. This  
might be a very interesting feature. We might want to have a method  
OBMetaNode>>wantsSecondPane

Cheers,
Alexandre

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.cs.tcd.ie/Alexandre.Bergel
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




Reply | Threaded
Open this post in threaded view
|

Re: Comment in OB

Lukas Renggli
Hi Colin,

> I feel that it is currently not possible in OB to have a second pane
> when I select a class. The model needs to be extended I guess. This
> might be a very interesting feature. We might want to have a method
> OBMetaNode>>wantsSecondPane

I would also like to be able to display different views, depending on
the current OBDefinition. Right now this is a hack if I want to
display something else than a TextMorph.

Btw, how are the announcements and the multi-selection going?

Cheers,
Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch

Reply | Threaded
Open this post in threaded view
|

Re: Comment in OB

Alexandre Bergel-2
Another thing I was missing with OB, is to have the --all-- method  
category automatically selected when I select a class. I attached  
a .cs that add this.

Here are the changes I did:
        - Instead of sending #nodeChanged, #nodeChanged: theSelectedNode is  
sent
        - OBPanel>>nodeChanged: aNode  ^ self nodeChanged
        - OBBrowser>>nodeChanged: aNode ^ self nodeChanged
        - OBSystemBrowser>>nodeChanged: aNode
        | methodCategoryColumn |
        super nodeChanged: aNode.
       
        (aNode isKindOf: OBClassNode)
                ifTrue: [
                        methodCategoryColumn :=
                                (panels select: [:p| p isKindOf: OBColumnPanel]) first columns  
third.
                        (methodCategoryColumn getChildren first) ifNotNil: [
                                methodCategoryColumn select: (methodCategoryColumn getChildren  
first).]]

I am not sure about this last method. Looks like a hack now... But it  
works fine.

Cheers,
Alexandre



Am May 29, 2006 um 8:09 PM schrieb Lukas Renggli:

> Hi Colin,
>
>> I feel that it is currently not possible in OB to have a second pane
>> when I select a class. The model needs to be extended I guess. This
>> might be a very interesting feature. We might want to have a method
>> OBMetaNode>>wantsSecondPane
>
> I would also like to be able to display different views, depending on
> the current OBDefinition. Right now this is a hack if I want to
> display something else than a TextMorph.
>
> Btw, how are the announcements and the multi-selection going?
>
> Cheers,
> Lukas
>
> --
> Lukas Renggli
> http://www.lukas-renggli.ch
>
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.cs.tcd.ie/Alexandre.Bergel
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.






OBAllMethods.1.cs (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Comment in OB

Alexandre Bergel-2
Oups...
I just noticed that OBColumn>>#nodeChanged: exist. and #nodeChanged:  
is also used as event. There is therefore a little mess with the  
events. This new version does not have this problem. I simply used  
#nodeSelected: instead of #nodeChanged:

Cheers,
Alexandre



Am May 30, 2006 um 10:58 AM schrieb Alexandre Bergel:

> Another thing I was missing with OB, is to have the --all-- method  
> category automatically selected when I select a class. I attached  
> a .cs that add this.
>
> Here are the changes I did:
> - Instead of sending #nodeChanged, #nodeChanged: theSelectedNode  
> is sent
> - OBPanel>>nodeChanged: aNode  ^ self nodeChanged
> - OBBrowser>>nodeChanged: aNode ^ self nodeChanged
> - OBSystemBrowser>>nodeChanged: aNode
> | methodCategoryColumn |
> super nodeChanged: aNode.
>
> (aNode isKindOf: OBClassNode)
> ifTrue: [
> methodCategoryColumn :=
> (panels select: [:p| p isKindOf: OBColumnPanel]) first columns  
> third.
> (methodCategoryColumn getChildren first) ifNotNil: [
> methodCategoryColumn select: (methodCategoryColumn getChildren  
> first).]]
>
> I am not sure about this last method. Looks like a hack now... But  
> it works fine.
>
> Cheers,
> Alexandre
> <OBAllMethods.1.cs>
>
>
> Am May 29, 2006 um 8:09 PM schrieb Lukas Renggli:
>
>> Hi Colin,
>>
>>> I feel that it is currently not possible in OB to have a second pane
>>> when I select a class. The model needs to be extended I guess. This
>>> might be a very interesting feature. We might want to have a method
>>> OBMetaNode>>wantsSecondPane
>>
>> I would also like to be able to display different views, depending on
>> the current OBDefinition. Right now this is a hack if I want to
>> display something else than a TextMorph.
>>
>> Btw, how are the announcements and the multi-selection going?
>>
>> Cheers,
>> Lukas
>>
>> --
>> Lukas Renggli
>> http://www.lukas-renggli.ch
>>
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.cs.tcd.ie/Alexandre.Bergel
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.cs.tcd.ie/Alexandre.Bergel
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.






OBAllMethods.2.cs (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Comment in OB

Alexandre Bergel-2
Ok. I think I got it now. Sorry to send .cs without deeply using them.

However, clicking on --all-- method category shows the definition of  
the class, and not the template method. But I still find this  
changeset useful...

Cheers,
Alexandre


Am May 30, 2006 um 11:23 AM schrieb Alexandre Bergel:

> Oups...
> I just noticed that OBColumn>>#nodeChanged: exist. and  
> #nodeChanged: is also used as event. There is therefore a little  
> mess with the events. This new version does not have this problem.  
> I simply used #nodeSelected: instead of #nodeChanged:
>
> Cheers,
> Alexandre
>
> <OBAllMethods.2.cs>
>
> Am May 30, 2006 um 10:58 AM schrieb Alexandre Bergel:
>
>> Another thing I was missing with OB, is to have the --all-- method  
>> category automatically selected when I select a class. I attached  
>> a .cs that add this.
>>
>> Here are the changes I did:
>> - Instead of sending #nodeChanged, #nodeChanged: theSelectedNode  
>> is sent
>> - OBPanel>>nodeChanged: aNode  ^ self nodeChanged
>> - OBBrowser>>nodeChanged: aNode ^ self nodeChanged
>> - OBSystemBrowser>>nodeChanged: aNode
>> | methodCategoryColumn |
>> super nodeChanged: aNode.
>>
>> (aNode isKindOf: OBClassNode)
>> ifTrue: [
>> methodCategoryColumn :=
>> (panels select: [:p| p isKindOf: OBColumnPanel]) first columns  
>> third.
>> (methodCategoryColumn getChildren first) ifNotNil: [
>> methodCategoryColumn select: (methodCategoryColumn getChildren  
>> first).]]
>>
>> I am not sure about this last method. Looks like a hack now... But  
>> it works fine.
>>
>> Cheers,
>> Alexandre
>> <OBAllMethods.1.cs>
>>
>>
>> Am May 29, 2006 um 8:09 PM schrieb Lukas Renggli:
>>
>>> Hi Colin,
>>>
>>>> I feel that it is currently not possible in OB to have a second  
>>>> pane
>>>> when I select a class. The model needs to be extended I guess. This
>>>> might be a very interesting feature. We might want to have a method
>>>> OBMetaNode>>wantsSecondPane
>>>
>>> I would also like to be able to display different views,  
>>> depending on
>>> the current OBDefinition. Right now this is a hack if I want to
>>> display something else than a TextMorph.
>>>
>>> Btw, how are the announcements and the multi-selection going?
>>>
>>> Cheers,
>>> Lukas
>>>
>>> --
>>> Lukas Renggli
>>> http://www.lukas-renggli.ch
>>>
>>
>> --
>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> Alexandre Bergel  http://www.cs.tcd.ie/Alexandre.Bergel
>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>
>>
>>
>>
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.cs.tcd.ie/Alexandre.Bergel
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.cs.tcd.ie/Alexandre.Bergel
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.






OBAllMethods.5.cs (2K) Download Attachment