calling IFile.delete method, but its a javascript keyword. [message #1610] |
Mon, 24 April 2006 20:39 |
John J. Franey Messages: 55 Registered: July 2009 |
Member |
|
|
Hi,
I think eclipse monkey is neat. I didn't expect to ever find a need to
write a monkey script, then all of a sudden: I want to extract a
project's classpath, manipulate the strings and write them out to
another file.
I wrote the em script to write contents to a new file. I was happy that
IFile.create worked fine. However, IFile.create returned error on my
second run because the file already exists. Obviously, I need to delete
the file first. Unfortunately, the 'delete' string appears to be a key
word in javascript. (Please note that I have not written a stitch of
javascript until I wanted to develop an em script.)
Is there a workaround? Does it involve writing another DOM?
Here is part of the em error message:
file.delete(false, false, null);
missing name after . operator
Here is lines of source code:
file = theProject.getFile("filename");
file.delete(false, false, null);
Thanks and regards,
John
|
|
|
Powered by
FUDForum. Page generated in 0.06171 seconds