Eclipse plugin dev: make bundle to explode inside `plugins` folder

Paul Verest

There is old Eclipse Image Viewer plugin https://github.com/persal/quickimage that I want to update.

After adding maven/tycho build and building against Kepler.

It works in new Eclipse instance (project -> run as Eclipse application), but when installing here is an issue #6

org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: file:\D:\Progs\Eclipses\eclipse-standard-luna-R-win32-x86_64\eclipse\plugins\nu.psnet.quickimage.plugin_1.1.0.201503030326.jar!\icons\previous.gif (The filename, directory name, or volume label syntax is incorrect.))

文件名、目录名或卷标语法不正确

Looking at the code there is line

iconsdir = FileLocator.resolve(QuickImagePlugin.getDefault().getBundle().getEntry("/")).getFile() + "icons" + File.separator;

that gets path like that.

The problem is that should work if the bungle jar becomes folder like nu.psnet.quickimage_1.0.3.2

UPDATE: As IDE using Luna 4.4.0

greg-449

If you can change the source of the plugin you can change

iconsdir = FileLocator.resolve(QuickImagePlugin.getDefault().getBundle().getEntry("/")).getFile() + "icons" + File.separator;

to something like:

URL dir = FileLocator.find(QuickImagePlugin.getDefault().getBundle(),
                           new Path("icons"), null);

dir = FileLocator.toFileURL(dir);

String iconsdir = dir.getPath() + File.separator;

This should work even when the plugin is packaged in a jar.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

ios dev - UIWebView cant open local files inside a folder

From Dev

How to use Eclipse plugin tarlog.eclipse.plugins_1.4.2.jar

From Dev

Eclipse-plugin-dev: How to get current bundle version?

From Dev

Why do Properties load method failed in Eclipse plugin dev?

From Dev

Can I create folder inside package in eclipse?

From Dev

How to make an eclipse plugin load on startup

From Dev

Eclipse plugin dev - How to add hyperlink on FieldEditorPreferencePage

From Dev

Using Wuff (Gradle Plugin) to Build Eclipse Plugins

From Dev

Eclipse Plugin-Dev - how to mark package as internal

From Dev

What is the purpose of fetch.json file inside cordova plugins folder?

From Dev

Sublime Text Plugin Dev - Open a file, Focus folder in sidbar

From Dev

Eclipse Plugin Development: Display View under same folder

From Dev

Adding stylesheet from plugins folder to front end, inside of plugin

From Dev

Eclipse plugin cannot find class from class folder

From Dev

How to use Eclipse plugin tarlog.eclipse.plugins_1.4.2.jar

From Dev

Eclipse plugin project not consuming OSGI bundle dependencies

From Dev

Eclipse Plugin: Order of Native Libraries in the "Bundle-NativeCode" Section

From Dev

Own eclipse plugin - sharing data between plugins

From Dev

Eclipse-plugin-dev putting a View first in a stack breaks the stack

From Dev

No Plugin in the WordPress Admin end, but in the plugins/ folder

From Dev

Sublime Text Plugin Dev - Open a file, Focus folder in sidbar

From Dev

Install old Plugin in last Eclipse or JBoss Dev Studio

From Dev

How to make eclipse read bundle properties in UTF-8?

From Dev

Eclipse Plugin Development: Display View under same folder

From Dev

How to make /dev inside linux namespaces

From Dev

Eclipse overwrites manifest created by maven bundle plugin

From Dev

Placing the jar in eclipse plugin folder is not working as expected

From Dev

How to call php variable inside echo statement - Wordpress Plugin Dev

From Dev

Can one bundle multiple Eclipse plugins in one project?

Related Related

  1. 1

    ios dev - UIWebView cant open local files inside a folder

  2. 2

    How to use Eclipse plugin tarlog.eclipse.plugins_1.4.2.jar

  3. 3

    Eclipse-plugin-dev: How to get current bundle version?

  4. 4

    Why do Properties load method failed in Eclipse plugin dev?

  5. 5

    Can I create folder inside package in eclipse?

  6. 6

    How to make an eclipse plugin load on startup

  7. 7

    Eclipse plugin dev - How to add hyperlink on FieldEditorPreferencePage

  8. 8

    Using Wuff (Gradle Plugin) to Build Eclipse Plugins

  9. 9

    Eclipse Plugin-Dev - how to mark package as internal

  10. 10

    What is the purpose of fetch.json file inside cordova plugins folder?

  11. 11

    Sublime Text Plugin Dev - Open a file, Focus folder in sidbar

  12. 12

    Eclipse Plugin Development: Display View under same folder

  13. 13

    Adding stylesheet from plugins folder to front end, inside of plugin

  14. 14

    Eclipse plugin cannot find class from class folder

  15. 15

    How to use Eclipse plugin tarlog.eclipse.plugins_1.4.2.jar

  16. 16

    Eclipse plugin project not consuming OSGI bundle dependencies

  17. 17

    Eclipse Plugin: Order of Native Libraries in the "Bundle-NativeCode" Section

  18. 18

    Own eclipse plugin - sharing data between plugins

  19. 19

    Eclipse-plugin-dev putting a View first in a stack breaks the stack

  20. 20

    No Plugin in the WordPress Admin end, but in the plugins/ folder

  21. 21

    Sublime Text Plugin Dev - Open a file, Focus folder in sidbar

  22. 22

    Install old Plugin in last Eclipse or JBoss Dev Studio

  23. 23

    How to make eclipse read bundle properties in UTF-8?

  24. 24

    Eclipse Plugin Development: Display View under same folder

  25. 25

    How to make /dev inside linux namespaces

  26. 26

    Eclipse overwrites manifest created by maven bundle plugin

  27. 27

    Placing the jar in eclipse plugin folder is not working as expected

  28. 28

    How to call php variable inside echo statement - Wordpress Plugin Dev

  29. 29

    Can one bundle multiple Eclipse plugins in one project?

HotTag

Archive