예제 #1
0
 /**
  * This method should be called only if isRelevant returns true; Makes simple check if this java
  * file contains annotation Name.
  *
  * @param resource
  * @return
  */
 public boolean isLikelyComponentSource(IFile f) {
   if (!f.isSynchronized(IFile.DEPTH_ZERO) || !f.exists()) return false;
   XModel model = InnerModelHelper.createXModel(f.getProject());
   if (model == null) return false;
   XModelObject o = EclipseResourceUtil.getObjectByResource(model, f);
   return (o != null)
       && (LibraryScanner.isTLDFile(o)
           || LibraryScanner.isFaceletTaglibFile(o)
           || LibraryScanner.isFacesConfigFile(o));
 }
예제 #2
0
 /**
  * Returns list of components
  *
  * @param f
  * @return
  * @throws ScannerException
  */
 public LoadedDeclarations parse(IFile f, IKbProject sp) throws ScannerException {
   XModel model = InnerModelHelper.createXModel(f.getProject());
   if (model == null) return null;
   XModelObject o = EclipseResourceUtil.getObjectByResource(model, f);
   return parse(o, f.getFullPath(), sp);
 }