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


Java Usage类代码示例

本文整理汇总了Java中org.eclipse.uml2.uml.Usage的典型用法代码示例。如果您正苦于以下问题:Java Usage类的具体用法?Java Usage怎么用?Java Usage使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: selectionChanged

import org.eclipse.uml2.uml.Usage; //导入依赖的package包/类
/**
 * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction,
 *      org.eclipse.jface.viewers.ISelection)
 */
public void selectionChanged(IAction action, ISelection selection) {
    objList.clear();
    objList = ProjectUtil.getSelectedEObjects(selection);

    if (objList == null || objList.size() < 1) {
        return;
    }

    for (EObject eobject : objList) {
        if (eobject instanceof Lifeline || eobject instanceof Abstraction || eobject instanceof Association
            || eobject instanceof BehaviorExecutionSpecification || eobject instanceof CombinedFragment
            || eobject instanceof Comment || eobject instanceof Connector || eobject instanceof ControlFlow
            || eobject instanceof Dependency || eobject instanceof ExecutionEvent
            || eobject instanceof ExecutionOccurrenceSpecification || eobject instanceof Extend
            || eobject instanceof Generalization || eobject instanceof Include
            || eobject instanceof InteractionOperand || eobject instanceof InterfaceRealization
            || eobject instanceof Message || eobject instanceof MessageOccurrenceSpecification
            || eobject instanceof ObjectFlow || eobject instanceof Realization
            || eobject instanceof ReceiveOperationEvent || eobject instanceof SendOperationEvent
            || eobject instanceof Usage) {
            objList.clear();
            return;
        }
    }
}
 
开发者ID:SK-HOLDINGS-CC,项目名称:NEXCORE-UML-Modeler,代码行数:30,代码来源:CopyAction.java

示例2: applyTyped

import org.eclipse.uml2.uml.Usage; //导入依赖的package包/类
@Override
protected void applyTyped(Require object) {
	if (object.eContainer() instanceof Classifier) {
		Classifier classifier = (Classifier) object.eContainer();
		if (classifier.getReferencedElement() != null && object.getInterface() != null
				&& object.getInterface().getReferencedElement() != null) {
			Element umlClassifier = classifier.getReferencedElement();
			EList<DirectedRelationship> usages = umlClassifier
					.getSourceDirectedRelationships(UMLPackage.eINSTANCE.getUsage());
			Optional<Usage> umlUsage = usages.stream().map(Usage.class::cast)
					.filter(u -> u.getSuppliers().contains(object.getInterface().getReferencedElement()))
					.filter(u -> object.getName() == null? true : u.getName().equals(object.getName()))
					.findFirst();
			if (umlUsage.isPresent()) {
				object.setReferencedElement(umlUsage.get());
			}
		}
	}

}
 
开发者ID:Cooperate-Project,项目名称:CooperateModelingEnvironment,代码行数:21,代码来源:RequireCalculator.java

示例3: eSet

import org.eclipse.uml2.uml.Usage; //导入依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void eSet(int featureID, Object newValue) {
    switch (featureID) {
        case CmpPackage.REQUIRE__REFERENCED_ELEMENT:
            setReferencedElement((Usage)newValue);
            return;
    }
    super.eSet(featureID, newValue);
}
 
开发者ID:Cooperate-Project,项目名称:CooperateModelingEnvironment,代码行数:15,代码来源:RequireImpl.java

示例4: eUnset

import org.eclipse.uml2.uml.Usage; //导入依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void eUnset(int featureID) {
    switch (featureID) {
        case CmpPackage.REQUIRE__REFERENCED_ELEMENT:
            setReferencedElement((Usage)null);
            return;
    }
    super.eUnset(featureID);
}
 
开发者ID:Cooperate-Project,项目名称:CooperateModelingEnvironment,代码行数:15,代码来源:RequireImpl.java

示例5: createUsage

import org.eclipse.uml2.uml.Usage; //导入依赖的package包/类
/**
 * 
 * 
 * @return org.eclipse.uml2.uml.Usage
 */
public static org.eclipse.uml2.uml.Usage createUsage() {
    Usage usage = FACTORY.createUsage();
    usage.addKeyword("usage");
    return usage;
}
 
开发者ID:SK-HOLDINGS-CC,项目名称:NEXCORE-UML-Modeler,代码行数:11,代码来源:UMLHelper.java

示例6: getReferencedElement

import org.eclipse.uml2.uml.Usage; //导入依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public Usage getReferencedElement() {
    return (Usage)eDynamicGet(CmpPackage.REQUIRE__REFERENCED_ELEMENT, TextualCommonsPackage.Literals.UML_REFERENCING_ELEMENT__REFERENCED_ELEMENT, true, true);
}
 
开发者ID:Cooperate-Project,项目名称:CooperateModelingEnvironment,代码行数:9,代码来源:RequireImpl.java

示例7: basicGetReferencedElement

import org.eclipse.uml2.uml.Usage; //导入依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public Usage basicGetReferencedElement() {
    return (Usage)eDynamicGet(CmpPackage.REQUIRE__REFERENCED_ELEMENT, TextualCommonsPackage.Literals.UML_REFERENCING_ELEMENT__REFERENCED_ELEMENT, false, true);
}
 
开发者ID:Cooperate-Project,项目名称:CooperateModelingEnvironment,代码行数:9,代码来源:RequireImpl.java

示例8: setReferencedElement

import org.eclipse.uml2.uml.Usage; //导入依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public void setReferencedElement(Usage newReferencedElement) {
    eDynamicSet(CmpPackage.REQUIRE__REFERENCED_ELEMENT, TextualCommonsPackage.Literals.UML_REFERENCING_ELEMENT__REFERENCED_ELEMENT, newReferencedElement);
}
 
开发者ID:Cooperate-Project,项目名称:CooperateModelingEnvironment,代码行数:9,代码来源:RequireImpl.java


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