From cf3505fd62b3c0ed3173da0bf9b7bbfe534faf5f Mon Sep 17 00:00:00 2001 From: Victor Rubezhny Date: Fri, 11 Aug 2023 01:51:35 +0200 Subject: [PATCH] LemMinX-Maven 0.10.1 + Lemminx 0.27.0 + WWD 1.3.0 --- .../META-INF/MANIFEST.MF | 2 +- .../m2e/editor/lemminx/tests/EditorTest.java | 14 ++++++++++---- .../META-INF/MANIFEST.MF | 2 +- org.eclipse.m2e.editor.lemminx/pom.xml | 2 +- org.eclipse.m2e.repository/category.xml | 2 +- target-platform/target-platform.target | 2 +- 6 files changed, 15 insertions(+), 9 deletions(-) diff --git a/org.eclipse.m2e.editor.lemminx.tests/META-INF/MANIFEST.MF b/org.eclipse.m2e.editor.lemminx.tests/META-INF/MANIFEST.MF index 2bd66d15a..cffcea50c 100644 --- a/org.eclipse.m2e.editor.lemminx.tests/META-INF/MANIFEST.MF +++ b/org.eclipse.m2e.editor.lemminx.tests/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: M2E Maven POM File Editor using Wild Web Developer, Lemminx and Maven LS extension Tests Bundle-SymbolicName: org.eclipse.m2e.editor.lemminx.tests -Bundle-Version: 2.0.0.qualifier +Bundle-Version: 2.0.1.qualifier Automatic-Module-Name: org.eclipse.m2e.editor.lemminx.tests Bundle-RequiredExecutionEnvironment: JavaSE-17 Bundle-Vendor: Eclipse.org - m2e diff --git a/org.eclipse.m2e.editor.lemminx.tests/src/org/eclipse/m2e/editor/lemminx/tests/EditorTest.java b/org.eclipse.m2e.editor.lemminx.tests/src/org/eclipse/m2e/editor/lemminx/tests/EditorTest.java index cca0f1c59..ab991d06f 100644 --- a/org.eclipse.m2e.editor.lemminx.tests/src/org/eclipse/m2e/editor/lemminx/tests/EditorTest.java +++ b/org.eclipse.m2e.editor.lemminx.tests/src/org/eclipse/m2e/editor/lemminx/tests/EditorTest.java @@ -40,6 +40,7 @@ import org.eclipse.ui.tests.harness.util.DisplayHelper; import org.eclipse.ui.texteditor.ITextEditor; import org.eclipse.ui.texteditor.ITextEditorActionConstants; +import org.eclipse.wildwebdeveloper.xml.internal.Activator; import org.junit.After; import org.junit.Assert; import org.junit.Before; @@ -49,11 +50,17 @@ public class EditorTest extends AbstractMavenProjectTestCase { private static final String GENERIC_EDITOR = "org.eclipse.ui.genericeditor.GenericEditor"; + + private static final String XML_PREFERENCES_DOWNLOAD_EXTERNAL_RESOURCES = "org.eclipse.wildwebdeveloper.xml.downloadExternalResources.enabled"; + + private static final long WAIT_TIMEOUT = 15000; + private IWorkbenchPage page; private IProject project; @Before public void setPage() { + Activator.getDefault().getPreferenceStore().setValue(XML_PREFERENCES_DOWNLOAD_EXTERNAL_RESOURCES, true); page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); } @@ -74,8 +81,7 @@ public void testGenericEditorHasMavenExtensionEnabled() throws Exception { pomFile.create(getClass().getResourceAsStream("pom.xml"), true, null); ITextEditor editorPart = (ITextEditor)IDE.openEditor(page, pomFile, GENERIC_EDITOR); Display display = page.getWorkbenchWindow().getShell().getDisplay(); - assertTrue("Missing diagnostic report", DisplayHelper.waitForCondition(display, 10000, () -> - { + assertTrue("Missing diagnostic report", DisplayHelper.waitForCondition(display, WAIT_TIMEOUT, () -> { try { return Arrays.stream(pomFile.findMarkers(IMarker.PROBLEM, true, IResource.DEPTH_ZERO)).anyMatch(marker -> marker.getAttribute(IMarker.SEVERITY, -1) == IMarker.SEVERITY_ERROR && @@ -90,7 +96,7 @@ public void testGenericEditorHasMavenExtensionEnabled() throws Exception { Set beforeShells = Arrays.stream(display.getShells()).filter(Shell::isVisible).collect(Collectors.toSet()); editorPart.getSelectionProvider().setSelection(new TextSelection(offset, 0)); editorPart.getAction(ITextEditorActionConstants.CONTENT_ASSIST).run(); - assertTrue("Missing completion proposals", DisplayHelper.waitForCondition(display, 10000, () -> { + assertTrue("Missing completion proposals", DisplayHelper.waitForCondition(display, WAIT_TIMEOUT, () -> { Set afterShells = Arrays.stream(display.getShells()).filter(Shell::isVisible).collect(Collectors.toSet()); afterShells.removeAll(beforeShells); return afterShells.stream() @@ -129,7 +135,7 @@ public void testOpenChildThenParentResolvesParent() throws Exception { IFile pomFile = child.getFile("pom.xml"); page.openEditor(new FileEditorInput(pomFile), GENERIC_EDITOR); Display display = page.getWorkbenchWindow().getShell().getDisplay(); - assertTrue("Expected marker not published", DisplayHelper.waitForCondition(display, 60000, () -> { + assertTrue("Expected marker not published", DisplayHelper.waitForCondition(display, WAIT_TIMEOUT, () -> { try { IMarker[] markers = pomFile.findMarkers("org.eclipse.lsp4e.diagnostic", false, IResource.DEPTH_ZERO); if (markers.length == 0) { diff --git a/org.eclipse.m2e.editor.lemminx/META-INF/MANIFEST.MF b/org.eclipse.m2e.editor.lemminx/META-INF/MANIFEST.MF index 83a0ef2a1..2dd44cbca 100644 --- a/org.eclipse.m2e.editor.lemminx/META-INF/MANIFEST.MF +++ b/org.eclipse.m2e.editor.lemminx/META-INF/MANIFEST.MF @@ -8,7 +8,7 @@ Import-Package: javax.inject;version="[1.0.0,2.0.0)", org.eclipse.core.runtime;version="3.5.0", org.osgi.framework;version="1.10.0", org.slf4j;version="[1.7.0,3.0.0)" -Require-Bundle: org.eclipse.wildwebdeveloper.xml;bundle-version="[1.2,1.3)", +Require-Bundle: org.eclipse.wildwebdeveloper.xml;bundle-version="[1.3,1.4)", org.eclipse.lsp4e;bundle-version="0.16.0", org.eclipse.lsp4j;bundle-version="0.9.0", org.eclipse.m2e.core, diff --git a/org.eclipse.m2e.editor.lemminx/pom.xml b/org.eclipse.m2e.editor.lemminx/pom.xml index b74b22d0f..b61549f50 100644 --- a/org.eclipse.m2e.editor.lemminx/pom.xml +++ b/org.eclipse.m2e.editor.lemminx/pom.xml @@ -45,7 +45,7 @@ org.eclipse.lemminx lemminx-maven - 0.9.0 + 0.10.1 ${project.basedir} lemminx-maven.jar +