Tabnine Logo
IResourceDescription.getReferenceDescriptions
Code IndexAdd Tabnine to your IDE (free)

How to use
getReferenceDescriptions
method
in
org.eclipse.xtext.resource.IResourceDescription

Best Java code snippets using org.eclipse.xtext.resource.IResourceDescription.getReferenceDescriptions (Showing top 6 results out of 315)

origin: org.eclipse.xtext/ui

public Iterable<IReferenceDescription> getReferenceDescriptions() {
  // find references was triggered - use up-to-date reference descriptions
  // the content of this copied description is updated as soon as the exported
  // objects of a resource change thus the default algorithm of the find 
  // references UI for the display string should work
  IResourceDescription snapShot = snapShotProvider.get();
  if (snapShot != null)
    return snapShot.getReferenceDescriptions();
  return Collections.emptyList();
}
origin: org.eclipse.xtext/builder

public static void copyReferenceDescriptions(IResourceDescription from, ResourceDescriptionImpl result) {
  Iterator<IReferenceDescription> sourceReferenceDescriptions = from.getReferenceDescriptions().iterator();
  if (sourceReferenceDescriptions.hasNext()) {
    InternalEList<IReferenceDescription> targetReferenceDescriptions = (InternalEList<IReferenceDescription>) result.getReferenceDescriptions();
    do {
      targetReferenceDescriptions.addUnique(BuilderStateUtil.create(sourceReferenceDescriptions.next()));    
    } while(sourceReferenceDescriptions.hasNext());
  }
}
origin: org.eclipse.xtext/ui

  /**
   * @since 2.4
   */
  public void findReferences(Set<URI> targetURIs, IResourceDescription resourceDescription, IAcceptor<IReferenceDescription> acceptor, IProgressMonitor monitor, ILocalResourceAccess localResourceAccess) {
    for (IReferenceDescription referenceDescription : resourceDescription.getReferenceDescriptions()) {
      if (targetURIs.contains(referenceDescription.getTargetEObjectUri())) {
        acceptor.accept(referenceDescription);
      }
    }
  }
}
origin: org.eclipse/xtext

/**
 * Collect the URIs of resources, that are referenced by the given description.
 * @return the list of referenced URIs. Never <code>null</code>.
 */
public Set<URI> collectOutgoingReferences(IResourceDescription description) {
  URI resourceURI = description.getURI();
  Set<URI> result = null;
  for(IReferenceDescription reference: description.getReferenceDescriptions()) {
    URI targetResource = reference.getTargetEObjectUri().trimFragment();
    if (!resourceURI.equals(targetResource)) {
      if (result == null)
        result = Sets.newHashSet(targetResource);
      else
        result.add(targetResource);
    }
  }
  if (result != null)
    return result;
  return Collections.emptySet();
}

origin: org.eclipse.xtext/ui

} else {
  Iterable<IReferenceDescription> newReferenceDescriptions = delta.getNew()
      .getReferenceDescriptions();
  List<ReferenceSearchViewTreeNode> removedReferenceNodes = Lists.newArrayList();
  for (ReferenceSearchViewTreeNode referenceNode : rootNode.getChildren()) {
origin: org.eclipse.xtext/org.eclipse.xtext.ide

URI uri = resource.getURI();
for (IResourceDescription desc : descriptions.getAllResourceDescriptions()) {
  for (IReferenceDescription ref : desc.getReferenceDescriptions()) {
    URI targetURI = ref.getTargetEObjectUri();
    URI sourceEObjectUri = ref.getSourceEObjectUri();
org.eclipse.xtext.resourceIResourceDescriptiongetReferenceDescriptions

Popular methods of IResourceDescription

  • getURI
  • getExportedObjects
  • getImportedNames
  • getExportedObjectsByObject
  • getExportedObjectsByType

Popular in Java

  • Making http requests using okhttp
  • getApplicationContext (Context)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • startActivity (Activity)
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now