View deleteProjects.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# name :Delete fruit projects | |
# toolbar : Project Explorer | |
# description : Get rid of the fruit projects | |
loadModule("/System/Resources") | |
for name in ["banana", "pineapple", "mango"]: | |
project = getProject(name) | |
project.delete(0, None) |
View createProjects.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# name : Create fruit projects | |
# toolbar : Project Explorer | |
# description : Create fruit projects | |
loadModule("/System/Resources") | |
for name in ["banana", "pineapple", "mango"]: | |
createProject(name) |
View explorer.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# name : Explore from here | |
# popup : enableFor(org.eclipse.core.resources.IResource) | |
# description : Start a file browser using current selection | |
loadModule("/System/Platform") | |
loadModule('/System/UI') | |
selection = getSelection() | |
if isinstance(selection, org.eclipse.jface.viewers.IStructuredSelection): | |
selection = selection.getFirstElement() | |
View autosave.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Before running this script you will need to turn on the 'Allow Scripts to run code in UI thread' | |
# setting by checking the box under Window>Preferences>Scripting. | |
# To run you can right click on the file and select Run As>EASE Script. | |
# A save message is printed out in the Console view every time an editor is saved. | |
# To turn off the autosave just stop the script for example, by pressing the | |
# 'Terminate' red square button in the Eclipse Console view. | |
import time | |
loadModule("/System/Platform") | |
loadModule("/System/UI") |
View add_readme.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
loadModule('/System/Resources') | |
for iproject in getWorkspace().getProjects(): | |
if not iproject.isOpen(): | |
continue | |
ifile = iproject.getFile("README.md") | |
if not ifile.exists(): | |
contents = "# " + iproject.getName() + "\n\n" |
View markers.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
loadModule('/System/Resources') | |
from org.eclipse.core.resources import IMarker | |
for ifile in findFiles("*.java"): | |
file_name = str(ifile.getLocation()) | |
print "Processing " + file_name | |
with open(file_name) as f: | |
for line_no, line in enumerate(f, start=1): | |
if "printStackTrace" in line: |