Skip to content

Commit c700b66

Browse files
committed
Make an independent bundle out of SWT SVG fragment
org.eclipse.swt.svg was implemented as a fragment for the SWT host. This requires a complex setup due to the SVG fragment depending on the effective SWT API provided by the native fragments. With the SVG rasterizer being provided via an OSGi capability anyway, the reason for having the SVG bundle as a fragment became obsolete. This change makes org.eclipse.swt.svg an ordinary bundle. The according tests are extracted into a separate bundle as well, making the SWT tests properly independent from the tests for the specific SVG rasterizer. Contributes to #3129
1 parent cc2762f commit c700b66

File tree

14 files changed

+103
-59
lines changed

14 files changed

+103
-59
lines changed

bundles/org.eclipse.swt.svg/META-INF/MANIFEST.MF

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ Bundle-ManifestVersion: 2
33
Bundle-SymbolicName: org.eclipse.swt.svg
44
Bundle-Version: 3.132.100.qualifier
55
Automatic-Module-Name: org.eclipse.swt.svg
6-
Bundle-Name: %fragmentName
6+
Bundle-Name: %pluginName
77
Bundle-Vendor: %providerName
8-
Bundle-Localization: fragment
8+
Bundle-Localization: plugin
99
Bundle-RequiredExecutionEnvironment: JavaSE-21
10-
Fragment-Host: org.eclipse.swt
10+
Require-Bundle: org.eclipse.swt
1111
Import-Package: com.github.weisj.jsvg;version="[2.0.0,3.0.0)",
1212
com.github.weisj.jsvg.parser;version="[2.0.0,3.0.0)",
1313
com.github.weisj.jsvg.view;version="[2.0.0,3.0.0)"

bundles/org.eclipse.swt.svg/META-INF/p2.inf

Lines changed: 0 additions & 32 deletions
This file was deleted.

bundles/org.eclipse.swt.svg/build.properties

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,6 @@ source.. = src/,\
1717
output.. = bin/
1818
bin.includes = META-INF/,\
1919
.,\
20-
fragment.properties,\
20+
plugin.properties,\
2121
about.html
2222
src.includes = about.html
23-
24-
jars.extra.classpath = platform:/plugin/org.eclipse.swt.cocoa.macosx.aarch64,\
25-
platform:/plugin/org.eclipse.swt.cocoa.macosx.x86_64,\
26-
platform:/plugin/org.eclipse.swt.gtk.linux.aarch64,\
27-
platform:/plugin/org.eclipse.swt.gtk.linux.ppc64le,\
28-
platform:/plugin/org.eclipse.swt.gtk.linux.riscv64,\
29-
platform:/plugin/org.eclipse.swt.gtk.linux.x86_64,\
30-
platform:/plugin/org.eclipse.swt.win32.win32.aarch64,\
31-
platform:/plugin/org.eclipse.swt.win32.win32.x86_64

bundles/org.eclipse.swt.svg/fragment.properties renamed to bundles/org.eclipse.swt.svg/plugin.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@
1010
# Contributors:
1111
# Michael Bangas (Vector Informatik GmbH) - initial API and implementation
1212
###############################################################################
13-
fragmentName = SWT SVG Rendering Support
13+
pluginName = SWT SVG Rendering Support
1414
providerName = Eclipse.org

bundles/org.eclipse.swt/META-INF/MANIFEST.MF

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Export-Package:
1616
org.eclipse.swt.events,
1717
org.eclipse.swt.graphics,
1818
org.eclipse.swt.internal;x-internal:=true,
19-
org.eclipse.swt.internal.image;x-internal:=true,
19+
org.eclipse.swt.internal.image;x-friends:="org.eclipse.swt.svg",
2020
org.eclipse.swt.layout,
2121
org.eclipse.swt.opengl,
2222
org.eclipse.swt.printing,

pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@
236236
<module>examples/org.eclipse.swt.examples.ole.win32</module>
237237
<module>examples/org.eclipse.swt.examples.views</module>
238238
<module>tests/org.eclipse.swt.tests</module>
239+
<module>tests/org.eclipse.swt.svg.tests</module>
239240
<module>features/org.eclipse.swt.tools.feature</module>
240241
</modules>
241242
</project>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-21"/>
4+
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
5+
<classpathentry kind="src" path="src">
6+
<attributes>
7+
<attribute name="test" value="true"/>
8+
</attributes>
9+
</classpathentry>
10+
<classpathentry kind="output" path="bin"/>
11+
</classpath>
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>org.eclipse.swt.svg.tests</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
<buildCommand>
14+
<name>org.eclipse.pde.ManifestBuilder</name>
15+
<arguments>
16+
</arguments>
17+
</buildCommand>
18+
<buildCommand>
19+
<name>org.eclipse.pde.SchemaBuilder</name>
20+
<arguments>
21+
</arguments>
22+
</buildCommand>
23+
</buildSpec>
24+
<natures>
25+
<nature>org.eclipse.pde.PluginNature</nature>
26+
<nature>org.eclipse.jdt.core.javanature</nature>
27+
</natures>
28+
<linkedResources>
29+
<link>
30+
<name>.settings/org.eclipse.jdt.core.prefs</name>
31+
<type>1</type>
32+
<locationURI>SHARED_SETTINGS/org.eclipse.jdt.core.prefs</locationURI>
33+
</link>
34+
</linkedResources>
35+
<variableList>
36+
<variable>
37+
<name>SHARED_SETTINGS</name>
38+
<value>$%7BPARENT-2-PROJECT_LOC%7D/examples/.settings_shared</value>
39+
</variable>
40+
</variableList>
41+
</projectDescription>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
eclipse.preferences.version=1
2+
encoding/<project>=UTF-8
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Manifest-Version: 1.0
2+
Bundle-ManifestVersion: 2
3+
Bundle-Name: Eclipse SWT Tests SVG
4+
Fragment-Host: org.eclipse.swt.svg
5+
Bundle-SymbolicName: org.eclipse.swt.svg.tests
6+
Bundle-Version: 3.0.0.qualifier
7+
Automatic-Module-Name: org.eclipse.swt.svg.tests
8+
Bundle-RequiredExecutionEnvironment: JavaSE-21
9+
Import-Package: org.junit.jupiter.api;version="[5.14.0,6.0.0)",
10+
org.junit.jupiter.api.function;version="[5.14.0,6.0.0)",
11+
org.junit.platform.suite.api;version="[1.14.0,2.0.0)"
12+

0 commit comments

Comments
 (0)