Examples of IReferenceDescription


Examples of org.eclipse.xtext.resource.IReferenceDescription

                    break;
                  }
                  Iterable<IReferenceDescription> newReferenceDescriptions = delta.getNew().getReferenceDescriptions();
                  List<ReferenceSearchViewTreeNode> removedReferenceNodes = Lists.newArrayList();
                  for(ReferenceSearchViewTreeNode referenceNode : rootNode.getChildren()) {
                    final IReferenceDescription refDesc = ((IReferenceDescription) referenceNode.getDescription());
                    final URI referenceSourceURI = refDesc.getSourceEObjectUri();
                    final URI referenceTargetURI = refDesc.getTargetEObjectUri();
                    if(Iterables.isEmpty(Iterables.filter(
                      newReferenceDescriptions, new Predicate<IReferenceDescription>() {
                        public boolean apply(IReferenceDescription input) {
                          return input.getSourceEObjectUri().equals(referenceSourceURI) &&
                              input.getTargetEObjectUri().equals(referenceTargetURI);
View Full Code Here

Examples of org.eclipse.xtext.resource.IReferenceDescription

              Iterable<IEObjectDescription> exported = exportedObjectsByResourceCache.get(r);
              if(exported == null)
                exportedObjectsByResourceCache.put(r, exported = getExportedElements(r));
              // find the exported container closest to the source referencing the target
              IEObjectDescription closestExported = findClosestExportedContainerDescriptor(eObj, exported);
              IReferenceDescription refDesc = PPReferenceDescription.create(
                EcoreUtil2.getNormalizedURI(eObj), closestExported, targetCandidate);
              if(filter == null || filter.apply(refDesc))
                acceptor.accept(refDesc);
            }
        }
View Full Code Here

Examples of org.eclipse.xtext.resource.IReferenceDescription

        if(selectedObject instanceof ReferenceSearchViewTreeNode) {
          ReferenceSearchViewTreeNode treeNode = (ReferenceSearchViewTreeNode) selectedObject;
          Object description = treeNode.getDescription();
          // open resource or a reference (standard EReference, or the PP way).
          if(description instanceof IReferenceDescription) {
            IReferenceDescription referenceDescription = (IReferenceDescription) description;
            // Asssume that the PP way is always to pass null as EReference
            if(referenceDescription.getEReference() != null) {
              uriEditorOpener.open(
                referenceDescription.getSourceEObjectUri(), referenceDescription.getEReference(),
                referenceDescription.getIndexInList(), true);
            }
            else {
              // Do it the PP way.
              uriEditorOpener.open(referenceDescription.getSourceEObjectUri(), true);
            }
          }
          else if(description instanceof IResourceDescription) {
            uriEditorOpener.open(((IResourceDescription) description).getURI(), true);
          }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.