How to browse namespaces?

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

How to browse namespaces?

askoh
Administrator
Is there a namespace browser to help navigate through the namespaces?
Thanks,
Aik-Siong Koh
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] How to browse namespaces?

Niall Ross
askoh wrote:

>Is there a namespace browser to help navigate through the namespaces?
>Thanks,
>Aik-Siong Koh
>  
>
Dear Aik-Siong,
    I attach a zipped .st file.  File it into a VisualWorks 7.7 image
(prudent not to have any RBs open when you do so), then open an RB and
see tab changes near the top left-hand side.

1) New 'Namespace' tab, shown when a namespace or namespaces is
selected, or when no object is selected.  In the leftmost pane, it shows
the namespace hierarchy based on the selection, or on Root if nothing is
selected.  In the next pane, it shows the packages in which that
namespace is defined or has shared variables.  In the third and forth
panes, you see exactly the same as if you had selected the package and
namespace using the 'Package' tab.

(Your opinion welcome:  is this tab intuitive, useful?  any deficiencies?)

2) In this particular version of the code, I also experiment with
renaming the 'Hierarchy' tab to the 'Class' tab.  Since arguably all 3
tabs show hierarchies, the idea is to name each tab by the type of
object displayed in the left-most pane.

(Your view on this change welcome, pro or anti.)

Notes
====
If you save the changed Browser-BaseUI as a package or parcel and reload
it in other images instead of reusing the file-in, you will need to
execute the last line of the file-in
    TabNavigatorPart resetTabDescriptions
in a workspace after loading.

If you use the RBHierarchicalClassesExtension utility (IIUC very few
people do) then it will need a change to work with this.  (If you use
it, email and I'll send the change;  if you don't, just ignore this.)

          Yours faithfully
             Niall Ross

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

Browser-BaseUI-NSdiffsFrom77-34.zip (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] How to browse namespaces?

Dave Stevenson-3
Niall,
 
Do you have a version for 7.6? (the thread is on vwnc, after all, not vw-dev)
 
Dave Stevenson
[hidden email]



From: Niall Ross <[hidden email]>
To: askoh <[hidden email]>
Cc: [hidden email]
Sent: Mon, January 18, 2010 11:20:01 AM
Subject: Re: [vwnc] How to browse namespaces?

askoh wrote:

> Is there a namespace browser to help navigate through the namespaces?
> Thanks,
> Aik-Siong Koh

Dear Aik-Siong,
  I attach a zipped .st file.  File it into a VisualWorks 7.7 image (prudent not to have any RBs open when you do so), then open an RB and see tab changes near the top left-hand side.

1) New 'Namespace' tab, shown when a namespace or namespaces is selected, or when no object is selected.  In the leftmost pane, it shows the namespace hierarchy based on the selection, or on Root if nothing is selected.  In the next pane, it shows the packages in which that namespace is defined or has shared variables.  In the third and forth panes, you see exactly the same as if you had selected the package and namespace using the 'Package' tab.

(Your opinion welcome:  is this tab intuitive, useful?  any deficiencies?)

2) In this particular version of the code, I also experiment with renaming the 'Hierarchy' tab to the 'Class' tab.  Since arguably all 3 tabs show hierarchies, the idea is to name each tab by the type of object displayed in the left-most pane.

(Your view on this change welcome, pro or anti.)

Notes
====
If you save the changed Browser-BaseUI as a package or parcel and reload it in other images instead of reusing the file-in, you will need to execute the last line of the file-in
  TabNavigatorPart resetTabDescriptions
in a workspace after loading.

If you use the RBHierarchicalClassesExtension utility (IIUC very few people do) then it will need a change to work with this.  (If you use it, email and I'll send the change;  if you don't, just ignore this.)

        Yours faithfully
            Niall Ross

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

Re: [vwnc] How to browse namespaces?

Dave Stevenson-3
In reply to this post by askoh
Ignore this part, having an off day...:
> the thread is on vwnc, after all, not vw-dev
 
Dave Stevenson
[hidden email]



From: Dave Stevenson <[hidden email]>
To: Niall Ross <[hidden email]>; askoh <[hidden email]>
Cc: [hidden email]
Sent: Mon, January 18, 2010 12:00:25 PM
Subject: Re: [vwnc] How to browse namespaces?

Niall,
 
Do you have a version for 7.6? (the thread is on vwnc, after all, not vw-dev)
 
Dave Stevenson
[hidden email]



From: Niall Ross <[hidden email]>
To: askoh <[hidden email]>
Cc: [hidden email]
Sent: Mon, January 18, 2010 11:20:01 AM
Subject: Re: [vwnc] How to browse namespaces?

askoh wrote:

> Is there a namespace browser to help navigate through the namespaces?
> Thanks,
> Aik-Siong Koh

Dear Aik-Siong,
  I attach a zipped .st file.  File it into a VisualWorks 7.7 image (prudent not to have any RBs open when you do so), then open an RB and see tab changes near the top left-hand side.

1) New 'Namespace' tab, shown when a namespace or namespaces is selected, or when no object is selected.  In the leftmost pane, it shows the namespace hierarchy based on the selection, or on Root if nothing is selected.  In the next pane, it shows the packages in which that namespace is defined or has shared variables.  In the third and forth panes, you see exactly the same as if you had selected the package and namespace using the 'Package' tab.

(Your opinion welcome:  is this tab intuitive, useful?  any deficiencies?)

2) In this particular version of the code, I also experiment with renaming the 'Hierarchy' tab to the 'Class' tab.  Since arguably all 3 tabs show hierarchies, the idea is to name each tab by the type of object displayed in the left-most pane.

(Your view on this change welcome, pro or anti.)

Notes
====
If you save the changed Browser-BaseUI as a package or parcel and reload it in other images instead of reusing the file-in, you will need to execute the last line of the file-in
  TabNavigatorPart resetTabDescriptions
in a workspace after loading.

If you use the RBHierarchicalClassesExtension utility (IIUC very few people do) then it will need a change to work with this.  (If you use it, email and I'll send the change;  if you don't, just ignore this.)

        Yours faithfully
            Niall Ross

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

Re: [vwnc] How to browse namespaces?

Niall Ross
Dear Dave,

Dave Stevenson wrote:

> Ignore this part, having an off day...:
> > the thread is on vwnc, after all, not vw-dev

Just as I'll sometimes forget to write 2010, not 2009, for a few days
yet, so I quite understand that 7.7's release is still fairly recent.  
But it is indeed out now.

>  
> Do you have a version for 7.6?


It doesn't work in 7.6 out of the box.  Backporting would probably not
be difficult but is not on my to-do list (there are some custom
refactoring things I still have to port forward, plus of course my other
tasks :-) ).

          Yours faithfully
             Niall Ross

>
>
> ------------------------------------------------------------------------
> *From:* Niall Ross <[hidden email]>
> *To:* askoh <[hidden email]>
> *Cc:* [hidden email]
> *Sent:* Mon, January 18, 2010 11:20:01 AM
> *Subject:* Re: [vwnc] How to browse namespaces?
>
> askoh wrote:
>
> > Is there a namespace browser to help navigate through the namespaces?
> > Thanks,
> > Aik-Siong Koh
> >
> Dear Aik-Siong,
>   I attach a zipped .st file.  File it into a VisualWorks 7.7 image
> (prudent not to have any RBs open when you do so), then open an RB and
> see tab changes near the top left-hand side.
>
> 1) New 'Namespace' tab, shown when a namespace or namespaces is
> selected, or when no object is selected.  In the leftmost pane, it
> shows the namespace hierarchy based on the selection, or on Root if
> nothing is selected.  In the next pane, it shows the packages in which
> that namespace is defined or has shared variables.  In the third and
> forth panes, you see exactly the same as if you had selected the
> package and namespace using the 'Package' tab.
>
> (Your opinion welcome:  is this tab intuitive, useful?  any deficiencies?)
>
> 2) In this particular version of the code, I also experiment with
> renaming the 'Hierarchy' tab to the 'Class' tab.  Since arguably all 3
> tabs show hierarchies, the idea is to name each tab by the type of
> object displayed in the left-most pane.
>
> (Your view on this change welcome, pro or anti.)
>
> Notes
> ====
> If you save the changed Browser-BaseUI as a package or parcel and
> reload it in other images instead of reusing the file-in, you will
> need to execute the last line of the file-in
>   TabNavigatorPart resetTabDescriptions
> in a workspace after loading.
>
> If you use the RBHierarchicalClassesExtension utility (IIUC very few
> people do) then it will need a change to work with this.  (If you use
> it, email and I'll send the change;  if you don't, just ignore this.)
>
>         Yours faithfully
>             Niall Ross
>
>------------------------------------------------------------------------
>
>_______________________________________________
>vwnc mailing list
>[hidden email]
>http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>  
>


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

Re: How to browse namespaces?

Reinout Heeck-2
In reply to this post by Niall Ross
Hi Niall,

I played a bit with this in 7.6.

Some random snippets of feedback:



Niall Ross wrote:
> New 'Namespace' tab, shown when a namespace or namespaces is selected,
> or when no object is selected.
It does not make sense for this  tab to sometimes disappear: if I have a
class selected I would like this tab to bring me to the environment of
the class (instead of being absent).


>   In the leftmost pane, it shows the namespace hierarchy based on the
> selection, or on Root if nothing is selected.  In the next pane, it
> shows the packages in which that namespace is defined or has shared
> variables.  In the third and forth panes, you see exactly the same as
> if you had selected the package and namespace using the 'Package' tab.
>
> (Your opinion welcome:  is this tab intuitive, useful?  any
> deficiencies?)

My main intended use case for such a tab was to quickly see if all of
the classes in a package are sitting in the correct namespace, and to be
able to quickly correct outliers (drag and drop). Since your code does
not show classes this is not (yet) possible.


However your code does hint to another nice tool: browsing 'global state'.
One enhancement I tried that worked out nicely was when I appended the
number of contained shareds to the names shown in the namespace tree.
This yields nice-and-quick drilldown through the shareds declared in
namespaces. I think it would be useful to explore this further (show
shareds-of-classes and perhaps class hierarchies of those classes that
introduce class inst vars).
Even in its current state showing only shareds-of-namespaces I easily
found a dozen globals in our code that I could trivially refactor away :-)


Still looking for a tool that at a glance shows me whether my classes
are sitting in the correct namespace(s).

>
> 2) In this particular version of the code, I also experiment with
> renaming the 'Hierarchy' tab to the 'Class' tab.  Since arguably all 3
> tabs show hierarchies, the idea is to name each tab by the type of
> object displayed in the left-most pane.
>
> (Your view on this change welcome, pro or anti.)
I dislike it, but I know it is not trivial to do this 'right' given the
limited space in a tab.

Given their use I would say these tabs present different perspectives on
the entire system, and the tabs should name these perspectives.
In both the old and new naming scheme it seems the names describe a
facet of the 'how' (in a sense: which stylesheet is used) instead of the
'what' (which perspective).
I've tried to come up with better names several times, but haven't come
up with anything satisfactory so far....
One thing I haven't tried yet is to remove the names from these tabs
entirely (spatial browsing).  Perhaps replacing these tab names with
just a single icon is a sweet spot?


>
>
> If you use the RBHierarchicalClassesExtension utility (IIUC very few
> people do) then it will need a change to work with this.  (If you use
> it, email and I'll send the change;  if you don't, just ignore this.)
Yes please...


Reinout
-------

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

Re: [vwnc] How to browse namespaces?

askoh
Administrator
In reply to this post by Niall Ross
Niall:

Thanks for the changeset Browser-BaseUI-NSdiffsFrom77-34.st

I tried to file it in VW7.9.1 and got a DNU. Can you post the latest version? Is it in public Store?

Happy New Year,
Aik-Siong Koh
Reply | Threaded
Open this post in threaded view
|

Re: How to browse namespaces?

Niall Ross
Dear Koh,
    this behaviour is standard in 7.9.1 (has been since 7.7.1).  If you
have a namespace selected in the second pane, or nothing selected, you
should see a 'Namespace' tab in the RB.

Do you see any difference between what the file-in did for 7.7 and what
the tab does in 7.9.1?

                   Yours faithfully
                         Niall Ross

>Niall:
>
>Thanks for the changeset Browser-BaseUI-NSdiffsFrom77-34.st
>
>I tried to file it in VW7.9.1 and got a DNU. Can you post the latest
>version? Is it in public Store?
>
>Happy New Year,
>Aik-Siong Koh
>
>
>
>--
>View this message in context: http://forum.world.st/How-to-browse-namespaces-tp1413131p4662132.html
>Sent from the VisualWorks mailing list archive at Nabble.com.
>_______________________________________________
>vwnc mailing list
>[hidden email]
>http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>
>
>  
>


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

Re: How to browse namespaces?

askoh
Administrator
This is my first time using your Browser-BaseUI-NSdiffsFrom77-34.st.
I start a virgin VW7.9.1 image.
Filein  Browser-BaseUI-NSdiffsFrom77-34.st
Message not understood: #resetTabDescriptions
What is the fix?

Thanks,
Aik-Siong Koh
Reply | Threaded
Open this post in threaded view
|

Re: How to browse namespaces?

Niall Ross
Dear Koh,
    you do not need to file in

Browser-BaseUI-NSdiffsFrom77-34.st

It is only a backport for 7.7 images.  The extra behaviour was
integrated into 7.7.1 and is in all later images.

                   Yours faithfully
                         Niall Ross

>This is my first time using your Browser-BaseUI-NSdiffsFrom77-34.st.
>I start a virgin VW7.9.1 image.
>Filein  Browser-BaseUI-NSdiffsFrom77-34.st
>Message not understood: #resetTabDescriptions
>What is the fix?
>
>Thanks,
>Aik-Siong Koh
>
>
>
>--
>View this message in context: http://forum.world.st/How-to-browse-namespaces-tp1413131p4662205.html
>Sent from the VisualWorks mailing list archive at Nabble.com.
>_______________________________________________
>vwnc mailing list
>[hidden email]
>http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>
>
>  
>


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

Re: How to browse namespaces?

askoh
Administrator
Ok.
I knew I had seen the Namespace tab before. But because it disappears most of the time I could not find it again. I suggest making the Namespace tab constantly visible just like Package and Class tabs. I always find disappearing menu items, buttons or tabs most confusing. Better to just gray them out if they are not applicable. That gives explicit information to users.

Thanks,
Aik-Siong