Skip to content

Commit

Permalink
feat: use ViewContainer from atom-ide-base
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Oct 6, 2020
1 parent ec96642 commit b7cfbfb
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 193 deletions.
20 changes: 14 additions & 6 deletions lib/signature-help-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

const { CompositeDisposable, Disposable, Range, Point, TextEditor } = require("atom")
import { ProviderRegistry } from "atom-ide-base/commons-atom/ProviderRegistry"
const SignatureHelpView = require("./signature-help-view")
import { ViewContainer } from "atom-ide-base/commons-ui/float-pane/ViewContainer"

module.exports = class SignatureHelpManager {
constructor() {
Expand Down Expand Up @@ -252,7 +252,7 @@ module.exports = class SignatureHelpManager {
this.unmountDataTip()

const grammar = editor.getGrammar().scopeName.toLowerCase()
const snippetHtml = await this.getSnippetHtml(signature.label, grammar)
const snippetHtml = await getSnippetHtml(signature.label, grammar)
let doc = null

if (parameter) {
Expand All @@ -266,10 +266,18 @@ module.exports = class SignatureHelpManager {
} else {
doc = ""
}
const documentationHtml = await this.getDocumentationHtml(doc, grammar)
const signatureHelpView = new SignatureHelpView({
snippet: snippetHtml,
html: documentationHtml,
const documentationHtml = await getDocumentationHtml(doc, grammar)
const signatureHelpView = new ViewContainer({
snippet: {
element: snippetHtml,
containerClassName: "signature-container",
contentClassName: "signature-snippet",
},
html: {
element: documentationHtml,
containerClassName: "signature-marked-container",
contentClassName: "signature-marked",
},
})
this.signatureHelpDisposables = this.mountSignatureHelp(editor, position, signatureHelpView)
}
Expand Down
187 changes: 0 additions & 187 deletions lib/signature-help-view.js

This file was deleted.

0 comments on commit b7cfbfb

Please sign in to comment.