Bug 465101 - Unable to use table editor in Change Function Signature Wizard
Summary: Unable to use table editor in Change Function Signature Wizard
Status: NEW
Alias: None
Product: JSDT
Classification: WebTools
Component: General (show other bugs)
Version: 3.7   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Victor Rubezhny CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-21 08:46 EDT by Victor Rubezhny CLA
Modified: 2015-04-21 10:55 EDT (History)
1 user (show)

See Also:


Attachments
Detached Field Editor's Screenshot (237.43 KB, image/png)
2015-04-21 09:03 EDT, Victor Rubezhny CLA
no flags Details
Error JVM Termination message screenshot (79.78 KB, image/png)
2015-04-21 09:17 EDT, Victor Rubezhny CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Victor Rubezhny CLA 2015-04-21 08:46:56 EDT
When trying to edit a function name or default value using table editor, the field editor gets off the table (is moved into a new separated window) and doesn't allow editing.

When that separated window is closed, the JVM gets terminated with "Exit code=1".

Steps to reproduce:

1. Create a simple JS with a function with an argument, like:

function test(name) {}

2. Right-click on the function name and select Refactor->Change Function Signature

3. Click on 'name' in the parameters table.
FAIL: Looks like nothings happen for the first time.

4. Click on 'name' in the parameters table again.
FAIL: The field editor gets opened in a new window. Clicking on the Wizard's dialog window closes that new window, but if you click on 'x' button in fields separated window's titlebar JVM get's terminated with "Exit code=1" and the following message appeared in error output:

Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.

5. The following start of Eclipse fails with the following error output:

[eclipse]$ java.lang.RuntimeException: Error initializing storage.
	at org.eclipse.osgi.internal.framework.EquinoxContainer.<init>(EquinoxContainer.java:77)
	at org.eclipse.osgi.launch.Equinox.<init>(Equinox.java:31)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(EclipseStarter.java:295)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:231)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:483)
	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)
Caused by: java.io.EOFException
	at java.io.DataInputStream.readInt(DataInputStream.java:392)
	at org.eclipse.osgi.container.ModuleDatabase$Persistence.readWire(ModuleDatabase.java:1168)
	at org.eclipse.osgi.container.ModuleDatabase$Persistence.load(ModuleDatabase.java:1028)
	at org.eclipse.osgi.container.ModuleDatabase.load(ModuleDatabase.java:879)
	at org.eclipse.osgi.storage.Storage.<init>(Storage.java:145)
	at org.eclipse.osgi.storage.Storage.createStorage(Storage.java:85)
	at org.eclipse.osgi.internal.framework.EquinoxContainer.<init>(EquinoxContainer.java:75)
	... 11 more
Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.
Comment 1 Victor Rubezhny CLA 2015-04-21 08:53:09 EDT
The field editor gets detached from the table as a result of set of subsequent calls to layout() method during the editor activation.

layout() method calls org.eclipse.swt.widgets.Table.getClientArea() which, in its turn, calls OS.gdk_window_get_origin (binWindow, binX, binY); (at line 1157).

One of these subsequent calls detaches the editor into a separated window.
Comment 2 Victor Rubezhny CLA 2015-04-21 08:58:58 EDT
Very similar effect happens with JDT's Refactor->Change Method Signature Wizard. There is also field editor isn't working: some 'new' window appears upon the field editor's activation (but it quickly get's closed or hidden) and the editor isn't activated as the result (so you cannot use it to edit a method name).
Comment 3 Victor Rubezhny CLA 2015-04-21 09:00:53 EDT
On Luna it works well. The issue appears only on Mars.
Comment 4 Victor Rubezhny CLA 2015-04-21 09:03:07 EDT
Created attachment 252580 [details]
Detached Field Editor's Screenshot

Detached Field Editor's Screenshot shows the detached editor's window on field editor's activation
Comment 5 Victor Rubezhny CLA 2015-04-21 09:17:53 EDT
Created attachment 252582 [details]
Error JVM Termination message screenshot

Error JVM Termination message screenshot shows a result of closing a 'detached' field editor's window by clicking the 'x' button on the titlebar.
Comment 6 Victor Rubezhny CLA 2015-04-21 10:55:05 EDT
It looks like cleaning the configuration ('./eclipse -clean') helps to start eclipse, if its configuration was broken in the way described in #5 of description. The configuration corruption itself looks like an accidental thing - it cannot be reproduced every time when JVM is crashed, but happens from time to time.