-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
6636-custom-editor: support for CustomEditor API #8910
Conversation
65d2871
to
c9f9857
Compare
Hi everyone, I'm one of the developers of Kogito Tooling [1]. You can check our VS Code extensions at [2] and [3]. We have been using the custom webview editor API from VS Code since the proposed API I was very thrilled to know that Theia will also support such an API, so I'd like to share some thoughts. From the branch of this PR, I was able to build everything up and run our extensions very easily. In fact, it was very impressive seeing our extensions working seamlessly in Theia without any changes. I can confirm that operations like save, save as, save all, redo, undo, etc are working as expected. However, I couldn't find the Another two things are related to the Source Control tab:
I'm not sure if this is something at our end though it doesn't reproduce on VS Code, but I'd like to let you know. And that's all. If you need any help testing this, please let me know. Great job! [1] https://github.com/kiegroup/kogito-tooling |
Dev-meeting entry added, to make committers aware of this PR. |
#8910 (comment) In regards to your comments: 2. Theia opening 2 text editors and not custom editors 3. When I try to Discard Changes of an empty file associated with our custom editor, |
I'm going to look at it this week. |
@danarad05 Can you please resolve the conflicts and push a new version? |
@azatsarynnyy Thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did some basic checks with the VS Code sample extension https://github.com/microsoft/vscode-extension-samples/tree/master/custom-editor-sample
Both of the contributed CustomEditor and CustomTextEditor are working as expected.
I plan to continue to review/test it more.
ab853ee
to
e911931
Compare
Done |
packages/plugin-ext/src/main/browser/custom-editors/custom-editor-contribution.ts
Outdated
Show resolved
Hide resolved
09e9521
to
48d8d9b
Compare
Since SAP is an Eclipse Foundation member company, I think we do not need to register a CQ for this substantial contribution (> 1000 LoC). Can you please look at the official flowchart(eclipse legal process pdf) and confirm - I think this contribution would fit under the figure 2 case, correct? If so can you also answer the question on figure 7? :
Note: this CQ for substantial contributions is independent of any CQ we might need. e.g. for copied code or new, as of yet unapproved runtime dependencies. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, I've checked it with Red Hat BPMN/DMN extensions, mentioned in #8910 (comment) - all the basic functionality works well 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a few general comments regarding the code (I have not yet tested the functionality). As mentioned by Marc (https://github.com/eclipse-theia/theia/pull/8910/files#r561122885) we will need a CQ which makes sure to cover all the copied code before it can be accepted 👍 (I believe Amiram is handling it).
As for the pull-request itself, it is quite a significant change (~3000 lines) and it would be good to better document the functionality in both the commit
message (which is currently empty), and the pull-request description.
packages/plugin-ext/src/main/browser/custom-editors/custom-editor-widget.ts
Outdated
Show resolved
Hide resolved
packages/plugin-ext/src/main/browser/custom-editors/custom-editor-widget.ts
Show resolved
Hide resolved
@marcdumais-work this is also my understanding. We confirm that this contribution does not contain Cryptography, is developed from scratch and 100% project license code. |
Thanks, Good to see the Custom editor API will be available in master branch soon as well. We will use the API in our current project and using the https://github.com/danarad05/theia/tree/6636-custom-editor branch in the meantime. |
3a58d9c
to
fddf185
Compare
packages/plugin-ext/src/main/browser/custom-editors/custom-editors-main.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reviewed the code - all my notes were addressed.
Also, I tested the functionality in #8910 (review) and #8910 (review). Everything works as expected.
There're some missing parts of CustomEditor API that aren't implemented in this PR, but I'd say it's okay to implement them later, as needed.
512e8ad
to
0e33a85
Compare
Thank you @azatsarynnyy @marechal-p, @vince-fugnitto - addresssed your issues - please review again. Thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I performed another round of review, please be sure to address my comment about the commit title and message: #8910 (review)
In addition, please add a link to the CQ for this pull-request in the pull-request description so that committers are able to track the state of the copied code.
packages/plugin-ext/src/main/browser/custom-editors/custom-editor-contribution.ts
Outdated
Show resolved
Hide resolved
packages/plugin-ext/src/main/browser/custom-editors/custom-editor-contribution.ts
Outdated
Show resolved
Hide resolved
packages/plugin-ext/src/main/browser/custom-editors/custom-editor-contribution.ts
Outdated
Show resolved
Hide resolved
9a97eee
to
3639693
Compare
@vince-fugnitto updated commit message and PR description. Also fixed all your review items. Please review again. Thanks. |
@amiramw Thanks for creating the CQ. For your information, ATM the CQ is waiting for your action. You added the copied code as atachment, then you need to "return" the CQ to the IP team by clicking button "issues addressed, return CQ to IPTeam". Until you do, no one will look at it. Thanks! |
@danarad05 Would these changes help with the jupyter notebook support in eclipse che? We are currently seeing the below error when we try the Jupyter extension from https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter in eclipse che. When do we expect the above PR to be merged? |
I think they might yes, but you should check with them.
hopefully next version. |
e6c8f66
to
c0292b0
Compare
@vince-fugnitto Thank for latest review. Fixed 2 of them and please see comment on third #8910 (comment). |
Thanks you @danarad05. We are just consumers of the API, we are not contributing to Theia right now, so no approval rights now. But we are looking forward to an formal Theia release containing the CustomEditor API because we have some dependencies now as we are expecting this API will be in as soon there are enough approvals. Please go ahead. |
packages/plugin-ext/src/main/browser/custom-editors/plugin-custom-editor-registry.ts
Outdated
Show resolved
Hide resolved
packages/plugin-ext/src/main/browser/custom-editors/custom-editor-opener.tsx
Outdated
Show resolved
Hide resolved
packages/plugin-ext/src/main/browser/custom-editors/custom-editors-main.ts
Show resolved
Hide resolved
packages/plugin-ext/src/main/browser/custom-editors/custom-editors-main.ts
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I verified the functionality of the cat-draw custom-editor and it works very well (both browser and electron) 👍
41e8438
to
92e11ad
Compare
@RomanNikitenko @vince-fugnitto |
b95adfc
to
88fc113
Compare
… extensions with this functionality: - Adds a new contribution point for custom editors. - Adds API for registering a custom editor providers. - Implements CustomEditor extension API - based on VSCode (excluding backup functionality not implemented in this PR). - Adds CustomEditorWidget extending WebviewWidget containing a model reference to CustomEditorModel. - Supports two CustomEditorModel implementations: CustomTextEditorModel for text documents and MainCustomEditorModel for binary documents. - Registers openHandlers for CustomEditors. - Adds `openWith` command for selecting which editor to use when openning a resource. Signed-off-by: Dan Arad <dan.arad@sap.com>
2023109
to
aedcc46
Compare
@RomanNikitenko @vince-fugnitto completed latest review changes. Please check again. Thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes look good to me, thank you for your effort and patience @danarad05 👍
I'll let @RomanNikitenko review as well if he'd like.
My comments were addressed, but I didn't test the changes. |
Merged. Thanks eveyone for the review! |
Signed-off-by: Dan Arad dan.arad@sap.com
Mainly developed by @EstherPerelman.
What it does
Fix #6636
Adds a prototype of custom editors contributed by extensions with this functionality:
openWith
command for selecting which editor to use when openning a resource.CQ: https://dev.eclipse.org/ipzilla/show_bug.cgi?id=23017
How to test
Review checklist
Reminder for reviewers