Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 389529 - explorers - life cycle and option specification is confusing
Summary: explorers - life cycle and option specification is confusing
Status: RESOLVED WONTFIX
Alias: None
Product: Orion
Classification: ECD
Component: Client (show other bugs)
Version: 0.5   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 379567 403483
  Show dependency tree
 
Reported: 2012-09-13 11:40 EDT by Susan McCourt CLA
Modified: 2015-05-05 14:43 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Susan McCourt CLA 2012-09-13 11:40:03 EDT
We have a number of different ways to configurer renderers, and I think there's room for a lot more consistency.

One example is the way styles are specified for various elements.
We can specify a class for the entire table in the renderer.
But some classes are specified in methods that are overridden.
And then we have getters like "getPrimaryColumnStyle"...there's really on reason that this shouldn't just be an option.

Then we need to document the options appropriately and decide if they are initialized in each "extension" or in one place.
Comment 1 Susan McCourt CLA 2013-01-18 15:28:56 EST
Another problem is the lifecycle of renderers and explorers.
In general you create a renderer and assign it to an explorer.
BUT...

in SelectionRenderer, the keyboard cursor code assumes that the renderer knows its explorer.  So you end up having to do something like

myRenderer = new myRenderer(....);
myExplorer = new Explorer(..., myRenderer);
myRenderer.explorer = myExplorer; //HACK!

worse, the file explorer has a circular reference where the renderer needs to know the explorer in its constructor, so we have to pass a renderer factory (!) to the explorer so that it can construct the renderer with the right explorer instance.
Comment 2 Susan McCourt CLA 2013-03-15 12:09:44 EDT
We have many, many options in explorers that simply get passed to the renderers.  Worse, we have renderer extensions that have to know to pass on options from explorer to renderer that the underlying classes care about.

We should define a way by which each level of renderer/explorer can process the options it cares about.  It's very brittle/difficult to add behavior to explorers or to reuse an explorer in a slightly different context.
Comment 3 John Arthorne CLA 2015-05-05 14:43:44 EDT
Closing as part of a mass clean up of inactive bugs. Please reopen if this problem still occurs or is relevant to you. For more details see:

https://dev.eclipse.org/mhonarc/lists/orion-dev/msg03444.html