Bug 472761 - No toolbar drag and drop with "-cssTheme none"
Summary: No toolbar drag and drop with "-cssTheme none"
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.5   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 4.6 M1   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords: noteworthy
Depends on:
Blocks: 472707 473670
  Show dependency tree
 
Reported: 2015-07-15 14:11 EDT by Andrey Loskutov CLA
Modified: 2017-04-12 05:30 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Loskutov CLA 2015-07-15 14:11:21 EDT
AS IS: 
As mentioned in bug 472707 comment 7, if Eclipse is started with "-cssTheme none" command line argument, toolbar can not be selected and dragged to the different place - they simply do not have the drag handler shown. 
I can confirm this on Linux GTK2 / GTK3 Eclipse 4.5.

TO BE:
If themes are disabled, toolbars should still be movable via drag and drop.
Comment 1 Lars Vogel CLA 2015-07-16 00:15:19 EDT
Sopot can you take this one?
Comment 2 Nobody - feel free to take it CLA 2015-07-16 04:06:51 EDT
Alright I'll take a stab at it.
Comment 3 Eclipse Genie CLA 2015-07-16 06:41:27 EDT
New Gerrit change created: https://git.eclipse.org/r/52061
Comment 4 Nobody - feel free to take it CLA 2015-07-16 06:46:29 EDT
Patchset proposed. I'll wait for your feedback before I +2.
Comment 6 Nobody - feel free to take it CLA 2015-07-17 06:09:40 EDT
.
Comment 7 Lars Vogel CLA 2015-07-17 07:14:18 EDT
Sopot, can you add an entry to the N&N.
Comment 8 Nobody - feel free to take it CLA 2015-07-17 07:28:28 EDT
(In reply to Lars Vogel from comment #7)
> Sopot, can you add an entry to the N&N.

Sure. Can you point me to the git repo? It's been a while since I've done that.
Comment 9 Lars Vogel CLA 2015-07-17 10:13:28 EDT
(In reply to Sopot Cela from comment #8)
> (In reply to Lars Vogel from comment #7)
> > Sopot, can you add an entry to the N&N.
> 
> Sure. Can you point me to the git repo? It's been a while since I've done
> that.

You find the correct clone URI here: 

https://git.eclipse.org/r/#/admin/projects/www.eclipse.org/eclipse/news
Comment 10 Lars Vogel CLA 2015-07-20 15:17:14 EDT
Sopot, in an RCP application, is D&D now automatically always enabled? In this case we should allow customers to disable this via the IPresentationEngine.NO_MOVE tag.
Comment 11 Nobody - feel free to take it CLA 2015-07-21 08:27:08 EDT
(In reply to Lars Vogel from comment #10)
> Sopot, in an RCP application, is D&D now automatically always enabled? 
Yes. But I think this is the desired behavior as this functionality should not depend on whether you use CSS to style your application. 

> In this case we should allow customers to disable this via the
> IPresentationEngine.NO_MOVE tag.

For the sake of tracking things this bug was to decouple the influence of CSS in whether you have drag and drop on toolbars or not. I think this one should stay like it was. 

I agree with providing a way to disable it so I filed bug 473184 to track that.
Comment 13 Nobody - feel free to take it CLA 2015-07-28 09:30:39 EDT
(In reply to Markus Keller from comment #12)
> (In reply to Eclipse Genie from comment #5)
> > Gerrit change https://git.eclipse.org/r/52061 was merged to [master].
> > Commit:
> > http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=e4c59ff4ec9aff8acc0900644d25ed9383db9b98
> 
> This change caused bug 473670. Reverted with
> http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/
> ?id=9fb137605d391858454159e782110c037c3b1a44

Issue is that there are these special tool control elements of Glue and Stretch (see TrimBarLayout) which by default have no drag handle. This code tried to add a drag handle to those and messed up the layout. I will submit a patch shortly to exclude them from obtaining the default handle.
Comment 14 Eclipse Genie CLA 2015-07-28 10:19:50 EDT
New Gerrit change created: https://git.eclipse.org/r/52721
Comment 15 Nobody - feel free to take it CLA 2015-07-28 12:34:17 EDT
After I investigated this a bit more following Markus' comments it turns out that the spacers and glues are not responsible for this. If I do Window->New window the Running Platform still disappears but this seems to happen also for Mars. 

I'll look into this tomorrow so hopefully we can have this for M1.
Comment 16 Eclipse Genie CLA 2015-07-30 08:27:40 EDT
New Gerrit change created: https://git.eclipse.org/r/52853
Comment 18 Nobody - feel free to take it CLA 2015-07-31 07:45:29 EDT
.
Comment 19 Swanand Nagarkar CLA 2017-04-12 03:03:39 EDT
Hi,

We have our own RCP application which was first developed using eclipse 3.8 as platform. Now we have migrated it to the 4.6. We are using Eclipse 4 technology wherever it is required. After migration we saw couple of issues in product itself. One of the issue is we cant drag-and-drop the toolbars at other places. toolbars located at main toolbar, trim bar etc. we can't move around them at other places. What changes should be done in our product in order to have this D&D functionality.

Let me know if more data is required.
Thanks.
Comment 20 Nobody - feel free to take it CLA 2017-04-12 04:54:35 EDT
(In reply to Swanand Nagarkar from comment #19)
> Hi,
> 
> We have our own RCP application which was first developed using eclipse 3.8
> as platform. Now we have migrated it to the 4.6. We are using Eclipse 4
> technology wherever it is required. After migration we saw couple of issues
> in product itself. One of the issue is we cant drag-and-drop the toolbars at
> other places. toolbars located at main toolbar, trim bar etc. we can't move
> around them at other places. What changes should be done in our product in
> order to have this D&D functionality.
> 
> Let me know if more data is required.
> Thanks.

Is there anything suspicious in the log? Can you see the drag handle? What OS?
Comment 21 Swanand Nagarkar CLA 2017-04-12 05:28:18 EDT
(In reply to Sopot Cela from comment #20)
> (In reply to Swanand Nagarkar from comment #19)
> > Hi,
> > 
> > We have our own RCP application which was first developed using eclipse 3.8
> > as platform. Now we have migrated it to the 4.6. We are using Eclipse 4
> > technology wherever it is required. After migration we saw couple of issues
> > in product itself. One of the issue is we cant drag-and-drop the toolbars at
> > other places. toolbars located at main toolbar, trim bar etc. we can't move
> > around them at other places. What changes should be done in our product in
> > order to have this D&D functionality.
> > 
> > Let me know if more data is required.
> > Thanks.
> 
> Is there anything suspicious in the log? Can you see the drag handle? What
> OS?

Thank you for quick reply.
Yes. I can see the Drag handle.
OS : Windows 7
Log : We are getting one ClassCastException. its about cannot be cast to org.eclipse.e4.ui.workbench.renderers.swt.TrimBarLayout.

Thanks.
Comment 22 Nobody - feel free to take it CLA 2017-04-12 05:30:17 EDT
(In reply to Swanand Nagarkar from comment #21)
> (In reply to Sopot Cela from comment #20)
> > (In reply to Swanand Nagarkar from comment #19)
> > > Hi,
> > > 
> > > We have our own RCP application which was first developed using eclipse 3.8
> > > as platform. Now we have migrated it to the 4.6. We are using Eclipse 4
> > > technology wherever it is required. After migration we saw couple of issues
> > > in product itself. One of the issue is we cant drag-and-drop the toolbars at
> > > other places. toolbars located at main toolbar, trim bar etc. we can't move
> > > around them at other places. What changes should be done in our product in
> > > order to have this D&D functionality.
> > > 
> > > Let me know if more data is required.
> > > Thanks.
> > 
> > Is there anything suspicious in the log? Can you see the drag handle? What
> > OS?
> 
> Thank you for quick reply.
> Yes. I can see the Drag handle.
> OS : Windows 7
> Log : We are getting one ClassCastException. its about cannot be cast to
> org.eclipse.e4.ui.workbench.renderers.swt.TrimBarLayout.
> 
> Thanks.

Please file a separate bug in platform UI https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Platform&component=UI

Also attach the full log.