Skip to content

Commit

Permalink
#279 Fix issue with custom images on linux
Browse files Browse the repository at this point in the history
Generation now properly throws an error if image not found
Generation now properly found images if there

Add images folder in test model so that it works both on win and linux

Signed-off-by: Erwann Traisnel <[email protected]>
  • Loading branch information
etraisnel2 authored and tguiu committed Dec 3, 2024
1 parent 1bde07e commit 213ca3e
Show file tree
Hide file tree
Showing 6 changed files with 729 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ public String handleImage(ILog logger, EObject eObject, String imageSrc, IFolder
IPath path = new Path(decodedImageSrc);
IFile iconFile = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
if (!iconFile.exists()) { // Try if image is located in the current folder
IPath parentSrcFolder = new Path(eObject.eResource().getURI().segment(1));
String unencodedPath = StringUtil.unencodeURIString(eObject.eResource().getURI().segment(1), logger);
IPath parentSrcFolder = new Path(unencodedPath);
path = parentSrcFolder.append(decodedImageSrc);
iconFile = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
}
Expand Down
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 213ca3e

Please sign in to comment.