Import file system

Hi,

I tried to do this for the last three hours with no luck.

I want to be able to import a file/folder in a location on my machine with Intellij giving me the option to link against the file or actually import (ie copy the file) into the project.

This was not possible? I finally got the file to link bby going to file->Setting-> Path and chossing Paths and then adding the file to the content root and coloring this blue - ie source file. But then when I deleted the file it deleted it off the file system

Not impressed at the mo.

Eclipse has a import export option which does exactly that.

Please help

3 comments
Comment actions Permalink

I'm not sure what you're asking for exactly, but IDEA doesn't giive you
some fake filesystem. It will not copy files into your project. It will
simply allow you to list them as part of your project, by defining a
content root. So when you deleted that file, you weren't deleting it
from IDEA, you were deleting it.

Steve wrote:

Hi,

I tried to do this for the last three hours with no luck.

I want to be able to import a file/folder in a location on my machine
with Intellij giving me the option to link against the file or
actually import (ie copy the file) into the project.

This was not possible? I finally got the file to link bby going to
file->Setting-> Path and chossing Paths and then adding the file to
the content root and coloring this blue - ie source file. But then
when I deleted the file it deleted it off the file system

Not impressed at the mo.

Eclipse has a import export option which does exactly that.

Please help

0
Comment actions Permalink

Errr,
Big Picture:
Eclipse has an import option because it wants to put all of your files
into its notion of how to structure the project and therefore copies
them into a project. (unless you use the new option in 3.1 to link a file
system)

Intellij IDEA, on the other hand, just lives with your files whereever
they are. You can get it to deal with them in whatever way you have
structured your project by mapping source directories and test directories
and ignoring directories. IDEA will add a its own config files to your
file system where ever your project lives, you may or may not want to add
them into your version control system.

Hence you don't import files into an IDEA project.

However I think that once you get used to this major behavioral difference
you will find that this makes IDEA a lot more transparent to work with.

--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

0
Comment actions Permalink

That said, it would be nice to have an option to retain deleted content roots, so that if they were to be recreated and contents added, those contents would automatically be available. I've run across a couple of circumstances (usually code generation passes in automated builds), where the content root gets blown away and recreated, which causes IDEA to drop it as a content root. Annoying.

--Dave Griffith

0

Please sign in to leave a comment.