Skip to content

Commit 516cf00

Browse files
committed
fix: move props from constructor to props
1 parent 6c18c0b commit 516cf00

File tree

1 file changed

+36
-45
lines changed

1 file changed

+36
-45
lines changed

src/signature-help-manager.ts

Lines changed: 36 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,44 @@
1-
const { CompositeDisposable, Disposable, Range, Point, TextEditor } = require("atom")
1+
import { CompositeDisposable, Disposable, Range, Point, TextEditor } from "atom"
22
import { ProviderRegistry } from "atom-ide-base/commons-atom/ProviderRegistry"
33
import { ViewContainer } from "atom-ide-base/commons-ui/float-pane/ViewContainer"
44
import { makeOverlaySelectable, makeOverLayCopyable } from "atom-ide-base/commons-ui/float-pane/selectable-overlay"
55

66
export default class SignatureHelpManager {
7-
constructor() {
8-
/**
9-
* holds a reference to disposable items from this data tip manager
10-
* @type {CompositeDisposable}
11-
*/
12-
this.subscriptions = new CompositeDisposable()
13-
/**
14-
* holds a list of registered data tip providers
15-
* @type {ProviderRegistry}
16-
*/
17-
this.providerRegistry = new ProviderRegistry()
18-
/**
19-
* holds a weak reference to all watched Atom text editors
20-
* @type {Array<TextEditor>}
21-
*/
22-
this.watchedEditors = new WeakSet()
23-
/**
24-
* holds a reference to the current watched Atom text editor
25-
* @type {TextEditor}
26-
*/
27-
this.editor = null
28-
/**
29-
* holds a reference to the current watched Atom text editor viewbuffer
30-
*/
31-
this.editorView = null
32-
/**
33-
* holds a reference to all disposable items for the current watched Atom text editor
34-
* @type {CompositeDisposable}
35-
*/
36-
this.editorSubscriptions = null
37-
/**
38-
* holds a reference to all disposable items for the current signature help
39-
* @type {CompositeDisposable}
40-
*/
41-
this.signatureHelpDisposables = null
42-
/**
43-
* config flag denoting if the signature help should be shown during typing automatically
44-
* @type {Boolean}
45-
*/
46-
this.showSignatureHelpOnTyping = false
47-
48-
// glow on hover class
49-
this.glowClass = atom.config.get("atom-ide-signature-help.glowOnHover") ? "signature-glow" : ""
50-
}
7+
/**
8+
* holds a reference to disposable items from this data tip manager
9+
*/
10+
subscriptions = new CompositeDisposable()
11+
/**
12+
* holds a list of registered data tip providers
13+
*/
14+
providerRegistry = new ProviderRegistry()
15+
/**
16+
* holds a weak reference to all watched Atom text editors
17+
*/
18+
watchedEditors = new WeakSet<TextEditor>()
19+
/**
20+
* holds a reference to the current watched Atom text editor
21+
*/
22+
editor: TextEditor | null = null
23+
/**
24+
* holds a reference to the current watched Atom text editor viewbuffer
25+
*/
26+
editorView = null
27+
/**
28+
* holds a reference to all disposable items for the current watched Atom text editor
29+
*/
30+
editorSubscriptions: CompositeDisposable | null = null
31+
/**
32+
* holds a reference to all disposable items for the current signature help
33+
*/
34+
signatureHelpDisposables: CompositeDisposable | null = null
35+
/**
36+
* config flag denoting if the signature help should be shown during typing automatically
37+
*/
38+
showSignatureHelpOnTyping = false
39+
40+
// glow on hover class
41+
glowClass = atom.config.get("atom-ide-signature-help.glowOnHover") ? "signature-glow" : ""
5142

5243
/**
5344
* initialization routine

0 commit comments

Comments
 (0)