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

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

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

origin: org.eclipse/xtext

protected Collection<QualifiedName> getImportedNames(IResourceDescription candidate) {
  return Sets.newHashSet(candidate.getImportedNames());
}
origin: org.eclipse.xtext/ui

public Iterable<QualifiedName> getImportedNames() {
  IResourceDescription snapShot = snapShotProvider.get();
  if (snapShot != null)
    return snapShot.getImportedNames();
  return Collections.emptyList();
}
origin: org.eclipse.xtext/builder

public static void copyImportedNames(IResourceDescription from, ResourceDescriptionImpl result) {
  Iterable<QualifiedName> importedNames = from.getImportedNames();
  if (importedNames instanceof Collection<?>) {
    Collection<? extends QualifiedName> sourceImportedNames = (Collection<? extends QualifiedName>) importedNames;
    if (!sourceImportedNames.isEmpty()) {
      InternalEList<QualifiedName> targetImportedNames = (InternalEList<QualifiedName>) result.getImportedNames();
      targetImportedNames.addAllUnique(sourceImportedNames);
    }
  } else {
    Iterator<QualifiedName> importedNamesIterator = importedNames.iterator();
    if (importedNamesIterator.hasNext()) {
      InternalEList<QualifiedName> targetImportedNames = (InternalEList<QualifiedName>) result.getImportedNames();
      do {
        targetImportedNames.addUnique(importedNamesIterator.next());
      } while(importedNamesIterator.hasNext());
    }
  }
}
origin: org.eclipse.xtend/org.eclipse.xtend.core

@Override
public void findReferencesInDescription(final TargetURIs targetURIs, final IResourceDescription resourceDescription, final IReferenceFinder.IResourceAccess resourceAccess, final IReferenceFinder.Acceptor acceptor, final IProgressMonitor monitor) {
 if ((resourceAccess == null)) {
  return;
 }
 final Set<QualifiedName> names = this.declarators.getDeclaratorData(targetURIs, resourceAccess).getDeclaratorNames();
 boolean _isCanceled = monitor.isCanceled();
 if (_isCanceled) {
  throw new OperationCanceledException();
 }
 final Set<QualifiedName> importedNames = IterableExtensions.<QualifiedName>toSet(resourceDescription.getImportedNames());
 final Function1<QualifiedName, Boolean> _function = (QualifiedName it) -> {
  return Boolean.valueOf(importedNames.contains(it));
 };
 boolean _exists = IterableExtensions.<QualifiedName>exists(names, _function);
 if (_exists) {
  final IUnitOfWork<Object, ResourceSet> _function_1 = (ResourceSet it) -> {
   this.findReferences(targetURIs, it.getResource(resourceDescription.getURI(), true), acceptor, monitor);
   return null;
  };
  resourceAccess.<Object>readOnly(resourceDescription.getURI(), _function_1);
 }
}

origin: org.eclipse.xtext/org.eclipse.xtext.java

@Override
public boolean isAffected(final Collection<IResourceDescription.Delta> deltas, final IResourceDescription candidate, final IResourceDescriptions context) throws IllegalArgumentException {
 Collection<QualifiedName> importedNames = IterableExtensions.<QualifiedName>toSet(candidate.getImportedNames());
 for (final IResourceDescription.Delta delta : deltas) {
  boolean _hasChanges = this.hasChanges(delta, candidate);
  if (_hasChanges) {
   if ((this.isAffected(importedNames, delta.getNew()) || this.isAffected(importedNames, delta.getOld()))) {
    return true;
   }
  }
 }
 return false;
}

org.eclipse.xtext.resourceIResourceDescriptiongetImportedNames

Popular methods of IResourceDescription

  • getURI
  • getExportedObjects
  • getReferenceDescriptions
  • getExportedObjectsByObject
  • getExportedObjectsByType

Popular in Java

  • Running tasks concurrently on multiple threads
  • getSystemService (Context)
  • putExtra (Intent)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • From CI to AI: The AI layer in your organization
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