| Summary: | [Compatibility] NPE thrown when DND'ing text in the text editor | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] e4 | Reporter: | Remy Suen <remy.suen> | ||||
| Component: | UI | Assignee: | Oleg Besedin <ob1.eclipse> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | bokowski, Lars.Vogel, ob1.eclipse | ||||
| Version: | 1.0 | Flags: | bokowski:
review+
emoffatt: review+ |
||||
| Target Milestone: | 1.0 RC3 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Remy Suen
I'll take a look at this. Created attachment 174866 [details]
Patch
This is a fun patch - the one-line fix.
The problem was that WorkbenchWindowConfigurer#configureEditorAreaDropListener() method was left empty in the e4 version.
The 3.x method:
(1) sets the EditorAreaDropAdapter into the local variable, and
(2) adds it as a listener to pages->presentation->layout parts -> drop targets
The (2) which would be a problem for e4 due to different internal structure. However, the (2) is not actually executed in the 3.x world: at the time the code is run, there are no workbench pages.
So, it is only (1) that is actually done in 3.x and that is the values needed by the EditorSiteDragAndDropServiceImpl which does:
DropTargetListener editorSiteListener = winConfigurer.getDropTargetListener();
So, simply doing a single line of code (1) fixes the problem.
However, theirony is that
Boris, Eric, could you review? (In reply to comment #2) > However, theirony is that Please ignore that line. One of those days I will join Bugzilla development with a single goal of finally adding ability to edit comments :-(. Looks good to me... BTW, I'll fight any attempt to make Bugzilla comments editable...we'd end up in wikipedia-like change wars, revisionist history is a bad thing (tm) ;-) Patch applied to CVS Head. Verified on XP in I20100726-2152. |