* selected (to emulate that the user is working on that), then when filter
* on save the data should indicate that the user has spent x amount of time
* working on the method, not any of the Runnable's.
*/
JavaEditor editor = closeAndOpenEditor();
IDocument document = getDocument(editor);
StringBuilder builder = new StringBuilder();
builder.append("void aMethod() {");
builder.append(" new Runnable() { ");
builder.append(" public void run(){");
builder.append(" new Runnable() {");
builder.append(" public void run() {}");
builder.append(" };");
builder.append(" } ");
builder.append(" };");
builder.append("}");
String content = document.get();
int offset = content.indexOf("{") + 1;
int len = 0;
document.replace(offset, len, builder.toString());
content = document.get();
offset = content.indexOf("Runnable", content.indexOf("Runnable") + 1);
len = "Runnable".length();
editor.getSelectionProvider().setSelection(new TextSelection(offset, len));
long preStart = System.currentTimeMillis();
tracker.setEnabled(true);
long postStart = System.currentTimeMillis();