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

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

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

origin: org.eclipse/xtext

public URI getUri() {
  return old == null ? _new.getURI() : old.getURI();
}
origin: org.eclipse.xtext/builder

  public URI apply(IResourceDescription from) {
    return from.getURI();
  }
}
origin: org.eclipse.xtext/builder

  public URI apply(IResourceDescription from) {
    return from.getURI();
  }
});
origin: org.eclipse.xtext/org.eclipse.xtext.common.types

  @Override
  public boolean apply(IResourceDescription input) {
    return filter.apply(input.getURI());
  }
});
origin: org.eclipse/xtext

  public boolean apply(IResourceDescription input) {
    return !input.getURI().equals(filterMe);
  }
});
origin: org.eclipse/xtext

  public boolean apply(IResourceDescription input) {
    return uri.equals(input.getURI());
  }
}, null);
origin: org.eclipse.xtext/ui

public URI getURI() {
  if (document == null)
    throw new IllegalStateException("Cannot use getURI if this dirty resource is not connected to a document");
  if (description == null)
    throw new IllegalStateException("Cannot use getURI if this dirty resource is currently not initialized");
  return description.getURI();
}

origin: org.eclipse.xtext/ui

protected Integer _compare(IResourceDescription rd0, IResourceDescription rd1) {
  String[] segments0 = rd0.getURI().segments();
  String[] segments1 = rd1.getURI().segments();
  for(int i=0; i<Math.min(segments0.length, segments1.length); ++i) {
    int compareToIgnoreCase = segments0[i].compareToIgnoreCase(segments1[i]);
    if(compareToIgnoreCase != 0)
      return compareToIgnoreCase;
  }
  return segments0.length - segments1.length;
}

origin: org.eclipse/xtext

@Override
public boolean hasResourceDescription(URI uri) {
  if (uri.equals(description.getURI()))
    return true;
  return delegate.hasResourceDescription(uri);
}

origin: org.eclipse.xtext/ui

public StatefulResourceDescription(IResourceDescription original, Provider<IResourceDescription> snapShotProvider) {
  this.snapShotProvider = snapShotProvider;
  this.uri = original.getURI();
  this.exported = copyExportedObjects(original);
}
origin: org.eclipse/xtext

@Override
public IResourceDescription getResourceDescription(URI uri) {
  if (description.getURI().equals(uri))
    return description;
  return delegate.getResourceDescription(uri);
}
origin: org.eclipse.xtext/ui

public Object image(IResourceDescription element) {
  return getImageForURI(element.getURI());
}
origin: org.eclipse.xtext/builder

  public IResourceDescription apply(IResourceDescription from) {
    IResourceDescription dirty = dirtyStateManager.getDirtyResourceDescription(from.getURI());
    if (dirty != null)
      return dirty;
    return from;
  }
});
origin: org.eclipse.viatra/org.eclipse.viatra.query.patternlanguage.emf

@Override
public Iterable<IResourceDescription> getAllResourceDescriptions() {
  return Iterables.filter(super.getAllResourceDescriptions(),
      Predicates.not(rd -> rd.getURI().toString().contains(PatternParser.SYNTHETIC_URI_PREFIX)));
}
origin: org.eclipse/xtext

  public boolean apply(IResourceDescription input) {
    return !isExistingOrRenamedResourceURI(input.getURI());
  }
});
origin: org.eclipse/xtext

protected Map<URI, IResourceDescription> doGetUriToDescription() {
  Iterable<? extends IResourceDescription> filtered = Iterables.filter(descriptions.getAllResourceDescriptions(), new DelegatingPredicate());
  Map<URI, IResourceDescription> result = Maps.newLinkedHashMap();
  for(IResourceDescription description: filtered) {
    result.put(description.getURI(), description);
  }
  return result;
}

origin: org.eclipse.xtext/ui

public Object text(IResourceDescription element) {
  Iterator<Pair<IStorage, IProject>> storages = storage2UriMapper.getStorages(element.getURI()).iterator();
  if (storages.hasNext()) {
    IStorage storage = storages.next().getFirst();
    return storage.getFullPath().toString();
  }
  return null;
}
origin: org.eclipse.xtext/ui

/**
 * @deprecated Use {@link #haveEObjectDescriptionsChanged(IResourceDescription, org.eclipse.xtext.resource.IResourceDescription.Manager)}.
 */
@Deprecated
public boolean haveEObjectDescriptionsChanged(final IResourceDescription newDescription) {
  IResourceDescription.Manager resourceDescriptionManager = resourceServiceProviderRegistry.getResourceServiceProvider(newDescription.getURI()).getResourceDescriptionManager();
  return haveEObjectDescriptionsChanged(newDescription, resourceDescriptionManager);
}
origin: org.eclipse.xtext/builder

public URI getEObjectURI() {
  EObject container = eContainer();
  if (container instanceof IResourceDescription) {
    URI result = ((IResourceDescription) container).getURI().appendFragment(getFragment());
    return result;
  }
  return null;
}
origin: org.eclipse.xtext/builder

public static ResourceDescriptionImpl create(IResourceDescription desc) {
  if (desc instanceof ResourceDescriptionImpl)
    return (ResourceDescriptionImpl) desc;
  ResourceDescriptionImpl result = (ResourceDescriptionImpl) BuilderStateFactory.eINSTANCE.createResourceDescription();
  result.setURI(desc.getURI());
  copyExportedObject(desc, result);
  copyReferenceDescriptions(desc, result);
  copyImportedNames(desc, result);
  return result;
}
org.eclipse.xtext.resourceIResourceDescriptiongetURI

Popular methods of IResourceDescription

  • getExportedObjects
  • getImportedNames
  • getReferenceDescriptions
  • getExportedObjectsByObject
  • getExportedObjectsByType

Popular in Java

  • Making http post requests using okhttp
  • scheduleAtFixedRate (Timer)
  • getSystemService (Context)
  • getSupportFragmentManager (FragmentActivity)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • Permission (java.security)
    Legacy security code; do not use.
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • 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