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
Michael Schwarz
CUP Eclipse Plugin
Commits
c761c9b1
Commit
c761c9b1
authored
Feb 20, 2016
by
Michael Schwarz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added information about conflicts to overview
parent
aac36302
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
3 deletions
+38
-3
CupPlugin/src/de/tum/in/www2/cupplugin/views/CupOverviewView.java
...n/src/de/tum/in/www2/cupplugin/views/CupOverviewView.java
+38
-3
No files found.
CupPlugin/src/de/tum/in/www2/cupplugin/views/CupOverviewView.java
View file @
c761c9b1
...
...
@@ -21,6 +21,9 @@ import org.eclipse.ui.forms.widgets.FormToolkit;
import
org.eclipse.ui.forms.widgets.ScrolledForm
;
import
org.eclipse.ui.forms.widgets.Section
;
import
de.in.tum.www2.cup.Conflict
;
import
de.in.tum.www2.cup.ConflictResolutionManager
;
import
de.in.tum.www2.cup.ShiftReduceConflict
;
import
de.in.tum.www2.cup.Statistics
;
import
de.in.tum.www2.cup.analysis.StatisticsVisitor
;
import
de.in.tum.www2.cup.ast.ParserResult
;
...
...
@@ -47,7 +50,8 @@ public class CupOverviewView extends FailableView
private
ParserResult
ast
;
private
Statistics
stats
;
private
ControllerStatistics
controllerStats
;
private
ConflictResolutionManager
crm
;
static
class
SimpleTable
{
private
final
Color
NORMAL_COLOR
=
new
Color
(
Display
.
getCurrent
(),
Colors
.
darkGray
);
...
...
@@ -118,6 +122,10 @@ public class CupOverviewView extends FailableView
private
static
final
int
STATUS_PRODUCTION_NOTREDUCED
=
8
;
private
static
final
int
STATUS_ERRORS
=
9
;
private
static
final
int
CONFLICTS_TOTAL
=
0
;
private
static
final
int
CONFLICTS_SR
=
1
;
private
static
final
int
CONFLICTS_RR
=
2
;
private
static
final
int
DEBUGGER_TARGET_FILE
=
0
;
private
static
final
int
DEBUGGER_BREAKPOINTS
=
1
;
...
...
@@ -138,6 +146,7 @@ public class CupOverviewView extends FailableView
private
Pair
<
Composite
,
SimpleTable
>
commonSection
;
private
Pair
<
Composite
,
SimpleTable
>
pluginSection
;
private
Pair
<
Composite
,
SimpleTable
>
debuggerSection
;
private
Pair
<
Composite
,
SimpleTable
>
conflictsSection
;
boolean
visible
=
false
;
...
...
@@ -172,7 +181,10 @@ public class CupOverviewView extends FailableView
st
.
setRowLabel
(
STATUS_PRODUCTION_NOTREDUCED
,
"Not reduced Productions:"
);
st
.
setRowLabel
(
STATUS_ERRORS
,
"Errors:"
);
createTableSection
(
"Conflicts"
,
""
,
false
,
3
);
conflictsSection
=
createTableSection
(
"Unresolved conflicts"
,
""
,
false
,
3
);
conflictsSection
.
getSecond
().
setRowLabel
(
CONFLICTS_TOTAL
,
"Total:"
);
conflictsSection
.
getSecond
().
setRowLabel
(
CONFLICTS_SR
,
"Shift/Reduce:"
);
conflictsSection
.
getSecond
().
setRowLabel
(
CONFLICTS_RR
,
"Reduce/Reduce:"
);
debuggerSection
=
createTableSection
(
"Debugger"
,
""
,
false
,
2
);
...
...
@@ -353,6 +365,25 @@ public class CupOverviewView extends FailableView
pluginSection
.
getFirst
().
layout
();
}
if
(
this
.
crm
!=
null
){
SimpleTable
tbl
=
conflictsSection
.
getSecond
();
int
sr
=
0
,
rr
=
0
;
for
(
Conflict
c
:
crm
.
getAllConflicts
()){
if
(
c
instanceof
ShiftReduceConflict
){
sr
++;
}
else
{
rr
++;
}
}
tbl
.
setRowValue
(
CONFLICTS_TOTAL
,
sr
+
rr
);
tbl
.
setRowValue
(
CONFLICTS_SR
,
sr
);
tbl
.
setRowValue
(
CONFLICTS_RR
,
rr
);
conflictsSection
.
getFirst
().
layout
();
}
if
(
commonSectionNeedsLayout
)
commonSection
.
getFirst
().
layout
();
}
...
...
@@ -364,7 +395,11 @@ public class CupOverviewView extends FailableView
this
.
stats
=
model
.
getStatistics
();
this
.
controllerStats
=
model
.
getControllerStatistics
();
this
.
ast
=
model
.
getAstModel
();
if
(
model
.
getLaLrResult
()
!=
null
){
this
.
crm
=
new
ConflictResolutionManager
(
model
.
getLaLrResult
().
getContext
());
}
if
(
visible
)
updateStatistics
();
}
...
...
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