org.eclipse.emf.common.util.URI.isArchive()方法的使用及代码示例

x33g5p2x  于2022-01-31 转载在 其他  
字(3.9k)|赞(0)|评价(0)|浏览(96)

本文整理了Java中org.eclipse.emf.common.util.URI.isArchive()方法的一些代码示例,展示了URI.isArchive()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。URI.isArchive()方法的具体详情如下:
包路径:org.eclipse.emf.common.util.URI
类名称:URI
方法名:isArchive

URI.isArchive介绍

[英]Returns true if this is an archive URI. If so, it is also hierarchical, with an authority (consisting of an absolute URI followed by "!"), no device, and an absolute path.
[中]如果这是存档URI,则返回true。如果是这样的话,它也是分层的,有一个权限(由绝对URI和“!”组成),没有设备,绝对路径。

代码示例

代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.common

@Override
public boolean isArchive()
{
 return uri.isArchive();
}

代码示例来源:origin: fr.inria.atlanmod.neoemf/neoemf-core

@Override
public boolean isArchive() {
  return internalUri.isArchive();
}

代码示例来源:origin: atlanmod/NeoEMF

@Override
public boolean isArchive() {
  return base.isArchive();
}

代码示例来源:origin: org.eclipse.xtext/org.eclipse.xtext.java

@Override
public boolean canHandle(final URI uri) {
 return (this.extensionProvider.getFileExtensions().contains(uri.fileExtension()) && (!uri.isArchive()));
}

代码示例来源:origin: io.sarl.lang/io.sarl.lang

if (uri.isArchive() || uri.isEmpty() || uri.isCurrentDocumentReference()) {
  return false;

代码示例来源:origin: org.eclipse.xtext/ui

/**
 * @since 2.3
 */
protected void updateCache(IURIEditorInput input) throws CoreException {
  URIInfo info= (URIInfo) getElementInfo(input);
  if (info != null) {
    java.net.URI uri= input.getURI();
    if (uri != null) {
      boolean readOnly = true;
      String uriAsString = uri.toString();
      URI emfURI = URI.createURI(uriAsString);
      if (emfURI.isFile() && !emfURI.isArchive()) {
        // TODO: Should we use the resource set somehow to obtain the URIConverter for the file protocol?
        // see also todo below, but don't run into a stackoverflow ;-)
        Map<String, ?> attributes = URIConverter.INSTANCE.getAttributes(emfURI, null);
        readOnly = Boolean.TRUE.equals(attributes.get(URIConverter.ATTRIBUTE_READ_ONLY));
      }
      info.isReadOnly=  readOnly;
      info.isModifiable= !readOnly;
    }
    info.updateCache= false;
  }
}

代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.edit

/**
 * Returns whether to expect that the resource corresponding to the given URI form will be read only.
 * @deprecated this method is no longer called by {@link #isReadOnly(Resource)}
 */
@Deprecated
protected boolean isReadOnlyURI(URI uri)
{
 if (uri.isArchive())
 {
  return isReadOnlyURI(URI.createURI(uri.authority()));
 }
 return !uri.isPlatformResource() && (uri.isRelative() || !uri.isFile());
}

代码示例来源:origin: org.eclipse.xtext/ui

if (result.isEmpty() && uri.isArchive()) {
  String authority = uri.authority();
  authority = authority.substring(0, authority.length() - 1);

代码示例来源:origin: org.eclipse.xtext/ui

IFile result = null;
if (considerArchives && uri.isArchive()) {
  class MyArchiveURLConnection extends ArchiveURLConnection {
    public MyArchiveURLConnection(String url) {

代码示例来源:origin: org.eclipse.xtext/ui

protected IPackageFragmentRoot getPackageFragmentRoot(URI uri) {
  if (uri.isArchive() || !uri.isPlatform()) {
    return getJarWithEntry(uri);
  }
  final IFile file = getWorkspaceRoot().getFile(new Path(uri.toPlatformString(true)));
  if (file == null) {
    return getJarWithEntry(uri);
  }
  IPackageFragmentRoot root = getJavaElement(file);
  if (root == null)
    return getJarWithEntry(uri);
  return root;
}

代码示例来源:origin: org.eclipse.emf/org.eclipse.emf.ecore

URI pluginLocationURI = pluginLocation.isArchive() ? pluginLocation : pluginLocation.appendSegment("");
platformPluginToLocationURIMap.put(logicalPlatformPluginURI, pluginLocationURI);

代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.ecore

URI pluginLocationURI = pluginLocation.isArchive() ? pluginLocation : pluginLocation.appendSegment("");
platformPluginToLocationURIMap.put(logicalPlatformPluginURI, pluginLocationURI);

代码示例来源:origin: org.eclipse/xtext

if ((uri.isPlatform() || uri.isArchive()) && delta.getNew() != null) { 
  if (containers == null)
    containers = containerManager.getVisibleContainers(candidate, context);

代码示例来源:origin: org.codehaus.openxma/dsl-generator

public void doGenerate(final Resource resource, final IFileSystemAccess fileSystemAccess) {
 boolean _or = false;
 URI _uRI = resource.getURI();
 boolean _isArchive = _uRI.isArchive();
 if (_isArchive) {
  _or = true;

相关文章