예제 #1
0
 @Override
 public String getElementName(Object item) {
   if (item instanceof SVDBDeclCacheItem) {
     SVDBDeclCacheItem ci = (SVDBDeclCacheItem) item;
     return ci.getName();
   } else {
     return item.toString();
   }
 }
예제 #2
0
  public List<SVDBDeclCacheItem> findCacheItem(String type_name) {
    List<SVDBDeclCacheItem> ret = new ArrayList<SVDBDeclCacheItem>();

    List<SVDBDeclCacheItem> found =
        fIndexIt.findGlobalScopeDecl(new NullProgressMonitor(), type_name, fMatcher);

    for (SVDBDeclCacheItem ci : found) {
      if (ci.getType() == SVDBItemType.ClassDecl) {
        ret.add(ci);
      }
    }

    return ret;
  }
예제 #3
0
 public SVCompletionProposal(
     SVDBDeclCacheItem item, String prefix, int replacementOffset, int replacementLength) {
   fCacheItem = item;
   fPrefix = prefix;
   fReplacement = item.getName();
   fReplacementOffset = replacementOffset;
   fReplacementLength = replacementLength;
   fType = SVCompletionProposalType.SVObject;
 }
예제 #4
0
 public SVDBItemType getItemType() {
   if (fCacheItem != null) {
     return fCacheItem.getType();
   } else if (fItem != null) {
     return fItem.getType();
   } else {
     return null;
   }
 }
예제 #5
0
 public ISVDBItemBase getItem() {
   if (fItem != null) {
     return fItem;
   } else if (fCacheItem != null) {
     fItem = fCacheItem.getSVDBItem();
     return fItem;
   } else {
     return null;
   }
 }
예제 #6
0
 public String getName() {
   if (fCacheItem != null) {
     return fCacheItem.getName();
   } else {
     ISVDBItemBase item = getItem();
     if (item != null) {
       return SVDBItem.getName(item);
     } else {
       return fReplacement;
     }
   }
 }