Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CUP Eclipse Plugin
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dr. Michael Petter
CUP Eclipse Plugin
Commits
6d1d1301
Commit
6d1d1301
authored
Nov 28, 2014
by
Sebastian Pretscher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed the locationpatch job(obsolet)
parent
eb22c744
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
31 deletions
+4
-31
CupPlugin/src/de/tum/in/www2/cupplugin/controller/Controller.java
...n/src/de/tum/in/www2/cupplugin/controller/Controller.java
+2
-16
CupPlugin/src/de/tum/in/www2/cupplugin/controller/DocumentDidChangeJob.java
...um/in/www2/cupplugin/controller/DocumentDidChangeJob.java
+0
-13
CupPlugin/src/de/tum/in/www2/cupplugin/editors/CupContentOutlinePage.java
.../tum/in/www2/cupplugin/editors/CupContentOutlinePage.java
+1
-1
CupPlugin/src/de/tum/in/www2/cupplugin/editors/CupTextHover.java
...in/src/de/tum/in/www2/cupplugin/editors/CupTextHover.java
+1
-1
No files found.
CupPlugin/src/de/tum/in/www2/cupplugin/controller/Controller.java
View file @
6d1d1301
...
...
@@ -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
();
...
...
CupPlugin/src/de/tum/in/www2/cupplugin/controller/DocumentDidChangeJob.java
View file @
6d1d1301
...
...
@@ -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
);
...
...
CupPlugin/src/de/tum/in/www2/cupplugin/editors/CupContentOutlinePage.java
View file @
6d1d1301
...
...
@@ -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
...
...
CupPlugin/src/de/tum/in/www2/cupplugin/editors/CupTextHover.java
View file @
6d1d1301
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment