Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Re: Obtaining an IResource from a fully qualified class name
Re: Obtaining an IResource from a fully qualified class name [message #255834] Sat, 23 August 2008 02:34 Go to next message
Eclipse UserFriend
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 #255836 is a reply to message #255834] Sat, 23 August 2008 09:45 Go to previous message
Eclipse UserFriend
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
Previous Topic:org.eclipse.ltk.core.refactoring.deleteParticipants not honoring enablement
Next Topic:Blank lines between methods when generating getters/setters
Goto Forum:
  


Current Time: Sun May 11 12:48:30 EDT 2025

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

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

Back to the top