Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 399779

Summary: refactor FileExplorer root generation, drag drop, and tree creation for easier consumption by projects page
Product: [ECD] Orion Reporter: Susan McCourt <susan>
Component: ClientAssignee: Susan McCourt <susan>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: antonm
Version: 1.0   
Target Milestone: 2.0 RC1   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Susan McCourt CLA 2013-02-02 14:21:05 EST
In working with Anton on the projects page, we developed a ProjectExplorer that is basically a file explorer, except that it loads drives and folders instead of assuming it's an explorer on a single workspace.

To get it working, I had to copy parts of "loadResourceList" from FileExplorer.  That function is all about retargeting a navigator page for a different root in the file system and creating a tree, but in the case of the project page the requirement is different.  We want to be able to supply a model root and get a tree.  loadResourceList assumes the root can be divined from some single path.  In our case we just want to create the root ourselves (some filtered set of drives plus the Orion workspace).

The problem is that loadResourceList mixes the root creation stuff with other initialization like creating the tree, drag and drop, etc...

We should instead have "loadResourceList" call other functions that can be overridden, such as

createModelRoot
createTree
etc.

Then ProjectExplorer could just override createModelRoot rather than copy parts of that method.

This is fairly simple refactoring but I wanted to do it as a separate step so as not to totally clutter up the changes I was doing for Anton.