inst.insertPosition = insertPosition;
inst.rotationAngle = rotationAngle;
inst.position = position;
- ComponentUtils.addComponent(root, component, inst);
+ PipelineComponent newComponent = ComponentUtils.addComponent(root, component, inst);
+ componentAdded(newComponent);
} catch (Exception e) {
ExceptionUtils.logAndShowError("Cannot add component", e);
}
}
+ /**
+ * This method does nothing, but can be overridden by a subclass to do additional
+ * post-processing for a newly added component.
+ *
+ * @param newComponent A newly added pipeline component
+ */
+ protected void componentAdded(PipelineComponent newComponent) {
+ // Nothing to do here
+ }
+
public boolean mouseClicked(MouseEvent e) {
if (e.getClickCount() == 1 && e.getButton() == MouseEvent.BUTTON1) {
int type = panel.getPickType();
GridDataFactory.fillDefaults().span(2, 1).align(SWT.END, SWT.END).grab(true, false).applyTo(validationLabel);
if (!allowed.contains(PositionType.NEXT) && !allowed.contains(PositionType.PREVIOUS)) {
- turnViewer.getList().setEnabled(false);
- endViewer.getList().setEnabled(false);
+ if (turnViewer != null)
+ turnViewer.getList().setEnabled(false);
+ if (endViewer != null)
+ endViewer.getList().setEnabled(false);
inlineSplit = true;
}