Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 255839 - new remote editor
Summary: new remote editor
Status: RESOLVED FIXED
Alias: None
Product: PTP
Classification: Tools
Component: RDT (show other bugs)
Version: 2.1RC3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 2.1.1   Edit
Assignee: Chris Recoskie CLA
QA Contact: Greg Watson CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-19 12:03 EST by Mike Kucera CLA
Modified: 2008-11-20 15:43 EST (History)
0 users

See Also:


Attachments
proposed patch (620.59 KB, patch)
2008-11-19 12:03 EST, Mike Kucera CLA
recoskie: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kucera CLA 2008-11-19 12:03:44 EST
Created attachment 118285 [details]
proposed patch

The current implementation of the remote editor in RDT is basically just a copy-pasted version of the CDT editor. This creates problems because in CDT there is lots of code that depends on the concrete type of the editor. This has led to a snowball effect where more and more code has been copy-pasted from CDT in order to get things to work. 

The only real difference with the remote editor is that some of the action groups are replaced with remote versions. For example the action that opens the Type Hierarchy is replaced with an action that opens the Remote Type Hierarchy instead.

I have discovered that by making a few small changes to the CEditor class from CDT (bug 255688) its possible to extend from CEditor, then override the actions with the remote versions. This means that copying all that code is unnecessary.

This approach has another huge benefit. I was able to add code that checks if the file is from a remote project before overriding the actions. So the remote editor defaults back to normal local behaviour when opened on local files. This fixes bug 249156.

Also, scalability mode was added to CEditor after it was copied into RDT. By extending the existing CEditor scalability mode now works in RDT.
Comment 1 Chris Recoskie CLA 2008-11-20 15:42:51 EST
Applied to HEAD.  Thanks Mike.