Skip to content

Use Wild Web developer instead of Eclipse WTP #354

Closed

Description

@vogella

https://github.com/eclipse/wildwebdeveloper is currently developed by Red Hat with the intention to provide light-weight language server based support for JavaScript, JSon, etc.

I suggest you evaluate if this package can be used instead of Eclipse WTP.

The EPPs are also planning to do that https://bugs.eclipse.org/bugs/show_bug.cgi?id=544355

Activity

  1. vogella commented on Aug 29, 2019

    @vogella
    Author

    Update: Just learned from @mickaelistria that this migration was already done for the Eclipse packages. So you should also consider to switch.

  2. mickaelistria commented on Aug 29, 2019

    @mickaelistria

    It's been done for the JavaScript package, not (yet) for the Enterprise Java package.
    The reason is that we still need WTP for JSP and JSF support, and Wild Web Developer doesn't (and probably never will) support those.

  3. martinlippert commented on Aug 29, 2019

    @martinlippert
    Member

    I would love to replace large parts of WTP in the Spring Tools 4 for Eclipse distribution with the Wild Web Developer pieces (it is on my to do list for quite a while already), but I need to figure out all the dependencies among the various WTP features that we would still need.

  4. vogella commented on Aug 29, 2019

    @vogella
    Author

    @martinlippert thanks, looking forward to it.

  5. martinlippert commented on Aug 29, 2019

    @martinlippert
    Member

    Since there are no concrete plans to incorporate this into any STS 3.x distributions, I will move this over to the Spring Tools 4 issue tracker.

  6. martinlippert commented on Sep 5, 2019

    @martinlippert
    Member

    I am pulling this from the upcoming 4.4 release, this requires a bit more thought and testing. Ripping out the right pieces of the WTP tools and replacing them with the Wild Web tooling is a major change and probably needs more work.

    One area that we need to investigate is the XML tooling that comes with the Wild Web package and whether we can use that as a full replacement of the existing tooling:

    • make sure the project-related XML namespace resolution works with the new tooling (no idea yet how to integrate that)
    • make sure the boot-ls contributed content-assist etc. works (should actually get easier with the Wild Web package due to everything being ls-based)

    Other areas of work need to be identified and worked on. Nothing we can get done for the upcoming 4.4. release - unfortunately.

  7. vogella commented on Feb 26, 2020

    @vogella
    Author

    One nice thing is that WWD has also support for *.scss files.

  8. vogella commented on Feb 26, 2020

    @vogella
    Author

    Also using WWD should get rid of multiple UI freezes I get with the STS like the following:

    Stack Trace
    at org.eclipse.swt.internal.gtk.OS.g_utf16_offset_to_pointer(Native Method)
    at org.eclipse.swt.graphics.TextLayout.computeRuns(TextLayout.java:200)
    at org.eclipse.swt.graphics.TextLayout.getLineCount(TextLayout.java:1013)
    at org.eclipse.swt.custom.StyledTextRenderer.getTextLayout(StyledTextRenderer.java:1248)
    at org.eclipse.swt.custom.StyledTextRenderer.getTextLayout(StyledTextRenderer.java:886)
    at org.eclipse.swt.custom.StyledTextRenderer.calculate(StyledTextRenderer.java:296)
    at org.eclipse.swt.custom.StyledTextRenderer.calculateClientArea(StyledTextRenderer.java:325)
    at org.eclipse.swt.custom.StyledText.resetCache(StyledText.java:8093)
    at org.eclipse.swt.custom.StyledText.setStyleRanges(StyledText.java:10297)
    at org.eclipse.swt.custom.StyledText.replaceStyleRanges(StyledText.java:8006)
    at org.eclipse.jface.text.TextViewer.addPresentation(TextViewer.java:4693)
    at org.eclipse.jface.text.TextViewer.changeTextPresentation(TextViewer.java:4770)
    at org.eclipse.wst.sse.ui.internal.provisional.style.StructuredPresentationReconciler.applyTextRegionCollection(StructuredPresentationReconciler.java:903)
    at org.eclipse.wst.sse.ui.internal.provisional.style.StructuredPresentationReconciler.processDamage(StructuredPresentationReconciler.java:878)
    at org.eclipse.wst.sse.ui.internal.provisional.style.StructuredPresentationReconciler$InternalListener.textChanged(StructuredPresentationReconciler.java:422)
    at org.eclipse.jface.text.TextViewer.updateTextListeners(TextViewer.java:2709)
    at org.eclipse.jface.text.TextViewer.invalidateTextPresentation(TextViewer.java:3329)
    at org.eclipse.jface.text.TextViewer.initializeWidgetContents(TextViewer.java:3377)
    at org.eclipse.jface.text.TextViewer.setVisibleDocument(TextViewer.java:3416)
    at org.eclipse.jface.text.source.projection.ProjectionViewer.setVisibleDocument(ProjectionViewer.java:700)
    at org.eclipse.jface.text.source.projection.ProjectionViewer.executeReplaceVisibleDocument(ProjectionViewer.java:755)
    at org.eclipse.jface.text.source.projection.ProjectionViewer.replaceVisibleDocument(ProjectionViewer.java:743)
    at org.eclipse.jface.text.source.projection.ProjectionViewer.reinitializeProjection(ProjectionViewer.java:1219)
    at org.eclipse.jface.text.source.projection.ProjectionViewer.catchupWithProjectionAnnotationModel(ProjectionViewer.java:937)
    at org.eclipse.jface.text.source.projection.ProjectionViewer.lambda$0(ProjectionViewer.java:891)
    at org.eclipse.jface.text.source.projection.ProjectionViewer$$Lambda$1521/305204106.run(Unknown Source)
    at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:185)
    at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4930)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4451)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1160)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1049)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
    at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:658)
    at org.eclipse.ui.internal.Workbench$$Lambda$130/1402211887.run(Unknown Source)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:557)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:154)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:150)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
    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:498)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:657)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:594)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1447)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1420)

  9. 24 remaining items

  10. martinlippert commented on Sep 14, 2020

    @martinlippert
    Member

    Not exactly... ;-)

    The upcoming Spring Tools 4 for Eclipse release (4.8.0) will include WWD by default for the Eclipse 2020-09-based distribution as an experimental part of the distribution. Therefore I closed this ticket and marked it for the upcoming 4.8.0 release.

    Due to various dependencies across multiple bundles and features, we were not able to fully remove WTP UI tooling from the distribution. As a result, you will see a set of duplication across several features, including HTML and JavaScript editors, and a few more. You will be able to switch to the WWD editors, but due to the duplication they are not the default editors yet. This is all work-in-progress and we try to make progress on further reducing dependencies on WTP UI features across the board.

    Another piece that we haven't ported yet to WWD is the project-related XSD namespace resolution, that is also be to done for one of the upcoming releases. So we are making progress, but we aren't there yet.

  11. mauromol commented on Sep 14, 2020

    @mauromol

    Does it mean that 4.8.0 will present issue #447 "out-of-the-box"?

  12. martinlippert commented on Sep 14, 2020

    @martinlippert
    Member

    Not "out-of-the-box", since the default XML editor will still be the WTP one. But if you switch to the WWD-based generic editor to work on Spring XML config files, the problem will appear.

  13. mickaelistria commented on Sep 14, 2020

    @mickaelistria

    Not "out-of-the-box", since the default XML editor will still be the WTP one. But if you switch to the WWD-based generic editor to work on Spring XML config files, the problem will appear.

    That's not really true as Wild Web Developer plugs its analysis at document level, so it can show reports on other editors.
    If there is a bug in LemMinX that returns invalid errors, then it should be reported and fixed in LemMinX itself.

  14. martinlippert commented on Sep 14, 2020

    @martinlippert
    Member

    @mickaelistria Thanks for the pointer, wasn't aware of that. The "problem" is not really a bug in LemMinx, but a special XSD namespace resolution mechanism that we need to plug into LemMinx (as we did in the past for WTP). So lets double check whether the issue actually occurs.

    If this happens, can users disable or switch the severity of specific validations in LemMinx? (as a workaround)

  15. mickaelistria commented on Sep 14, 2020

    @mickaelistria

    If this happens, can users disable or switch the severity of specific validations in LemMinx? (as a workaround)

    Nope, they'd most likely need to disable the LemMinX LS as advised in the other bug.
    On client-side, it's possible to tweak LemMinX options (with some limitations at the moment). You can see an example of how to do that in m2e.

  16. mauromol commented on Sep 14, 2020

    @mauromol

    @martinlippert if you recall from bug #447, the problem was not about using the WWD XML editor in place of the WTP one, but rather that the WWD XML language server was "on" by default and this interfered with STS special XSD namespace resolution. The workaround was to disable the WWD XML language server. So perhaps you may evaluate to ship STS with WWD language servers disabled by default and perhaps document this known issue in some way...

  17. martinlippert commented on Sep 14, 2020

    @martinlippert
    Member

    @mauromol You are absolutely right, I mixed #447 up with another bug I had in mind. Sorry about that. We need to carefully document that limitation, I absolutely agree. I don't think we can easily disable the XML language server by default.

  18. martinlippert commented on Sep 14, 2020

    @martinlippert
    Member

    If this happens, can users disable or switch the severity of specific validations in LemMinx? (as a workaround)

    Nope, they'd most likely need to disable the LemMinX LS as advised in the other bug.
    On client-side, it's possible to tweak LemMinX options (with some limitations at the moment). You can see an example of how to do that in m2e.

    @mickaelistria Any concrete pointer which part of m2e you mean here?

  19. martinlippert commented on Sep 14, 2020

    @martinlippert
    Member

    @mickaelistria Any concrete pointer which part of m2e you mean here?

    Never mind, I think I found the code... :-)

  20. mickaelistria commented on Sep 14, 2020

    @mickaelistria

    I don't think we can easily disable the XML language server by default.

    Technically, you can as it's just a matter of setting preference org.eclipse.wildwebdeveloper.xml/org.eclipse.core.runtime.xml=false in LSP4E store. However, is this what you desire for all your users, that's trickier to decide.

    @mickaelistria Any concrete pointer which part of m2e you mean here?

    MavenLemminxExtension can be interesting if you want to consider it a lemminx extension, I'm not sure a lemminx extension allows to ignore some files though...
    InitializationOptionsProvider shows for example how you can statically add schemas or other settings on LS startup.
    MavenRuntimeClasspathProvider shows how you can listen to preferences to retrieve active instances of the LS and tweak them.
    And Wild Web Developer/LemMinX actually offer a way to add schema catalogs, via preferences.

    By order of preference, I think you should investigate:

    1. schema catalogs with Wild Web Developer prefs
    2. initializationOptions
    3. LemMinX extensions
    4. Some more complex glue
  21. martinlippert commented on Sep 15, 2020

    @martinlippert
    Member

    @mickaelistria Thanks a lot for the additional insights and ideas, much appreciated. I think the "correct" solution to this would be to implement a lemminx extension that registers a URIResolverExtension.

    But even that is not trivial to implement as an extension to lemminx for our case, since the URI resolution mechanism that we need is project-specific, so you need some sort of project context when resolving the namespace and look up things on the classpath of the specific project. Therefore a schema catalog doesn't really help.

    Since lemminx doesn't seem to have any project-specific information around (let aside the classpath information of a project), it might be necessary to implement some kind of language-server communication to get that information into the lemminx extension to do the resolving.

    I don't really have an idea for a short-term solution or workaround beyond disabling the XML language server. Given the fact that this issue appears only for very specific situations, I am reluctant to disable the entire XML language server by default for everybody. But to be honest, I am not very happy either way.

  22. martinlippert commented on Sep 16, 2020

    @martinlippert
    Member

    The next step here will be to find a way to implement the project-specific resolver as an extension to the lemminx project. I will start to work on that once we have the 4.8.0 release out the door and follow up on the lemminx project for more help with that extension authoring and possible or necessary changes in lemminx. Looks like I will have to investigate this a bit... :-)

    @mickaelistria Thanks again for the feedback and ideas, much appreciated. Lets continue on the lemminx project with it.

  23. ENate commented on Oct 3, 2024

    @ENate

    I still see issues with Angular templates in eclipse 2024! Can anyone let me know where to remove the old HTML package from Eclipse Java EE? Thanks

  24. martinlippert commented on Oct 21, 2024

    @martinlippert
    Member

    I still see issues with Angular templates in eclipse 2024! Can anyone let me know where to remove the old HTML package from Eclipse Java EE? Thanks

    The Spring Tools for Eclipse distributions do not ship with the old HTML tooling anymore. In case you are referring to the standard Eclipse JEE package, the question is probably a better for fit for https://github.com/eclipse-packaging/packages

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions