![JAR search and dependency download from the Maven repository](/logo.png)
org.eclipse.elk.graph.util.ElkGraphUtil.class Maven / Gradle / Ivy
???? 7? 'org/eclipse/elk/graph/util/ElkGraphUtil java/lang/Object createGraph !()Lorg/eclipse/elk/graph/ElkNode; Code
createNode @(Lorg/eclipse/elk/graph/ElkNode;)Lorg/eclipse/elk/graph/ElkNode; LineNumberTable LocalVariableTable %org/eclipse/elk/graph/ElkGraphFactory eINSTANCE 'Lorg/eclipse/elk/graph/ElkGraphFactory;
createElkNode org/eclipse/elk/graph/ElkNode setParent "(Lorg/eclipse/elk/graph/ElkNode;)V parent Lorg/eclipse/elk/graph/ElkNode; node
StackMapTable
createPort @(Lorg/eclipse/elk/graph/ElkNode;)Lorg/eclipse/elk/graph/ElkPort; $ % &
createElkPort !()Lorg/eclipse/elk/graph/ElkPort; ( ) org/eclipse/elk/graph/ElkPort port Lorg/eclipse/elk/graph/ElkPort; createLabel I(Lorg/eclipse/elk/graph/ElkGraphElement;)Lorg/eclipse/elk/graph/ElkLabel; / 0 1 createElkLabel "()Lorg/eclipse/elk/graph/ElkLabel; 3 5 4 org/eclipse/elk/graph/ElkLabel 6 *(Lorg/eclipse/elk/graph/ElkGraphElement;)V 'Lorg/eclipse/elk/graph/ElkGraphElement; label Lorg/eclipse/elk/graph/ElkLabel; [(Ljava/lang/String;Lorg/eclipse/elk/graph/ElkGraphElement;)Lorg/eclipse/elk/graph/ElkLabel;
< , - 3 > ? @ setText (Ljava/lang/String;)V text Ljava/lang/String;
createEdge @(Lorg/eclipse/elk/graph/ElkNode;)Lorg/eclipse/elk/graph/ElkEdge; F G H
createElkEdge !()Lorg/eclipse/elk/graph/ElkEdge; J L K org/eclipse/elk/graph/ElkEdge M setContainingNode containingNode edge Lorg/eclipse/elk/graph/ElkEdge; createSimpleEdge w(Lorg/eclipse/elk/graph/ElkConnectableShape;Lorg/eclipse/elk/graph/ElkConnectableShape;)Lorg/eclipse/elk/graph/ElkEdge; T source cannot be null
V X W java/util/Objects Y Z requireNonNull 8(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object; \ target cannot be null
^ C D J ` a b
getSources %()Lorg/eclipse/emf/common/util/EList; d f e !org/eclipse/emf/common/util/EList g h add (Ljava/lang/Object;)Z J j k b
getTargets
m n o updateContainment "(Lorg/eclipse/elk/graph/ElkEdge;)V source +Lorg/eclipse/elk/graph/ElkConnectableShape; target createHyperedge I(Ljava/lang/Iterable;Ljava/lang/Iterable;)Lorg/eclipse/elk/graph/ElkEdge; Signature ?(Ljava/lang/Iterable;Ljava/lang/Iterable;)Lorg/eclipse/elk/graph/ElkEdge; x sources cannot be null z targets cannot be null | ~ } java/lang/Iterable ? iterator ()Ljava/util/Iterator; ? ? ? java/util/Iterator ? ? next ()Ljava/lang/Object; ? )org/eclipse/elk/graph/ElkConnectableShape ? f ? java/util/List ? ? ? ? hasNext ()Z sources Ljava/lang/Iterable; targets edgeSources Ljava/util/List; edgeTargets LocalVariableTypeTable ALjava/lang/Iterable; =Ljava/util/List; createEdgeSection G(Lorg/eclipse/elk/graph/ElkEdge;)Lorg/eclipse/elk/graph/ElkEdgeSection; ? ? ? createElkEdgeSection (()Lorg/eclipse/elk/graph/ElkEdgeSection; J ? ? b getSections section &Lorg/eclipse/elk/graph/ElkEdgeSection; ? $org/eclipse/elk/graph/ElkEdgeSection firstEdgeSection I(Lorg/eclipse/elk/graph/ElkEdge;ZZ)Lorg/eclipse/elk/graph/ElkEdgeSection; d ? ? ? isEmpty
? ? ? d ? ? ? get (I)Ljava/lang/Object; ? ? ? b
getBendPoints d ? ? ? clear ()V ? ? ? ? setStartLocation (DD)V ? ? ? ? setEndLocation ? ? ? ? size ()I ? ? ? ? remove resetSection Z removeOtherSections sections 8Ljava/util/List; createBendPoint L(Lorg/eclipse/elk/graph/ElkEdgeSection;)Lorg/eclipse/elk/graph/ElkBendPoint;
? ? ? N(Lorg/eclipse/elk/graph/ElkEdgeSection;DD)Lorg/eclipse/elk/graph/ElkBendPoint; edgeSection ? ? ? createElkBendPoint &()Lorg/eclipse/elk/graph/ElkBendPoint; ? ? ? "org/eclipse/elk/graph/ElkBendPoint ? ? set x D y bendPoint $Lorg/eclipse/elk/graph/ElkBendPoint; ? edge cannot be null
? ? ? findBestEdgeContainment @(Lorg/eclipse/elk/graph/ElkEdge;)Lorg/eclipse/elk/graph/ElkNode; d ? ? "java/lang/IllegalArgumentException ? 1The edge must have at least one source or target.
? ? ? @
? ? ? connectableShapeToNode L(Lorg/eclipse/elk/graph/ElkConnectableShape;)Lorg/eclipse/elk/graph/ElkNode; ? ? getParent
? ? ? allIncidentShapes 5(Lorg/eclipse/elk/graph/ElkEdge;)Ljava/lang/Iterable;
? ? ? isDescendant A(Lorg/eclipse/elk/graph/ElkNode;Lorg/eclipse/elk/graph/ElkNode;)Z
? ? ? findLowestCommonAncestor _(Lorg/eclipse/elk/graph/ElkNode;Lorg/eclipse/elk/graph/ElkNode;)Lorg/eclipse/elk/graph/ElkNode;
sourceNode
targetNode incidentShapes Ljava/util/Iterator; commonAncestor incidentNode ALjava/util/Iterator; 8org/eclipse/elk/graph/util/ElkGraphUtil$AncestorIterator
? #(Lorg/eclipse/elk/graph/ElkNode;Z)V
com/google/common/collect/Lists newArrayList +(Ljava/util/Iterator;)Ljava/util/ArrayList; ? listIterator (I)Ljava/util/ListIterator; java/util/ListIterator ? previous ? hasPrevious node1 node2
ancestors1 iterator1 Ljava/util/ListIterator;
ancestors2 iterator2 ancestor1 ancestor2 1Ljava/util/List; 9Ljava/util/ListIterator; allIncomingEdges 5(Lorg/eclipse/elk/graph/ElkNode;)Ljava/lang/Iterable; V(Lorg/eclipse/elk/graph/ElkNode;)Ljava/lang/Iterable; -. b getPorts
012 newArrayListWithCapacity (I)Ljava/util/ArrayList; 45 b getIncomingEdges d ~ (4
9;: #com/google/common/collect/Iterables<= concat *(Ljava/lang/Iterable;)Ljava/lang/Iterable; incomingEdgeIterables GLjava/util/List;>; allOutgoingEdges BC b getOutgoingEdges (B outgoingEdgeIterables allIncidentEdges A(Lorg/eclipse/elk/graph/ElkConnectableShape;)Ljava/lang/Iterable; b(Lorg/eclipse/elk/graph/ElkConnectableShape;)Ljava/lang/Iterable; ?4 ?B
9L<M >(Ljava/lang/Iterable;Ljava/lang/Iterable;)Ljava/lang/Iterable; shape
P@*
R)* b(Lorg/eclipse/elk/graph/ElkEdge;)Ljava/lang/Iterable; allIncidentSections <(Lorg/eclipse/elk/graph/ElkEdgeSection;)Ljava/lang/Iterable; d(Lorg/eclipse/elk/graph/ElkEdgeSection;)Ljava/lang/Iterable; ?XY b getIncomingSections ?[\ b getOutgoingSections child ancestor current containingGraph H(Lorg/eclipse/elk/graph/ElkGraphElement;)Lorg/eclipse/elk/graph/ElkNode; Jcd getContainingNodefhg %org/eclipse/elk/graph/ElkGraphElementij
eContainer !()Lorg/eclipse/emf/ecore/EObject; element ( ?n java/lang/NullPointerExceptionp connectableShape cannot be null
m ?s 'java/lang/UnsupportedOperationExceptionu Only support nodes and ports.
r ? connectableShape connectableShapeToPort L(Lorg/eclipse/elk/graph/ElkConnectableShape;)Lorg/eclipse/elk/graph/ElkPort;
getSourceNode| Passed edge is not 'simple'.
simpleEdge
getTargetNode
getSourcePort @(Lorg/eclipse/elk/graph/ElkEdge;)Lorg/eclipse/elk/graph/ElkPort;
?xy
getTargetPort elementLabeledBy I(Lorg/eclipse/elk/graph/ElkLabel;)Lorg/eclipse/elk/graph/ElkGraphElement; 3? ?? )()Lorg/eclipse/elk/graph/ElkGraphElement;?h? org/eclipse/emf/ecore/EObject Lorg/eclipse/emf/ecore/EObject; propertiesSkippingIteratorFor 6(Lorg/eclipse/emf/ecore/EObject;Z)Ljava/util/Iterator; W(Lorg/eclipse/emf/ecore/EObject;Z)Ljava/util/Iterator;? Forg/eclipse/elk/graph/util/ElkGraphUtil$PropertiesSkippingTreeIterator
?? ?? (Ljava/lang/Object;Z)V root includeRoot isAdvancedPropertyValue (Ljava/lang/Enum;)Z (Ljava/lang/Enum<*>;)Z
??? getClass ()Ljava/lang/Class;
??? java/lang/Enum?? name ()Ljava/lang/String;
??? java/lang/Class?? getField -(Ljava/lang/String;)Ljava/lang/reflect/Field;
??? java/lang/reflect/Field?? getAnnotations $()[Ljava/lang/annotation/Annotation;
??? java/util/Arrays?? stream .([Ljava/lang/Object;)Ljava/util/stream/Stream; ??? test ()Ljava/util/function/Predicate;??? java/util/stream/Stream?? anyMatch !(Ljava/util/function/Predicate;)Z? java/lang/NoSuchFieldException? java/lang/SecurityException enumValue Ljava/lang/Enum; annotations "[Ljava/lang/annotation/Annotation; e Ljava/lang/Exception; Ljava/lang/Enum<*>;? java/lang/Exception isExperimentalPropertyValue ?
? ? ? this )Lorg/eclipse/elk/graph/util/ElkGraphUtil; lambda$0 $(Ljava/lang/annotation/Annotation;)Z? 6org/eclipse/elk/graph/properties/AdvancedPropertyValue a !Ljava/lang/annotation/Annotation; lambda$1? :org/eclipse/elk/graph/properties/ExperimentalPropertyValue
SourceFile ElkGraphUtil.java BootstrapMethods
??? "java/lang/invoke/LambdaMetafactory?? metafactory ?(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;? h
????? h
????? InnerClasses? %java/lang/invoke/MethodHandles$Lookup? java/lang/invoke/MethodHandles Lookup AncestorIterator PropertiesSkippingTreeIterator NestMembers? Horg/eclipse/elk/graph/util/ElkGraphUtil$PropertiesSkippingTreeIterator$1 1 $ % ? ? L
d ? ? L*?
+*? +? V X
Y \
? ! " d ? ? # L*?
+*? ' +? f h
i l
* + ? ( , - d ? ? . L*?
+*? 2 +? v x
y |
7
8 9 ? 3 , : T +? ;M,*? = ,? ? ? ?
A B 7 8 9 C D d ? ? E L*?
+*? I +? ? ?
? ?
N
O P ? J Q R ? 3*S? UW+[? UW? ]M,? _ *? c W,? i +? c W,? l,? ? ? ? ? ? - ? 1 ?
3 p q 3 r q O P s t u v ~ }*w? UW+y? UW? ]M,? _ N*? { :? ? ? ? ?:-? ? W? ? ???,? i :+? { :? ? ? ? ?:? ? W? ? ???,? l,? 6
? ? ? ? ? 1 ? : ? D ? L ? c ? m ? w ? { ?
H } ? ? } ? ? j O P c ? ? 1 p q L 1 ? ? c
r q ? * } ? ? } ? ? c ? ? L 1 ? ? 5 ? % | | J ? ? ? | | J ? ? ? ? ? j ? ? ? L*? *? ? +? c W+? ? ?
? ?
O P ? ? ? ? ? ? o*? ? ? ? ? *? ??*? ? ? ? ? ?N? -? ? ? ? -? ? -? ? ? **? ? :? ? ? d? ? W? ? ???-? 6
? ? ? # ? ' ? 2 ? : ? B F N Q b m
4 o O P o ? ? o ? ? # L ? ? N ? ? ? N ? ? ? . ?? ??
? ? 1 *? Ͱ
? ? ? ? ? (? ? ? :')? ? *? *? ? ? c W?
" $ % %(
* ( ? ? ( ? ? ( ? ?
? ? ? % ? n o D *߸ UW**? ? I ? 8 : ;
O P ? ? W R*߸ UW*? _ ? ? *? i ? ? `? ^ ? ?Y? ?*? _ ? ? ? *? i ? ? ? ?? ?? ? ?*? _ ? ? ? ?? ?? ? ?*? _ ? ? ? f*? i ? ? ? W*? _ ? ? ? ?? ?L*? i ? ? ? ?? ?M+? ? ,? ? ?
+? ? ?+,? ? ? +?,+? ? ? ,?*? ?? { L+? ? ? ?? ?M? B+? ? ? ?? ?N-,? 0-,? ?? (-? ? ,? ? ?
-? ? M? ,-? ?M,? ?+? ? ???,? r J P 4S >W LX dZ |g ?h ?i ?k ?l ?m ?n ?o ?p ? ?????"?1?8?;?A?E?G?P?
> R O P ? A ? . ? Z M 2 ? ? Z %
4 %? Y ? ? ? ? 2 ? ? ? r v?Y*? ?M,,? ? ? N?Y+? ?:? ? ? ::? %-? ? :? ? :? :-? ?
? ???? 2 ?
? ? (? 8? ;? >? I? U? \? `? s?
\ v v
i ? \!" ( N# ? 8 >$" ; ; I % U &