Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Problem loading files from other Plugin in Eclipse 3.3
Problem loading files from other Plugin in Eclipse 3.3 [message #464476] Thu, 08 March 2007 09:33
Yves Harms is currently offline Yves HarmsFriend
Messages: 80
Registered: July 2009
Member
Since Eclipse 3.3 I have a problem loading a file from a different
plugin. Before 3.3 it just works using the calling class to determine
the correct file URL.

PluginA calls a class in PluginB which tries to read a DTD file from
PluginA.

To make things even more complicated
- Both plugins are library plugins which don't know about Eclipse. So we
can't use any Eclipse framework classes to determine the file path.
- We can't use any Streams either since the API of a third party library
that we use here can only handle String paths.


For illustration a Test class that is called from PluginA

public InPluginB(Class usingClass) {
super();
final URL fileUrl
= usingClass.getResource("lago-config-1_0.dtd");
System.out.println(fileUrl.getFile());
System.out.println(new File(fileUrl.toExternalForm()).exists());
}

The second printout always return false.

Can anyone give me a hint how to determine the correct absolute path of
the file for use in the other plugin ?
I already tried to enable buddy classloading by registering PluginA in
PluginB - but with no success.

Regards,
Yves Harms
Previous Topic:Resource changed in state location
Next Topic:showing a list of registered views
Goto Forum:
  


Current Time: Sun Sep 08 04:31:54 GMT 2024

Powered by FUDForum. Page generated in 0.03570 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top