RCP design query [message #449035] |
Tue, 09 May 2006 01:07  |
Eclipse User |
|
|
|
I have a couple of questions about general design for RCP apps. Imagine I am writing a CRM-style application where a typical usage pattern would be to select a Customer from a list/table, and then display their details in an Editor.
1. There are fairly logical divisions for the customer data, so it would make sense to use tabs (inside a TabFolder) to split the data up. However, I can achieve a similar effect by using a MultiPageEditorPart. Is there an advantage of using one over the other? If it helps sway the decision either way, I would probably need to be able to add additional tabs progammatically (ie. Customer X might have 3 tabs, Customer Y might have 5 tabs).
2. In the Eclipse RCP book, I noticed that most of the Actions are SelectionListeners, and apart from acting on the SelectionChanged event, they also store the "currently selected" object. They appear to do this so that when the run() method is invoked, it knows which object it should run on... however, I was wondering why they didn't just have a single attribute on the perspective (or appication or plugin) which always contains the currently selected object, and other views/actions/etc could ask for the selected object. I realise that both ways will work, but I was wondering if there was a generally accepted practice of doing it one way or another.
Many thanks.
Craig
|
|
|
Re: RCP design query [message #449045 is a reply to message #449035] |
Tue, 09 May 2006 09:41  |
Eclipse User |
|
|
|
I'm wondering if the notion of Editor is a good pattern
for general RCP applications ?
Didier
> 1. There are fairly logical divisions for the customer data, so it would make sense to use tabs (inside a TabFolder) to split the data up. However, I can achieve a similar effect by using a MultiPageEditorPart. Is there an advantage of using one over the other? If it helps sway the decision either way, I would probably need to be able to add additional tabs progammatically (ie. Customer X might have 3 tabs, Customer Y might have 5 tabs).
>
|
|
|
Powered by
FUDForum. Page generated in 0.03352 seconds