-
Notifications
You must be signed in to change notification settings - Fork 26
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
feat: tooltip on hover #119
Conversation
- @ui5-language-assistant/language-server@1.3.0 - @ui5-language-assistant/logic-utils@1.1.2 - @ui5-language-assistant/semantic-model-types@1.2.0 - @ui5-language-assistant/semantic-model@1.2.0 - vscode-ui5-language-assistant@1.1.3 - @ui5-language-assistant/xml-views-completion@1.3.0 - @ui5-language-assistant/test-utils@1.2.0
ast: XMLDocument, | ||
offset: number, | ||
model: UI5SemanticModel | ||
): BaseUI5Node | undefined { |
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.
We can probably be more specific than BaseUI5Node
and define a "HoverUI5Node` ,e.g:
type HoverUI5Node = UI5Class | UI5Attribute | ....;
return undefined; | ||
} | ||
|
||
function findUI5ClassMemberByName( |
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.
This should probably go into logic-utils
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.
I agree but make it receive the attribute instead of its key
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.
I didn't go over the tests yet
UI5Enum, | ||
BaseUI5Node, | ||
} from "@ui5-language-assistant/semantic-model-types"; | ||
import { getNodeDocumentation } from "./documentation"; |
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.
This should be the last import
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.
From these comments only the readme comments and the .only comments are important for now
const offset = document.offsetAt(textDocumentPosition.position); | ||
const astPosition = getAstNodeInPosition(ast, offset); | ||
if (astPosition !== undefined) { | ||
const ui5Node = findUI5HoverNodeAtOffset(astPosition, model); |
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.
Not for now but maybe we should rename findUI5HoverNodeAtOffset
because to findUI5HoverNodeAtPosition
…over # Conflicts: # packages/language-server/package.json
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.
Please fix the readme file. The rest of the comments are minor and can be in a different PR.
No description provided.