Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2895147
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'
;
import
*
as
browse
from
'./arc_browse'
;
import
*
as
hovercard
from
'./hovercard'
;
export
function
activate
(
context
:
vscode.ExtensionContext
)
{
const
log
=
vscode
.
window
.
createOutputChannel
(
"arcanist"
);
const
diagnostics
=
vscode
.
languages
.
createDiagnosticCollection
(
'arc lint'
);
lint
.
setup
(
log
,
diagnostics
);
browse
.
setup
(
log
);
function
d
(
disposable
:
vscode.Disposable
)
{
context
.
subscriptions
.
push
(
disposable
);
}
d
(
diagnostics
);
d
(
log
);
d
(
hovercard
.
register
());
d
(
vscode
.
commands
.
registerCommand
(
"arc-vscode.browseFile"
,
browse
.
browseFile
));
d
(
vscode
.
commands
.
registerCommand
(
'arc-vscode.clearLint'
,
()
=>
diagnostics
.
clear
()));
d
(
vscode
.
commands
.
registerCommand
(
'arc-vscode.lintEverything'
,
lint
.
lintEverything
));
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
);
}
d
(
vscode
.
workspace
.
onDidCloseTextDocument
(
document
=>
diagnostics
.
delete
(
document
.
uri
)));
function
onTextDocumentEvent
(
document
:
vscode
.
TextDocument
)
{
lint
.
lintFile
(
document
);
}
}
export
function
deactivate() {
}
function
onChangeConfig
(
e
:
vscode.ConfigurationChangeEvent
)
{
if
(
!
e
.
affectsConfiguration
(
'arc-vscode.lint'
))
{
return
;
}
lint
.
updateLintSeverityMap
();
}
File Metadata
Details
Attached
Mime Type
text/x-java
Expires
Jan 19 2025, 21:00 (6 w, 1 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1128705
Default Alt Text
extension.ts (1 KB)
Attached To
Mode
R7 arc-vscode
Attached
Detach File
Event Timeline
Log In to Comment