File creation [message #449313] |
Fri, 21 January 2005 09:48 |
Eclipse User |
|
|
|
Originally posted by: seb01016.fh-hagenberg.at
Hello!
I am a little bit confused how to create a new file in Eclipse. I know
that there is the NewFileCreation wizard which can be used to create own
files and I already used it to create a special file. These files can be
edited with a special editor. This editor adds an action to the
EditorContribution bar. If this action is invoked, new java files should
bed created from the information specified in the editor. My problem is
you to find out the current Path of the project, how to use the IFile
interface to create files....
To sumerize my problem up:
1) I have got the name of the file that should be created as a simple
string, for example "MyJavaFile.java" and eventually a package name as
string too.
2) I want to check if the current project has the package, if the user has
specified one, if it does not exist, I want to create the package too.
3) The new file sould be created in the current project in the specified
package (if none is specifed it sould be placed in the default package)
4) eventually refresh the navigator view (if necessary to show the new
file)
thx in advance
Hannes
|
|
|
|
Powered by
FUDForum. Page generated in 0.04224 seconds