Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Linking an external file to a project
Linking an external file to a project [message #202717] Mon, 02 April 2007 08:43 Go to next message
zakir Hussain is currently offline zakir HussainFriend
Messages: 76
Registered: July 2009
Member
Hi Friends,

I am working with Linking of Resources in eclipse right now...

My requirement is i need to import some external files in to my local
workspace.

I am able to link an external folder to my project ... but when it comes
to linking of an external file i am getting an exception.

My action's run code is in this way:

FileDialog dialog=new FileDialog(Display.getCurrent().getActiveShell());
dialog.setFilterExtensions(new String[]{"*.hex"});
dialog.open();

IFolder folder = project.getFolder("ImportedFiles");
IFile file = folder.getFile(dialog.getFileName());
try {
if(!file.isLinked())
folder.createLink(new Path(dialog.getFilterPath()), IResource.NONE,
null);
} catch (CoreException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

Here i am able to link the external folder...

but concept of linking of external file is not working fine for me...

Could any body help me regarding this....

Regards,

Zakir
Re: Linking an external file to a project [message #202767 is a reply to message #202717] Mon, 02 April 2007 12:21 Go to previous message
Eclipse UserFriend
Originally posted by: krzysztofHMMMMdaniel.gmail.com

zakir wrote:

> I am able to link an external folder to my project ... but when it comes
> to linking of an external file i am getting an exception.

what stack trace?

Regards,
Chris
Previous Topic:how to exclude a mirror from the update manager?
Next Topic:Can I install Eclipse on Windown Vista?
Goto Forum:
  


Current Time: Tue Apr 23 06:32:11 GMT 2024

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

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

Back to the top