Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Dash » calling IFile.delete method, but its a javascript keyword.
calling IFile.delete method, but its a javascript keyword. [message #1610] Mon, 24 April 2006 16:39
John J. Franey is currently offline 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
Previous Topic:calling IFile.delete method, but its a javascript keyword.
Next Topic:Monkey vs Groovy-Monkey vs EclipseShell
Goto Forum:
  


Current Time: Fri Aug 22 07:58:17 EDT 2014

Powered by FUDForum. Page generated in 0.02599 seconds