-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show SQL cursors in outline view #216
base: main
Are you sure you want to change the base?
Changes from 7 commits
4ecde9c
6e59d06
4f6ef7a
e1a28fd
f6402c3
e019173
af0b9a0
6729ff0
e699548
638ed80
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,6 +42,10 @@ export default class Cache { | |
|
||
/** @type {IncludeStatement[]} */ | ||
this.includes = cache.includes || []; | ||
|
||
/** @type {Declaration[]} */ | ||
this.cursors = cache.cursors || []; | ||
|
||
} | ||
|
||
/** | ||
|
@@ -58,7 +62,8 @@ export default class Cache { | |
files: [...this.files, ...second.files], | ||
structs: [...this.structs, ...second.structs], | ||
constants: [...this.constants, ...second.constants], | ||
indicators: [...this.indicators, ...second.indicators] | ||
indicators: [...this.indicators, ...second.indicators], | ||
cursor: [...this.cursor, ...second.cursor] | ||
}); | ||
} else { | ||
return this; | ||
|
@@ -79,6 +84,7 @@ export default class Cache { | |
...this.subroutines.map(def => def.name), | ||
...this.variables.map(def => def.name), | ||
...this.structs.map(def => def.name), | ||
...this.cursor.map(def => def.name), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
].filter(name => name); | ||
} | ||
|
||
|
@@ -93,7 +99,8 @@ export default class Cache { | |
this.structs.filter(d => d.position.path === fsPath).pop(), | ||
this.variables.filter(d => d.position.path === fsPath).pop(), | ||
this.constants.filter(d => d.position.path === fsPath).pop(), | ||
this.files.filter(d => d.position.path === fsPath).pop() | ||
this.files.filter(d => d.position.path === fsPath).pop(), | ||
this.cursor.filter(d => d.position.path === fsPath).pop() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Incorrect reference here also. |
||
].filter(d => d !== undefined); | ||
|
||
const lines = lasts.map(d => d.range && d.range.end ? d.range.end : d.position.line).sort((a, b) => b - a); | ||
|
@@ -120,6 +127,7 @@ export default class Cache { | |
...this.subroutines.filter(def => def.name.toUpperCase() === name), | ||
...this.variables.filter(def => def.name.toUpperCase() === name), | ||
...this.indicators.filter(def => def.name.toUpperCase() === name), | ||
...this.cursor.filter(def => def.name.toUpperCase() === name), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like you've updated the |
||
]; | ||
|
||
if (allStructs.length > 0 && possibles.length === 0) { | ||
|
@@ -136,7 +144,7 @@ export default class Cache { | |
} | ||
|
||
clearReferences() { | ||
[...this.parameters, ...this.constants, ...this.files, ...this.procedures, ...this.subroutines, ...this.variables, ...this.structs].forEach(def => { | ||
[...this.parameters, ...this.constants, ...this.files, ...this.procedures, ...this.subroutines, ...this.variables, ...this.structs, ...this.cursor].forEach(def => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
def.references = []; | ||
}); | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cursor
->cursors