Examples of ZipEntryStorage


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

        if (resource instanceof IFile) {
          nonJavaResources[i] = resource;
        }
        else if (resource instanceof IStorage && root.getResource() instanceof IFile) {
          IStorage storage = (IStorage) resource;
          nonJavaResources[i] = new ZipEntryStorage((IFile) root.getResource(), storage
              .getFullPath().toString());
        }
      }
    }
    return nonJavaResources;
View Full Code Here

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

    if (root.getKind() == IPackageFragmentRoot.K_BINARY && root.getResource() instanceof IFile) {
      for (int i = 0; i < nonJavaResources.length; i++) {
        Object resource = nonJavaResources[i];
        if (resource instanceof IStorage) {
          IStorage storage = (IStorage) resource;
          nonJavaResources[i] = new ZipEntryStorage((IFile) root.getResource(), storage
              .getFullPath().toString());
        }
      }
    }
    return nonJavaResources;
View Full Code Here

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

      if (input instanceof IFileEditorInput) {
        IFile file = ((IFileEditorInput) input).getFile();
        return BeansCorePlugin.getModel().getConfig(file);
      }
      else if (input instanceof ZipEntryEditorInput) {
        ZipEntryStorage storage = (ZipEntryStorage) ((ZipEntryEditorInput) input)
            .getStorage();
        IBeansProject project = BeansCorePlugin.getModel().getProject(
            storage.getFile().getProject());
        if (project != null) {
          return project.getConfig(storage.getFullName());
        }
      }
    }
    return null;
  }
View Full Code Here

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

   */
  public static IEditorPart openInEditor(IResourceModelElement element,
      boolean activate) {
    IResourceModelElement sourceElement;
    IResource resource = null;
    ZipEntryStorage zipEntryStorage = null;
    int line;
    if (element instanceof ISourceModelElement) {
      ISourceModelElement source = (ISourceModelElement) element;
      sourceElement = source.getElementSourceElement();
      line = source.getElementStartLine();
      Resource res = source.getElementSourceLocation().getResource();
      if (res instanceof IAdaptable) {
        resource = (IResource) ((IAdaptable) res)
            .getAdapter(IResource.class);
        zipEntryStorage = (ZipEntryStorage) ((IAdaptable) res)
            .getAdapter(ZipEntryStorage.class);
      }
      else {
        resource = sourceElement.getElementResource();
      }
    }
    else if (element instanceof AbstractBeansConfig) {
      sourceElement = element;
      line = ((AbstractBeansConfig) element).getElementStartLine();
      resource = sourceElement.getElementResource();
    }
    else {
      return null;
    }

    if (resource instanceof IFile) {

      // add to history
      BeansUIActivationHistory.addToHistory(element);

      IFile file = (IFile) resource;
      if (sourceElement.isElementArchived()) {
        try {
          ZipEntryStorage storage = new ZipEntryStorage(sourceElement);
          return openZipEntryStorage(line, file, storage);
        }
        catch (CoreException e) {
          BeansCorePlugin.log(e);
        }
View Full Code Here

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

    while (element != null && element.getElementParent() != null) {
      path.addParent(element);
      if (element instanceof IBeansConfig) {
        IBeansConfig config = (IBeansConfig) element;
        if (config.isElementArchived()) {
          path.addParent(new ZipEntryStorage(config));
        }
        else {
          path.addParent(config.getElementResource());
        }
      }
View Full Code Here

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

          if (element instanceof IType) {
            IType type = (IType) element;
            config = BeansConfigFactory.JAVA_CONFIG_TYPE + type.getFullyQualifiedName();
          }
          else if (element instanceof ZipEntryStorage) {
            ZipEntryStorage storage = (ZipEntryStorage) element;
            config = storage.getFullName();
          }
          else {
            IFile file = (IFile) element;
            config = file.getProjectRelativePath().toString();
          }
View Full Code Here

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

      Object[] selection = dialog.getResult();
      if (selection != null && selection.length > 0) {
        for (Object element : selection) {
          String config = null;
          if (element instanceof ZipEntryStorage) {
            ZipEntryStorage storage = (ZipEntryStorage) element;
            config = storage.getFullName();
          }
          else if (element instanceof IFile) {
            IFile file = (IFile) element;
            config = file.getProjectRelativePath().toString();
          }
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.