Views - lazycodertools/codefilter GitHub Wiki

Introduction

Views define what code elements appear in search results.

View description should answer three questions:

  1. What code elements are selected?
  2. Is any condition applied to these elements?
  3. Are any nested elements excluded?

For example:

View: static class declarations.

Selected: class name, modifiers and inheritance.

Condition: static classes only.

Excluded: class attributes, documentation comments and members.

Types of views

Plain syntax views based on a single code element.

Such as comments or strings.

Aggregates of other views.

type declarations view aggregates classes, structs, interfaces, enums, delegates and records.

Refinements achieved by adding a condition.

static constructors view refines constructors.

Exclusions of nested elements.

public members view shows all code lines but excludes any non-public types and members.

How results are displayed

There are currently two ways view results are shown:

Most views show results grouped by files.

You can control whether file names are displayed or not, by typing '=+files' or '=-files'

or by using a context menu on the search description.

'File Name Options' setting controls whether just a file name or a path is displayed.

Some view's results are grouped by code elements when identical results are expected to be found in multiple files.

These views are: all views ending with names (such as class names), namespaces, usings, regions

List of all views

Type and type members views can be divided in three groups: Names, Declarations and Code.

  • Views ending with names show just a name of a type, no conditions applied.

  • Views ending with declarations show type declarations without documentation comments, attributes or members.

  • Views ending with code show all the code of the corresponding type or the type member.

Type views

type names - aggregate of type names

type declarations - aggregate of type declarations

types and namespaces - all code lines excluding type members, using statements, regions, preprocessor directives and disabled code.

Class

class names

class declarations

abstract class declarations

static class declarations

Struct

struct names

struct declarations

structs code

Interface

interface names

interface declarations

interface code

Enum

enum names

enum declarations

enums code

Delegate

delegate names

delegate declarations

delegates code

Record

(class and struct records are not separated)

record names

record declarations

records code

Type members views

static members - aggregate of static member declarations.

public members - all code lines with non-public types and members excluded.

public internal members - all code lines with non-public and non-internal types and members excluded.

public internal protected members - all code lines with private types and members excluded.

Constructors

constructor declarations

constructors code

static constructors - static constructor declarations.

Methods

abstract methods - abstract method declarations.

async methods - async method declarations.

method declarations

method names

methods code

static methods - static method declarations.

Operators

operator declarations

operators code

Fields

field declarations

field names

fields code

static fields - static field declarations.

Properties

properties code

property declarations

property names

static properties - static property declarations.

Indexers

indexer declarations

indexers code

Events

event declarations

event names

events code

static events - static event declarations.

Statements views

using statements

try catch

throws

returns

Expression views

assignments

cast expressions

lambdas

new

query expressions - linq queries

Strings

strings - all strings literals

interpolated strings - in case of nested interpolated strings the top-level string, includes verbatim interpolated strings

verbatim strings

Comments

comments - includes documentation comments also

documentation comments

Local variables

local variable names

local variables

IDE related

breakpoints - list of all defined breakpoints

syntax errors - list of syntax errors (due to background compilation, on large project can generate temporary false positive results)

Other views

attributes - all attribute usages.

code blocks - any blocks of code between curly braces.

preprocessor directives

disabled text - code disabled due to preprocessor directives

regions

usings - using declarations including aliases

text - all lines of code