Examples of IContainer


Examples of com.xuggle.xuggler.IContainer

    IMediaWriter writer = new MediaWriter(file.toString());

    // add the audio stream

    ICodec codec = ICodec.findEncodingCodec(ICodec.ID.CODEC_ID_MP3);
    IContainer container = writer.getContainer();
    IStream stream = container.getStream(
        writer.addAudioStream(audioStreamIndex, audioStreamId,
            codec, channelCount, sampleRate));
    int sampleCount = stream.getStreamCoder().getDefaultAudioFrameSize();

    // create a place for audio samples
View Full Code Here

Examples of jadx.core.dex.nodes.IContainer

        if (!(region instanceof Region)) {
          return;
        }

        for (Iterator<IContainer> it = region.getSubBlocks().iterator(); it.hasNext(); ) {
          IContainer container = it.next();
          if (container instanceof BlockNode) {
            BlockNode block = (BlockNode) container;
            if (block.getInstructions().isEmpty()) {
              try {
                it.remove();
View Full Code Here

Examples of org.apache.axiom.om.impl.common.IContainer

            // We get here if rootNode is an element and the current event is START_DOCUMENT
            assert !visited;
            node = rootNode;
            return true;
        } else if (node instanceof OMContainer && !visited) {
            IContainer current = (IContainer)node;
            OMNode firstChild = cache ? current.getFirstOMChild() : current.getFirstOMChildIfAvailable();
            if (firstChild != null) {
                node = firstChild;
                visited = false;
                return true;
            } else if (node.isComplete()) {
                visited = true;
                return true;
            } else {
                return false;
            }
        } else if (node == rootNode) {
            // We get here if rootNode is an element and the next event is END_DOCUMENT
            node = null;
            visited = true;
            return true;
        } else {
            OMNodeEx current = (OMNodeEx)node;
            OMNode nextSibling = cache ? current.getNextOMSibling() : current.getNextOMSiblingIfAvailable();
            if (nextSibling != null) {
                node = nextSibling;
                visited = false;
                return true;
            } else {
                OMContainer parent = current.getParent();
                node = parent;
                if (parent.isComplete() || parent.getBuilder() == null) { // TODO: review this condition
                    visited = true;
                    return true;
                } else {
View Full Code Here

Examples of org.eclipse.core.resources.IContainer

  public Object[] getElements(Object inputElement) {
      final List<IFile> fileList = new ArrayList<IFile>();
    if (inputElement instanceof File) {
      File root = (File) inputElement;   
      IContainer rootContainer = ResourcesPlugin.getWorkspace().getRoot().getContainerForLocation(new Path(root.getAbsolutePath()));
     
      try {
                rootContainer.accept(new IResourceVisitor() {
                   
                    public boolean visit(IResource resource) throws CoreException {
                        if(resource instanceof IFolder){
                            return true;
                        }
View Full Code Here

Examples of org.eclipse.core.resources.IContainer

    if (selectedResource instanceof IFile) {
      selectedResource = (IContainer) selectedResource.getParent();
    }
   
    if (selectedResource instanceof IContainer) {
      IContainer selectedFolder = (IContainer) selectedResource;
      while (!(selectedFolder instanceof IProject) && selectedFolder != null) {

        if (WGADesignStructureHelper.isDesignFolder(selectedFolder)) {
          return new SingleStructuredSelection(selectedFolder.getFolder(new Path(getPathNameUnderDesign())));
        }       

        if (getFilter().select(selectedFolder)) {
          return new SingleStructuredSelection(selectedFolder);
        }
        selectedFolder = selectedFolder.getParent();
      }
      if (selectedFolder != null) {
        return new SingleStructuredSelection(selectedFolder);
      }
    }
View Full Code Here

Examples of org.eclipse.core.resources.IContainer

  }

  class NameSorter extends ViewerSorter {
    public int compare(Viewer viewer, Object e1, Object e2) {
      if (e1 instanceof IContainer && e2 instanceof IContainer) {
        IContainer ct1 = (IContainer) e1;
        IContainer ct2 = (IContainer) e2;
        return ct1.getName().toLowerCase().compareTo(ct2.getName().toLowerCase());
      }
      return 0;

    }
View Full Code Here

Examples of org.eclipse.core.resources.IContainer

    List<IResource> roots = new ArrayList<IResource>();
    roots.add(_runtime.getProject());
    IFolder[] designFolders = _runtime.getDesignsAsFolder(false);
    for (IFolder designFolder : designFolders) {
      if (WGADesignStructureHelper.isDirlinkFolder(designFolder)) {
        IContainer dirlinkTarget = WGADesignStructureHelper.resolveDirLink(designFolder.getFile(WGUtils.DIRLINK_FILE));
        roots.add(dirlinkTarget.getProject());
      }
    }
    return roots.toArray(new IResource[0]);
  }
View Full Code Here

Examples of org.eclipse.core.resources.IContainer

  private List<LocalFSDesignResourceState> buildFSDesignResourceStates(IResource resource, IPath base) throws CoreException {
    List<LocalFSDesignResourceState> states = new ArrayList<LocalFSDesignResourceState>();
 
    if (resource instanceof IFolder && WGADesignStructureHelper.isDirlinkFolder((IFolder)resource)) {
      // we have to resolve dirlink
      IContainer dirlinkTarget = WGADesignStructureHelper.resolveDirLink(((IFolder)resource).getFile(WGUtils.DIRLINK_FILE));
      if (dirlinkTarget != null && dirlinkTarget.isAccessible()) {
          states.addAll(buildDirLinkFSDesignResourceStates(dirlinkTarget, resource.getName(), dirlinkTarget));
      }
    } else {
      LocalFSDesignResourceState state = new LocalFSDesignResourceState();
      states.add(state);
      state.setFqPath(resource.getFullPath());
      state.setPath(computeRelativPathFrom(resource, base).makeRelative().toString());   
      if (resource instanceof IContainer) {
        state.setType(FSDesignResourceState.TYPE_FOLDER);
        IContainer container = (IContainer) resource;
        for (IResource child : container.members()) {
          List<LocalFSDesignResourceState> childStates = buildFSDesignResourceStates(child, base);
          states.addAll(childStates);
        }
      } else if (resource instanceof IFile) {
        IFile file = (IFile) resource;
View Full Code Here

Examples of org.eclipse.core.resources.IContainer

    state.setDirLinkTarget(linkTarget);
    state.setFqPath(resource.getFullPath());   
    state.setPath(new Path(linkName).append(computeRelativPathFrom(resource, linkTarget.getFullPath()).makeRelative()).toString());   
    if (resource instanceof IContainer) {
      state.setType(FSDesignResourceState.TYPE_FOLDER);
      IContainer container = (IContainer) resource;
      for (IResource child : container.members()) {
        List<LocalFSDesignResourceState> childStates = buildDirLinkFSDesignResourceStates(linkTarget, linkName, child);
        states.addAll(childStates);
      }
    } else if (resource instanceof IFile) {
      IFile file = (IFile) resource;
View Full Code Here

Examples of org.eclipse.core.resources.IContainer

        String designFolderName = pathElements[0];
        // check if this design is internal or external
        IFolder designFolder = _runtime.getDesignRoot().getFolder(new Path(designFolderName));
        if (WGADesignStructureHelper.isDirlinkFolder(designFolder)) {
          // this is an external design
          IContainer linkTarget = WGADesignStructureHelper.resolveDirLink(designFolder.getFile(WGUtils.DIRLINK_FILE));
          path = linkTarget.getFullPath().append(new Path(state.getPath()).removeFirstSegments(1));
        } else {
          path = _runtime.getDesignRoot().getFullPath().append(new Path(state.getPath()));   
        }
      } else {
        path = _runtime.getDesignRoot().getFullPath().append(new Path(state.getPath()));
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.