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
005bdfee
Commit
005bdfee
authored
Feb 21, 2016
by
Michael Schwarz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
If choice can no longer be changed make green to indicate that it is not
an error
parent
4004e645
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
5 deletions
+27
-5
CupPlugin/src/de/tum/in/www2/cupplugin/views/ConflictPanel.java
...gin/src/de/tum/in/www2/cupplugin/views/ConflictPanel.java
+27
-5
No files found.
CupPlugin/src/de/tum/in/www2/cupplugin/views/ConflictPanel.java
View file @
005bdfee
...
...
@@ -71,7 +71,10 @@ class ConflictPanel extends Composite {
private
Color
foregroundColorShiftReduceAffected
=
new
Color
(
Display
.
getCurrent
(),
Colors
.
conflictFgRed
);
private
Color
backgroundColorShiftReduceUnrelated
=
new
Color
(
Display
.
getCurrent
(),
Colors
.
conflictBgGray
);
private
Color
foregroundColorShiftReduceUnrelated
=
new
Color
(
Display
.
getCurrent
(),
Colors
.
conflictFgGray
);
private
Color
textConflictFixResolved
=
new
Color
(
Display
.
getCurrent
(),
Colors
.
green
);
private
Color
textDefault
=
new
Color
(
Display
.
getCurrent
(),
Colors
.
black
);
private
GridData
gridData
;
public
ConflictPanel
(
CupConflictsView
cupConflictsView
,
Composite
parent
,
int
style
)
{
...
...
@@ -397,7 +400,7 @@ class ConflictPanel extends Composite {
*/
public
boolean
markIfAffected
(
PrecedenceToInsert
pti
){
if
(
conflict
instanceof
ShiftReduceConflict
&&
pti
.
isAffected
(
srdetails
)){
resolutionOptions
.
setForeground
(
textDefault
);
partOfCurrentConnected
=
true
;
changeColors
(
backgroundColorShiftReduceAffected
,
foregroundColorShiftReduceAffected
);
...
...
@@ -408,9 +411,15 @@ class ConflictPanel extends Composite {
// Used assoc to sort out. Can't be changed anymore (unless this is the start)
if
(
srdetails
.
shiftAndReducePrecedenceFromSameTerminal
()){
resolutionOptions
.
setEnabled
(
forceEnableDropdown
);
if
(!
forceEnableDropdown
){
resolutionOptions
.
setForeground
(
textConflictFixResolved
);
}
}
else
{
resolutionOptions
.
setEnabled
(
pti
.
canChangeDefaultResolution
(
srdetails
));
if
(!
pti
.
canChangeDefaultResolution
(
srdetails
)){
resolutionOptions
.
setEnabled
(
false
);
resolutionOptions
.
setForeground
(
textConflictFixResolved
);
}
}
}
else
if
(
pti
.
isResolvedInFavorOfShift
(
srdetails
)){
...
...
@@ -420,9 +429,15 @@ class ConflictPanel extends Composite {
// Used assoc to sort out. Can't be changed anymore
if
(
srdetails
.
shiftAndReducePrecedenceFromSameTerminal
()){
resolutionOptions
.
setEnabled
(
forceEnableDropdown
);
if
(!
forceEnableDropdown
){
resolutionOptions
.
setForeground
(
textConflictFixResolved
);
}
}
else
{
resolutionOptions
.
setEnabled
(
pti
.
canChangeDefaultResolution
(
srdetails
));
if
(!
pti
.
canChangeDefaultResolution
(
srdetails
)){
resolutionOptions
.
setEnabled
(
false
);
resolutionOptions
.
setForeground
(
textConflictFixResolved
);
}
}
}
...
...
@@ -433,9 +448,15 @@ class ConflictPanel extends Composite {
// Used assoc to sort out. Can't be changed anymore (unless this is the start)
if
(
srdetails
.
shiftAndReducePrecedenceFromSameTerminal
()){
resolutionOptions
.
setEnabled
(
forceEnableDropdown
);
if
(!
forceEnableDropdown
){
resolutionOptions
.
setForeground
(
textConflictFixResolved
);
}
}
else
{
resolutionOptions
.
setEnabled
(
pti
.
canChangeDefaultResolution
(
srdetails
));
if
(!
pti
.
canChangeDefaultResolution
(
srdetails
)){
resolutionOptions
.
setEnabled
(
false
);
resolutionOptions
.
setForeground
(
textConflictFixResolved
);
}
}
}
else
{
...
...
@@ -470,6 +491,7 @@ class ConflictPanel extends Composite {
resolutionOptions
.
setEnabled
(
true
);
resolutionOptions
.
select
(
0
);
changeColors
(
backgroundColorShiftReduce
,
foregroundColorShiftReduce
);
resolutionOptions
.
setForeground
(
textDefault
);
}
partOfCurrentConnected
=
false
;
...
...
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