1 / 22

Structural Search: Two Examples

Structural Search: Two Examples. Ted M. Young http://about.me/tedmyoung Polyglot Coder in Labs Guidewire Software. The Problem. Want to Find Something. Use RegEx !. Does not understand class hierarchy. Find Usages?. Too many results: want to restrict by visibility. Simple example….

sidone
Download Presentation

Structural Search: Two Examples

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Structural Search: Two Examples Ted M. Young http://about.me/tedmyoung Polyglot Coder in Labs Guidewire Software

  2. The Problem

  3. Want to Find Something

  4. Use RegEx! Does not understand class hierarchy

  5. Find Usages? Too many results: want to restrict by visibility

  6. Simple example… Find only direct implementors

  7. Use Template

  8. Edit Variables…

  9. The Results Are In…

  10. Oh, So That's What It Means!

  11. Better Results

  12. More complex example…

  13. Find IQueryFilter Implementers • Only public, static, concrete classes • Not abstract, not private

  14. Find Usages: Too Many

  15. Structural Search Template • Look for: public, static implementations

  16. The "OuterClass" Variable • Nothing special here, we "don't care"

  17. The "Class" Variable Scripting Target

  18. Script Constraints • Want classes that don't have the "abstract" modifier • Warning: not well documented!

  19. The "Interface" Variable • Looking for IQueryFilter implementations

  20. Text Constraints • Want IQueryFiltersubinterfaces and subclasses as well (i.e., the type hierarchy)

  21. Just What I Needed

  22. That's All Folks! Ted M. Young http://about.me/tedmyoung

More Related