Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 434524 - [EditorMgmt] Luna M7: New editor side-by-side view through dragging not working anymore
Summary: [EditorMgmt] Luna M7: New editor side-by-side view through dragging not worki...
Status: CLOSED DUPLICATE of bug 492842
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.4   Edit
Hardware: PC Linux-GTK
: P3 major with 1 vote (vote)
Target Milestone: 4.6 RC1   Edit
Assignee: Stefan Xenos CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-09 11:51 EDT by Sascha Konrad CLA
Modified: 2016-05-10 12:08 EDT (History)
5 users (show)

See Also:


Attachments
Weird looking tabs after split (15.45 KB, image/png)
2014-05-23 09:41 EDT, Sascha Konrad CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sascha Konrad CLA 2014-05-09 11:51:27 EDT
Can't create another side-by-side editor anymore by taking the file and dragging it to the left side of the current editor view. The screen flickers briefly, changing to the blue color, and also nothing happens when releasing the mouse. This used to be fine in M6, seems to be broken in M7 now.
Comment 1 Sascha Konrad CLA 2014-05-09 13:43:11 EDT
Dragging to right side also doesn't seem to work anymore. Dragging it down detaches it (not sure if that is desired behavior or not).
Comment 2 Sascha Konrad CLA 2014-05-09 13:43:57 EDT
This is observed on CDT version of Eclipse Luna M7, in case it matters.
Comment 3 Sascha Konrad CLA 2014-05-13 08:11:17 EDT
Can anyone confirm this? I think this is quite major.
Comment 4 Eric Moffatt CLA 2014-05-13 13:18:20 EDT
There's a known defect that prevents the *feedback* from showing up on Linux but our tests here show that it does work.

If you have an editor area with let's say 3 open editors A, B & C...if you drag one of the tabs and position the cursor to the center of the editor vertically and 1/4 the way from the left edge of the editor and release what happens ?
Comment 5 Sascha Konrad CLA 2014-05-13 13:22:12 EDT
Nothing happens. My screen gets the blue overlay just like it should, but when releasing the mouse nothing happens. Also, the blue overlay used to indicate where the dragged editor will end up, but now it just covers the entire screen.
Comment 6 Sascha Konrad CLA 2014-05-13 13:45:10 EDT
Is there a workaround for now? Is there another way I can open an editor side-by-side? Keyboard shortcut maybe?
Comment 7 Eric Moffatt CLA 2014-05-13 13:54:50 EDT
We'll check this on Paul's machine when he's available. Is there anybody else where you are with a similar setup that could try to sse if there results match.

You might also try a different CSS Theme to see if there's a difference...
Comment 8 Sascha Konrad CLA 2014-05-13 13:59:45 EDT
Tried different themes and palettes, no avail. As a workaround, for now I can drag the editor tab to where the outline view is, that still works.
Comment 9 Eric Moffatt CLA 2014-05-13 14:24:56 EDT
Thanks but...YUK ! We'll take a look at this tomorrow.

Is there anything in your Error Log view or the .log file ? Maybe we're blowing up showing he feedback and killing the 'drop' operation...
Comment 10 Sascha Konrad CLA 2014-05-13 14:32:39 EDT
I can see this error tRACE here. Doesn't happen all the time though, but it's definitely related.

java.lang.NullPointerException
	at org.eclipse.e4.ui.workbench.addons.dndaddon.DetachedDropAgent.drop(DetachedDropAgent.java:60)
	at org.eclipse.e4.ui.workbench.addons.dndaddon.DragAgent.dragFinished(DragAgent.java:159)
	at org.eclipse.e4.ui.workbench.addons.dndaddon.PartDragAgent.dragFinished(PartDragAgent.java:111)
	at org.eclipse.e4.ui.workbench.addons.dndaddon.DnDManager.finishDrag(DnDManager.java:276)
	at org.eclipse.e4.ui.workbench.addons.dndaddon.DnDManager.startDrag(DnDManager.java:243)
	at org.eclipse.e4.ui.workbench.addons.dndaddon.DnDManager$1.dragDetected(DnDManager.java:87)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:127)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4462)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1388)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3806)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3416)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:832)
	at org.eclipse.jface.window.Window.open(Window.java:808)
	at org.eclipse.ui.internal.views.log.EventDetailsDialog.open(EventDetailsDialog.java:181)
	at org.eclipse.ui.internal.views.log.EventDetailsDialogAction.run(EventDetailsDialogAction.java:98)
	at org.eclipse.ui.internal.views.log.LogView$15.doubleClick(LogView.java:536)
	at org.eclipse.jface.viewers.StructuredViewer$1.run(StructuredViewer.java:831)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:50)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:178)
	at org.eclipse.jface.viewers.StructuredViewer.fireDoubleClick(StructuredViewer.java:828)
	at org.eclipse.jface.viewers.AbstractTreeViewer.handleDoubleSelect(AbstractTreeViewer.java:1472)
	at org.eclipse.jface.viewers.StructuredViewer$4.widgetDefaultSelected(StructuredViewer.java:1237)
	at org.eclipse.jface.util.OpenStrategy.fireDefaultSelectionEvent(OpenStrategy.java:252)
	at org.eclipse.jface.util.OpenStrategy.access$0(OpenStrategy.java:249)
	at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:311)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4462)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1388)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3806)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3416)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1152)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1033)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:635)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:578)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:135)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:379)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:233)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1438)
Comment 11 Sascha Konrad CLA 2014-05-15 10:36:52 EDT
I just tried it out on a colleague's PC that pretty much runs the same setup as me (running Eclipse on Linux, the GUI is on Windows via Exceed). On his PC, strangely it works somewhat, but the behavior is pretty erratic, the editor often becomes detached completely. Not sure why it doesn't work at all on mine, but there is definitely some issue.
Comment 12 Sascha Konrad CLA 2014-05-19 08:55:20 EDT
Tried out RC1, same issue there.
Comment 13 Sascha Konrad CLA 2014-05-23 09:22:02 EDT
Anybody working on this? This would be a very bad bug to make it to the final release. 

Tried out Eclipse CDT 4.4.0 RC1, still same issue there, not surprisingly. I found out there is a spot somewhere on the edge that will actually to a split. But I have to try about 50-100 times before it works, so it's very annoying. Along the way, I get plenty of the following error traces. Also, the editor widget looks pretty weird now, the tabs seem to have once full height, once only half height.

java.lang.NullPointerException
	at org.eclipse.e4.ui.workbench.addons.dndaddon.DetachedDropAgent.drop(DetachedDropAgent.java:60)
	at org.eclipse.e4.ui.workbench.addons.dndaddon.DragAgent.dragFinished(DragAgent.java:159)
	at org.eclipse.e4.ui.workbench.addons.dndaddon.PartDragAgent.dragFinished(PartDragAgent.java:111)
	at org.eclipse.e4.ui.workbench.addons.dndaddon.DnDManager.finishDrag(DnDManager.java:276)
	at org.eclipse.e4.ui.workbench.addons.dndaddon.DnDManager.startDrag(DnDManager.java:243)
	at org.eclipse.e4.ui.workbench.addons.dndaddon.DnDManager$1.dragDetected(DnDManager.java:87)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:127)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4462)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1388)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3806)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3416)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1152)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1033)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
...
Comment 14 Sascha Konrad CLA 2014-05-23 09:22:22 EDT
Was there a text editor widget change between M6 and M7?
Comment 15 Paul Webster CLA 2014-05-23 09:25:44 EDT
With the RC2 candidate, you can now see feedback on linux again.  Can you try your usecase on http://download.eclipse.org/eclipse/downloads/drops4/I20140522-1330/ ?

I tried it here and it worked fine.

PW
Comment 16 Sascha Konrad CLA 2014-05-23 09:33:47 EDT
Just tried, it's still broken:

eclipse.buildId=4.4.0.I20140522-1330
java.version=1.7.0_10
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Command-line arguments:  -os linux -ws gtk -arch x86_64

java.lang.NullPointerException
	at org.eclipse.e4.ui.workbench.addons.dndaddon.DetachedDropAgent.drop(DetachedDropAgent.java:60)
	at org.eclipse.e4.ui.workbench.addons.dndaddon.DragAgent.dragFinished(DragAgent.java:159)
	at org.eclipse.e4.ui.workbench.addons.dndaddon.PartDragAgent.dragFinished(PartDragAgent.java:111)
	at org.eclipse.e4.ui.workbench.addons.dndaddon.DnDManager.finishDrag(DnDManager.java:276)
	at org.eclipse.e4.ui.workbench.addons.dndaddon.DnDManager.startDrag(DnDManager.java:243)
	at org.eclipse.e4.ui.workbench.addons.dndaddon.DnDManager$1.dragDetected(DnDManager.java:87)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:127)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4487)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1388)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3831)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3441)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1152)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1033)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:135)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:379)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:233)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1438)
Comment 17 Paul Webster CLA 2014-05-23 09:36:25 EDT
(In reply to Sascha Konrad from comment #16)
> Just tried, it's still broken:
> 

Thanks for trying again.

So what's going on here?  When I drag an editor towards the left side of the editor area, I see the split DND feedback.  If I drop the editor in the center of the left split pane, I get 2 editors (and no errors).

PW
Comment 18 Paul Webster CLA 2014-05-23 09:37:23 EDT
(In reply to Paul Webster from comment #17)
> 
> So what's going on here?  When I drag an editor towards the left side of the
> editor area, I see the split DND feedback.  If I drop the editor in the
> center of the left split pane, I get 2 editors (and no errors).

I meant to ask a question :-)

Do you see the split feedback now?  Do you get that error when you drop your editor in the centre of left hand split?

PW
Comment 19 Sascha Konrad CLA 2014-05-23 09:40:36 EDT
I see the feedback in the RC2 candidate just the same as in RC1. It flickers, and it seems to sometimes tell me that if I drop it, it will split, but then releasing it does nothing and logs the error trace.

Like I said, if I try 100 times, I can get it to split, but then it also looks weird (see attachment). Is that expected? Tabs are very small now, and there is a white line above them.
Comment 20 Sascha Konrad CLA 2014-05-23 09:41:14 EDT
Created attachment 243449 [details]
Weird looking tabs after split
Comment 21 Paul Webster CLA 2014-05-23 09:48:57 EDT
Yes, the tab part is correct.

PW

(In reply to Sascha Konrad from comment #16)
> Just tried, it's still broken:
> 
> eclipse.buildId=4.4.0.I20140522-1330
> java.version=1.7.0_10

The other thing I would suggest (although it might not make a difference) is updating your java.  Anything before 1.7.0_25 is suspect, and AFAIK they're up past 1.7.0_51

Also, could attach your <workspace>/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi

Maybe it's something specific to your workspace that kills it.

PW
Comment 22 Sascha Konrad CLA 2014-05-23 10:09:46 EDT
Just updated Java, still same issue.

eclipse.buildId=4.4.0.I20140515-1230
java.version=1.7.0_55
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.cpp.product
Command-line arguments:  -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.cpp.product

Don't want to attach my entire workbench.xmi, it seems to have some sensitive information in there. Anything specific I should look for?
Comment 23 Sascha Konrad CLA 2014-05-23 23:06:37 EDT
Ok, I tracked it down a little bit further. I am running Eclipse on a remote Linux server, and I am using an Exceed on Demand X server on my windows machine to display the GUI. When I have Exceed set to use the Native (Windows) window manager, then I have the issue. When I switch to use the MWM window manager, then splitting works normally. Using MWM window manager is not really an option though, it's quite archaic and a pain.
Comment 24 Sascha Konrad CLA 2014-05-23 23:32:47 EDT
I realize that may be hard to reproduce, but maybe there is some tweaking that can be done, since it was working without issues until M6.
Comment 25 Paul Webster CLA 2014-05-30 10:36:38 EDT
Sascha, we can reproduce the problem since we don't have access to that environment.

Can you debug it?  Find out what is causing the NPE?  Is it the org.eclipse.e4.ui.workbench.addons.dndaddon.DetachedDropAgent.curRect?

Then can you find out when that's set to null?  What call is doing that?

PW
Comment 26 Paul Webster CLA 2014-05-30 10:42:47 EDT
(In reply to Paul Webster from comment #25)
> Sascha, we can reproduce the problem since we don't have access to that
> environment.

That's "we can't reproduce the problem"
Comment 27 Sascha Konrad CLA 2014-06-02 09:14:22 EDT
I haven't tried to debug Eclipse before, if there are some instructions on how to get Eclipse running in the debugger I would appreciate that.

I have found a workaround for my problem now. I can run mwm in my console, which temporarily switches Eclipse to the mwm window manager. Then I can do the split, and then exit out of mwm to return to native window manager again. While this works, it's less from ideal.
Comment 28 dylan justice CLA 2016-04-14 12:06:04 EDT
Bug confirmed still present on Mars.2 (4.5.2), under Ubuntu 15.10, default "Unity" window manager.
Comment 29 Stefan Xenos CLA 2016-05-02 14:06:31 EDT
My patch for bug 492842 also addresses an intermittent issue that would interfere with editor splitting.

After the patch gets into a build, I'd be interested in hearing from one of the reporters to see if it's the same problem they were seeing here.
Comment 30 Stefan Xenos CLA 2016-05-10 10:01:04 EDT
I believe this is fixed. Please reopen if you don't see the fix in RC1.
Comment 31 Stefan Xenos CLA 2016-05-10 12:08:01 EDT
Marking as duplicate so that anyone discovering this can trace the problem to the fix.

*** This bug has been marked as a duplicate of bug 492842 ***