Package org.eclipse.jdt.core

Examples of org.eclipse.jdt.core.IClassFile


      IResource resource = this.configClass.getResource();
      if (resource != null && resource instanceof IFile) {
        file = (IFile) resource;
      }
      else {
        IClassFile classFile = configClass.getClassFile();
       
        PackageFragment pkg = (PackageFragment) configClass.getPackageFragment();
        IPackageFragmentRoot root = (IPackageFragmentRoot) pkg.getParent();

        if (root.isArchive()) {
          IPath zipPath = root.getPath();

          String classFileName = classFile.getElementName();
          String path = Util.concatWith(pkg.names, classFileName, '/');
          file = new ExternalFile(zipPath.toFile(), path, project.getProject());
        }
      }
    }
View Full Code Here


    return null;
  }

  @Override
  public char[] findSource(IType type, IBinaryType info) {
    IClassFile classFile = (IClassFile) type.getParent();
    addDecompiled(this, classFile);
    return super.findSource(type, info);
  }
View Full Code Here

    boolean attachDecompiled = true;

    if (mInput instanceof IClassFileEditorInput)
    {
      IClassFileEditorInput classFileEditorInput = (IClassFileEditorInput) mInput;
      IClassFile classFile = classFileEditorInput.getClassFile();
      PackageFragmentRoot root = SelectUtils.getRoot(classFile);

      if (root != null)
      {
        try
View Full Code Here

          IBuffer buffer = (IBuffer) openBuffers.nextElement();
          IOpenable owner = buffer.getOwner();

          if (owner instanceof IClassFile)
          {
            IClassFile bufClassFile = (IClassFile) owner;
            PackageFragmentRoot bufRoot = SelectUtils.getRoot(bufClassFile);

            if (root.equals(bufRoot))
            {
              // Remove any empty buffer
View Full Code Here

      if (part != null)
      {
        if (part instanceof IEditorPart)
        {
          IEditorPart editor = (IEditorPart) part;
          IClassFile classFile = (IClassFile)editor.getEditorInput().getAdapter(IClassFile.class);
          if (classFile != null)
          {
            PackageFragmentRoot root = SelectUtils.getRoot(classFile);

            if (root != null)
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.core.IClassFile

Copyright © 2018 www.massapicom. 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.