Examples of ZipEntryStorage


Examples of org.eclipse.debug.core.sourcelookup.containers.ZipEntryStorage

      try {
        zipFile = new JarFile(sourceFile, true, JarFile.OPEN_READ);
        ZipEntry zipEntry = zipFile.getEntry(searchedPath + "/" + searchedFileName);
        if (zipEntry != null) {
          return new ZipEntryStorageEditorInput(
              new ZipEntryStorage(zipFile, zipEntry));
        } else {
          // Nothing, alas
        }
      } catch (IOException e) {
        CCWPlugin.logError("Error trying to open " + sourceAbsolutePath, e);
View Full Code Here

Examples of org.springframework.ide.eclipse.core.io.ZipEntryStorage

          if (isArchived) {
            if (file instanceof Resource) {
              resource = (Resource) file;
            }
            else {
              resource = new StorageResource(new ZipEntryStorage(file.getProject(), getElementName()),
                  file.getProject());
            }
          }
          else {
            resource = new FileResource(file);
View Full Code Here

Examples of org.springframework.ide.eclipse.core.io.ZipEntryStorage

  }

  private void init(Resource resource) {
    if (resource instanceof IAdaptable) {
      if (((IAdaptable) resource).getAdapter(ZipEntryStorage.class) != null) {
        ZipEntryStorage storage = (ZipEntryStorage) ((IAdaptable) resource)
            .getAdapter(ZipEntryStorage.class);
        file = storage.getFile();
        setElementName(storage.getFullName());
        isArchived = true;
      }
      else if (((IAdaptable) resource).getAdapter(IFile.class) != null) {
        file = (IFile) ((IAdaptable) resource).getAdapter(IFile.class);
        isArchived = file instanceof ExternalFile;
View Full Code Here

Examples of org.springframework.ide.eclipse.core.io.ZipEntryStorage

      String toolTipPrefix = BeansGraphPlugin.getResourceString("ShowGraphAction.name.config");
      IBeansConfig config = (IBeansConfig) element;
      IResource resource = config.getElementResource();
      if (resource != null) {
        if (config.isElementArchived()) {
          ZipEntryStorage storage = new ZipEntryStorage(config);
          name = storage.getName();
          toolTip = toolTipPrefix + storage.getFile().getProjectRelativePath().toString() + " - "
              + storage.getFullPath().toString();
        }
        else {
          name = resource.getName();
          toolTip = toolTipPrefix + resource.getFullPath().toString();
        }
View Full Code Here

Examples of org.springframework.ide.eclipse.core.io.ZipEntryStorage

  public static final IProject getProject(IDocument document) {
    IProject project = null;
    IEditorInput input = Workbench.getInstance().getActiveWorkbenchWindow().getActivePage().getActiveEditor()
        .getEditorInput();
    if (input instanceof ZipEntryEditorInput) {
      ZipEntryStorage storage = (ZipEntryStorage) ((ZipEntryEditorInput) input).getStorage();
      project = storage.getFile().getProject();
    }
    else {
      IFile file = BeansEditorUtils.getFile(document);
      project = file.getProject();
    }
View Full Code Here

Examples of org.springframework.ide.eclipse.core.io.ZipEntryStorage

  protected Object[] getImportChildren(final Object parentElement) {
    Set<IImportedBeansConfig> importedBeansConfigs = ((IBeansImport) parentElement).getImportedBeansConfigs();
    Set<Object> importedFiles = new LinkedHashSet<Object>();
    for (IBeansConfig bc : importedBeansConfigs) {
      if (bc.isElementArchived()) {
        importedFiles.add(new ZipEntryStorage(bc));
      }
      else {
        importedFiles.add(bc.getElementResource());
      }
    }
View Full Code Here

Examples of org.springframework.ide.eclipse.core.io.ZipEntryStorage

        return BeansModelLabels.getElementLabel(config, BeansUILabels.APPEND_PATH | BeansUILabels.DESCRIPTION);
      }
    }
    else if (element instanceof ZipEntryStorage) {
      // Create label of zip entry here as it is not a core model element
      ZipEntryStorage storage = (ZipEntryStorage) element;
      StringBuilder builder = new StringBuilder();
      builder.append(storage.getFullPath().lastSegment());
      builder.append(" - ");
      builder.append(storage.getFullPath().removeLastSegments(1).toString());
      builder.append(" - ");
      builder.append(storage.getFile().getFullPath().toString());
      return builder.toString();
    }
    else if (element instanceof BeanMetadataReference
        && BeanMetadataUtils.getLabelProvider((BeanMetadataReference) element) != null) {
      return BeanMetadataUtils.getLabelProvider((BeanMetadataReference) element).getDescription(element);
View Full Code Here

Examples of org.springframework.ide.eclipse.core.io.ZipEntryStorage

      buf.append(javaConfig.getConfigClass().getElementName());
    }
    else {
      String configName = config.getElementName();
      if (config.isElementArchived()) {
        ZipEntryStorage storage = new ZipEntryStorage(config);
        buf.append(storage.getFullPath());
        buf.append(" - ");
        buf.append(storage.getFile().getName());
      }
      else {
        buf.append(new Path(configName).lastSegment());
      }
    }
View Full Code Here

Examples of org.springframework.ide.eclipse.core.io.ZipEntryStorage

      return BeansModelLabels.getElementLabel((IModelElement) element, 0);
    }
    else if (element instanceof ZipEntryStorage) {
      // create zip entry label right here as it is not a core model
      // element
      ZipEntryStorage storage = (ZipEntryStorage) element;
      StringBuilder builder = new StringBuilder();
      builder.append(storage.getFullPath().lastSegment());
      builder.append(" - ");
      builder.append(storage.getFile().getProjectRelativePath().toString());
      builder.append("!");
      builder.append(storage.getFullPath().removeLastSegments(1).toString());
      return builder.toString();
    }
    else if (element instanceof BeanClassReferences) {
      return BeansUIPlugin.getResourceString("BeanClassReferences.label");
    }
View Full Code Here

Examples of org.springframework.ide.eclipse.core.io.ZipEntryStorage

  protected Object[] getProjectChildren(IBeansProject project, boolean onlyConfigSets) {
    Set<Object> children = new LinkedHashSet<Object>();
    if (!onlyConfigSets) {
      for (IBeansConfig config : project.getConfigs()) {
        if (config.isElementArchived()) {
          children.add(new ZipEntryStorage(config));
        }
        else {
          children.add(config);
        }
      }
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.