-
- private void createExistingCompositeGroup(Composite parent) {
- Group group= new Group(parent, SWT.NONE);
- group.setFont(parent.getFont());
- group.setText("Mapped composite");
- GridDataFactory.fillDefaults().grab(true, false).applyTo(group);
- group.setLayout(new GridLayout(1, false));
-
- Composite cmposite = new Composite(group, SWT.NONE);
- cmposite.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));
- cmposite.setLayout(new GridLayout(2, false));
-
- Label compositeMappingLabel = new Label(cmposite, SWT.NONE);
- compositeMappingLabel.setText("Select composite");
-
- compositeMappingCombo = new Combo(cmposite, SWT.READ_ONLY | SWT.BORDER);
- GridDataFactory.fillDefaults().grab(true, false).applyTo(compositeMappingCombo);
- compositeMappingCombo.addSelectionListener(new SelectionAdapter() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- super.widgetSelected(e);
- recalculateMappapleComponents();
- }
- });
-
- Label compojnentMappingLabel = new Label(cmposite, SWT.NONE);
- compojnentMappingLabel.setText("Select component");
-
- componentMappingCombo = new Combo(cmposite, SWT.READ_ONLY | SWT.BORDER);
- GridDataFactory.fillDefaults().grab(true, false).applyTo(componentMappingCombo);
+ SCLContext ctx = SCLContext.getCurrent();
+ Object oldGraph = ctx.put("graph", graph);
+ try {
+ return new BrightnessExpressionValidator(
+ importEntry != null
+ ? Arrays.asList(importEntry)
+ : Collections.emptyList());
+ } finally {
+ ctx.put("graph", oldGraph);