[vwnc] Status Bar in RB -- how to show parcel information

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

[vwnc] Status Bar in RB -- how to show parcel information

Mark Pirogovsky-3
In the previous version of VW we had three panes status bar which did
display Method, Parcel, and Package information when method was selected.

In the  VW7.6 we have on two status bar panes  Method and Package.

After browsing around a bit,  I could not find a way to get  the Parcel
information pane.  so I did implement a method like  the following to
show me a parcel information  in the Package pane. I do understand
highly intrusive nature of my change, so  I wonder is there any better
way do do the same


SelectionPackageStatus >> statusTextForSelector: aSelector andClass: aClass
    | text codeComponents parcelComponents parcelLabel |
    text := (#PackageCSpace << #browser >> 'Package: ') asText allBold.
    codeComponents := codeModel storeRegistry
        allContainingPackagesForSelector: aSelector class: aClass.

    parcelComponents := Parcel parcelsDefiningSelector: aSelector
inClass: aClass.
    parcelLabel :=  (parcelComponents isEmpty
                        ifTrue: [String new]
                        ifFalse: [  parcelComponents asArray first name
= codeComponents asArray first name ifTrue:[String new ]  ifFalse:['
Parcel: ' asText allBold ,  parcelComponents asArray first name asText]] ).
    text := text
        ,
            (codeComponents isEmpty
                ifTrue: [#NotPackaged << #browser >> 'Not packaged']
                ifFalse: [codeComponents asArray first name]).
    ^[text+ parcelLabel] on:Error do:[:ex | ex return: text, parcelLabel]

    "@__markp    07/23/2009 10:09:36 am"


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Status Bar in RB -- how to show parcel information

Karsten Kusche
Hi Mark,

you could subclass SimpleTextSelectionStatus for your needs and add a
method to CodeModel class with a pragma like: <status:15> returning your
new subclass.

Kind Regards
Karsten



Mark Pirogovsky wrote:

> In the previous version of VW we had three panes status bar which did
> display Method, Parcel, and Package information when method was selected.
>
> In the  VW7.6 we have on two status bar panes  Method and Package.
>
> After browsing around a bit,  I could not find a way to get  the Parcel
> information pane.  so I did implement a method like  the following to
> show me a parcel information  in the Package pane. I do understand
> highly intrusive nature of my change, so  I wonder is there any better
> way do do the same
>
>
> SelectionPackageStatus>>  statusTextForSelector: aSelector andClass: aClass
>      | text codeComponents parcelComponents parcelLabel |
>      text := (#PackageCSpace<<  #browser>>  'Package: ') asText allBold.
>      codeComponents := codeModel storeRegistry
>          allContainingPackagesForSelector: aSelector class: aClass.
>
>      parcelComponents := Parcel parcelsDefiningSelector: aSelector
> inClass: aClass.
>      parcelLabel :=  (parcelComponents isEmpty
>                          ifTrue: [String new]
>                          ifFalse: [  parcelComponents asArray first name
> = codeComponents asArray first name ifTrue:[String new ]  ifFalse:['
> Parcel: ' asText allBold ,  parcelComponents asArray first name asText]] ).
>      text := text
>          ,
>              (codeComponents isEmpty
>                  ifTrue: [#NotPackaged<<  #browser>>  'Not packaged']
>                  ifFalse: [codeComponents asArray first name]).
>      ^[text+ parcelLabel] on:Error do:[:ex | ex return: text, parcelLabel]
>
>      "@__markp    07/23/2009 10:09:36 am"
>
>
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>
>
>    

--
Karsten Kusche - Dipl.Inf. - [hidden email]
Tel: +49 3496 21 43 29
Georg Heeg eK - Köthen
Handelsregister: Amtsgericht Dortmund A 12812
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc