Commit 6d1d1301 authored by Sebastian Pretscher's avatar Sebastian Pretscher

Removed the locationpatch job(obsolet)

parent eb22c744
......@@ -23,7 +23,7 @@ import de.tum.in.www2.cupplugin.model.Model;
public class Controller {
public static enum JobsToDo {
doNothing, parseCode, locationPatch, buildTable
doNothing, parseCode, buildTable
};
// The Job handling changes in a document is triggered after x seconds
......@@ -171,11 +171,6 @@ public class Controller {
if (event.getText().trim().length() == 0
&& (document.getLength() <= (event.getOffset() + 1) || document
.getChar(event.getOffset() + 1) == (' '))) {
if (event.getText().equals(
System.getProperty("line.separator"))) {
// Some debug outut...
possibleJobs.add(JobsToDo.locationPatch);
}
if (event.getText().equals("")) {
char beforeDelete = '+'; // DUMMY
int offset = event.getOffset();
......@@ -211,25 +206,19 @@ public class Controller {
if (event.getText().equals("{")) {
possibleJobs.add(JobsToDo.parseCode);
possibleJobs.add(JobsToDo.buildTable);
} else {
possibleJobs.add(JobsToDo.locationPatch);
}
break;
case CupPartionScanner.MULTILINE_COMMENT:
if (event.getText().equals("/")) {
possibleJobs.add(JobsToDo.parseCode);
possibleJobs.add(JobsToDo.buildTable);
} else {
possibleJobs.add(JobsToDo.locationPatch);
}
break;
case CupPartionScanner.SINGLE_COMMENT:
if (event.getText().equals("/")) {
possibleJobs.add(JobsToDo.parseCode);
possibleJobs.add(JobsToDo.buildTable);
} else {
possibleJobs.add(JobsToDo.locationPatch);
}
}
break;
default:
possibleJobs.add(JobsToDo.parseCode);
......@@ -286,9 +275,6 @@ public class Controller {
for (JobsToDo job : observedJobs) {
switch (job) {
case locationPatch:
addJobToDo(job);
break;
case parseCode:
long modelAstRev = Model.getInstanceForDocument(document)
.getAstModelRevisionNumber();
......
......@@ -105,19 +105,6 @@ public class DocumentDidChangeJob extends Job {
if (document == null)
return Status.CANCEL_STATUS;
if (jobs.contains(JobsToDo.locationPatch)
&& (jobs.contains(JobsToDo.parseCode) || jobs
.contains(JobsToDo.buildTable))) {
jobs.remove(JobsToDo.locationPatch);
}
// TODO: the location patcher need to always run, even when only comments or
// new lines were edited.
// if (jobs.contains(JobsToDo.locationPatch)) {
LocationPatchJob locPatch = new LocationPatchJob(documentEvents);
locPatch.setSystem(true);
locPatch.schedule();
// }
IFile file = ((FileEditorInput) myEditor.getEditorInput()).getFile();
CupEditorErrorReporter errorReporter = new CupEditorErrorReporter(file);
......
......@@ -97,7 +97,7 @@ public class CupContentOutlinePage extends ContentOutlinePage implements
@Override
public EnumSet<JobsToDo> getRequiredJobs() {
return EnumSet.of(JobsToDo.locationPatch, JobsToDo.parseCode);
return EnumSet.of(JobsToDo.parseCode);
}
@Override
......
......@@ -70,7 +70,7 @@ public class CupTextHover implements ITextHover,
@Override
public EnumSet<JobsToDo> getRequiredJobs() {
return EnumSet.of(JobsToDo.locationPatch, JobsToDo.parseCode);
return EnumSet.of(JobsToDo.parseCode);
}
@Override
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment