1- import { TextDocumentShowOptions , ThemeIcon , TreeItem , TreeItemCollapsibleState , Uri } from "vscode" ;
2- import { Location , Position , Range } from "vscode-languageclient" ;
1+ import { TextDocumentShowOptions , ThemeIcon , TreeItem , TreeItemCollapsibleState } from "vscode" ;
2+ import { Location } from "vscode-languageclient" ;
33import { LsStereoTypedNode } from "./structure-tree-manager" ;
44
55export class SpringNode {
@@ -12,216 +12,6 @@ export class SpringNode {
1212 }
1313}
1414
15- export class ProjectNode extends SpringNode {
16- constructor ( readonly name : string , children : SpringNode [ ] ) {
17- super ( children ) ;
18- }
19- getTreeItem ( ) : TreeItem {
20- const item = super . getTreeItem ( ) ;
21- item . label = this . name ;
22- return item ;
23- }
24- }
25-
26- export class DocumentNode extends SpringNode {
27- constructor ( readonly docURI : Uri , children : SpringNode [ ] ) {
28- super ( children ) ;
29- }
30- getTreeItem ( ) : TreeItem {
31- const item = super . getTreeItem ( ) ;
32- item . label = undefined ; // let VSCode derive the label from the resource URI
33- item . resourceUri = this . docURI ;
34- item . iconPath = ThemeIcon . File ;
35- return item ;
36- }
37- }
38-
39- export class AotProcessorNode extends SpringNode {
40- constructor (
41- children : SpringNode [ ] ,
42- readonly type : string ,
43- readonly docUri : Uri
44- ) {
45- super ( children ) ;
46- }
47- getTreeItem ( ) : TreeItem {
48- const item = super . getTreeItem ( ) ;
49- item . label = this . type ;
50- item . resourceUri = this . docUri ;
51- return item ;
52- }
53- }
54-
55- export class BeanMethodContainerNode extends SpringNode {
56- constructor (
57- children : SpringNode [ ] ,
58- readonly type : string ,
59- readonly location : Location ,
60- ) {
61- super ( children ) ;
62- }
63- getTreeItem ( ) : TreeItem {
64- const item = super . getTreeItem ( ) ;
65- item . label = this . type ;
66- return item ;
67- }
68- }
69-
70- export class BeanRegistrarNode extends SpringNode {
71- constructor (
72- children : SpringNode [ ] ,
73- readonly name : string ,
74- readonly type : string ,
75- readonly location : Location ,
76- ) {
77- super ( children ) ;
78- }
79- getTreeItem ( ) : TreeItem {
80- const item = super . getTreeItem ( ) ;
81- item . label = this . name ;
82- return item ;
83- }
84- }
85-
86- export class ConfigPropertyNode extends SpringNode {
87- constructor (
88- children : SpringNode [ ] ,
89- readonly name : string ,
90- readonly type : string ,
91- readonly range : Range
92- ) {
93- super ( children ) ;
94- }
95- getTreeItem ( ) : TreeItem {
96- const item = super . getTreeItem ( ) ;
97- item . label = this . name ;
98- return item ;
99- }
100- }
101-
102- export class EventListenerNode extends SpringNode {
103- constructor (
104- children : SpringNode [ ] ,
105- readonly eventType : string ,
106- readonly location : Location ,
107- readonly containerBeanType : string ,
108- readonly annotations : AnnotationMetadata [ ]
109- ) {
110- super ( children ) ;
111- }
112- getTreeItem ( ) : TreeItem {
113- const item = super . getTreeItem ( ) ;
114- item . label = this . eventType ;
115- return item ;
116- }
117- }
118-
119- export class EventPublisherNode extends SpringNode {
120- constructor (
121- children : SpringNode [ ] ,
122- readonly eventType : string ,
123- readonly location : Location ,
124- readonly eventTypesFromHierarchy : string [ ]
125- ) {
126- super ( children ) ;
127- }
128- getTreeItem ( ) : TreeItem {
129- const item = super . getTreeItem ( ) ;
130- item . label = this . eventType ;
131- return item ;
132- }
133- }
134-
135- export class QueryMethodNode extends SpringNode {
136- constructor (
137- children : SpringNode [ ] ,
138- readonly methodName : string ,
139- readonly queryString : string ,
140- readonly range : Range
141- ) {
142- super ( children ) ;
143- }
144- getTreeItem ( ) : TreeItem {
145- const item = super . getTreeItem ( ) ;
146- item . label = this . methodName ;
147- return item ;
148- }
149- }
150-
151- export class RequestMappingNode extends SpringNode {
152- constructor (
153- children : SpringNode [ ] ,
154- readonly path : string ,
155- readonly httpMethods : string [ ] ,
156- readonly contentTypes : string [ ] ,
157- readonly acceptTypes : string [ ] ,
158- readonly symbolLabel : string ,
159- readonly range : Range
160- ) {
161- super ( children ) ;
162- }
163- getTreeItem ( ) : TreeItem {
164- const item = super . getTreeItem ( ) ;
165- item . label = this . path ;
166- return item ;
167- }
168- }
169-
170- export class WebfluxRoutesNode extends RequestMappingNode {
171- constructor (
172- children : SpringNode [ ] ,
173- path : string ,
174- httpMethods : string [ ] ,
175- contentTypes : string [ ] ,
176- acceptTypes : string [ ] ,
177- symbolLabel : string ,
178- range : Range ,
179- readonly ranges : Range [ ]
180- ) {
181- super ( children , path , httpMethods , contentTypes , acceptTypes , symbolLabel , range ) ;
182- }
183- }
184-
185- export class BeanNode extends SpringNode {
186- constructor (
187- children : SpringNode [ ] ,
188- readonly name : string ,
189- readonly type : string ,
190- readonly location : Location ,
191- readonly injectionPoints : InjectionPoint [ ] ,
192- readonly supertypes : string [ ] ,
193- readonly annotations : AnnotationMetadata [ ] ,
194- readonly isConfiguration : boolean ,
195- readonly symbolLabel : string
196- ) {
197- super ( children ) ;
198- }
199- getTreeItem ( ) : TreeItem {
200- const item = super . getTreeItem ( ) ;
201- item . label = this . name ;
202- return item ;
203- }
204- }
205-
206- export interface InjectionPoint {
207- readonly name : string ;
208- readonly type : string ;
209- readonly location : Location ;
210- readonly annotations : AnnotationMetadata [ ] ;
211- }
212-
213- export interface AnnotationMetadata {
214- readonly annotationType : string ;
215- readonly isMetaAnnotation : boolean ;
216- readonly location : Location ;
217- readonly attributes : { [ key : string ] : AnnotationAttributeValue [ ] } ;
218- }
219-
220- export interface AnnotationAttributeValue {
221- readonly name : string ;
222- readonly location : Location ;
223- }
224-
22515export class StereotypedNode extends SpringNode {
22616 constructor ( private n : LsStereoTypedNode , children : SpringNode [ ] ) {
22717 super ( children ) ;
@@ -253,7 +43,9 @@ export class StereotypedNode extends SpringNode {
25343 case "fa-stereotype" :
25444 return new ThemeIcon ( "symbol-class" ) ;
25545 case "fa-application" :
256- return new ThemeIcon ( "folder" ) ;
46+ return new ThemeIcon ( "folder" ) ;
47+ case "fa-method" :
48+ return new ThemeIcon ( "symbol-method" ) ;
25749 default :
25850 return new ThemeIcon ( "symbol-object" ) ;
25951 }
0 commit comments