/*
  * (non-Javadoc)
  * @see
  * org.eclipse.pde.api.tools.internal.provisional.search.IApiProblemDetector
  * #createProblems()
  */
 @Override
 public List<IApiProblem> createProblems() {
   List<IReference> references = getRetainedReferences();
   List<IApiProblem> problems = new LinkedList<IApiProblem>();
   for (IReference reference : references) {
     if (isProblem(reference)) {
       try {
         IApiProblem problem = null;
         IApiComponent component = reference.getMember().getApiComponent();
         if (component instanceof ProjectComponent) {
           ProjectComponent ppac = (ProjectComponent) component;
           IJavaProject project = ppac.getJavaProject();
           problem = createProblem(reference, project);
         } else {
           problem = createProblem(reference);
         }
         if (problem != null) {
           problems.add(problem);
         }
       } catch (CoreException e) {
         ApiPlugin.log(e.getStatus());
       }
     }
   }
   return problems;
 }
Beispiel #2
0
 /* (non-Javadoc)
  * @see org.eclipse.pde.api.tools.internal.provisional.search.IApiProblemDetector#createProblems()
  */
 public List createProblems() {
   List references = getRetainedReferences();
   List problems = new LinkedList();
   Iterator iterator = references.iterator();
   while (iterator.hasNext()) {
     IReference reference = (IReference) iterator.next();
     if (reference.getResolvedReference() == null) {
       // TODO: unresolved reference
     } else {
       if (isProblem(reference)) {
         try {
           IApiProblem problem = null;
           IApiComponent component = reference.getMember().getApiComponent();
           if (component instanceof ProjectComponent) {
             ProjectComponent ppac = (ProjectComponent) component;
             IJavaProject project = ppac.getJavaProject();
             problem = createProblem(reference, project);
           } else {
             problem = createProblem(reference);
           }
           if (problem != null) {
             problems.add(problem);
           }
         } catch (CoreException e) {
           ApiPlugin.log(e.getStatus());
         }
       }
     }
   }
   return problems;
 }