Obtaining an IResource from a fully qualified class name [message #331070] |
Fri, 22 August 2008 22:01 |
Eclipse User |
|
|
|
Originally posted by: pschoenb.gmx.de
Hi,
for a custom debugger implementation, I need to set Java line
breakpoints programmatically. In order to achieve this, I need an
IResource of the resource for which I want to set a breakpoint. I only
have the fully qualified class name as a string where the breakpoint is
to be set. How do I obtain the corresponding IResource object from that?
--
Regards,
Patrick
|
|
|
|
Re: Obtaining an IResource from a fully qualified class name [message #331074 is a reply to message #331071] |
Sat, 23 August 2008 06:34 |
Prakash G.R. Messages: 621 Registered: July 2009 |
Senior Member |
|
|
Francis,
If the source folder name is different or if the class in question is
an inner class, it won't work. I guess we first need to get the IType
for the fully qualified name and use the getCompilationUnit() or
getCorrespondingResource()
Copying jdt, as we might get more accurate replies there.
- Prakash
www.eclipse-tips.com
Francis Upton (News) wrote:
> ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(<your file
> name>p));
>
> Your file name needs to be qualified by the project name and the
> packages, like:
>
> Project/src/org/eclipse/package/class.class
>
> Look at IContainer for more information.
>
> Patrick Schoenbach wrote:
>> Hi,
>>
>> for a custom debugger implementation, I need to set Java line
>> breakpoints programmatically. In order to achieve this, I need an
> Path: build.eclipse.org!pc01.robustsoft.de!news
> From: Patrick Schoenbach <pschoenb@gmx.de>
> Newsgroups: eclipse.platform
> Subject: Obtaining an IResource from a fully qualified class name
> Date: Sat, 23 Aug 2008 00:01:54 +0200
> Organization: EclipseCorner
> Lines: 11
> Message-ID: <1o6asip0wu070.zd0bqyqgsktm.dlg@40tude.net>
> NNTP-Posting-Host: pc01.robustsoft.de
> Mime-Version: 1.0
> Content-Type: text/plain; charset="us-ascii"
> Content-Transfer-Encoding: 7bit
> X-Trace: build.eclipse.org 1219443304 31057 87.230.127.17 (22 Aug 2008
> 22:15:04 GMT)
> X-Complaints-To: news@build.eclipse.org
> NNTP-Posting-Date: Fri, 22 Aug 2008 22:15:04 +0000 (UTC)
> User-Agent: 40tude_Dialog/2.0.15.1de
> Xref: build.eclipse.org eclipse.platform:77287
>
> Hi,
>
> for a custom debugger implementation, I need to set Java line
> breakpoints programmatically. In order to achieve this, I need an
> IResource of the resource for which I want to set a breakpoint. I only
> have the fully qualified class name as a string where the breakpoint is
> to be set. How do I obtain the corresponding IResource object from that?
>
|
|
|
Re: Obtaining an IResource from a fully qualified class name [message #331079 is a reply to message #331074] |
Sat, 23 August 2008 13:45 |
Eclipse User |
|
|
|
Originally posted by: pschoenb.gmx.de
On Sat, 23 Aug 2008 12:04:14 +0530, Prakash G.R. wrote:
> If the source folder name is different or if the class in question is
> an inner class, it won't work. I guess we first need to get the IType
> for the fully qualified name and use the getCompilationUnit() or
> getCorrespondingResource()
This sounds like the way to go. Thanks.
--
Regards,
Patrick
|
|
|
Powered by
FUDForum. Page generated in 0.03588 seconds