Skip to main content

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 20:39
John J. Franey is currently offline John J. FraneyFriend
Messages: 55
Registered: July 2009

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,
Previous Topic:calling IFile.delete method, but its a javascript keyword.
Next Topic:Monkey vs Groovy-Monkey vs EclipseShell
Goto Forum:

Current Time: Sun Feb 25 05:29:44 GMT 2024

Powered by FUDForum. Page generated in 0.01715 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top