Skip to content

Commit

Permalink
use decorationType instead of textDocument, update package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
vanesa committed Jan 10, 2019
1 parent f066cdc commit 18beab1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "datadog-metrics",
"title": "WIP: Datadog metrics",
"title": "Datadog metrics",
"description": "Allows jumps to the Datadog page for a metrics/instrumentation call in the code files",
"publisher": "sourcegraph",
"activationEvents": [
Expand Down Expand Up @@ -37,7 +37,7 @@
"@sourcegraph/tsconfig": "^3.0.0",
"@sourcegraph/tslint-config": "^12.1.0",
"parcel-bundler": "^1.10.3",
"sourcegraph": "^19.4.0",
"sourcegraph": "^20.0.0",
"tslint": "^5.11.0",
"typescript": "^3.2.1"
}
Expand Down
7 changes: 4 additions & 3 deletions src/datadog-metrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@ export function activate(): void {
} while (m)
STATSD_PATTERN.lastIndex = 0 // reset
}
editor.setDecorations(null, decorations)
const decorationType = sourcegraph.app.createDecorationType()
editor.setDecorations(decorationType, decorations)
}
}
sourcegraph.workspace.onDidOpenTextDocument.subscribe(textDocument => {
sourcegraph.workspace.onDidOpenTextDocument.subscribe(() =>
decorateEditors(sourcegraph.app.activeWindow!.visibleViewComponents)
})
)

sourcegraph.configuration.subscribe(() => {
decorateEditors(sourcegraph.app.activeWindow!.visibleViewComponents)
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4515,10 +4515,10 @@ source-map@^0.5.0, source-map@^0.5.3, source-map@^0.5.6:
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"
integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=

sourcegraph@^19.4.0:
version "19.4.1"
resolved "https://registry.yarnpkg.com/sourcegraph/-/sourcegraph-19.4.1.tgz#c36a71f58040e84114f7547867df9e937eac2515"
integrity sha512-utBHSFMHBWfCRWol+TpgMRTU0wnbNHrZVRuQvdFGhP/yT0y/MwHCs+D9Gk16A/F2tU05Jd+beBPhqoF57IHpyA==
sourcegraph@^20.0.0:
version "20.0.0"
resolved "https://registry.yarnpkg.com/sourcegraph/-/sourcegraph-20.0.0.tgz#7828fa7f8383a3631e7d4f12a6c8468ba6ba2dd3"
integrity sha512-9wCLAIwbMIiG0KfftvRjvsHuCyRsOIk9/Kun1ULusVLnuM6Y/6VC2vrcx3Gk3YHudAwcd5xEA1LYraiNGmbuvQ==

split-string@^3.0.1, split-string@^3.0.2:
version "3.1.0"
Expand Down

0 comments on commit 18beab1

Please sign in to comment.