public IScope scope_FaultSource_property(final FaultSource exp, final EReference ref) { FunctionblockModel _model = exp.getModel(); FunctionblockModel model = ((FunctionblockModel) _model); FunctionBlock _functionblock = model.getFunctionblock(); Fault _fault = _functionblock.getFault(); EList<Property> _properties = _fault.getProperties(); return Scopes.scopeFor(_properties); }
public static EList<Type> getReferencedTypes(FunctionBlock fb) { EList<Type> types = new BasicEList<Type>(); if (fb != null) { // Analyze the status properties... if (fb.getStatus() != null) { for (Property property : fb.getStatus().getProperties()) { types.addAll(getReferencedTypes(property)); } } // Analyze the configuration properties... if (fb.getConfiguration() != null) { for (Property property : fb.getConfiguration().getProperties()) { types.addAll(getReferencedTypes(property)); } } // Analyze the fault properties... if (fb.getFault() != null) { for (Property property : fb.getFault().getProperties()) { types.addAll(getReferencedTypes(property)); } } } return types; } }
public static EList<Type> getReferencedTypes(FunctionBlock fb) { EList<Type> types = new BasicEList<Type>(); if (fb != null) { // Analyze the status properties... if (fb.getStatus() != null) { for (Property property : fb.getStatus().getProperties()) { types.addAll(getReferencedTypes(property)); } } // Analyze the configuration properties... if (fb.getConfiguration() != null) { for (Property property : fb.getConfiguration().getProperties()) { types.addAll(getReferencedTypes(property)); } } // Analyze the fault properties... if (fb.getFault() != null) { for (Property property : fb.getFault().getProperties()) { types.addAll(getReferencedTypes(property)); } } } return types; } }
private void generateForFunctionblock( FunctionBlock fb, InvocationContext context, String targetPath, String jsonFileExt, IGeneratedWriter outputter) { if (fb == null) { throw new IllegalArgumentException("fb must not be null null"); } String stateTargetPath = targetPath + "/properties"; String operationTargetPath = targetPath + "/operations"; String eventTargetPath = targetPath + "/events"; Configuration configuration = fb.getConfiguration(); Status status = fb.getStatus(); Fault fault = fb.getFault(); if (configuration != null || status != null || fault != null) { generateTask(fb, context, outputter, ValidationTaskFactory.getPropertiesValidationTask(jsonFileExt, stateTargetPath)); } generateConfiguration(context, jsonFileExt, outputter, stateTargetPath, configuration); generateStatus(context, jsonFileExt, outputter, stateTargetPath, status); generateFault(context, jsonFileExt, outputter, stateTargetPath, fault); generateEvents(fb, context, jsonFileExt, outputter, eventTargetPath); generateOperations(fb, context, jsonFileExt, outputter, operationTargetPath); }
final Fault fault = functionblock.getFault(); if( fault != null ) { final String errMsg = "Unsupported element <fault>" + STR_ABORT_GENERATOR;
private void generateForFunctionBlock(InformationModel infomodel, FunctionblockModel fbm, IGeneratedWriter outputter) { ChainedCodeGeneratorTask<FunctionblockModel> generator = new ChainedCodeGeneratorTask<FunctionblockModel>(); if (fbm.getFunctionblock().getStatus() != null) { generator.addTask(new JavaFunctionblockStatusGeneratorTask(JAVA_FILE_EXTENSION, FB_TARGET_PATH, FB_PACKAGE, JAVA_INTERFACE_PREFIX, STATUS_SUFFIX, ENTITY_PACKAGE)); } if (fbm.getFunctionblock().getConfiguration() != null) { generator.addTask(new JavaFunctionblockConfigurationGeneratorTask(JAVA_FILE_EXTENSION, FB_TARGET_PATH, FB_PACKAGE, JAVA_INTERFACE_PREFIX, CONFIG_SUFFIX, ENTITY_PACKAGE)); } if (fbm.getFunctionblock().getFault() != null) { generator.addTask(new JavaFunctionblockFaultGeneratorTask(JAVA_FILE_EXTENSION, FB_TARGET_PATH, FB_PACKAGE, JAVA_INTERFACE_PREFIX, FAULT_SUFFIX, ENTITY_PACKAGE)); } generator.addTask(new JavaFunctionblockImplGeneratorTask(JAVA_FILE_EXTENSION, FB_TARGET_PATH, FB_PACKAGE, JAVA_INTERFACE_PREFIX, JAVA_IMPL_SUFFIX, ENTITY_PACKAGE)); generator.addTask(new JavaFunctionblockInterfaceGeneratorTask(JAVA_FILE_EXTENSION, FB_TARGET_PATH, FB_PACKAGE, JAVA_INTERFACE_PREFIX, ENTITY_PACKAGE)); generator.generate(fbm,null, outputter); }
Fault _fault = _functionblock.getFault(); boolean _notEquals = (!Objects.equal(_fault, null)); if (_notEquals) { Fault _fault_1 = _functionblock_1.getFault(); EList<Property> _properties = _fault_1.getProperties(); for(final Property property : _properties) { Fault _fault_2 = _functionblock_2.getFault(); EList<Property> _properties_1 = _fault_2.getProperties(); for(final Property property_1 : _properties_1) {
Fault _fault = fb.getFault(); boolean _tripleNotEquals_4 = (_fault != null); if (!_tripleNotEquals_4) { _and_2 = false; } else { Fault _fault_1 = fb.getFault(); EList<Property> _properties_4 = _fault_1.getProperties(); boolean _tripleNotEquals_5 = (_properties_4 != null); Fault _fault_2 = fb.getFault(); EList<Property> _properties_5 = _fault_2.getProperties(); for (final Property property_2 : _properties_5) {
_builder.newLine(); Fault _fault = fb.getFault(); boolean _notEquals_2 = (!Objects.equal(_fault, null)); if (_notEquals_2) {
_builder.newLine(); Fault _fault = fb.getFault(); boolean _tripleNotEquals_2 = (_fault != null); if (_tripleNotEquals_2) {