当前位置: 首页>>代码示例>>Java>>正文


Java ECollections.newBasicEList方法代码示例

本文整理汇总了Java中org.eclipse.emf.common.util.ECollections.newBasicEList方法的典型用法代码示例。如果您正苦于以下问题:Java ECollections.newBasicEList方法的具体用法?Java ECollections.newBasicEList怎么用?Java ECollections.newBasicEList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.emf.common.util.ECollections的用法示例。


在下文中一共展示了ECollections.newBasicEList方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getKnownInputs

import org.eclipse.emf.common.util.ECollections; //导入方法依赖的package包/类
/**
 * <!-- 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;
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:18,代码来源:AverageModuleImpl.java

示例2: getKnownOutputs

import org.eclipse.emf.common.util.ECollections; //导入方法依赖的package包/类
/**
 * <!-- 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;
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:21,代码来源:AverageModuleImpl.java

示例3: getKnownOutputs

import org.eclipse.emf.common.util.ECollections; //导入方法依赖的package包/类
/**
 * <!-- 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;
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:18,代码来源:FormulaModuleImpl.java

示例4: getKnownInputs

import org.eclipse.emf.common.util.ECollections; //导入方法依赖的package包/类
/**
 * <!-- 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;
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:18,代码来源:MovingAverageModuleImpl.java

示例5: getKnownOutputs

import org.eclipse.emf.common.util.ECollections; //导入方法依赖的package包/类
/**
 * <!-- 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;
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:21,代码来源:MovingAverageModuleImpl.java

示例6: getEndpoints

import org.eclipse.emf.common.util.ECollections; //导入方法依赖的package包/类
/**
 * <!-- 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;
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:17,代码来源:ArduinoDriverImpl.java

示例7: getEndpoints

import org.eclipse.emf.common.util.ECollections; //导入方法依赖的package包/类
/**
 * <!-- 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;
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:17,代码来源:DriverApplicationImpl.java

示例8: getEPackages

import org.eclipse.emf.common.util.ECollections; //导入方法依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated NOT
 */
public EList<EPackage> getEPackages() {
	EList<EPackage> ret = ECollections.newBasicEList();
	for (EPackageSource ps: getPackageSources()) {
		ret.addAll(ps.getEPackages(resourceSet));
	}		
	return ret;
}
 
开发者ID:Nasdanika,项目名称:codegen-ecore,代码行数:13,代码来源:EcoreCodeGeneratorImpl.java

示例9: getScope

import org.eclipse.emf.common.util.ECollections; //导入方法依赖的package包/类
@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);
}
 
开发者ID:dsldevkit,项目名称:dsl-devkit,代码行数:28,代码来源:CheckCfgScopeProvider.java

示例10: getEPackages

import org.eclipse.emf.common.util.ECollections; //导入方法依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated NOT
 */
public EList<EPackage> getEPackages(ResourceSet resourceSet) {
	EList<EPackage> ret = ECollections.newBasicEList();
	
	if (getLocation() == null || getLocation().trim().length() == 0) {
		// Global registry
		for (String nsURI: getNsURIs()) {
			EPackage ep = EPackage.Registry.INSTANCE.getEPackage(nsURI);
			if (ep != null) {
				ret.add(ep);
			}
		}			
	} else {
		URI uri = URI.createURI(getLocation());
		if (uri.isRelative()) {
			if (eResource() == null) {
				System.err.println("Resource is null"); // TODO - proper logging.
				return ret;
			}
			
			URI base = eResource().getURI();
			if (base != null && base.isHierarchical()) {
				uri = uri.resolve(base);
			}
		}
		Resource resource = resourceSet.getResource(uri, true);
		TreeIterator<EObject> cit = resource.getAllContents();
		while (cit.hasNext()) {
			EObject next = cit.next();
			if (next instanceof EPackage) {
				if ((getNsURIs().isEmpty() || getNsURIs().contains(((EPackage) next).getNsURI()))) {
					ret.add((EPackage) next);
				}
			} else if (next instanceof GenPackage) {
				GenPackage genPackage = (GenPackage) next;
				EPackage ePackage = genPackage.getEcorePackage();	
				if ((getNsURIs().isEmpty() || getNsURIs().contains(ePackage.getNsURI()))) {
					ret.add(ePackage);
					for (GenClassifier gc: genPackage.getGenClassifiers()) {
						EClassifier ec = gc.getEcoreClassifier();
						if (ec.getInstanceClassName() == null) {
							ec.setInstanceClassName(gc.getRawInstanceClassName());
						}
					}
				}
			}
		}
	}

	return ret;
}
 
开发者ID:Nasdanika,项目名称:codegen-ecore,代码行数:56,代码来源:EPackageSourceImpl.java

示例11: run

import org.eclipse.emf.common.util.ECollections; //导入方法依赖的package包/类
@Override
public java.util.Map<String, Model> run(
		java.util.Map<String, Model> inputsByName, java.util.Map<String, GenericElement> genericsByName,
		java.util.Map<String, MID> outputMIDsByName) throws Exception {

	// input
	List<Model> inputMIDModels = MIDOperatorIOUtils.getVarargs(inputsByName, IN_MIDS);
	EList<MID> inputMIDs = ECollections.newBasicEList();
	EList<Set<Model>> modelBlacklists = ECollections.newBasicEList();
	for (Model inputMIDModel : inputMIDModels) {
		inputMIDs.add((MID) inputMIDModel.getEMFInstanceRoot());
		modelBlacklists.add(new HashSet<>());
	}
	Operator mapperOperatorType = (Operator) genericsByName.get(GENERIC_OPERATORTYPE);
	java.util.Map<String, MID> instanceMIDsByMapperOutput = MIDOperatorIOUtils.getVarargOutputMIDsByOtherName(outputMIDsByName, OUT_MIDS, mapperOperatorType.getOutputs());

	// find all possible combinations of inputs and execute them
	java.util.Map<Operator, Set<EList<OperatorInput>>> mapperSpecs = new LinkedHashMap<>(); // reproducible order
	EList<Operator> polyOperators = (Boolean.parseBoolean(MMINT.getPreference(MMINTConstants.PREFERENCE_MENU_POLYMORPHISM_MULTIPLEDISPATCH_ENABLED))) ?
		ECollections.asEList(MIDTypeHierarchy.getSubtypes(mapperOperatorType)) :
		ECollections.emptyEList();
	if (polyOperators.isEmpty()) { // multiple dispatch disabled, or the mapper operator is not a multimethod
		mapperSpecs.put(mapperOperatorType, mapperOperatorType.findAllowedInputs(inputMIDs, modelBlacklists));
	}
	else {
		polyOperators.add(mapperOperatorType);
		java.util.Map<String, EList<OperatorInput>> assignedInputs = new HashMap<>();
		Iterator<Operator> polyIter = MIDTypeHierarchy.getInverseTypeHierarchyIterator(polyOperators);
		while (polyIter.hasNext()) { // start from the most specialized operator backwards
			Operator polyMapper = polyIter.next();
			// assign at each step the allowed inputs that have not been already assigned
			Set<EList<OperatorInput>> mapperInputs = polyMapper.findAllowedInputs(inputMIDs, modelBlacklists);
			java.util.Map<String, EList<OperatorInput>> newInputs = this.diffMultipleDispatchInputs(assignedInputs, mapperInputs);
			mapperSpecs.put(polyMapper, new LinkedHashSet<>(newInputs.values())); // reproducible order
			assignedInputs.putAll(newInputs);
		}
	}
	java.util.Map<String, Model> outputsByName = this.map(inputMIDModels, inputMIDs, mapperOperatorType, mapperSpecs, instanceMIDsByMapperOutput);

	return outputsByName;
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:42,代码来源:Map.java


注:本文中的org.eclipse.emf.common.util.ECollections.newBasicEList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。