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
88a1cea3
Commit
88a1cea3
authored
Feb 18, 2016
by
Michael Schwarz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Layout improvements
parent
2a8891d3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
6 deletions
+15
-6
CupPlugin/src/de/tum/in/www2/cupplugin/views/ConflictPanel.java
...gin/src/de/tum/in/www2/cupplugin/views/ConflictPanel.java
+3
-1
CupPlugin/src/de/tum/in/www2/cupplugin/views/CupConflictsView.java
.../src/de/tum/in/www2/cupplugin/views/CupConflictsView.java
+12
-5
No files found.
CupPlugin/src/de/tum/in/www2/cupplugin/views/ConflictPanel.java
View file @
88a1cea3
...
...
@@ -46,7 +46,7 @@ class ConflictPanel extends Composite {
private
static
final
int
BASE_HEIGHT
=
85
;
private
static
final
int
COLUMNS
=
3
;
private
static
final
int
HEADING_FONT_SIZE
=
14
;
private
Conflict
conflict
;
// srdetails may be null if conflict is not a shift-reduce conflict
...
...
@@ -89,6 +89,8 @@ class ConflictPanel extends Composite {
gridData
.
grabExcessHorizontalSpace
=
true
;
gridData
.
widthHint
=
100
;
// Do not remove. This is a bugfix. :-)
gridData
.
heightHint
=
BASE_HEIGHT
;
gridData
.
horizontalAlignment
=
GridData
.
FILL
;
gridData
.
horizontalSpan
=
2
;
setLayoutData
(
gridData
);
GridLayout
gl
=
new
GridLayout
();
...
...
CupPlugin/src/de/tum/in/www2/cupplugin/views/CupConflictsView.java
View file @
88a1cea3
...
...
@@ -16,6 +16,7 @@ import org.eclipse.swt.events.SelectionListener;
import
org.eclipse.swt.graphics.Color
;
import
org.eclipse.swt.graphics.Point
;
import
org.eclipse.swt.layout.FillLayout
;
import
org.eclipse.swt.layout.GridData
;
import
org.eclipse.swt.layout.GridLayout
;
import
org.eclipse.swt.widgets.Button
;
import
org.eclipse.swt.widgets.Composite
;
...
...
@@ -102,15 +103,21 @@ public class CupConflictsView extends FailableView implements ICupEditorPageVisi
scrolled
.
setContent
(
list
);
GridLayout
gl
=
new
GridLayout
();
gl
.
numColumns
=
1
;
gl
.
makeColumnsEqualWidth
=
tru
e
;
gl
.
numColumns
=
2
;
gl
.
makeColumnsEqualWidth
=
fals
e
;
list
.
setLayout
(
gl
);
GridData
gridDataCountConflicts
=
new
GridData
(
SWT
.
FILL
,
SWT
.
FILL
,
true
,
false
);
gridDataCountConflicts
.
horizontalSpan
=
2
;
this
.
countConflictsLabel
=
new
Label
(
list
,
SWT
.
NONE
);
this
.
countConflictsLabel
.
setBackground
(
new
Color
(
Display
.
getCurrent
(),
Colors
.
white
));
this
.
countConflictsLabel
.
setLayoutData
(
gridDataCountConflicts
);
GridData
gridDataConnectedResolution
=
new
GridData
(
SWT
.
FILL
,
SWT
.
FILL
,
true
,
false
);
gridDataConnectedResolution
.
horizontalSpan
=
2
;
this
.
connectedResolutionLabel
=
new
Label
(
list
,
SWT
.
NONE
);
this
.
connectedResolutionLabel
.
setBackground
(
new
Color
(
Display
.
getCurrent
(),
Colors
.
white
));
this
.
connectedResolutionLabel
.
setLayoutData
(
gridDataConnectedResolution
);
this
.
connectedResolutionAbort
=
new
Button
(
list
,
SWT
.
PUSH
);
this
.
connectedResolutionAbort
.
setVisible
(
false
);
...
...
@@ -244,6 +251,7 @@ public class CupConflictsView extends FailableView implements ICupEditorPageVisi
scrolled
.
layout
(
true
,
true
);
scrolled
.
setMinSize
(
list
.
computeSize
(
SWT
.
DEFAULT
,
SWT
.
DEFAULT
));
}
public
void
dispose
()
{
editor
.
getModel
().
unregisterModelObserver
(
this
);
...
...
@@ -397,12 +405,9 @@ public class CupConflictsView extends FailableView implements ICupEditorPageVisi
document
.
replace
(
positionForPrec
,
0
,
toInsert
);
}
catch
(
BadLocationException
e
)
{
// TODO Auto-generated catch block
e
.
printStackTrace
();
}
catch
(
de
.
tum
.
in
.
www2
.
cupplugin
.
views
.
PrecedenceToInsert
.
PrecedenceCyclicException
e
)
{
// TODO Auto-generated catch block
e
.
printStackTrace
();
}
finally
{
...
...
@@ -410,6 +415,8 @@ public class CupConflictsView extends FailableView implements ICupEditorPageVisi
}
}
//TODO: What happens with breakpoints if we insert precedences
void
insertPrecedence
(
terminal
terminal
,
Precedence
.
Type
assoc
){
try
{
String
toInsert
=
"precedence "
+
assoc
.
toString
().
toLowerCase
()
+
" "
+
terminal
.
name
()+
"; // Inserted by Eclipse plugin"
;
...
...
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