Skip to content

Use svg files in the Eclipse RCP template for e4#1723

Merged
vogella merged 1 commit intoeclipse-pde:masterfrom
vogella:svg-support-in-rcp-template
May 8, 2025
Merged

Use svg files in the Eclipse RCP template for e4#1723
vogella merged 1 commit intoeclipse-pde:masterfrom
vogella:svg-support-in-rcp-template

Conversation

@vogella
Copy link
Copy Markdown
Contributor

@vogella vogella commented Apr 17, 2025

Adds Require-Capability: eclipse.swt;filter:="(image.format=svg)" to the MANIFEST and replaces png with svg files.

@vogella
Copy link
Copy Markdown
Contributor Author

vogella commented Apr 17, 2025

Require-Capability: eclipse.swt;filter:="(image.format=svg)" prevents the plug-in from starting correctly, if I remove it its starts and svg files are shown correctly.

I used the approach supported by @laeubi from https://github.com/eclipse-platform/eclipse.platform.ui/pull/2925/files#diff-2e3ec9ee6782044d4a3f43dcaff53f6d43fd66f7a91a804ba02246ca9be74b4dR26

Anyone wrong with the MANIFEST.MF you can spot? @Michael5601

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: F1
Bundle-SymbolicName: f1;singleton:=true
Bundle-Version: 1.0.0.qualifier
Require-Bundle: org.eclipse.swt,
 org.eclipse.e4.ui.model.workbench,
 org.eclipse.jface,
 org.eclipse.e4.ui.services,
 org.eclipse.e4.ui.workbench,
 org.eclipse.e4.core.di,
 org.eclipse.e4.ui.di,
 org.eclipse.e4.core.contexts,
 org.eclipse.core.runtime
Bundle-RequiredExecutionEnvironment: JavaSE-21
Automatic-Module-Name: f1
Import-Package: jakarta.annotation;version="[2.1.0,3.0.0)",
 jakarta.inject;version="[2.0.0,3.0.0)"
Require-Capability: eclipse.swt;filter:="(image.format=svg)"

@vogella
Copy link
Copy Markdown
Contributor Author

vogella commented Apr 17, 2025

image

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 17, 2025

Test Results

   285 files  +  6     285 suites  +6   50m 17s ⏱️ + 4m 30s
 3 611 tests ±  0   3 535 ✅ +  1   76 💤 ± 0  0 ❌  - 1 
11 025 runs  +194  10 794 ✅ +165  231 💤 +30  0 ❌  - 1 

Results for commit 4a1ddaa. ± Comparison against base commit b77badd.

♻️ This comment has been updated with latest results.

@Michael5601
Copy link
Copy Markdown
Contributor

Anyone wrong with the MANIFEST.MF you can spot? @Michael5601

Should be correct as you just need to add the single Requre-Capability line. @HannesWell also had this problem and assumed it was a PDE bug. We still need to investigate this as far as I know.

@HannesWell
Copy link
Copy Markdown
Member

also had this problem and assumed it was a PDE bug. We still need to investigate this as far as I know.

It was slightly different. In my case the jsvg bundle was not added to the runtime, but yes I want to have a look at this.

@vogella
Copy link
Copy Markdown
Contributor Author

vogella commented Apr 23, 2025

As for now I will take out Require-Capability: eclipse.swt;filter:="(image.format=svg)" until it works it is no use to add this to the template.

@vogella
Copy link
Copy Markdown
Contributor Author

vogella commented Apr 23, 2025

#1727

@vogella vogella force-pushed the svg-support-in-rcp-template branch from f7094a3 to a1a0c52 Compare April 23, 2025 08:51
@HannesWell
Copy link
Copy Markdown
Member

#1727

@vogella that issue is resolved now. Can we proceed here, respectively can you update the code to add the discussed header?

@vogella vogella force-pushed the svg-support-in-rcp-template branch from a1a0c52 to 8400a08 Compare May 6, 2025 21:00
Does not yet add Require-Capability:
eclipse.swt;filter:="(image.format=svg)" to the
MANIFEST and replaces png with svg files. See
eclipse-pde#1727
@vogella vogella force-pushed the svg-support-in-rcp-template branch from 8400a08 to 4a1ddaa Compare May 7, 2025 11:43
@vogella
Copy link
Copy Markdown
Contributor Author

vogella commented May 8, 2025

@HannesWell using this new template I still get:

image

@vogella
Copy link
Copy Markdown
Contributor Author

vogella commented May 8, 2025

Strange. I only see this error message is a runtime Eclipse, not in my latest I-Build. I merge this and test it tomorrow in the next I-build.

@vogella vogella merged commit 5dc5f26 into eclipse-pde:master May 8, 2025
19 checks passed
@vogella vogella deleted the svg-support-in-rcp-template branch May 8, 2025 08:22
@HannesWell
Copy link
Copy Markdown
Member

Strange. I only see this error message is a runtime Eclipse, not in my latest I-Build. I merge this and test it tomorrow in the next I-build.

Could it be that the TP in your Dev-Eclipse doesn't contain the latest I-build respectively was on an old state of PDE?

However looking at what I have described in #1727 (comment) and your screenshot from here, we are actually talking about different errors.
But I have never seen your problem, if the swt.svg fragment was in the TP.

@vogella
Copy link
Copy Markdown
Contributor Author

vogella commented May 8, 2025

Strange. I only see this error message is a runtime Eclipse, not in my latest I-Build. I merge this and test it tomorrow in the next I-build.

Could it be that the TP in your Dev-Eclipse doesn't contain the latest I-build respectively was on an old state of PDE?

I had no explicit target platform defined, so I assumed that it would pick up the new runtime plug-ins but maybe it was using an older state. I don't know how a runtime Eclipse sources its target environment if it is using the IDE as target.

However looking at what I have described in #1727 (comment) and your screenshot from here, we are actually talking about different errors. But I have never seen your problem, if the swt.svg fragment was in the TP.

Lets see in tomorrows I-Build.

@vogella
Copy link
Copy Markdown
Contributor Author

vogella commented May 9, 2025

Works fine in latest I-Build (Using template to create RCP app with content -> Start via product -> No error dialog)

@vogella
Copy link
Copy Markdown
Contributor Author

vogella commented May 9, 2025

Thanks @HannesWell

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants