use of org.bndtools.core.ui.resource.RequirementWithResourceLabelProvider in project bndtools by bndtools.
the class ResolutionFailurePanel method createControl.
public void createControl(final Composite parent) {
FormToolkit toolkit = new FormToolkit(parent.getDisplay());
composite = toolkit.createComposite(parent);
composite.setLayout(new GridLayout(1, false));
GridData gd;
sectProcessingErrors = toolkit.createSection(composite, Section.TITLE_BAR | Section.EXPANDED);
sectProcessingErrors.setText("Processing Errors:");
processingErrorsText = toolkit.createText(sectProcessingErrors, "", SWT.BORDER | SWT.MULTI | SWT.WRAP | SWT.READ_ONLY | SWT.V_SCROLL);
sectProcessingErrors.setClient(processingErrorsText);
ControlDecoration controlDecoration = new ControlDecoration(processingErrorsText, SWT.RIGHT | SWT.TOP);
controlDecoration.setMarginWidth(2);
controlDecoration.setDescriptionText("Double-click to view details");
controlDecoration.setImage(FieldDecorationRegistry.getDefault().getFieldDecoration(FieldDecorationRegistry.DEC_CONTENT_PROPOSAL).getImage());
gd = new GridData(SWT.FILL, SWT.FILL, true, true);
gd.widthHint = 600;
gd.heightHint = 300;
sectProcessingErrors.setLayoutData(gd);
sectUnresolved = toolkit.createSection(composite, Section.TITLE_BAR | Section.TWISTIE);
sectUnresolved.setText("Unresolved Requirements:");
createUnresolvedViewToolBar(sectUnresolved);
Tree treeUnresolved = toolkit.createTree(sectUnresolved, SWT.BORDER | SWT.FULL_SELECTION | SWT.H_SCROLL);
sectUnresolved.setClient(treeUnresolved);
gd = new GridData(SWT.FILL, SWT.FILL, true, false);
gd.widthHint = 600;
gd.heightHint = 300;
sectUnresolved.setLayoutData(gd);
unresolvedViewer = new TreeViewer(treeUnresolved);
unresolvedViewer.setContentProvider(new UnresolvedRequirementsContentProvider());
unresolvedViewer.setLabelProvider(new RequirementWithResourceLabelProvider());
setFailureViewMode();
}
Aggregations