1

I am creating my own custom IDE for my programming language, and I came upon a problem. In any IDE, you always want to be able to import images, other projects, and other files. Therefore, I would definitely love to have that in my IDE. I am using JavaFX for my GUI. I have already created a FileChooser, and a user can successfully choose a File they want to import into my IDE.

Here's My Question When a user selects a File, should I use the File.copy() method to copy the File over to the IDE, or should I copy all the bytes from the File onto a resources file in my IDE? Copying the File directly would lead me to have a Resources folder attached to the Project, but I do not know if that would be the most optimal way of importing Files into my IDE. Is there a preferred way of importing and saving Files in Java? What would be the best way for me to do it in this case?

Thanks in advance!

Community
  • 1
  • 1
Jaboyc
  • 567
  • 1
  • 8
  • 16
  • Just going to say that most IDEs support both, linking a file and copy a file ;) – SomeJavaGuy Aug 12 '16 at 12:17
  • @KevinEsche Doesn't linking a file mean that the file isn't imported, there is just a reference to the location of the file? I haven't even thought about adding the functionality of linking files. I'm just confused on exactly how to copy a file... – Jaboyc Aug 12 '16 at 12:19

1 Answers1

0

Ideally user should have have both options and IDEs tend to support both ways.

Practically, don't get stack on this. Implement either one, and move one with other tasks to have a working prototype earlier.

It is more important to check if your language has design flaws before you devote too much time decorating gui.

sixtytrees
  • 1,156
  • 1
  • 10
  • 25
  • Because files are going to be an important aspect of my programming language, I feel scared to just rush into a decision without having background knowledge of which method is the best method (hence the reason I am asking StackOverflow). Good answer though, I just want to have concrete evidence one method will do better than another. – Jaboyc Aug 12 '16 at 12:27