Package org.eclipse.emf.common.util

Examples of org.eclipse.emf.common.util.URI.lastSegment()


  public void appendToLog(Resource resource, String content) {
    URI logUri = getLogURI(resource);
    IResource iRes = JdtHelper.getIResource(logUri, true);
    IFile file = null;
    if (iRes instanceof IFolder) {
      file = ((IFolder)iRes).getFile(logUri.lastSegment());
    } else if (iRes instanceof IFile) {
      file = (IFile)iRes;
    }
    if (file != null) {
      try {
View Full Code Here


    if (obj == null) {
      text = NO_EXERCISE_LABEL;
    } else if (obj instanceof Resource) {
      Resource res = (Resource) obj;
      URI uri = res.getURI();
      text = uri.lastSegment() + NAME_PATH_SEPARATOR + toPath(uri.trimSegments(1));
//      Exercise ex = res.getExercise();
//      text = (ex != null ? getText(ex) : res.getURI().toString());
    } else if (obj instanceof Exercise) {
//      JexResource res = JexUiPlugin.getPlugin().getExerciseManager().getExerciseResource((Exercise)obj);
//      String exText = (res != null ? res.getURI().toString() : null);
View Full Code Here

 
  protected void _generatePHP(final AbstractSection as, final IFileSystemAccess fsa) {
    Resource _eResource = as.eResource();
    URI _uRI = _eResource.getURI();
    URI _trimFileExtension = _uRI.trimFileExtension();
    String _lastSegment = _trimFileExtension.lastSegment();
    String _plus = (_lastSegment + ".php");
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("<?php require_once($_SERVER[\'DOCUMENT_ROOT\'] . \"/eclipse.org-common/system/app.class.php\");\trequire_once($_SERVER[\'DOCUMENT_ROOT\'] . \"/eclipse.org-common/system/nav.class.php\"); \trequire_once($_SERVER[\'DOCUMENT_ROOT\'] . \"/eclipse.org-common/system/menu.class.php\"); \t$App \t= new App();\t$Nav\t= new Nav();\t$Menu \t= new Menu();\t\tinclude($App->getProjectCommon());    # All on the same line to unclutter the user\'s desktop\'");
    _builder.newLine();
    _builder.append("\t");
View Full Code Here

        if (!_matched_1) {
          String _packageName = ((JvmDeclaredType) ie).getPackageName();
          String _replaceAll_2 = _packageName.replaceAll("\\.", "/");
          String _plus_2 = (prefix + _replaceAll_2);
          String _plus_3 = (_plus_2 + "/");
          String _lastSegment = uri.lastSegment();
          _switchResult_1 = (_plus_3 + _lastSegment);
        }
        _xifexpression = _switchResult_1;
      } else {
        _xifexpression = null;
View Full Code Here

      if (identifiable instanceof Chapter) {
        _matched=true;
        Resource _eResource = ((Chapter)identifiable).eResource();
        URI _uRI = _eResource.getURI();
        URI _trimFileExtension = _uRI.trimFileExtension();
        String _lastSegment = _trimFileExtension.lastSegment();
        String _xifexpression = null;
        EObject _eContainer = ((Chapter)identifiable).eContainer();
        if ((_eContainer instanceof Part)) {
          String _xifexpression_1 = null;
          EObject _eContainer_1 = ((Chapter)identifiable).eContainer();
View Full Code Here

      if (identifiable instanceof Part) {
        _matched=true;
        Resource _eResource = ((Part)identifiable).eResource();
        URI _uRI = _eResource.getURI();
        URI _trimFileExtension = _uRI.trimFileExtension();
        String _lastSegment = _trimFileExtension.lastSegment();
        String _plus = (_lastSegment + "_");
        EObject _eContainer_1 = ((Part)identifiable).eContainer();
        EList<EObject> _eContents = _eContainer_1.eContents();
        int _indexOf = _eContents.indexOf(identifiable);
        String _plus_1 = (_plus + Integer.valueOf(_indexOf));
View Full Code Here

    }
    if (!_matched) {
      Resource _eResource = identifiable.eResource();
      URI _uRI = _eResource.getURI();
      URI _trimFileExtension = _uRI.trimFileExtension();
      String _lastSegment = _trimFileExtension.lastSegment();
      return (_lastSegment + ".html");
    }
    return _switchResult;
  }
 
View Full Code Here

    String _decode = URLDecoder.decode(_fullURL);
    CharSequence _generateRootDocument = this.generateRootDocument(document);
    access.generateFile(_decode, _generateRootDocument);
    Resource _eResource = document.eResource();
    URI _uRI = _eResource.getURI();
    String _lastSegment = _uRI.lastSegment();
    final String homeFileName = _lastSegment.replaceAll(".xdoc$", ".html");
    EList<Chapter> _chapters = document.getChapters();
    for (final Chapter c : _chapters) {
      this.generate(c, access, homeFileName);
    }
View Full Code Here

    this.populateFileMap(doc);
  }
 
  public String getTargetDocumentName() {
    URI _targetURI = this.getTargetURI(this.doc);
    return _targetURI.lastSegment();
  }
 
  public URI getTargetURI(final Ref it) {
    URI _xblockexpression = null;
    {
View Full Code Here

      if(root != null) {
        uri = uri.deresolve(root.appendSegment(""));
      }
      boolean isPptpResource = "pptp".equals(uri.fileExtension());
      String path = isPptpResource
          ? uri.lastSegment().replace(".pptp", "")
          : uri.devicePath();
      if(!resources.contains(path))
        resources.add(path);
    }
    StringBuffer buf = new StringBuffer();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.