Bug 303584 - Link JavaLite explorer with editor
Summary: Link JavaLite explorer with editor
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: IDE4EDU (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-23 00:37 EST by Wayne Beaton CLA
Modified: 2014-01-09 15:38 EST (History)
0 users

See Also:


Attachments
Patch to link editor and package explorer (32.77 KB, patch)
2010-04-01 19:26 EDT, Cory Matheson CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Wayne Beaton CLA 2010-02-23 00:37:03 EST
This is a handy feature in Eclipse. As you switch editors, it highlights the corresponding resource in the explorer. We should probably do something like this ourselves. I can see a case where the user has made several different classes named "MyClass"  in different projects; it'd be impossible to know which one is represented by the current editor. I'm inclined to think of this as an "always on" feature and not include an icon in the view's tool bar (i.e. the left-right arrow icon).
Comment 1 Cory Matheson CLA 2010-04-01 19:26:34 EDT
Created attachment 163689 [details]
Patch to link editor and package explorer

Attaching a patch that enables package explorer <-> editor linking.

It may seem like a large chunk of code, but I pretty much copy / pasted existing functionality from org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart. I brought down all the relevant code into our LitePackageExplorer.

When we go to create the view part, I automatically enable the linking. The code however, still allows for toggling on/off as its a direct copy from PackageExplorerPart. Some of the functions add some more internal calls.. Maybe you can see some areas for improving the code? Either way, this is a good baseline I think.