@Override public void visitReference(IReferenceDescriptor reference) { ReferenceDescriptor refDesc = new ReferenceDescriptor(fReferencingComponent, reference.getMember(), reference.getLineNumber(), fCurrentComponent, fCurrentReferencedMember, reference.getReferenceKind(), reference.getReferenceFlags(), reference.getVisibility(), null); fReferences.add(fCurrentReferencedMemberRootType, refDesc); }
protected List<?> parse(IProgressMonitor monitor) throws Exception { UseScanParser lparser = new UseScanParser(); Visitor convertor = new Visitor(); lparser.parse(getXmlLocation(), monitor, convertor); return convertor.reports; }
/** * Parse the XML directories and report.xml and generate HTML for them */ protected List<?> parse() throws Exception { MissingRefParser lparser = new MissingRefParser(); MissingRefVisitor visitor = new MissingRefVisitor(); lparser.parse(getXmlLocation(), visitor); return visitor.reports; }
/** * Returns a handle to the singleton instance * * @return the singleton {@link UseScanManager} */ public synchronized static UseScanManager getInstance() { if (fUseScanProcessor == null) { fUseScanProcessor = new UseScanManager(); fApiComponentCache = new UseScanCache(DEFAULT_CACHE_SIZE); } return fUseScanProcessor; }
/** * Constructs a visitor with the given patterns. * * @param internal regular expressions to match as internal packages or * <code>null</code> * @param api regular expressions to match as API or <code>null</code> */ public ApiDescriptionModifier(String[] internal, String[] api) { setInternalPatterns(internal); setApiPatterns(api); }
public void enterTargetMember(IMemberDescriptor member) { if (targetMember == null || !targetMember.equals(member)) { endMember(); targetMember = member; if (visitReferencingComponent && visitMembers) { visitReferences = visitor.visitMember(targetMember); } } }
@Override IMetadata getMetadata() throws Exception { File xmlFile = new File(getReportsRoot(), "meta" + XML_EXTENSION); //$NON-NLS-1$ if (!xmlFile.exists()) { // try looking in the default 'xml' directory as a raw report root // might have been specified xmlFile = new File(getReportsRoot() + File.separator + "xml", "meta" + XML_EXTENSION); //$NON-NLS-1$//$NON-NLS-2$ } return MissingRefMetadata.getMetadata(xmlFile); }
/** * Constructor * * @param consumerDescriptor the bundle that we are collecting * information on */ public ConsumerReportVisitor(IComponentDescriptor consumerDescriptor) { this.consumerDescriptor = consumerDescriptor; consumer = new Consumer(); consumer.name = composeName(consumerDescriptor.getId(), consumerDescriptor.getVersion()); }
@Override public boolean visitComponent(IComponentDescriptor target) { currentProducer = new Producer(); currentProducer.name = composeName(target.getId(), target.getVersion()); return true; }
@Override protected boolean close(LRUCacheEntry<IApiComponent, IReferenceCollection> entry) { IReferenceCollection references = entry.value; references.clear(); return true; }
/** * This method is called during the HTML header creation phase to allow META * header elements to be written for metadata objects * * @param buffer * @throws Exception */ void writeMetadataHeaders(StringBuilder buffer) throws Exception { writeMetaTag(buffer, "description", SearchMessages.UseReportConverter_root_index_description); //$NON-NLS-1$ // TODO could write metadata information here }
public void setReference(IReferenceDescriptor reference) { if (visitReferencingComponent && visitMembers && visitReferences) { visitor.visitReference(reference); } }
private void endReferencingComponent() { if (referencingComponent != null) { if (visitReferencingComponent) { visitor.endVisitReferencingComponent(referencingComponent); } referencingComponent = null; } }
private void endComponent() { if (targetComponent != null) { visitor.endVisitComponent(targetComponent); targetComponent = null; } }
private void endMember() { if (targetMember != null) { if (visitReferencingComponent && visitMembers) { visitor.endVisitMember(targetMember); } targetMember = null; } }
/** * Sets the cache size * * @param size The total number of references that can be held in memory */ public void setCacheSize(int size) { fApiComponentCache.setSpaceLimit(size); }
@Override public IReferenceCollection getExternalDependencies() { if (fReferences == null) { fReferences = new UseScanReferences(); } return fReferences; } }
@Override public boolean visitReferencingComponent(IComponentDescriptor component) { this.currentreferee = new Type(component); return true; }
@Override protected UseScanCache newInstance(int size, int newOverflow) { return new UseScanCache(size, newOverflow); }