congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
IResourceDescription.getExportedObjects
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: org.eclipse.xtext/ui

  public Iterable<IEObjectDescription> apply(IResourceDescription from) {
    return from.getExportedObjects();
  }
}));
origin: org.eclipse.xtext/builder

  public Iterable<IEObjectDescription> apply(IResourceDescription from) {
    if (from != null) {
      return from.getExportedObjects(type, qualifiedName, ignoreCase);
    }
    return Collections.emptyList();
  }
}));
origin: org.eclipse.xtend/org.eclipse.xtend.core

private boolean isFiltered(QualifiedName name) {
  Iterable<IEObjectDescription> exportedObjects = filterDescription.getExportedObjects(TypesPackage.Literals.JVM_TYPE, name, false);
  return !Iterables.isEmpty(exportedObjects);
}
origin: org.eclipse.xtext/ui

  public Iterable<IEObjectDescription> apply(IDirtyResource from) {
    if (from != null)
      return from.getDescription().getExportedObjects();
    return Collections.emptyList();
  }
}));
origin: org.eclipse/xtext

protected boolean internalHasChanges() {
  if (_new == null || old == null)
    return true;
  Iterable<IEObjectDescription> oldEObjects = old.getExportedObjects();
  Iterable<IEObjectDescription> newEObjects = _new.getExportedObjects();
  if (Iterables.size(oldEObjects) != Iterables.size(newEObjects))
    return true;
  Iterator<IEObjectDescription> iterator1 = oldEObjects.iterator();
  Iterator<IEObjectDescription> iterator2 = newEObjects.iterator();
  while (iterator1.hasNext()) {
    if (!equals(iterator1.next(), iterator2.next()))
      return true;
  }
  return false;
}
origin: org.eclipse/xtext

@Override
public Iterable<IEObjectDescription> getExportedObjects(EClass type, QualifiedName qualifiedName, boolean ignoreCase) {
  Iterable<IEObjectDescription> added = description.getExportedObjects(type, qualifiedName, ignoreCase);
  Iterable<IEObjectDescription> delegated = delegate.getExportedObjects(type, qualifiedName, ignoreCase);
  return Iterables.concat(added, delegated);
}
origin: org.eclipse.xtext/ui

  public Iterable<IEObjectDescription> apply(IDirtyResource from) {
    if (from != null)
      return from.getDescription().getExportedObjects(type, name, ignoreCase);
    return Collections.emptyList();
  }
}));
origin: org.eclipse.xtext/builder

@Override
public Iterable<IEObjectDescription> getExportedObjects(final EClass type, final QualifiedName qualifiedName, final boolean ignoreCase) {
  Object existing = lookupMap.get(qualifiedName.toLowerCase());
  if (existing instanceof IResourceDescription) {
    return ((IResourceDescription) existing).getExportedObjects(type, qualifiedName, ignoreCase);
  } else if (existing instanceof Set<?>) {
    @SuppressWarnings("unchecked")
    Set<IResourceDescription> casted = (Set<IResourceDescription>) existing;
    return Iterables.concat(Iterables.transform(casted, new Function<IResourceDescription, Iterable<IEObjectDescription>>() {
      public Iterable<IEObjectDescription> apply(IResourceDescription from) {
        if (from != null) {
          return from.getExportedObjects(type, qualifiedName, ignoreCase);
        }
        return Collections.emptyList();
      }
    }));
  }
  return Collections.emptyList();
}

origin: org.eclipse/xtext

protected void addExportedNames(Set<QualifiedName> names, IResourceDescription resourceDescriptor) {
  if (resourceDescriptor==null)
    return;
  Iterable<IEObjectDescription> iterable = resourceDescriptor.getExportedObjects();
  for (IEObjectDescription ieObjectDescription : iterable) {
    names.add(ieObjectDescription.getName().toLowerCase());
  }
}

origin: org.eclipse/xtext

protected boolean isAffected(Collection<QualifiedName> importedNames, IResourceDescription description) {
  if (description != null) {
    for (IEObjectDescription desc : description.getExportedObjects())
      if (importedNames.contains(desc.getName().toLowerCase()))
        return true;
  }
  return false;
}

origin: org.eclipse.xtext/builder

public static void copyExportedObject(IResourceDescription from, ResourceDescriptionImpl result) {
  Iterator<IEObjectDescription> sourceExportedObjects = from.getExportedObjects().iterator();
  if (sourceExportedObjects.hasNext()) {
    InternalEList<IEObjectDescription> targetExportedObjects = (InternalEList<IEObjectDescription>) result.getExportedObjects();
    do {
      targetExportedObjects.addUnique(BuilderStateUtil.create(sourceExportedObjects.next()));
    } while(sourceExportedObjects.hasNext());
  }
}

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

 protected boolean isAffected(final Collection<QualifiedName> importedNames, final IResourceDescription description) {
  if ((description != null)) {
   Iterable<IEObjectDescription> _exportedObjects = description.getExportedObjects();
   for (final IEObjectDescription desc : _exportedObjects) {
    boolean _contains = importedNames.contains(desc.getName().toLowerCase());
    if (_contains) {
     return true;
    }
   }
  }
  return false;
 }
}
origin: org.eclipse.xtend/org.eclipse.xtend.core

private boolean containsActiveAnnotation(final IResourceDescription description) {
 final Function1<IEObjectDescription, Boolean> _function = (IEObjectDescription it) -> {
  return Boolean.valueOf(((List<String>)Conversions.doWrapArray(it.getUserDataKeys())).contains(XtendResourceDescriptionStrategy.ACTIVE_ANNOTATION_TIMESTAMP));
 };
 return IterableExtensions.<IEObjectDescription>exists(description.getExportedObjects(), _function);
}

origin: org.eclipse/xtext

protected List<EObject> findEObjectsOfType(Set<EClass> eClasses, IResourceDescriptions resourceDescriptions,
    ResourceSet resourceSet) {
  List<EObject> elements = Lists.newArrayList();
  Iterable<IResourceDescription> descriptions = resourceDescriptions.getAllResourceDescriptions();
  for (IResourceDescription resDesc : descriptions) {
    Iterable<IEObjectDescription> objects = resDesc.getExportedObjects();
    for (IEObjectDescription description : objects) {
      if (matches(eClasses, description))
        elements.add(resourceSet.getEObject(description.getEObjectURI(), true));
    }
  }
  return elements;
}
origin: org.eclipse.xtext/org.eclipse.xtext.common.types

  @Override
  public void doGenerateStubs(IFileSystemAccess access, IResourceDescription description) {
    for (IEObjectDescription objectDesc : description.getExportedObjects()) {
      String javaStubSource = getJavaStubSource(objectDesc, description);
      if(javaStubSource != null) {
        String javaFileName = getJavaFileName(objectDesc);
        access.generateFile(javaFileName, javaStubSource);
      }
    }
  }
}
origin: org.eclipse.xtext/org.eclipse.xtext.ide

protected IEObjectDescription getDescription(final URI objectURI) {
 final IResourceDescription resourceDescription = this.getIndexData().getResourceDescription(objectURI.trimFragment());
 if ((resourceDescription == null)) {
  return null;
 }
 final Function1<IEObjectDescription, Boolean> _function = (IEObjectDescription it) -> {
  URI _eObjectURI = it.getEObjectURI();
  return Boolean.valueOf(Objects.equal(_eObjectURI, objectURI));
 };
 return IterableExtensions.<IEObjectDescription>findFirst(resourceDescription.getExportedObjects(), _function);
}

origin: org.eclipse.xtext/org.eclipse.xtext.common.types

public String getJavaStubSource(IEObjectDescription description, IResourceDescription resourceDescription) {
  if(isNestedType(description) || !isJvmDeclaredType(description)) {
    return null;
  }
  Multimap<QualifiedName, IEObjectDescription> owner2nested = LinkedHashMultimap.create();
  for(IEObjectDescription other: resourceDescription.getExportedObjects()) {
    if(isJvmDeclaredType(other) && isNestedType(other))
      owner2nested.put(getOwnerClassName(other.getQualifiedName()), other);
  }
  StringBuilder classSignatureBuilder = new StringBuilder();
  QualifiedName qualifiedName = description.getQualifiedName();
  if (qualifiedName.getSegments().size() > 1) {
    String string = qualifiedName.toString();
    classSignatureBuilder.append("package " + string.substring(0, string.lastIndexOf('.')) + ";");
  }
  appendType(description, owner2nested, classSignatureBuilder);
  return classSignatureBuilder.toString();
}
origin: org.eclipse.xtext/org.eclipse.xtext.ide

public List<? extends SymbolInformation> getSymbols(final IResourceDescription resourceDescription, final String query, final IReferenceFinder.IResourceAccess resourceAccess, final CancelIndicator cancelIndicator) {
 final LinkedList<SymbolInformation> symbols = CollectionLiterals.<SymbolInformation>newLinkedList();
 Iterable<IEObjectDescription> _exportedObjects = resourceDescription.getExportedObjects();
 for (final IEObjectDescription description : _exportedObjects) {
  {
   this.operationCanceledManager.checkCanceled(cancelIndicator);
   boolean _filter = this.filter(description, query);
   if (_filter) {
    final Procedure1<SymbolInformation> _function = (SymbolInformation symbol) -> {
     symbols.add(symbol);
    };
    this.createSymbol(description, resourceAccess, _function);
   }
  }
 }
 return symbols;
}

origin: org.eclipse/xtext

public void doCheckUniqueNames(Resource resource, CancelIndicator cancelIndicator) {
  final IResourceServiceProvider resourceServiceProvider = resourceServiceProviderRegistry.getResourceServiceProvider(resource.getURI());
  if (resourceServiceProvider==null)
    return;
  IResourceDescription.Manager manager = resourceServiceProvider.getResourceDescriptionManager();
  if (manager != null) {
    IResourceDescription description = manager.getResourceDescription(resource);
    if (description != null) {
      Iterable<IEObjectDescription> descriptions = description.getExportedObjects();
      helper.checkUniqueNames(descriptions, cancelIndicator, this);
    }
  }
}
origin: org.eclipse.xtext/ui

private void addReference(IReferenceDescription referenceDescription, boolean isUpdateViewer) {
  URI containerEObjectURI = referenceDescription.getContainerEObjectURI();
  final URI eObjectURI = (containerEObjectURI == null) ? referenceDescription.getSourceEObjectUri()
      : containerEObjectURI;
  IResourceDescription resourceDescription = resourceDescriptions.getResourceDescription(eObjectURI
      .trimFragment());
  if (resourceDescription != null) {
    ReferenceSearchViewTreeNode resourceNode = resourceNode(resourceDescription, isUpdateViewer);
    ReferenceSearchViewTreeNode referenceNode = null;
    for (IEObjectDescription eObjectDescription : resourceDescription.getExportedObjects()) {
      if (eObjectDescription.getEObjectURI().equals(eObjectURI)) {
        referenceNode = new ReferenceSearchViewTreeNode(resourceNode, referenceDescription,
            eObjectDescription);
        break;
      }
    }
    if (referenceNode == null && resourceNode != null)
      new ReferenceSearchViewTreeNode(resourceNode, referenceDescription, referenceDescription);
  }
}
org.eclipse.xtext.resourceIResourceDescriptiongetExportedObjects

Popular methods of IResourceDescription

  • getURI
  • getImportedNames
  • getReferenceDescriptions
  • getExportedObjectsByObject
  • getExportedObjectsByType

Popular in Java

  • Running tasks concurrently on multiple threads
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getSystemService (Context)
  • putExtra (Intent)
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • Permission (java.security)
    Legacy security code; do not use.
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • BoxLayout (javax.swing)
  • JFrame (javax.swing)
  • Best plugins for Eclipse
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