+
+ // TODO : check if all parameter always have a linked attribute.
+ if (element instanceof ProcessParametersView.ObjectWithName) {
+ ProcessParametersView.ObjectWithName own = (ProcessParametersView.ObjectWithName) element;
+ ExecutionSpecAttribute esa = executionSpec.getAttributes().get(
+ own.name);
+ if (esa != null) {
+ // Paramater is a primitive with no list of choices linked by
+ // the specs
+ if (own.obj instanceof PrimitiveAccessor
+ && !(esa instanceof RefSpecAttribute))
+ return strEditor;
+ else if (esa instanceof RefSpecAttribute) {
+ RefSpecAttribute rsa = (RefSpecAttribute) esa;
+
+ Iterator<RefValueChoice> choices = rsa.getChoices()
+ .iterator();
+ List<String> items = new ArrayList<String>();
+ while (choices.hasNext()) {
+ items.add(choices.next().getName());
+ }
+
+ // persists order of the elements in the current combo box
+ comboBoxes.put(own.name, items);
+
+ String[] itemsStr = new String[items.size()];
+ ComboBoxCellEditor comboEditor = new ComboBoxCellEditor(
+ ((TableViewer) getViewer()).getTable(),
+ items.toArray(itemsStr));
+ return comboEditor;
+ }
+ }
+ }
+ if (log.isTraceEnabled()) {
+ log.warn(" No cell Editor fits for element : " + element.toString()
+ + " of class : " + element.getClass().getName());
+ }
+ return null;