Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » getImageDescriptorFromProgram, what format filename input parameter expects ?
getImageDescriptorFromProgram, what format filename input parameter expects ? [message #324501] Fri, 25 January 2008 05:27 Go to next message
Eclipse UserFriend
There is a method in the WorkbenchImages class called
getImageDescriptorFromProgram(String filename, int offset). The
documentation says that "This consults the plugin for extension and
obtains its installation location. All requested images are assumed to be
in a directory below and relative to that plugin's installation
directory.". Can somebody please let me know what is the expected value
for the filename parameter here. Is it just a filename, a complete URL or
a relative URL in the bundle context.

Warm Regards,
Rajesh
Re: getImageDescriptorFromProgram, what format filename input parameter expects ? [message #324505 is a reply to message #324501] Fri, 25 January 2008 05:40 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Rajesh,

That method is pretty explicit about being intended for use only by the
workbench. As far as I can tell looking at the code, the file name is
used only as a key for looking up an image that was put into the
registry by some other logic. So I suggest you not use this method.
What are you trying to accomplish?


Rajesh Adukkadukkath wrote:
> There is a method in the WorkbenchImages class called
> getImageDescriptorFromProgram(String filename, int offset). The
> documentation says that "This consults the plugin for extension and
> obtains its installation location. All requested images are assumed to
> be in a directory below and relative to that plugin's installation
> directory.". Can somebody please let me know what is the expected
> value for the filename parameter here. Is it just a filename, a
> complete URL or a relative URL in the bundle context.
>
> Warm Regards,
> Rajesh
>
Re: getImageDescriptorFromProgram, what format filename input parameter expects ? [message #324506 is a reply to message #324505] Fri, 25 January 2008 06:21 Go to previous messageGo to next message
Eclipse UserFriend
Ed,

Actually a developer who was a my predessor for my application used this
method for some purpose which I am trying to findout now. My objective is
to modify the implementation this method in my code that uses the
"ProgramImageDescriptor" with a alternative. I will not be able to modify
the method, method signature because it will break the customization done
over my application by customers when they migrate the code. \

So my plan is to:

1) Understand what WoekbenchMessages.getImageDescriptorFromProgram() is
doing internally in eclipse, besed on what implementation did my collegue
was trying to provide.

2) Provide an alternative implementation without any API Changes, also
wihout using any internal classes.

Any help would be really appreciated.

Warm Regards,
Rajesh
Re: getImageDescriptorFromProgram, what format filename input parameter expects ? [message #324508 is a reply to message #324506] Fri, 25 January 2008 07:09 Go to previous message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Rajesh,

Run Eclipse under debug control and set a breakpoint in the interesting
methods. See how things get there. It seems to me, looking at the
code, that it could only be used to retrieve things that have been
cached by some other part of the system. So perhaps your predecessor
was using it as a sneaky (no-API) way to gain access to some images.
When I set a breakpoint there, I don't even see it get called...

Does your software ever actually call this method today. If so, use the
debugger to trace into the behavior of the method that way...


Rajesh Adukkadukkath wrote:
> Ed,
>
> Actually a developer who was a my predessor for my application used
> this method for some purpose which I am trying to findout now. My
> objective is to modify the implementation this method in my code that
> uses the "ProgramImageDescriptor" with a alternative. I will not be
> able to modify the method, method signature because it will break the
> customization done over my application by customers when they migrate
> the code. \
>
> So my plan is to:
>
> 1) Understand what WoekbenchMessages.getImageDescriptorFromProgram()
> is doing internally in eclipse, besed on what implementation did my
> collegue was trying to provide.
>
> 2) Provide an alternative implementation without any API Changes, also
> wihout using any internal classes.
>
> Any help would be really appreciated.
>
> Warm Regards,
> Rajesh
>
Previous Topic:Constructor of class extending AbstractUIPlugin is not called
Next Topic:JFace Databinding with a variable list of widgets
Goto Forum:
  


Current Time: Thu Sep 18 21:44:51 EDT 2025

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

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

Back to the top