Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
This script runs with Eclipse EASE Jython engine. It adds a file to all open projects in the workspace, noting if they are a java or python project.
for iproject in getWorkspace().getProjects():
if not iproject.isOpen():
ifile = iproject.getFile("")
if not ifile.exists():
contents = "# " + iproject.getName() + "\n\n"
if iproject.hasNature("org.eclipse.jdt.core.javanature"):
contents += "A Java Project\n"
elif iproject.hasNature("org.python.pydev.pythonNature"):
contents += "A Python Project\n"
writeFile(ifile, contents)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.