Esempio n. 1
0
 /** @since 2.5 */
 protected void convertNewTypes(
     ICompilationUnit compilationUnit, List<IResourceDescription.Delta> result) {
   try {
     for (IType type : compilationUnit.getTypes()) {
       if (isDerived(type)) return;
       String typeName = type.getFullyQualifiedName();
       URI topLevelURI = uriHelper.createResourceURIForFQN(typeName);
       convertNewTypeAndChildren(topLevelURI, type, result);
     }
   } catch (JavaModelException e) {
     if (LOGGER.isDebugEnabled()) LOGGER.debug(e, e);
   }
 }
Esempio n. 2
0
  /** @since 2.5 */
  protected void convertChangedCompilationUnit(
      IJavaElementDelta delta, List<IResourceDescription.Delta> result) {
    if ((delta.getFlags() & IJavaElementDelta.F_PRIMARY_WORKING_COPY) != 0) {
      return;
    }
    TypeNames typeNames = getTypeNamesFromIndex(delta);

    ICompilationUnit compilationUnit = (ICompilationUnit) delta.getElement();
    try {
      for (IType type : compilationUnit.getTypes()) {
        if (isDerived(type)) return;
        String typeName = type.getFullyQualifiedName();
        URI topLevelURI = uriHelper.createResourceURIForFQN(typeName);
        convertChangedTypeAndChildren(result, typeNames, type, topLevelURI);
      }
      convertRemovedTypes(typeNames, result);
    } catch (JavaModelException e) {
      if (LOGGER.isDebugEnabled()) {
        LOGGER.debug(e, e);
      }
    }
  }
Esempio n. 3
0
 protected URI getURIFor(IType type) {
   return uriHelper.createResourceURIForFQN(type.getFullyQualifiedName());
 }
Esempio n. 4
0
 /** @since 2.8 */
 protected void convertRemovedTypes(TypeNames typeNames, List<IResourceDescription.Delta> result) {
   for (String typeName : typeNames.getTypeNames()) {
     URI toplevelUri = uriHelper.createResourceURIForFQN(typeNames.getTopLevelTypeName(typeName));
     convertRemovedType(toplevelUri, typeName, typeNames.getProjectContext(), result);
   }
 }
Esempio n. 5
0
 /**
  * @since 2.5
  * @deprecated
  * @see #createTypeResourceDescription(URI, String)
  */
 @Deprecated
 protected TypeResourceDescription createTypeResourceDescription(String typeName) {
   URI uri = uriHelper.createResourceURIForFQN(typeName);
   return createTypeResourceDescription(uri, typeName);
 }