| 
| Can one use Show in navigation when this requires a server query? [message #273011] | Wed, 29 September 2004 18:52 |  | 
| Eclipse User  |  |  |  |  | A Music View displays songs based on information provided by a song server. The view supports navigation to it via
 IShowInTarget.show(context) based on query result IFoundSong objects.
 Each IFoundSong represent a single song found by a query. (The Music
 plugins also support Search dialogs which take advantage of this.)
 
 Now a different view (created by entirely unrelated people) called
 MusicReviewView features reviews of songs . The songs reviewed are
 identified by textual ID information such as Artist, Title and Song.
 They also want to support navigation from the songs in the Music Review
 view to songs in the MusicView via the “Navigate|Show In” menu.
 
 To do this the MusicReviewView supports the IShowInSource interface
 which produces the context that is than used to determine whether the
 Music View is a potential target view and should appear in the menu. The
 same context object is passed into the MusicView.show(context) method
 when the user selects the entry.
 
 Executing the queries seems fine when the user selects the Show in/Music
 View, but it is far too expensive in order to decide whether the
 according menu should appear in the first place.
 
 What seems missing is:
 1. A means for a lightweight decision whether to show the menu. In the
 example this would be based on the source views inspection of whether
 there are songs referenced in its current selection. The song references
 found would presumably packaged into a StructuredSelection.
 2. After the navigate menu action is invoked the song references
 selection is turned into a selection of ISong objects based on a query
 to the song server before it is passed to MusicView.show() command.
 
 Here are my questions:
 1. Is this analysis correct?
 2. Should there be an eclipse mechanism to support this?
 3. Should instead views like the MusicView also support a context that
 is based on a selection of query objects which it then executes during
 the show call?
 4. Finally should Show In be used at all, given that the query can take
 some time? If not is there a suggested paradigm?
 
 Thanks....
 - Henrich
 |  |  |  | 
Powered by 
FUDForum. Page generated in 0.25927 seconds