private InputData currentInput = null;
private LiveEditDiffViewer(Composite parent, Configuration configuration) {
colors = new Colors(parent.getDisplay());
FontMetrics defaultFontMetrics = PluginUtil.getFontMetrics(parent, null);
Composite composite = new Composite(parent, SWT.NONE);
{
composite.setLayoutData(new GridData(GridData.FILL_BOTH));
GridLayout topLayout = new GridLayout();
topLayout.numColumns = 1;
composite.setLayout(topLayout);
}
Composite labelPairComposite = new Composite(composite, SWT.NONE);
{
labelPairComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
FillLayout fillLayout = new FillLayout();
fillLayout.type = SWT.HORIZONTAL;
fillLayout.spacing = 5;
labelPairComposite.setLayout(fillLayout);
}
Label labelLeft = new Label(labelPairComposite, SWT.NONE);
Label labelRight = new Label(labelPairComposite, SWT.NONE);
Composite fourCells = new Composite(composite, SWT.NONE);
{
GridData gd = new GridData(GridData.FILL_BOTH);
gd.heightHint = defaultFontMetrics.getHeight() * 30;
gd.widthHint = defaultFontMetrics.getAverageCharWidth() * 85;
fourCells.setLayoutData(gd);
FillLayout fillLayout = new FillLayout();
fillLayout.type = SWT.VERTICAL;
fillLayout.spacing = 5;
fourCells.setLayout(fillLayout);
}
Composite treePairComposite = new Composite(fourCells, SWT.NONE);
{
FillLayout fillLayout = new FillLayout();
fillLayout.type = SWT.HORIZONTAL;
fillLayout.spacing = 5;
treePairComposite.setLayout(fillLayout);
}
linkMonitor = new TreeLinkMonitor();
TreeViewer treeViewerLeft = new TreeViewer(treePairComposite);
TreeViewer treeViewerRight = new TreeViewer(treePairComposite);
Composite sourcePairComposite = new Composite(fourCells, SWT.NONE);
{
FillLayout fillLayout = new FillLayout();
fillLayout.type = SWT.HORIZONTAL;
fillLayout.spacing = 5;
sourcePairComposite.setLayout(fillLayout);
}
SourceViewer sourceViewerLeft =
new SourceViewer(sourcePairComposite, null, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
sourceViewerLeft.getTextWidget().setEditable(false);
SourceViewer sourceViewerRight =
new SourceViewer(sourcePairComposite, null, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
sourceViewerRight.getTextWidget().setEditable(false);
{
functionStatusText = new Text(composite, SWT.READ_ONLY | SWT.MULTI | SWT.WRAP | SWT.V_SCROLL);
Display display = composite.getDisplay();
functionStatusText.setBackground(display.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
GridData gd = new GridData(GridData.FILL_BOTH);
gd.minimumHeight = defaultFontMetrics.getHeight() * 3;
gd.heightHint = gd.minimumHeight;
gd.grabExcessHorizontalSpace = true;
gd.horizontalAlignment = GridData.FILL;
functionStatusText.setLayoutData(gd);
}