Bug 514294 - [template] an Eclipse view developed with HTML/JS and Browser widget
Summary: [template] an Eclipse view developed with HTML/JS and Browser widget
Status: VERIFIED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 1.0   Edit
Hardware: All All
: P3 enhancement with 1 vote (vote)
Target Milestone: 4.23 M1   Edit
Assignee: Wim Jongman CLA
QA Contact:
URL:
Whiteboard:
Keywords: bugday, helpwanted, noteworthy
Depends on:
Blocks:
 
Reported: 2017-03-28 04:48 EDT by Mickael Istria CLA
Modified: 2022-02-17 05:23 EST (History)
4 users (show)

See Also:


Attachments
Visual (14.64 MB, video/mp4)
2021-11-30 18:23 EST, Wim Jongman 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 2017-03-28 04:48:31 EDT
In order to easily demo the Browser widget and how it can allow to use HTML/JS to create Eclipse components such as views, it would be great to have a PDE template creating a well integrated view relying on the Browser widget and showing operations such as being synchronized with the SelectionService or something that shows the view can interact in both ways with the IDE.
Comment 1 Mickael Istria CLA 2017-03-28 04:48:54 EDT
Interesting resource: https://www.slideshare.net/bokowski/embedding-web-uis-in-your-eclipse-application
Comment 2 Lars Vogel CLA 2017-03-28 05:04:27 EDT
+1
Comment 3 Leo Ufimtsev CLA 2017-03-28 10:39:39 EDT
I recommend to run things on Webkit2 when you develop/test.

export SWT_WEBKIT2=1
./eclipse

If something doesn't work, please ping me.
Comment 4 Wim Jongman CLA 2017-04-03 13:41:27 EDT
Maybe this is interesting? I have been experimenting with this back in the day  to see which opensocial gadgets would be consumed and which not. As you can see this code is running inside views and react with their surroundings (e.g. Eyes).

https://wiki.eclipse.org/E4/OpenSocialGadgets
Comment 5 Mickael Istria CLA 2017-06-23 04:27:29 EDT
@Win: Those are great examples, and a template showing one of those widgets in a view or an editor with bidirectional interaction would be perfect! Is this something you'd like to contribute?
Comment 6 Wim Jongman CLA 2017-06-23 06:13:25 EDT
(In reply to Mickael Istria from comment #5)
> @Win: Those are great examples, and a template showing one of those widgets
> in a view or an editor with bidirectional interaction would be perfect! Is
> this something you'd like to contribute?

I have been doing a lot with JavaScript lately so this sounds like a nice challenge. I will do some experiments to see how far I get.
Comment 7 Wim Jongman CLA 2017-06-23 06:30:30 EDT
Apparently Boris Bokowski was inspired by this vimeo video.

https://vimeo.com/21166223

This code was created by Peter Stibrany. The source of the code in the above vimeo I believe is here

https://github.com/Tasktop/Foglyn

I will try to find Peter.
Comment 8 Leo Ufimtsev CLA 2017-06-23 12:25:31 EDT
(In reply to Wim Jongman from comment #7)
> Apparently Boris Bokowski was inspired by this vimeo video.
> 
> https://vimeo.com/21166223

Wow, awesome.
Comment 9 Mickael Istria CLA 2017-07-03 12:00:27 EDT
(In reply to Wim Jongman from comment #7)
> Apparently Boris Bokowski was inspired by this vimeo video.
> https://vimeo.com/21166223
> This code was created by Peter Stibrany. The source of the code in the above
> vimeo I believe is here
> https://github.com/Tasktop/Foglyn
> I will try to find Peter.

I believe for a template, something simpler such as a regular HTTP form that's pre-populated according to Eclipse selection and that opens an Eclipse pop-up dialog on submit would be enough.
No need to introduce funtional complexity, the purpose is mainly to show that embedding HTTP in Eclipse UI and bidirectional communication with Workbench is possible.
Comment 10 Wim Jongman CLA 2017-12-10 15:34:37 EST
(In reply to Wim Jongman from comment #7)

> I will try to find Peter.

https://github.com/Tasktop/Foglyn/issues/50
Comment 11 Mickael Istria CLA 2018-09-01 02:33:36 EDT
This kind of blogposts https://cdtdoug.ca/2018/08/31/aliens-vscode.html is exactly the reason why I believe we need Eclipse IDE and PDE to get such template or at least documentation.
What's explained here for VSCode would be about as as trivial to do in the Eclipse IDE with a browser view. Unfortunately we miss shareable content to answer here and remind the HTML/JS based extensions are possible in the Eclipse IDE too.
Comment 12 Wim Jongman CLA 2021-11-30 18:23:43 EST
Created attachment 287598 [details]
Visual

I have created the requested template. However, I accidentally pushed it directly to master. I'm sorry about that. If you want you can revert so we can go through G.

See the video for the result. This is pretty nice.
Comment 13 Mickael Istria CLA 2021-12-01 04:06:21 EST
All that looks good to me. Please add a note about those new examples to the N&N.
Comment 14 Eclipse Genie CLA 2021-12-21 08:02:48 EST
New Gerrit change created: https://git.eclipse.org/r/c/www.eclipse.org/eclipse/news/+/189047
Comment 16 Vikas Chandra CLA 2022-02-17 02:04:06 EST
Please resolve this bug if this is fixed.
Comment 17 Mickael Istria CLA 2022-02-17 04:57:32 EST
I verified it with latest I-Build and it's a great example.
Comment 18 Wim Jongman CLA 2022-02-17 05:22:29 EST
Verified.
Comment 19 Wim Jongman CLA 2022-02-17 05:23:08 EST
(In reply to Mickael Istria from comment #17)
> I verified it with latest I-Build and it's a great example.

Thanks!