Skip to content

Commit

Permalink
Bug 546074 - [Passage] Hardware Inspector dialog should not be editable
Browse files Browse the repository at this point in the history
Change-Id: Ib3d53779fa472b516c5691d5c56062690d889694
Signed-off-by: Alexander Fedorov <[email protected]>
  • Loading branch information
ruspl-afed committed Apr 3, 2019
1 parent f21c0e3 commit a016b5b
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,28 +25,28 @@
import org.eclipse.swt.widgets.Text;

public class HardwareInspectorDialog extends TrayDialog {

private final HardwareInspector hardwareInspector;

public HardwareInspectorDialog(Shell shell, HardwareInspector inspector) {
super(shell);
this.hardwareInspector = inspector;
}

@Override
protected void configureShell(Shell newShell) {
super.configureShell(newShell);
newShell.setText("Hardware Inspector");
newShell.setImage(LicensingImages.getImage(LicensingImages.IMG_INSPECTOR));
}

@Override
protected Control createDialogArea(Composite parent) {
Composite area = (Composite) super.createDialogArea(parent);
Text text = new Text(area, SWT.MULTI);
Text text = new Text(area, SWT.MULTI | SWT.READ_ONLY);
text.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create());
StringBuilder infoBuilder = new StringBuilder();
try (ByteArrayOutputStream baos = new ByteArrayOutputStream()){
try (ByteArrayOutputStream baos = new ByteArrayOutputStream()) {
hardwareInspector.dumpHardwareInfo(baos);
infoBuilder.append(new String(baos.toByteArray()));
} catch (Exception e) {
Expand Down

0 comments on commit a016b5b

Please sign in to comment.