+ public ComponentSelectionDialog(Shell parentShell, Set<PositionType> allowed, PipelineComponent component, String libUri){
+ super(parentShell);
+ this.allowed = allowed;
+ this.component = component;
+ filterAllowed = new HashSet<PositionType>();
+ insertAdjustable = component instanceof InlineComponent ? ((InlineComponent)component).isVariableLength() : false;
+ lenghtAdjustable = false;
+ this.libUri = libUri;
+ }
+
+ protected List<Item> getItems(Class c, String libUri) throws DatabaseException{
+ if (InlineComponent.class.equals(c)) {
+ return P3DUtil.getInlines(libUri);
+ } else if (TurnComponent.class.equals(c)) {
+ return P3DUtil.getTurns(libUri);
+ } else if (EndComponent.class.equals(c)) {
+ return P3DUtil.getEnds(libUri);
+ } else {
+ return null;
+ }
+ }
+