Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2892954
extension.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
1 KB
Referenced Files
None
Subscribers
None
extension.ts
View Options
import
*
as
vscode
from
'vscode'
;
import
*
as
lint
from
'./arc_lint'
;
export
function
activate
(
context
:
vscode.ExtensionContext
)
{
const
collection
=
vscode
.
languages
.
createDiagnosticCollection
(
'arc lint'
);
lint
.
setup
();
function
d
(
disposable
:
vscode.Disposable
)
{
context
.
subscriptions
.
push
(
disposable
);
}
d
(
vscode
.
commands
.
registerCommand
(
'arc-vscode.clearLint'
,
()
=>
collection
.
clear
()));
d
(
vscode
.
workspace
.
onDidSaveTextDocument
(
onTextDocumentEvent
));
d
(
vscode
.
workspace
.
onDidOpenTextDocument
(
onTextDocumentEvent
));
d
(
vscode
.
workspace
.
onDidChangeConfiguration
(
onChangeConfig
));
if
(
vscode
.
window
.
activeTextEditor
)
{
lint
.
lintFile
(
vscode
.
window
.
activeTextEditor
.
document
,
collection
);
}
d
(
vscode
.
window
.
onDidChangeActiveTextEditor
(
editor
=>
{
if
(
editor
)
{
lint
.
lintFile
(
editor
.
document
,
collection
);
}
}));
function
onTextDocumentEvent
(
document
:
vscode
.
TextDocument
)
{
lint
.
lintFile
(
document
,
collection
);
}
}
export
function
deactivate() {
// TODO collection.clear();
}
function
onChangeConfig
(
e
:
vscode.ConfigurationChangeEvent
)
{
if
(
!
e
.
affectsConfiguration
(
'arc-vscode.lint'
))
{
return
;
}
lint
.
updateLintSeverityMap
();
}
File Metadata
Details
Attached
Mime Type
text/x-java
Expires
Sun, Jan 19, 17:37 (1 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1127034
Default Alt Text
extension.ts (1 KB)
Attached To
Mode
R7 arc-vscode
Attached
Detach File
Event Timeline
Log In to Comment