Java Code Examples for org.eclipse.emf.common.util.ECollections#newBasicEList()

The following examples show how to use org.eclipse.emf.common.util.ECollections#newBasicEList() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AverageModuleImpl.java    From neoscada with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * 
 * @generated NOT
 */
@Override
public EList<InputSpecification> getKnownInputs ()
{
    if ( this.knownInputs == null )
    {
        final BasicEList<InputSpecification> inputs = ECollections.newBasicEList ();
        inputs.add ( Components.createInput ( "input" ) );
        this.knownInputs = ECollections.unmodifiableEList ( inputs );
    }
    return this.knownInputs;
}
 
Example 2
Source File: AverageModuleImpl.java    From neoscada with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * 
 * @generated NOT
 */
@Override
public EList<OutputSpecification> getKnownOutputs ()
{
    if ( this.knownOutputs == null )
    {
        final BasicEList<OutputSpecification> outputs = ECollections.newBasicEList ();
        for ( final AverageReferenceType type : AverageReferenceType.values () )
        {
            outputs.add ( Components.createOutput ( type.getLiteral (), DataType.FLOAT ) );
        }
        this.knownOutputs = ECollections.unmodifiableEList ( outputs );
    }
    return this.knownOutputs;
}
 
Example 3
Source File: FormulaModuleImpl.java    From neoscada with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * 
 * @generated NOT
 */
@Override
public EList<OutputSpecification> getKnownOutputs ()
{
    if ( this.knownOutputs == null )
    {
        final BasicEList<OutputSpecification> outputs = ECollections.newBasicEList ();
        outputs.add ( Components.createOutput ( "output", null ) );
        this.knownOutputs = ECollections.unmodifiableEList ( outputs );
    }
    return this.knownOutputs;
}
 
Example 4
Source File: MovingAverageModuleImpl.java    From neoscada with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 *
 * @generated NOT
 */
@Override
public EList<InputSpecification> getKnownInputs ()
{
    if ( this.knownInputs == null )
    {
        final BasicEList<InputSpecification> inputs = ECollections.newBasicEList ();
        inputs.add ( Components.createInput ( "input" ) );
        this.knownInputs = ECollections.unmodifiableEList ( inputs );
    }
    return this.knownInputs;
}
 
Example 5
Source File: MovingAverageModuleImpl.java    From neoscada with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 *
 * @generated NOT
 */
@Override
public EList<OutputSpecification> getKnownOutputs ()
{
    if ( this.knownOutputs == null )
    {
        final BasicEList<OutputSpecification> outputs = ECollections.newBasicEList ();
        for ( final MovingAverageReferenceType type : MovingAverageReferenceType.values () )
        {
            outputs.add ( Components.createOutput ( type.getLiteral (), DataType.FLOAT ) );
        }
        this.knownOutputs = ECollections.unmodifiableEList ( outputs );
    }
    return this.knownOutputs;
}
 
Example 6
Source File: ArduinoDriverImpl.java    From neoscada with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * 
 * @generated NOT
 */
@Override
public EList<Endpoint> getEndpoints ()
{
    final EList<Endpoint> result = ECollections.newBasicEList ();
    for ( final Exporter exporter : getExporter () )
    {
        result.addAll ( exporter.getEndpoints () );
    }
    return result;
}
 
Example 7
Source File: ParserDriverImpl.java    From neoscada with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * 
 * @generated NOT
 */
@Override
public EList<Endpoint> getEndpoints ()
{
    final EList<Endpoint> result = ECollections.newBasicEList ();
    for ( final Exporter exporter : getExporter () )
    {
        result.addAll ( exporter.getEndpoints () );
    }
    return result;
}
 
Example 8
Source File: DriverApplicationImpl.java    From neoscada with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 *
 * @generated NOT
 */
@Override
public EList<Endpoint> getEndpoints ()
{
    final EList<Endpoint> result = ECollections.newBasicEList ();
    for ( final Exporter exporter : getExporter () )
    {
        result.addAll ( exporter.getEndpoints () );
    }
    return result;
}
 
Example 9
Source File: DriverApplicationImpl.java    From neoscada with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated NOT
 */
public EList<Endpoint> getEndpoints ()
{
    final EList<Endpoint> result = ECollections.newBasicEList ();
    for ( final Exporter exporter : getExporter () )
    {
        result.addAll ( exporter.getEndpoints () );
    }
    return result;
}
 
Example 10
Source File: DaveDriverImpl.java    From neoscada with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * 
 * @generated NOT
 */
@Override
public EList<Endpoint> getEndpoints ()
{
    final EList<Endpoint> result = ECollections.newBasicEList ();
    for ( final Exporter exporter : getExporter () )
    {
        result.addAll ( exporter.getEndpoints () );
    }
    return result;
}
 
Example 11
Source File: ModbusDriverImpl.java    From neoscada with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * 
 * @generated NOT
 */
@Override
public EList<Endpoint> getEndpoints ()
{
    final EList<Endpoint> result = ECollections.newBasicEList ();
    for ( final Exporter exporter : getExporter () )
    {
        result.addAll ( exporter.getEndpoints () );
    }
    return result;
}
 
Example 12
Source File: CheckCfgScopeProvider.java    From dsl-devkit with Eclipse Public License 1.0 5 votes vote down vote up
@Override
public IScope getScope(final EObject context, final EReference reference) {
  if (reference == CheckcfgPackage.Literals.CONFIGURED_CHECK__CHECK) {
    // Note that context object can be either a configured check (if 'optional' keyword has been provided
    // so that a new instance is created and the configured catalog does not contain any configured checks
    // yet) or a configured catalog (in all other cases)
    final ConfiguredCatalog configuredCatalog = EcoreUtil2.getContainerOfType(context, ConfiguredCatalog.class);
    if (configuredCatalog == null || configuredCatalog.getCatalog() == null) {
      return IScope.NULLSCOPE;
    }
    CheckCatalog catalog = configuredCatalog.getCatalog();
    return Scopes.scopeFor(catalog.getAllChecks(), checkQualifiedNameProvider, IScope.NULLSCOPE);
  } else if (reference == CheckcfgPackage.Literals.CONFIGURED_PARAMETER__PARAMETER) {
    // a new list of FormalParameters to scope to
    EList<FormalParameter> parameters = ECollections.newBasicEList();
    final ConfiguredCheck configuredCheck = EcoreUtil2.getContainerOfType(context, ConfiguredCheck.class);
    if (configuredCheck != null) {
      // add FormalParameter definitions from linked check
      parameters.addAll(configuredCheck.getCheck().getFormalParameters());
    }
    // add inferred FormalParameters (properties)
    final CheckConfiguration checkConfiguration = EcoreUtil2.getContainerOfType(context, CheckConfiguration.class);
    parameters.addAll(checkConfiguration.getProperties());
    return Scopes.scopeFor(parameters, checkQualifiedNameProvider, IScope.NULLSCOPE);
  }
  return super.getScope(context, reference);
}