本文整理汇总了Java中org.eclipse.uml2.uml.Property.getOwner方法的典型用法代码示例。如果您正苦于以下问题:Java Property.getOwner方法的具体用法?Java Property.getOwner怎么用?Java Property.getOwner使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.uml2.uml.Property
的用法示例。
在下文中一共展示了Property.getOwner方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: unsetAssociation
import org.eclipse.uml2.uml.Property; //导入方法依赖的package包/类
/**
* association설정지움
*
* @param umlModel
* void
*/
public static void unsetAssociation(Association umlModel) {
umlModel.getNearestPackage().getPackagedElements().remove(umlModel);
EList<Property> propertyList = umlModel.getMemberEnds();
Property property;
Element element;
for (Iterator<Property> iter = propertyList.iterator(); iter.hasNext();) {
property = iter.next();
element = property.getOwner();
if (!umlModel.equals(element)) {
((StructuredClassifier) element).getOwnedAttributes().remove(property);
deleteElement(property);
}
}
umlModel.getMemberEnds().clear();
deleteElement(umlModel);
}
示例2: redo
import org.eclipse.uml2.uml.Property; //导入方法依赖的package包/类
/**
* @see nexcore.tool.uml.manager.command.DeleteUMLStereotypeCommand#redoOwnElement()
*/
@Override
public void redo() {
Property property;
Element element;
if (null == this.association) {
return;
}
init();
for (Iterator<Property> iter = propertyList.iterator(); iter.hasNext();) {
property = iter.next();
element = property.getOwner();
if (!(this.association.equals(element))) {
if (element instanceof StructuredClassifier) {
elementList.put(property, (NamedElement) element);
((StructuredClassifier) element).getOwnedAttributes().remove(property);
}
UMLManager.deleteElement(property);
}
}
List<AbstractView> relatedList = UMLManager.getRelatedViewModel(this.association);
AbstractView abstractView;
Relation relation;
Diagram diagram = null;
AbstractNode sourceNode, targetNode;
for (Iterator<AbstractView> iter = relatedList.iterator(); iter.hasNext();) {
abstractView = iter.next();
if (abstractView instanceof Relation) {
relation = (Relation) abstractView;
if (relation.eContainer() instanceof Diagram) {
diagram = (Diagram) relation.eContainer();
}
if (null == diagram) {
continue;
}
sourceNode = (AbstractNode) relation.getSource();
sourceNode.getOutgoingConnectionList().remove(relation);
targetNode = (AbstractNode) relation.getTarget();
targetNode.getIncomingConnectionList().remove(relation);
diagram.getConnectionList().remove(relation);
UMLManager.deleteElement(relation);
}
}
UMLManager.deleteElement(this.association);
}