|
Rational Developer for Power Systems Software V7.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object CanonicalConnectionEditPolicy com.ibm.etools.systems.application.visual.editor.editpolicies.AggregateCanonicalConnectionEditPolicy
public class AggregateCanonicalConnectionEditPolicy
A specialized implementation of CanonicalConnectionEditPolicy
.
This implementation will manage the aggregate connections owned by the semantic host.
Field Summary | |
---|---|
static String |
copyright
|
Constructor Summary | |
---|---|
AggregateCanonicalConnectionEditPolicy()
|
Method Summary | |
---|---|
protected Collection<Relationship> |
computeLinksFromSemanticModel()
Compute all links from semantic model which conforms to current model filter. |
protected void |
createAggregatedConnection(EObject aggregatedSourceElement,
EObject aggregatedTargetElement)
Create the aggregated relationships that either start or end with the host. |
protected Command |
createAggregatedConnectionCommand(EditPart sourceEditPart,
EditPart targetEditPart)
Create command for aggregated connection. |
protected void |
createConnections(Collection relations)
Create the relationships that either start or end with the host. |
protected void |
createDirectConnection(Relationship relationship)
Create the aggregated relationships that either start or end with the host. |
void |
deactivate()
|
protected View |
findViewForSemanticElement(EObject element)
Find view for semantic element under given view ancestor. |
protected EObject |
getAggregatedSemanticElement(EObject semanticElement)
Get aggregated semantic element where the aggregated connection will connect. |
protected EObject |
getAncestor(EObject modelElement)
Get ancestor of given semantic element. |
protected ApplicationModel |
getApplicationModel()
Get ApplicationModel. |
protected View |
getCollapsedChecker(View ancestorView)
Return the real view object used to check the collapse status, for example, a resizable compartment view. |
protected View |
getConnectionView(Relationship semanticRelation)
Find the view object for the given relationship semantic element. |
protected Diagram |
getDiagram()
Return the diagram object. |
protected EditPart |
getEditPartFor(EObject semanticElement)
Find editpart from semantic model element. |
protected EditPart |
getEditPartFor(View view)
Find editpart from semantic model element. |
protected EObject |
getExistDirectConnection(EObject relationship,
Collection containedConnections)
Get the exist direct connection for given relationship in contained connections. |
protected Edge |
getExistingAggregateConnection(Artifact sourceElement,
Artifact targetElement)
Check if the given relationship model element has been renderred. |
protected Edge |
getExistingDirectConnection(Relationship relationship)
Check if the given relationship model element has been renderred. |
protected EObject |
getHighestCollapsedContainer(EObject targetSemanticElement)
Check if the view of given semantic element is driectly or indirectly in a collapsed container. |
protected EObject |
getHostSemanticElement()
Return the semantic element for the host of this editpolicy. |
protected ICollapsableEditPart |
getOwningCollapsableEditPart(EditPart ep)
Gets the collapsable edipart ancestor for a given editpart. |
protected List |
getSemanticConnectionsList()
|
protected ISemanticElementToViewRegistry |
getSemanticElementToViewRegistry()
Helper to get SemanticElementToViewRegistry. |
protected EObject |
getSourceElement(EObject relationship)
|
protected EObject |
getTargetElement(EObject relationship)
|
protected boolean |
isCollapsedEditPart(EditPart ep)
Return true if the given editpartt is collpased, false otherwise. |
protected boolean |
isConnectionReady(EObject sourceElement,
EObject targetElement)
Check if it is ready to create an Edge between two semantic elements. |
protected boolean |
isInternalRelation(Relationship nextRelationship)
Check if a relationship is between two children ( direct or indirect ) inside the semantic element of the host. |
protected boolean |
isRelatedSemanticRelationship(Relationship relation)
Check if the given Relationship semantic element is related with the host. |
protected boolean |
registerSemanticElementToViewMappings(View view)
Register semantic element to view mappings for all semantic children elements from the element of given view. |
protected void |
setSemanticElementToViewRegistry(ISemanticElementToViewRegistry semanticElementToViewRegistry)
Helper to set SemanticElementToViewRegistry. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static String copyright
Constructor Detail |
---|
public AggregateCanonicalConnectionEditPolicy()
Method Detail |
---|
protected void createConnections(Collection relations)
relations:
- the collection for Relationships where the aggregated relationship to be computed.protected Edge getExistingDirectConnection(Relationship relationship)
protected Edge getExistingAggregateConnection(Artifact sourceElement, Artifact targetElement)
protected EObject getHighestCollapsedContainer(EObject targetSemanticElement)
targetSemanticElement
- semantic element
protected View findViewForSemanticElement(EObject element)
element
- semantic elementviewAncestor
- the view to be searched
protected View getCollapsedChecker(View ancestorView)
ancestorView
- the view asked for checking the collapse status
protected void createAggregatedConnection(EObject aggregatedSourceElement, EObject aggregatedTargetElement)
aggregatedSourceElement:
- the source element that aggregated connection will start from.aggregatedTargetElement:
- the target element that aggregated connection will start from.protected void createDirectConnection(Relationship relationship)
relations:
- the collection for Relationships where the aggregated relationship to be computed.protected EObject getAggregatedSemanticElement(EObject semanticElement)
semanticElement
- the semantic element
protected boolean registerSemanticElementToViewMappings(View view)
view
- the view whose semantic elements to be mapped.
protected boolean isConnectionReady(EObject sourceElement, EObject targetElement)
sourceElement
- source elementtargetElement
- target element
protected boolean isInternalRelation(Relationship nextRelationship)
nextRelationship
- semantic relationship
protected boolean isCollapsedEditPart(EditPart ep)
protected EObject getHostSemanticElement()
protected EditPart getEditPartFor(View view)
protected EditPart getEditPartFor(EObject semanticElement)
protected View getConnectionView(Relationship semanticRelation)
protected EObject getAncestor(EObject modelElement)
modelElement
- semantic element.
protected Diagram getDiagram()
protected Command createAggregatedConnectionCommand(EditPart sourceEditPart, EditPart targetEditPart)
sourceEditPart
- editpart for source viewtargetEditPart
- editpart for target viewprotected ISemanticElementToViewRegistry getSemanticElementToViewRegistry()
protected void setSemanticElementToViewRegistry(ISemanticElementToViewRegistry semanticElementToViewRegistry)
protected ApplicationModel getApplicationModel()
protected EObject getExistDirectConnection(EObject relationship, Collection containedConnections)
relationship
- relationship to be checkedcontainedConnections
- collection of existing contained connections
protected Collection<Relationship> computeLinksFromSemanticModel()
myLinkDescriptors
- protected boolean isRelatedSemanticRelationship(Relationship relation)
protected ICollapsableEditPart getOwningCollapsableEditPart(EditPart ep)
ep
- edit part
ShapeCompartmentEditPart
public void deactivate()
protected List getSemanticConnectionsList()
protected EObject getSourceElement(EObject relationship)
protected EObject getTargetElement(EObject relationship)
|
Rational Developer for Power Systems Software V7.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |