Skip to content

Commit f2d392d

Browse files
committed
Actions
1 parent f1b1123 commit f2d392d

File tree

1 file changed

+187
-0
lines changed

1 file changed

+187
-0
lines changed
Lines changed: 187 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,187 @@
1+
# Actions
2+
Actions are a series of API calls that perform IDE specific functionality. CodeFactory is reponsible for the heavy lifting of all integration with the IDE. These calls are used during the automation process as well as the final output back into the IDE itself.
3+
4+
## Visual Studio Actions
5+
The core actions within CodeFactory today directly interop with Visual Studio itself. Visual Studio actions are accessible at two different levels within the SDK. CodeFactory data models have direct links to Visual Studio actions that directly impact the target data model. At the command level there is direct access to all Visual Studio actions by calling the property VisualStudioActions.
6+
The following provides a high level summary of the actions that are avaliable at diffrent levels of the CodeFactory platform.
7+
8+
### Project System Actions
9+
The following are the target actions that are avaliable at the project system level of Visual Studio.
10+
11+
#### Solution Actions
12+
These actions are directly executed at the solution level.
13+
- GetSolutionAsync - Loads the current solution data model
14+
- CreateSolutionFolderAsync - Creates a new solution folder
15+
- GetChildrenAsync - Gets all Visual Studio models hosted under the solution
16+
- GetProjectsAsync - Gets all project data models hosted by the solution
17+
18+
#### Solution Folder Actions
19+
These actions are directly executed at the solution folder level.
20+
21+
- AddDocumentAsync - Creates a new document data model and assigns it to the solution folder
22+
- AddExitingDocumentAsync - Adds an existing document to the target solution folder
23+
- AddSolutionFolder - Adds a solution folder under the current solution folder
24+
- GetChildrenAsync - Gets all Visul Studio models that are children of this solution folder
25+
- GetParentAsync - Gets the parent Visual Studio model for this solution folder
26+
- Remove - Removes the solution folder from the solution
27+
28+
#### Project Actions
29+
These actions are directly executed at the project level.
30+
31+
- AddDocumentAsync - Creates a new document and assigns it to the root of the project
32+
- AddExistingDocumentAsync - Adds an executing document to the root of the project
33+
- AddProjectFolderAsync - Creates a new project folder under the root of the project
34+
- GetChildrenAsync - Gets the Visual Studio models that are children of the project
35+
- GetParentAsync - Gets the Visual Studio model that is the parent to this project
36+
- GetReferencedProjects - Gets the project data models that are referenced by this project
37+
- GetReferencesAsync - Genereates the full list of Project Reference data models that support this project
38+
39+
#### Project Reference Actions
40+
These actions are directly executed at the project reference level.
41+
42+
- GetReferencedProjectAsync - Loads the Project data model the project reference is from
43+
44+
#### Project Folder Actions
45+
These actions are directly executed at the project folder level.
46+
47+
- AddDocumentAsync - Creates a new document and adds it to the project folder
48+
- AddExistingDocumentAsync - Adds an existing document already in the project folder
49+
- AddProjectFolderAsync - Adds a new project folder that is a child of the current project folder
50+
- DeleteAsync - Deletes the project folder and all files under the project folder
51+
- GetCSharpNamespaceAsync - Generates the namespace definition from the project root to the project folder location
52+
- GetChildrenAsync - Gets all Visual Studio models that are children of this project folder
53+
- GetParentAsync - Get the parent Visual Studio model of this project folder
54+
- RemoveAsync - Removes the project folder from the project but does not remove it from the file system
55+
56+
#### Document Actions
57+
These actions are directly exected at the document level.
58+
59+
- AddContentAsync - Adds content to a document starting at a target line number and character position
60+
- AddContentToBeginningAsync - Adds content at the beginning of the document
61+
- AddContentToEndAsync - Adds content at the end of the document
62+
- DeleteAsync - Deletes the document from the hosting solution or project and from the file system
63+
- GetCSharpSourceModelAsync - If the document is a C# document will load the C# sourcecode model from the document
64+
- GetChildrenAsync - Builds document models for all documents that are children of this document
65+
- GetDocumentContentAsContentAsync - Will return the content of the document as a content data model
66+
- GetDocumentContentAsStringAsync - Will return the content of the document as a string
67+
- GetParentAsync - Will get the parent Visual Studio model for this document
68+
- RemoveAsync - Will remove the document from the hosting solution or project but will keep it on the file system
69+
- RemoveContentAsync - Will remove all content from the document
70+
71+
#### Source Actions
72+
These actions are directly executed at the C# document level
73+
- LoadDocumentFromSourceAsync - Loads a document model from the c# source document
74+
75+
#### User model Actions
76+
These actions are directly related to creating and executed customer user models that are hosted in Visual Studio.
77+
78+
- CreateVsUserControlAsync - Generic method that creates a new instance of a visual studio user control
79+
- ShowDialogWindowAsync - Displays the target user control in the Visual Studio IDE
80+
81+
## C# Actions
82+
The following actions are directly tied to the C# data models. The implementation of these actions are specific to IDE, but do not change from one IDE to another.
83+
84+
### Container Actions
85+
Container actions focus on actions that occur at the model, model, and structure model levels.
86+
87+
#### Class Actions
88+
The following actions occur at the class model level.
89+
90+
- AddAfterAsync - Add code syntax after the model definition
91+
- AddBeforeAsync - Add code syntax before the model definition
92+
- AddToBeginningAsync - Add code syntax to beginning of the body of the model definition
93+
- AddToEndAsync - Add code syntax to the end of the body of the model definition
94+
- DeleteAsync - Delete the model definition
95+
- GetBodySourceLocationAsync - Get the document coordinates where the body starts and ends
96+
- GetBodySyntaxAsync - Get the raw syntax within the body
97+
- GetSourceLocationAsync - Get the full model definitions document coordiants where it starts and ends
98+
- ReplaceAsync - Replaces the entire definition of the model with the provided syntax
99+
100+
#### Interface Actions
101+
The following actions occur at the interface model level.
102+
103+
- AddAfterAsync - Add code syntax after the model definition
104+
- AddBeforeAsync - Add code syntax before the model definition
105+
- AddToBeginningAsync - Add code syntax to beginning of the body of the model definition
106+
- AddToEndAsync - Add code syntax to the end of the body of the model definition
107+
- DeleteAsync - Delete the model definition
108+
- GetBodySourceLocationAsync - Get the document coordinates where the body starts and ends
109+
- GetBodySyntaxAsync - Get the raw syntax within the body
110+
- GetSourceLocationAsync - Get the full model definitions document coordiants where it starts and ends
111+
- ReplaceAsync - Replaces the entire definition of the model with the provided syntax
112+
113+
#### Structure Actions
114+
The following actions occur at the structure model level.
115+
116+
- AddAfterAsync - Add code syntax after the model definition
117+
- AddBeforeAsync - Add code syntax before the model definition
118+
- AddToBeginningAsync - Add code syntax to beginning of the body of the model definition
119+
- AddToEndAsync - Add code syntax to the end of the body of the model definition
120+
- DeleteAsync - Delete the model definition
121+
- GetBodySourceLocationAsync - Get the document coordinates where the body starts and ends
122+
- GetBodySyntaxAsync - Get the raw syntax within the body
123+
- GetSourceLocationAsync - Get the full model definitions document coordiants where it starts and ends
124+
- ReplaceAsync - Replaces the entire definition of the model with the provided syntax
125+
126+
### Member Actions
127+
Member actions focus on actions that occur at the event, field, method, property levels.
128+
129+
#### Event Actions
130+
The following actions occur at the event model level.
131+
132+
- AddAfterAsync - Adds the syntax after the model definition
133+
- AddBeforeAsync - Adds the syntax before the model defintion
134+
- DeleteAsync - Deletes the model
135+
- GetSourceLocationAsync - Gets the document coordinates where the model starts and ends
136+
- ReplaceAsync - Replaces the model with the provided syntax
137+
138+
#### Field Actions
139+
The following actions occur at the field model level.
140+
141+
- AddAfterAsync - Adds the syntax after the model definition
142+
- AddBeforeAsync - Adds the syntax before the model defintion
143+
- DeleteAsync - Deletes the model
144+
- GetSourceLocationAsync - Gets the document coordinates where the model starts and ends
145+
- ReplaceAsync - Replaces the model with the provided syntax
146+
147+
#### Method Actions
148+
The following actions occur at the method model level.
149+
150+
- AddAfterAsync - Adds the syntax after the model definition
151+
- AddBeforeAsync - Adds the syntax before the model defintion
152+
- DeleteAsync - Deletes the model
153+
- GetBodySyntaxAsync - Gets the syntax from the body of the model.
154+
- GetSourceLocationAsync - Gets the document coordinates where the model starts and ends
155+
- ReplaceAsync - Replaces the model with the provided syntax
156+
157+
#### Property Actions
158+
The following actions occur at the property model level.
159+
160+
- AddAfterAsync - Adds the syntax after the model definition
161+
- AddBeforeAsync - Adds the syntax before the model defintion
162+
- DeleteAsync - Deletes the model
163+
- GetSourceLocationAsync - Gets the document coordinates where the model starts and ends
164+
- LoadGetBodySyntaxAsync - Gets the body syntax from the properties get statement
165+
- LoadSetBodySyntaxAsync - Gets the body syntax from the properties set statement
166+
- ReplaceAsync - Replaces the model with the provided syntax
167+
168+
### Other C# Models with Actions
169+
The following are other C# models that also have direct actions.
170+
171+
#### Using Statement Actions
172+
The following actions apply to the using statement model level.
173+
174+
- AddAfterAsync - Adds the syntax after the model definition
175+
- AddBeforeAsync - Adds the syntax before the model defintion
176+
- DeleteAsync - Deletes the model
177+
- GetSourceLocationAsync - Gets the document coordinates where the model starts and ends
178+
- ReplaceAsync - Replaces the model with the provided syntax
179+
180+
#### Attribute Actions
181+
The following actions apply to the attribute model level.
182+
183+
- AddAfterAsync - Adds the syntax after the model definition
184+
- AddBeforeAsync - Adds the syntax before the model defintion
185+
- DeleteAsync - Deletes the model
186+
- GetSourceLocationAsync - Gets the document coordinates where the model starts and ends
187+
- ReplaceAsync - Replaces the model with the provided syntax

0 commit comments

Comments
 (0)