capabilities[0].setInputs(newIOs); else capabilities[0].setOutputs(newIOs);
TypeCapability annotation = ReflectionUtil.getAnnotation(componentClass, TypeCapability.class); String[] inputTypesOrFeatureNames = annotation.inputs(); capability.setInputs(createTypesOrFeatures(inputTypesOrFeatureNames)); String[] outputTypesOrFeatureNames = annotation.outputs(); capability.setOutputs(createTypesOrFeatures(outputTypesOrFeatureNames));
/** * Removes the feature. * * @param c the c * @param removeItem the remove item */ private void removeFeature(Capability c, TableTreeItem removeItem) { String shortFeatureName = removeItem.getText(NAME_COL); if (shortFeatureName.equals(ALL_FEATURES)) { if (isInput(removeItem)) { TypeOrFeature tfItem = getTypeOrFeature(c.getInputs(), getFullyQualifiedName(removeItem .getParentItem())); tfItem.setAllAnnotatorFeatures(false); } if (isOutput(removeItem) /* || isUpdate(removeItem) */) { TypeOrFeature tfItem = getTypeOrFeature(c.getOutputs(), getFullyQualifiedName(removeItem .getParentItem())); tfItem.setAllAnnotatorFeatures(false); } } else { String featureNameToRemove = getFullyQualifiedName(removeItem.getParentItem()) + ":" + removeItem.getText(NAME_COL); if (isInput(removeItem)) c.setInputs(typeOrFeatureArrayRemove(c.getInputs(), featureNameToRemove)); if (isOutput(removeItem) /* || isUpdate(removeItem) */) c.setOutputs(typeOrFeatureArrayRemove(c.getOutputs(), featureNameToRemove)); } removeItem.dispose(); }
c[ic].setInputs(deleteTypeOrFeatureFromCapability(c[ic].getInputs(), isType, typeOrFeatureName, typeName)); c[ic].setOutputs(deleteTypeOrFeatureFromCapability(c[ic].getOutputs(), isType,
c.setInputs(typeOrFeatureArrayRemove(c.getInputs(), typeInput)); removeAllFeatItemGui(editItem, INPUT_COL);
c.setInputs(typeOrFeatureArrayRemove(c.getInputs(), typeNameToRemove)); if (isOutput(removeItem) /* || isUpdate(removeItem) */) c.setOutputs(typeOrFeatureArrayRemove(c.getOutputs(), typeNameToRemove));