This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 550606 - [GTK] Right-click > Rename from Project Explorer non-functional when starting with only hidden projects
Summary: [GTK] Right-click > Rename from Project Explorer non-functional when starting...
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.12   Edit
Hardware: All All
: P3 major (vote)
Target Milestone: 4.14 M1   Edit
Assignee: Eric Williams CLA
QA Contact:
URL:
Whiteboard: RHT
Keywords: triaged
: 549948 551343 551404 551498 552316 553177 562872 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-08-30 11:53 EDT by Mickael Istria CLA
Modified: 2020-06-16 07:42 EDT (History)
17 users (show)

See Also:


Attachments
The rename works but the inline editor isin't visible (778.26 KB, image/gif)
2019-08-30 15:59 EDT, Andrew Obuchowicz CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mickael Istria CLA 2019-08-30 11:53:06 EDT
While trying `Eclipse IDE for JavaScript and Web developers` M3 from https://ci.eclipse.org/packaging/job/simrel.epp-tycho-build/557/artifact/org.eclipse.epp.packages/archive/ , I cannot rename any file from the project explorer.
Right click > Rename simply seems to do nothing. The log doesn't seem to say anything.
This was not happening with the M1 package.
Comment 1 Mickael Istria CLA 2019-08-30 11:53:59 EDT
I think it was introduced with change for bug 548877
Comment 2 Thomas Watson CLA 2019-08-30 14:21:45 EDT
(In reply to Mickael Istria from comment #1)
> I think it was introduced with change for bug 548877

Can you confirm that reverting this fixes the issue?
Comment 3 Andrew Obuchowicz CLA 2019-08-30 15:22:20 EDT
My initial suspicion is that the LTK launcher is unable to perform the rename request as it relies on the renaming to occur in JDT (which isin't available in the Eclipse IDE for JavaScript and Web Developers).

For some reason, the fallback renaming method is not being called. LTKLauncher.renameAction() is supposed to return false if it fails, perhaps this isin't the case in reality (which is causing the rename action to return as it assumes the renaming wizard was able to open.)
Comment 4 Andrew Obuchowicz CLA 2019-08-30 15:23:26 EDT
(In reply to Andrew Obuchowicz from comment #3)
> For some reason, the fallback renaming method is not being called.
> LTKLauncher.renameAction() is supposed to return false if it fails, 

Correction, I meant LTKLauncher.openRenameWizard()
Comment 5 Andrew Obuchowicz CLA 2019-08-30 15:54:55 EDT
Update: I think the renaming *operation* is working, it's the actual UI part of the inline rename that isin't appearing.

What I mean is that, when you right click > rename, the inline text editor where you input the new name isin't being drawn correctly (it's not visible).

However, if you type in a new name and hit enter, the rename dialog appears.

I will attach a gif to demonstrate this behavior.
Comment 6 Andrew Obuchowicz CLA 2019-08-30 15:59:51 EDT
Created attachment 279728 [details]
The rename works but the inline editor isin't visible

After clicking rename, I typed in the new names and hit enter to get the rename dialog to appear.
Comment 7 Mickael Istria CLA 2019-08-30 16:46:19 EDT
(In reply to Andrew Obuchowicz from comment #5)
> Update: I think the renaming *operation* is working, it's the actual UI part
> of the inline rename that isin't appearing.
> What I mean is that, when you right click > rename, the inline text editor
> where you input the new name isin't being drawn correctly (it's not visible).
> However, if you type in a new name and hit enter, the rename dialog appears.

I tried this and confirm I see that same faulty behavior here.
Unfortunately, it seems much more complex than if the bug where in the LTKRenameAction or something like that. Unless we quickly find the root cause of it and can trivially fix it, then the safest path seems to be reverting the inline renaming and re-include it in 4.14 once we have it fixed.
Comment 8 Mickael Istria CLA 2019-08-30 17:01:24 EDT
This seems to happen only when starting from an empty workspace.
Workaround is then to close Project Explorer and re-open it (or restart the IDE), then when the Project Explorer starts with non-empty content, the inline rename is visible and works fine.

This workaround IMO decreases the criticity of this bug to not make it mandatory for RC2 nor 4.13. I let other share their opinion on the topic.

So I don't think this is *not* a bug in the Inline Rename, but more a symptom of another bug which shows up on the "Eclipse IDE for JavaScript and Web developer" package: the case of empty Project Explorer, that's supposed to show links to some typical actions, actually shows no link. It could be that there is a bug in the Project Explorer rendering in this case, which make that following actions involving for example drawing on top of the tree are erroneous.
Comment 9 Andrey Loskutov CLA 2019-08-30 23:37:49 EDT
(In reply to Mickael Istria from comment #8)
> This seems to happen only when starting from an empty workspace.
>... 
> So I don't think this is *not* a bug in the Inline Rename, but more a
> symptom of another bug which shows up on the "Eclipse IDE for JavaScript and
> Web developer" package: the case of empty Project Explorer, that's supposed
> to show links to some typical actions, actually shows no link. It could be
> that there is a bug in the Project Explorer rendering in this case, which
> make that following actions involving for example drawing on top of the tree
> are erroneous.

Mickael, if this is the case for empty Project Explorer in the specific epp package only, you can probably quite easily find the root cause by debugging link creation for empty workspace helper - I guess one of the contributions to the "new" wizards contains "broken" decription so that the Link created by SWT somehow destroys the SWT rendering. Fixing such a contribution would be an easy thing for 4.13, and in 4.14 we can investigate and fix the real underlying problem.
Comment 10 Mickael Istria CLA 2019-08-31 09:19:10 EDT
I could track this issue a bit deeper:
This issue only happens when
* Workspace is empty when Project Explorer is shown, then
* some plugin automatically creates some invisible project (org.eclipse.rse.files.ui in the case of the Eclipse IDE for JavaScript)
In this case, the EmptyWorkspaceHelper gets to its resource listener and assumes workspace is not empty, trigger the switch to regular content; but probably with a glitch (such as bad parenting or something like that).
Comment 11 Mickael Istria CLA 2019-09-02 07:18:52 EDT
The criterion on whether drawing happens of the rename feedback correctly or not seems to be related to the case where the workspace contains at least one project, but all projects are hidden.

To reproduce with plain Platform (no TM/RSE, no Wild Web Developer...)
1. start from an empty workspace
=> the EmptyWorkspaceHelper shows the link
2. Create a project, name is `.blah` (or whatever starting with a dot
=> The project is hidden by default, but
=> the EmptyWorkspaceHelper shows the empty tree instead of the links (minor issue, not the one we need to fix now)
3. Crete a project, name it `p` (or whatever visible in Project Explorer)
=> project is visible
4. Create a child file
5. Right-click > rename of child file
=> EXPECTED: rename feedback showing
=> GOT: No rename feedback (but rename edition in progress while invisible)
Comment 12 Christian Dietrich CLA 2019-09-02 07:22:23 EDT
@Mickael, i see another wired behaviour.
i can rename inline but if i confirm the new name with Enter the rename element dialog pops up anyway. is that intended? what is the benefit from inline renaming then?
Comment 13 Mickael Istria CLA 2019-09-02 08:03:11 EDT
(In reply to Christian Dietrich from comment #12)
> @Mickael, i see another wired behaviour.
> i can rename inline but if i confirm the new name with Enter the rename
> element dialog pops up anyway. is that intended? what is the benefit from
> inline renaming then?

Let's chat about it on bug 550560.
Comment 14 Mickael Istria CLA 2019-09-04 07:39:41 EDT
Can someone check whether this issue happens on other OSs or if it's Linux-only?
Comment 15 Mickael Istria CLA 2019-09-09 09:42:08 EDT
@Eric: can you please have a look at this one when you have the opportunity (not highest priority, but still something we'd like to see fixed soon)?
I'd like your SWT expert opinion on this one as I cannot reproduce the issue easily in some other contexts, while am wondering whether it's not a SWT issue surfacing with this new use-case.
Comment 16 Eric Williams CLA 2019-09-09 10:19:30 EDT
(In reply to Mickael Istria from comment #15)
> @Eric: can you please have a look at this one when you have the opportunity
> (not highest priority, but still something we'd like to see fixed soon)?
> I'd like your SWT expert opinion on this one as I cannot reproduce the issue
> easily in some other contexts, while am wondering whether it's not a SWT
> issue surfacing with this new use-case.

I checked, looks to be an SWT regression stemming from bug 541427. I'll fix it in 4.14.
Comment 17 Eclipse Genie CLA 2019-09-09 15:23:32 EDT
New Gerrit change created: https://git.eclipse.org/r/149204
Comment 19 Eric Williams CLA 2019-09-11 09:57:30 EDT
(In reply to Eclipse Genie from comment #18)
> Gerrit change https://git.eclipse.org/r/149204 was merged to [master].
> Commit:
> http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/
> ?id=890b5826e457d87824a6c61a9fdda45bd407811a

In master now.
Comment 20 Eric Williams CLA 2019-09-21 19:21:58 EDT
*** Bug 551343 has been marked as a duplicate of this bug. ***
Comment 21 Paul Pazderski CLA 2019-09-24 09:52:51 EDT
*** Bug 549948 has been marked as a duplicate of this bug. ***
Comment 22 Paul Pazderski CLA 2019-09-28 05:37:51 EDT
*** Bug 551498 has been marked as a duplicate of this bug. ***
Comment 23 Eric Williams CLA 2019-10-08 13:35:41 EDT
Verified in I20191008-0600.
Comment 24 Sarika Sinha CLA 2019-10-21 04:40:09 EDT
*** Bug 551404 has been marked as a duplicate of this bug. ***
Comment 25 Paul Pazderski CLA 2019-10-22 06:33:15 EDT
*** Bug 552316 has been marked as a duplicate of this bug. ***
Comment 26 Paul Pazderski CLA 2019-10-27 07:18:07 EDT
*** Bug 552330 has been marked as a duplicate of this bug. ***
Comment 27 Paul Pazderski CLA 2019-11-18 08:13:46 EST
*** Bug 553177 has been marked as a duplicate of this bug. ***
Comment 28 Paul Pazderski CLA 2020-05-06 08:58:16 EDT
*** Bug 562872 has been marked as a duplicate of this bug. ***
Comment 29 François Mommens CLA 2020-06-16 07:42:30 EDT
I am using 4.15 but I am still affected by this bug.
I'm starting with open projects.