JetBrains.ReSharper.Psi
The accessibility domain of some type member
Unrestricted access to member
Access is restricted to assembly, in which member is defined
Access is restricted to and it derivates
Access is restricted to , all it derivates, and the assembly where member is defined
Access is restricted to and it derivates in assembly where member is declared
Access is restricted to only
Error occured while computing accessibility domain
Get the cache folder for global entities.
The value is null if do not use global cache - everything should be stored in solution
Repsents scope of declarations cache.
Scope can be one of :
- whole solution including libraries - covers types and namespaces in solution
- whole solution exclusing libraries - covers types and namespaces in source code of solution
- project - covers types and namespaces in source code of given project
- project and its referenced libraries and projects- covers types and namespaces in given project and its references including transitive ones
- library and its referenced libraries - covers types and namespaces in given library and libraries referenced by it
Methods of this class are static constructors allowing creation of different scopes listed above.
See for example of use.
DeclarationsCache
Creates whole solution or solution without libraries scope.
solution should not be null
Creates project scope or project and its referenced libraries and projects scope.
project should not be null
Creates library and its referenced libraries scope.
library should not be null null
Creates library and its referenced libraries scope.
library should not be null null
Declarations cache provides access to cached information about types and namespaces.
Depending on its scope declarations cache may provide information about types and namespaces
- in whole solution including libraries
- in whole solution exclusing libraries
- in project
- in project and its referenced libraries and projects
- in library and its referenced libraries
Following code demonstates use of IDeclarationsCache indexer
to get information about given class.
bool ClassIsSealed(string qualifiedName, ISolution solution)
{
DeclarationsCacheScope scope = DeclarationsCacheScope.SolutionScope(solution, false);
IDeclarationsCache cache = PsiManager.GetInstance(solution).GetDeclarationsCache(scope);
IDeclaredElementInfo info = cache[qualifiedName];
Logger.Assert(info.GetSymbolType() == DeclaredElementType.CLASS);
return info.IsSealed();
}
DeclarationsCacheScope
IDeclaredElementInfo
Takes cached information about namespace or type with given qualified name
and returns array with cached information about its nested namespaces and types
(or just types if qualified name is a typename).
Full qualified name of namespace or type
Returns information about default namespace if empty string is passed.
null should not be passed (throws NullReferenceException).
Returnes array of short names of all namespaces and types.
Short name of a type is its declared name. Short name of a namespace is
last part of its name without dot, e.g. in the following code
namespace A.B
{
}
short name of namespace A.B is B.
Lexicographically sorted array of all short names of namespaces and types.
Returns array of cached information about namespaces and types having given short name.
(GetAllShortNames for explanation of meaning of 'short name' term).
Empty arrray is returned if no elements with given name are found.
Empty array is returned if null is passed.
Returns array of cached information about types that might directly inherit type
with given short name. Type A is supposed that it might directly inherit type B if
it contains reference that might resolve to B in its extends list.
Reference might resolve to type B if its name is short name of type B.
GetPossibleInheritors takes aliases into consideration.
using X = B;
class A : B {}
Cached information for type A will be returned in calls to GetPossibleInheritors for type B.
(And for type X if any exists in this declarations cache scope).
(GetAllShortNames for explanation of meaning of 'short name' term).
short name of type
short type name should not be null
Returns cached information about namespace or type with given qualified name.
Returns null if no information for given name was found.
Full qualified name of namespace or type
Returns special value if empty string is passed.
null should not be passed (throws NullReferenceException).
Allows retrieving project items corresponding to source files
containing identifiers with given names.
This index can be used to narrow search operations on JetBrains.ReSharper.Psi.CSharp.
Example demostrates narrowing of search domain:
ISearchDomain NarrowSearchDomain (ISearchDomain searchDomain, IDeclaredElement elementToSearch)
{
WordIndex wordIndex = WordIndex.GetInstance (elementToSearch.GetManager().Solution );
IProjectItem [] itemsContainingNames = wordIndex.GetFilesContainingWords (elementToSearch.ShortName);
ISearchDomain newDomain = SearchDomainFactory.CreateSearchDomain (itemsContainingNames);
return SearchDomainFactory.CreateIntersectionDomain (searchDomain,newDomain);
}
Returns instance of word index for given solution.
Returns array of project items corresponding to all source code files
containing identifiers which text is equal to given word
Returns empty array if empty array is passed or no such files found.
Does not expect null to be passed (throws exception)
Returns array of project items corresponding to all source code files
containing identifiers which text is equal to any of given words
Returns empty array if empty array is passed or no such files found.
Does not expect null to be passed (throws exception)
Splits the text to the words using given provider
Get the format parameter of the string format method. Returns null if method is not string format method
Format the whole file
new caret position
Format the given subtree
Format the given range in the tree. The bounding nodes are random, not siblings
Format the given range in document
Format code during WritePSI action
Format code during WritePSI action
Format code during WritePSI action
Format code during WritePSI action
Optimize imports and shorten references in file
Range in document to process. Pass to process whole file
Create the necessary separator between two given tokens (for example. space between identifiers)
If there is no necessity for separator, then return null
The component-like holder for all code style settings
Get the copyright header of the file. Empty string means no copyright info
Get if the copyright notice should be embraced in region. Empty region name means no embracement
Specific code style settings (for specific language, for example) should be marked
by this attribute to be included in the code style settings container
Component which is responsible to managing global code style settings
Current code style settings container
Code style settings are pre user
Code style settings are shared in solution
Code style settings are serialized to external file
Per-solution code style settings management
Represents for presentations.
Provides ability to keep presentation when element becomes invalid
Gets value indicating if underlying declared element is valid
Gets presentation text for declared element, as was last generated via
Gets value indicating if underlying declared element is valid
Get the set of project files which contains the declaration of this element
Checks if there are declarations of this element in given
Get the language on which this element is declared
Calculate compile time constant value
Represents an expectation constraint
Checks if a type matches the constraint
Gets some default appropriate type
Gets some default appropriate types
Gets array of expected types if can be performed effeciently
null if ineffective
array of types if fast
Returns element type if collectionType is a _collection_type_ (described in specification, 15.8.4)
otherwise, returns null
Constraint implementation which accepts all types assignable to a given type
Constraint implementation which accepts all types assignable to a given type
Constraint implementation which accepts all types assignable to a given type
Represents an expectation based on expression context
Accepts types which inherit from the specified type
Joins multiple constraints (a type matches joined constraint
if it matches at least one of nested constraints)
Constraint which accepts only reference types
Constraint which accepts only super types of a given type
Immediate supertypes of the type
returns all members of this type (including nested types!)
returns all members of this type (including nested types!) with given name
Namespace containing this type
Get the CLR name of type element.
returns all nested (= inner) types of this type
returns all constructors of this type
returns all operators of this type
returns all methods of this type
returns all properties of this type
returns all events of this type
returns the enumerator through type parameters of this type and all container types
Type parameters are enumerated in right-to-left, nested class first order
In the following example
class A<X,Y>
{
class B<Z,W> {}
}
AllTypeParameters for class B will be enumerated in order W,Z,Y,X
Interface for a language construction that may have modifiers
Interface for a language construction that may have access rights modifiers
Find the members in supertypes which are hidden by this member
Returns the accessibility domain of the type member, taking into account
the accessibility of the containing types
Get the hide policy
Represents a function-like construct that can be invoked.
Signature of the invocable.
Set of formal parameters of the invocable
Return type of the invocable
Indicates if the interface can be instantiated using object creation expression
Returns true if struct not all fields are returned in property.
This could happen since private fields are not loaded through metadata
Base class for language-dependent cached type decls
a node of cache tree
Sets parent. Always use the method to set parent
Implementations should override this method to bind their declarations to their declared elements
Corresponding to PSI, that is changed
Override this method to read custom data
Reference to explicit interface implementation
Resolve
interface which contains implemented member
Name of implemented member
Implementors of this interface should have constructor with no parameters
An invocation target candidate for invocation context
keys are normalized qnames
A presenter that returns strings containing declared element entity kind.
A presenter that returns strings containing declared element entity kind with "in" preposition.
A presenter that returns strings containing declared element entity kind with "from" preposition.
A presenter that returns strings containing declared element entity kind and declared element name.
A presenter that returns strings containing declared element name.
A presenter that returns strings containing declared element entity kind and declared element qualified name.
Designed for and .
A presenter that returns strings containing declared element qualified name.
Designed for and .
Tries to cut a long string with by replacing some of the closing parameters with "...".
"Long" string containing a presentation of a .
If cutting succeds the altered str contains a "shortened" presentation of the .
Marking of a .
If cutting succeds the altered str contains a "shortened" presentation of the .
true if succeds to shorten a string.
This class describes positions of different components of the string presenting .
This class is used as out parameter in calls to methods.
See methods for examples of use.
The declared element entity kind range in a string presenting .
The declared element access rights range in a string presenting .
The declared element modifier words range in a string presenting .
The declared element type (for variables) or return type (for functions) range in a string presenting .
The declared element scalar type range in a string presenting .
E.g. in the string "int [] x" the scalar type range of "x" is the range of "int".
Range of the explicit interface qualification of the member.
The declared element name range in a string presenting .
The declared element parameter list range in a string presenting .
The declared element type parameter list range in a string presenting .
An array of the declared element type parameter ranges in a string presenting .
An array of the declared element parameter ranges in a string presenting .
The declared element container (type or namespace) range in a string presenting .
//TODO: what it returns for parameter?
The range of the name of the container.
The range of the value of a constant or a local constant in a string presenting .
This class describes position of parameter-related components of the string presenting .
An instance of this class is stored in the marking per each parameter of the formatted .
The paramter range in a string presenting .
The paramter kind range in a string presenting .
The paramter type range in a string presenting .
The range of scalar type of the parameter type in a string presenting .
E.g. in the string "void Foo(int [] x)" the scalar type range of parameter "x" is the range of "int".
The paramter name range in a string presenting .
Type of the declared element. Each type should be singleton
Presentable name of the declared element
Image of the declared element
Default declared element presenter
Presents type member, that could be overridden. Currently overridable members are method,
property, indexer and event.
- SuperMember for class (struct) overridable member "foo" is class member that is overridden
by "foo" or interface member that is implemented by "foo".
Interface member cannot have supermembers.
- If "A" is a class, "I" is an interface, both "A" and "I" contains member "foo", class "B" extends
"A" and implements "I", but "A" does not contain member "foo",
then "I.foo" is QuasiSuperMember fo "A.foo"
- Let "A.foo" is supermember for "B.foo". If there is no "C.foo" such that "C.foo" is
supermember for "B.foo" and "A.foo" is supermember foe "C.foo", then "A.foo" is immediate
supermember for "B.foo".
All interface members are immediate supermembers.
All quasisupermembers are immediate (quasi)supermembers.
- If "A.foo" is supermember for "B.foo" and "A.foo" has no supermembers, then "A.foo" is root
supermember for "B.foo".
All interface members are root supermembers.
All quasisupermembers are root (quasi)supermembers.
Returns true if this member is private implementation. See
Returns the list of the members which are implemented explicitly
Returns true if this member can implement interface member implicitly
Language-dependent property of IOverridableMember. Reflection implementations should return true.
Implements a valuation of type parameters
Substitution composition: s.Compose([t->T]) = [t->s(T)]
Get the predicate to check if the given node should be checked for text occurence
Base interface for language-specific custom handlers in write PSI and generated documents
Part of the PSI write interface.
Provides the functionality to re-bind references when the subtree is inserted into physical tree
Encode the references from the tree into the tree
Decode the references when the clone is inserted into the real tree, and returns the clone position in the tree
Occurs when clone subtree is inserted into target, but reference identity is not yet started
Occurs during encoding when reference identity is set
Occurs during decoding after reference was binded
Called once after encoding and gices the match table between local declarations
Map from declared elements in subtree into declaration in subtree
Try to extract reference from given element which could be bind
Element to extract reference from
Array of references to the element itself (i.e. C in A.B.C), or empty array if no bindable reference found
Map from declared elements in subtree into declaration in subtree
Data in this level of cache
- No value for key means "look upstream if there is upstream, otherwise recalculate"
- Other value is calculated value
Returns cached value for key, or FORGET if recalculation is required
Determines whether static members are accessible in this context.
Staticness should be consistent with qualifier kind of access context.
All qualifier
Returns the "owner" (tail) of the reference.
Returns reference name.
This name usually coincides with short name of corresponding DeclaredElement.
(Only known exception is constructor initializer, its name is "this" or "base".)
Returns all reference names (i.e., all possible short names of corresponding DeclaredElement)
Returns full symbol table for the reference
todo[dsl]: must write
Returns text range of reference in the source file.
Bind this reference to given Declared Element. May insert using directive.
new "this"
Bind this reference to given Declared Element and substitution. May insert using directive.
new "this"
Returns access context containing reference. It is useful to define, if context
is static or to determine access rights of context.
Returns true iff reference could be resolved in declared elements with different names.
E.g., attribute [XXX] could be resolved into class with name 'XXX' or 'XXXAttribute'
Prefer symbols defined in given assembly if their FQN is the same
Names of the reference, for which the symbol table is built.
Array is empty if the table should not be filtered.
False means failed to resolve
Tag name in which this reference occurs
Whether to include the starting element.
Returns true if the subtree rooted at this element contains other element
Checks if this element is located at physical file (and not in dummy holder).
Creates the copy of this element and puts it into dummy holder.
Use for strongly-typed variant
context for resolving, or null for none
Creates the copy of this element and puts it into dummy holder.
All references in the copy are fake-resolved.
Use for strongly-typed variant
Checks if this element is valid
Get the coordinates of this subtree in real document
Returns an offset in the text to move caret to when positioning to the element
An offset in the text
Finds the smallest element containing the specified text range
Text range in this element
Finds all elements containing the specified offset and such that none of the elements
contains another element meeting this condition
Offset to find element at
Array of found elements, or an empty array
If an element returned by this method is not a leaf, it should be empty
Returns the token containing the character corresponding to the specified offset
Finds all references whose ranges in text contain the specified text range
Implementations must always return parameter.
Returns text representation of an element
For performance reason, it's better to use another GetText method
Stores given value by specified key. This value will be copied to clones
Use PutPersistentData(key, null) to remove the association.
Retrieves value associated with given key.
Returns null when no value is associated.
Type of expression. This function never returns null, if type cannot be determined
it returns UnknownType.Instance.
Override this method if your reference has muiltiple names
Override this method if your reference has muiltiple names
Returns some presentation string for this type in which all names are shown in fully qualified form.
For example, for "System.Drawing.Point[]" it will be "System.Drawing.Point[]"
and for "System.Int32" it will be "int".
Note: long presentable name should not be used for any purposes except presentation.
For example, it should not be parsed to restore any information about original type.
Get the PSI manager
Check if the type is resolved successfully (and it's substitution is resolved correctly)
Check if this type is unknown, i.e. it can't have correct presentation
Check if this type is valid, i.e. referes to valid declared elements
Runs the task. The should be used only if the task requires additional progress display (like smooth execution progress or more text messages). Normally, for short-time tasks, the executing engine will handle the progress.
The individual description of the job. Not included into the status bar cache notifier.
Common ID for the group of jobs.
It's the group progress that is displayed in the cache notifier, not jobs'.
The group ID is displayed as the cache notifier main text (the only text of the status-bar cache notifier).
If a cache job wants to display more detailed progress while it's running, it can request a -based object from the .
It must be -ed before the job ends.
The owning notifier to which our display goes.
Thread affinity.
Disables the progress when each job ends.
The job identity, so that to include its name in error messages.
Enables the progress while a job is running, mapping it to the range occupied by the job.
Subprogress range.
Subprogress range.
The job identity, so that to include its name in error messages.
A cache thread work item, implemented by a delegate.
Ctor.
Job implementation.
Name for the job, to be displayed in the cache notifier.
Sets the ownership over the notifier, so that it could not be modified without a cookie.
Syncroniously wait until caches are ready, with a popup progress window.
Must be called under a read lock.
Identifies the caller of the utility, so that he could understand the reason of the delay.
Title of the Cancel button, or Null if the Cancel button should be disabled.
True if the caches are ready, False if user-cancelled.
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
2
The additional (verbose comment) text for the notifier.
This property can be set from any thread.
The main (title) text for the notifier.
This property can be set from any thread.
Whether the cache notifier is current active.
This means it should be visible on the screen, in either form, if additional conditions are met (eg VS window is active).
This property can be set from any thread.
The progress value for the cache notifier, must be in the [0…1] range.
This property can be set from any thread.
Returns the token containing the character corresponding to the specified offset
Finds all references whose ranges in document contain the specified range
Incrementally reparse file
range in the old file text which is changed
text which should replace given range
the new file (may be the same)
Translate the specified range in syncronized text into actual document range
Get all ranges in actual document which intersects with given range in syncronized text
Translate coordinates in actual document into range in syncronized text
The same as but with different return type.
Just for convenience.
Returns project item containing this source element
Obtains the caching lexer on file text
The document, that is parsed to the tree
This is either the generated code-behind document, or the real document
NOTE: Under PSI transaction this is still the original document, though it's contents doesn't correspobd to PSI tree
Starting from 0, each time the subtree is modified this counter increases
Context could slightly differ depending on which exit it is transited
Context after inspection of given element
Modification stamp for inspection
Represents a type.
Instances of IType can be compared by and are equal
if they represent the same type.
Returns some presentation string for this type.
For example, for "System.Drawing.Point[]" it will be "Point[]"
and for "System.Int32" it will be "int".
Note: presentable name should not be used for any purposes except presentation.
For example, it should not be parsed to restore any information about original type.
Returns type of the scalar value of this type.
For examples for "int", "int[]", "int[][]" and "int*" it returns "int".
Checks whether values of all type parameters satisfies their constrains
According to C# specs 25.5.2
- type parameter defines an open type
- An array type is an open type if and only if its element type is an open type
- A constructed type is an open type if and only if one or more of its type arguments is an open type. A
constructed nested type is an open type if and only if one or more of its type arguments or the type
arguments of its containing type(s) is an open type
Get the type kind. Returns null is can't classify this type
Get the module where this type was built
Contains to provide string presentation of.
Returns the markup of the string with a presentation.
Returns a string containing declared element text presentation made according to this presenter settings.
This method is usefull when additional processing is required for the returned string,
e.g. as is done in the following method:
RichText Foo(IMethod method)
{
DeclaredElementPresenterMarking marking;
RichTextParameters rtp = new RichTextParameters(ourFont);
// make rich text with declared element presentation
RichText result = new RichText(ourInvocableFormatter.Format(method, out marking),rtp);
// highlight name of declared element in rich text
result.SetColors(SystemColors.HighlightText,SystemColors.Info,marking.NameRange.StartOffset,marking.NameRange.EndOffset);
return result;
}
Returns language specific presentation for a given parameter kind
Returns language specific presentation for a given access rights value
True if further search is not needed
True if further search is not needed
True if further search is not needed
Check if given type elements equal.
This will check possible runtime binding, i.e. 2 type elements from assemblies equals if their FQN equals, and assembly names are the same
'null' for language neutral element kinds
'null' for cross language elements
'null' for language neutral element kinds
ElementOfPointer -> Pointer
GetPointer -> Pointer
ElementList -> Element
Returns false in the following cases:
- cache directory does not exist
- cache format version did not match
- one or more record's CRC did not match
- total cache CRC did not match
- IO problem occured
In all these cases it automatically resets the cache on the disk to an empty one.
Select the single type in the collection, which is implictly convertible to all others
Select the single type in the collection, to which all others are implicitly convertible
Sorts declarations array. If you want to perform write operation, write to the first item of the sorted array.
Array with declarations to sort.
Declaration to which you would particulary like to write to. Pass null if you do not care.
Returns true if marked with __ReSharperIgnoredField attribute
The field should not be added to the class' symbol table if it is already added from base class
Should be used in copperation with recursive element processor to check generated code regions
Do not optimize this reference
Reference is signature reference
Reference is in code block
Check if the given reference is located in code block, or in delcaration level
Do optimize imports and shorten references.
Parameter specifies range in file which is
affected by the process, or set it to
to process whole file
Collect and sort references which are affected bu optimze imports engine
Returns true, if qualifier should not be visited
For creating operators with common type for parameters and return type
Suggests names for variable of a given type
Suggests names for variable of a given type
Returns symbol table for code completion
Checks whether the reference can provide a meaningful symbol table for completion
Solves an equation of the form from <: to
Free occurences of type parameters are in 'from'
Unifies cross-language reference names and reference expressions
See corrected algorithm:
https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=281842
Select the single type in the collection, which is implictly convertible to all others
Checks if the given type is Nullable
Get the underlying type of the nullable type.
is deeper than
Fixup graf into canonical representation.
Prepare reachable sequence for inspection and analyze reacability of elements
Should be called from any inheritor constructor
Implementation for
Abstract interface for building model icon managers
Get the empty image of the typical size
Gets image for declared element
Gets image by declared element type
Gets image by declared element type
Extends the specified node image (16x16) to typical size
Gets typical size of images produced by the manager
A smart element which resurrects from model changes by tracking its location
Tries to load cached PSI for given assembly. Returns null if cached PSI does not exist or out of date
Save loaded PSI in caches
Save XML documentation index in caches
Search for ":this()", ":base()" references....
Creates lexer, that corresponds to source file text (NOT generated!)
The interface is used, when extension does not identify ProjectFileType unambiguously
File extensions, that identify ProjectFileType
IsDefault means that, the extensions identify the whole group of similar files (i.e. xml)
Keeps name settings for an entity
Interface for components performing language-specific canonisation of symbol names.
Canonises language-specific short name by returning the CLR-compilant equivalent
Language-specific name (possibly escaped)
Converts language-specific qualified name into CLR-compliant equivalent
Splits string by words and returns array of strings
Suggests names for variable of a given type
Part
Represents a word
Stores the word text
Stores thr word case style
Returns a copy of the word with the specified case
Gets the word text
Gets the word case
Gets the text formatter with the word case
Enumerates possible case styles of words
The word is UPPERCASE
The word is lowercase
The word is Camelcase
Don't change word casing
Enumerates possible node types
IAccessContext implementation based on element
Returned when is set and the related element is found
Returns first tree node satisfying the predicate and located after the current node
Returns first source element satisying the predicate and located before the current element
Returns next child which is meaningful in the language (not a comment and not a whitespace)
Represents type constructor
Note: ShortName of all implementations should return
DeclaredElementConstants.CONSTRUCTOR_NAME
This interface is implemented by implementations when there is defaut namespace
Get the XML node for this doc comment, using given DeclaredElement as the header
Get errors from XML parsing
In C#2.0 for field, check if this field is fixed-size buffer.
Returns null if this is not fixed-size buffer, otherwise returns it's size
If the field is fixed-size buffer, then it's type is a pointer to it's element
Finds all immediate supermembers for this member.
if true, returns quasisupermembers too.
Finds all root supermembers for this member.
if true, returns quasisupermembers too.
Returns qualified name of the namespace this declaration declares
Returns true if the type is (not necessary immediate) descendant of another type
Try to incrementally reparse the chameleon block
lexer of the new text
range in text which is modified
Length of the inserted portion of the text
new chameleon if successfull. null if can't syncronize
Indicates how declared element entity kind is presented:
Enum member nameDescription or example
- NONEDo not show entity kind (default value)
- NORMALnamespace
- NORMAL_IN_BRACKETS(in namespace)
- INin namespace
- FROMfrom namespace
Indicates how the entity name shold be presented
Enum member nameDescription or example
- NONEDo not show name (default value)
- SHORTShow name in short form
- SHORT_RAWShow name in short non-verbatim form
- QUALIFIEDShow name in fully qualified form
- QUALIFIED_EXCEPT_MEMBERSShow name in fully qualified form if the element is not type member
- FULL_NESTED_TYPEFull nested type name without namespace
- FULL_NESTED_TYPE_EXCEPT_MEMBERSFull nested type name without namespace if the element is not type member
Indicates how return type of a function or type of a variable are presented
Enum member nameDescription or example
- NONEDo not show type (default value)
- BEFORELanguage default (for example: Type foo)
- AFTERfoo:Type
Indicates where the container type of a type member should be shown.
Enum member nameDescription or example
- NONEDo not show type (default value)
- AFTERfoo() in ClassName
- AFTER_WITH_KINDfoo() in class ClassName
- AFTER_IN_PARENTHESISfoo() (in ClassName)
- AFTER_IN_PARENTHESIS_WITH_KINDfoo() (in class ClassName)
Indicates if the containing type or namespace of a should be shown and where it should be shown.
Enum member nameDescription or example
- NONEDo not show type (default value)
- AFTERClassName in Namespace
- AFTER_WITH_KINDClassName in namespace Namespace
- AFTER_IN_PARENTHESIS_WITH_KINDClassName (in namespace Namespace)
Indicates if the containing method should be shown and where it should be shown if the given element is a parameter.
Enum member nameDescription or example
- NONEDo not show method (default value)
- AFTERparameter a of method foo
- AFTER_IN_PARENTHESISparameter a (of method foo)
Indicates if the containing type of a should be shown and where it should be shown.
Enum member nameDescription or example
- NONEDo not show type (default value)
- AFTERNamespace in Namespace
- AFTER_IN_PARENTHESISNamespace (in Namespace)
The style of the type parameters presenting.
Enum member nameDescription or example
- NONEDo not show type parameters
- CLRCLR-style, i.e. the number of type parameters after `
- FULLShow type parameters with their names(default value)
Delagate for custom length checker. Length check is used to replace long parameter lists with "...".
is capable of calculating length itself (.
However, if there are other length considerations (e.g. UI limitations) this class may be used.
This class is a convertor from IDeclaredElement into presentable string with various options.
Generally this class is used to prepare strings for displaying information to user as is done
in the following code fragment:
class SomeClass
{
private static ourFormatter;
static SomeClass()
{
ourFormatter = new DeclaratedElementPresenter();
// set desired options
ourFormatter.ShowParameterTypes = true;
ourFormatter.ShowParameterNames = true;
ourFormatter.ShowBrackets = false;
}
public string[] Display(IDeclaredElement element)
{
System.Windows.Forms.MessageBox.Show("Readable presentation of IDeclaredElement : " + ourFormatter.Format(element));
}
public string[] Display(IDeclaredElementInfo info)
{
System.Windows.Forms.MessageBox.Show("Readable presentation of IDeclaredElementInfo : " + ourFormatter.Format(info));
}
}
Indicates if we should show acees rights of a (if any)
Indicates if we should show the modifiers other rhan access rights .
Indicates if we should show parameters for a .
Indicates if the result string should contain element entity kind
Indicates if the result string should contain element name
Indicates if type parameters should be shown
Indicates if the explicit interface qualification should be shown before type member name
This option is incompatible with ShowName == NameStyle.QUALIFIED
Indicates if the result string should contain element name (including signature, return type, etc.) enclosed in quotes
Indicates where and how
- type of a variable
- return type of a function
should be inserted into result
Indicates if the parameter list of a function should contain parameter types
Indicates if the parameter list of a function should contain parameter names
Indicates if
- return type of a function
- parameter types of a function
- type of a variable
should be fully qualified.
Does not affect .
To specify qualified names for
use property.
Indicates where the container type of a type member should be shown.
Affects only .
Indicates how the container type of a type member should be shown.
Affects only .
Workd only if
Indicates if the containing type or namespace of a should be shown and where it should be shown.
Affects only .
Indicates if the containing namespace of a should be shown and where it should be shown.
Affects only .
Indicates if the containing method of a should be shown and where it should be shown.
Affects only .
Sets the output string length limit.
Returns interface for computing output string length
Indicates if the value of a constant is to be shown.
Affects only constant.
Root of cached declarations tree for a file
Returns sorted array
Base class for language-dependent cached namespace decls
Implemenatation of
Find the type chain from type to subtype
Returns null if no path is found
Indicates that the marked class provides service for generated code-behind document
The marked class should be
- Interface of the solution-level component
- Implement the
Checks, whether the file is handled by this service.
Generates document for a file. File should be of correct type.
Project file
Language of the generated file
Created document. Not null.
Checks, whether the file was modifies
True, if the provider handles the document and it was modified since last commit.
Called from transaction manager when temporary copy generated document is chaged
project file for which the document is generated
replaced range in generated document
new text inserted into generated document
Transaction action that represents modification in real document
Custom naviagtion range, for instance for page declarations in ASP
Detects changes and applies changes in main thread
null means nothing should be done for this service
Performs background work (generate document text)
Return value of StartCommitDocuments
null means nothing should be done for this service
Performs document changes on main thread
Return value of WorkCommitDocuments
Returns true if no dirty items
Custom handler for write interface for C#
Get all names from the symbol table, starting from the given prefix .
The names are treated case-sensitive only if both and are true
adds declared symbol into symbol table
symbol to add into table
visibility scope for added symbol
"depth level" of declared symbol
for imported symbol (class or namespace) level = -1
for namespaces and top-level classes without containing namespace level = 0
for top-level classes with containing namespace level = 1
for class members (including inner classes) level = level of containing class + 1
for method parameters and local variables level = level of containing class + 2
removes all symbols wtih visibility scope = scope
<