Example usage for org.eclipse.jdt.internal.core.util Messages hierarchy_nullProject

List of usage examples for org.eclipse.jdt.internal.core.util Messages hierarchy_nullProject

Introduction

In this page you can find the example usage for org.eclipse.jdt.internal.core.util Messages hierarchy_nullProject.

Prototype

String hierarchy_nullProject

To view the source code for org.eclipse.jdt.internal.core.util Messages hierarchy_nullProject.

Click Source Link

Usage

From source file:com.codenvy.ide.ext.java.server.internal.core.BinaryType.java

License:Open Source License

public ITypeHierarchy newTypeHierarchy(IJavaProject project, WorkingCopyOwner owner, IProgressMonitor monitor)
        throws JavaModelException {
    if (project == null) {
        throw new IllegalArgumentException(Messages.hierarchy_nullProject);
    }/*  ww w. j  a v  a  2s .  co  m*/
    //   ICompilationUnit[] workingCopies = JavaModelManager.getJavaModelManager().getWorkingCopies(owner, true/*add primary working copies*/);
    //   ICompilationUnit[] projectWCs = null;
    //   if (workingCopies != null) {
    //      int length = workingCopies.length;
    //      projectWCs = new ICompilationUnit[length];
    //      int index = 0;
    //      for (int i = 0; i < length; i++) {
    //         ICompilationUnit wc = workingCopies[i];
    //         if (project.equals(wc.getJavaProject())) {
    //            projectWCs[index++] = wc;
    //         }
    //      }
    //      if (index != length) {
    //         System.arraycopy(projectWCs, 0, projectWCs = new ICompilationUnit[index], 0, index);
    //      }
    //   }
    //   CreateTypeHierarchyOperation op= new CreateTypeHierarchyOperation(
    //      this,
    //      projectWCs,
    //      project,
    //      true);
    //   op.runOperation(monitor);
    //   return op.getResult();
    throw new UnsupportedOperationException();
}

From source file:com.codenvy.ide.ext.java.server.internal.core.SourceType.java

License:Open Source License

/**
 * @see org.eclipse.jdt.core.IType#newTypeHierarchy(org.eclipse.jdt.core.IJavaProject, org.eclipse.jdt.core.WorkingCopyOwner, org.eclipse.core.runtime.IProgressMonitor)
 *///from w  ww.  ja v  a2  s .c om
public ITypeHierarchy newTypeHierarchy(IJavaProject project, WorkingCopyOwner owner, IProgressMonitor monitor)
        throws JavaModelException {
    if (project == null) {
        throw new IllegalArgumentException(Messages.hierarchy_nullProject);
    }
    //   ICompilationUnit[] workingCopies = JavaModelManager.getJavaModelManager().getWorkingCopies(owner, true/*add primary working copies*/);
    //   ICompilationUnit[] projectWCs = null;
    //   if (workingCopies != null) {
    //      int length = workingCopies.length;
    //      projectWCs = new ICompilationUnit[length];
    //      int index = 0;
    //      for (int i = 0; i < length; i++) {
    //         ICompilationUnit wc = workingCopies[i];
    //         if (project.equals(wc.getJavaProject())) {
    //            projectWCs[index++] = wc;
    //         }
    //      }
    //      if (index != length) {
    //         System.arraycopy(projectWCs, 0, projectWCs = new ICompilationUnit[index], 0, index);
    //      }
    //   }
    //   CreateTypeHierarchyOperation op= new CreateTypeHierarchyOperation(
    //      this,
    //      projectWCs,
    //      project,
    //      true);
    //   op.runOperation(monitor);
    //   return op.getResult();
    throw new UnsupportedOperationException();
}