[nobug] fixes to formatting tests
diff --git a/web/tests/org.eclipse.jst.jsp.core.tests/META-INF/MANIFEST.MF b/web/tests/org.eclipse.jst.jsp.core.tests/META-INF/MANIFEST.MF index 0e78e97..76f2ec7 100644 --- a/web/tests/org.eclipse.jst.jsp.core.tests/META-INF/MANIFEST.MF +++ b/web/tests/org.eclipse.jst.jsp.core.tests/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name.0 Bundle-SymbolicName: org.eclipse.jst.jsp.core.tests;singleton:=true -Bundle-Version: 1.1.101.qualifier +Bundle-Version: 1.1.200.qualifier Bundle-Activator: org.eclipse.jst.jsp.core.tests.JSPCoreTestsPlugin Bundle-Vendor: %Bundle-Vendor.0 Bundle-Localization: plugin @@ -25,7 +25,9 @@ Import-Package: org.w3c.dom.css, org.w3c.dom.stylesheets, javax.servlet, - javax.servlet.jsp + javax.servlet.jsp, + jakarta.servlet, + jakarta.servlet.jsp Require-Bundle: org.junit;bundle-version="[3.8.2,5.0.0)", org.eclipse.pde.core, org.eclipse.update.configurator,
diff --git a/web/tests/org.eclipse.jst.jsp.core.tests/pom.xml b/web/tests/org.eclipse.jst.jsp.core.tests/pom.xml index 6dc0047..3a3b48a 100644 --- a/web/tests/org.eclipse.jst.jsp.core.tests/pom.xml +++ b/web/tests/org.eclipse.jst.jsp.core.tests/pom.xml
@@ -22,7 +22,7 @@ <groupId>org.eclipse.webtools.sourceediting</groupId> <artifactId>org.eclipse.jst.jsp.core.tests</artifactId> - <version>1.1.101-SNAPSHOT</version> + <version>1.1.200-SNAPSHOT</version> <packaging>eclipse-test-plugin</packaging> <properties>
diff --git a/web/tests/org.eclipse.jst.jsp.core.tests/src/org/eclipse/jst/jsp/core/tests/WebContainerInitializer.java b/web/tests/org.eclipse.jst.jsp.core.tests/src/org/eclipse/jst/jsp/core/tests/WebContainerInitializer.java index e439a99..f867bdb 100644 --- a/web/tests/org.eclipse.jst.jsp.core.tests/src/org/eclipse/jst/jsp/core/tests/WebContainerInitializer.java +++ b/web/tests/org.eclipse.jst.jsp.core.tests/src/org/eclipse/jst/jsp/core/tests/WebContainerInitializer.java
@@ -12,6 +12,8 @@ *******************************************************************************/ package org.eclipse.jst.jsp.core.tests; +import java.io.IOException; + import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.FileLocator; import org.eclipse.core.runtime.IPath; @@ -29,12 +31,19 @@ public WebContainerInitializer() { } + private IClasspathEntry getBundleEntry(String bundleName) throws IOException { + return JavaCore.newLibraryEntry(new Path(FileLocator.getBundleFile(Platform.getBundle(bundleName)).getAbsolutePath()), null, null); + } + public void initialize(final IPath containerPath, IJavaProject project) throws CoreException { if (bundles == null) { try { - IClasspathEntry servlet = JavaCore.newLibraryEntry(new Path(FileLocator.getBundleFile(Platform.getBundle("javax.servlet-api")).getAbsolutePath()), null, null); - IClasspathEntry jsp = JavaCore.newLibraryEntry(new Path(FileLocator.getBundleFile(Platform.getBundle("javax.servlet.jsp-api")).getAbsolutePath()), null, null); - bundles = new IClasspathEntry[] {servlet, jsp}; + bundles = new IClasspathEntry[] { + getBundleEntry("jakarta.servlet.jsp"), + getBundleEntry("jakarta.servlet"), + getBundleEntry("jakarta.servlet-api"), + getBundleEntry("javax.servlet.jsp-api") + }; } catch (Exception e) { bundles = new IClasspathEntry[0];
diff --git a/web/tests/org.eclipse.jst.jsp.core.tests/testfiles/jspx_javaVariable_includes/META-INF/MANIFEST.MF b/web/tests/org.eclipse.jst.jsp.core.tests/testfiles/jspx_javaVariable_includes/META-INF/MANIFEST.MF index 8f80757..7b7adba 100644 --- a/web/tests/org.eclipse.jst.jsp.core.tests/testfiles/jspx_javaVariable_includes/META-INF/MANIFEST.MF +++ b/web/tests/org.eclipse.jst.jsp.core.tests/testfiles/jspx_javaVariable_includes/META-INF/MANIFEST.MF
@@ -1,6 +1,9 @@ Manifest-Version: 1.0 -Require-Bundle: javax.servlet,javax.servlet.jsp +Import-package: jakarta.servlet, + jakarta.servlet.http, + jakarta.servlet.jsp, + jakarta.servlet.jsp.tagext Bundle-ManifestVersion: 2 Bundle-SymbolicName: jspx_javaVariable_includes; singleton:=true Bundle-Version: 1.1 -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-RequiredExecutionEnvironment: JavaSE-17
diff --git a/web/tests/org.eclipse.wst.jsdt.web.ui.tests/src/org/eclipse/wst/jsdt/web/ui/tests/format/FormattingTests.java b/web/tests/org.eclipse.wst.jsdt.web.ui.tests/src/org/eclipse/wst/jsdt/web/ui/tests/format/FormattingTests.java index c7142c9..a63d0b4 100644 --- a/web/tests/org.eclipse.wst.jsdt.web.ui.tests/src/org/eclipse/wst/jsdt/web/ui/tests/format/FormattingTests.java +++ b/web/tests/org.eclipse.wst.jsdt.web.ui.tests/src/org/eclipse/wst/jsdt/web/ui/tests/format/FormattingTests.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2017 IBM Corporation and others. + * Copyright (c) 2010, 2023 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at @@ -314,6 +314,7 @@ try { IModelManager modelManager = StructuredModelManager.getModelManager(); model = modelManager.getModelForEdit(file); + assertNotNull("No model created for file type " + file.getContentDescription().getContentType().getId(), model); } catch (CoreException ce) { ce.printStackTrace();
diff --git a/web/tests/org.eclipse.wst.jsdt.web.ui.tests/src/org/eclipse/wst/jsdt/web/ui/tests/format/TestJSPContentFormatter.java b/web/tests/org.eclipse.wst.jsdt.web.ui.tests/src/org/eclipse/wst/jsdt/web/ui/tests/format/TestJSPContentFormatter.java index be359b2..81440b3 100644 --- a/web/tests/org.eclipse.wst.jsdt.web.ui.tests/src/org/eclipse/wst/jsdt/web/ui/tests/format/TestJSPContentFormatter.java +++ b/web/tests/org.eclipse.wst.jsdt.web.ui.tests/src/org/eclipse/wst/jsdt/web/ui/tests/format/TestJSPContentFormatter.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2017 IBM Corporation and others. + * Copyright (c) 2007, 2023 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at @@ -154,6 +154,7 @@ try { IModelManager modelManager = StructuredModelManager.getModelManager(); model = modelManager.getModelForEdit(file); + assertNotNull("No model created for file type " + file.getContentDescription().getContentType().getId(), model); } catch (CoreException ce) { ce.printStackTrace();