Skip to content

Commit 5974214

Browse files
committed
implementing discovering for vscode testcontroller, remove unused code
1 parent 6da1d74 commit 5974214

File tree

11 files changed

+539
-470
lines changed

11 files changed

+539
-470
lines changed

.vscode/launch.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@
130130
"request": "launch",
131131
"args": [
132132
"--extensionDevelopmentPath=${workspaceFolder}",
133-
"--enable-proposed-api"
133+
"--enable-proposed-api='myvscode-samples.test-provider-sample'"
134134
],
135135
"outFiles": [
136136
"${workspaceFolder}/out/**/*.js"
@@ -143,7 +143,8 @@
143143
"request": "launch",
144144
"args": [
145145
"--extensionDevelopmentPath=${workspaceFolder}",
146-
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
146+
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index",
147+
"--enable-proposed-api"
147148
],
148149
"outFiles": [
149150
"${workspaceFolder}/out/test/**/*.js"

package.json

Lines changed: 23 additions & 128 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,13 @@
44
"description": "Robot Framework support for Visual Studio Code",
55
"icon": "images/icon.png",
66
"publisher": "d-biehl",
7-
"version": "0.1.0-alpha.5",
8-
"enableProposedApi": true,
7+
"version": "0.1.0-alpha.5",
98
"repository": {
109
"type": "git",
1110
"url": "https://github.com/d-biehl/robotcode.git"
1211
},
1312
"engines": {
14-
"vscode": "^1.58.0"
13+
"vscode": "^1.59.0"
1514
},
1615
"categories": [
1716
"Programming Languages",
@@ -259,107 +258,7 @@
259258
}
260259
}
261260
}
262-
],
263-
"commands": [
264-
{
265-
"command": "robotcode.runSuite",
266-
"category": "RobotCode",
267-
"title": "Run Suite",
268-
"enablement": "resourceLangId == robotframework && resourceExtname == .robot || explorerResourceIsFolder",
269-
"icon": {
270-
"light": "resources/light/run_suite.svg",
271-
"dark": "resources/dark/run_suite.svg"
272-
}
273-
},
274-
{
275-
"command": "robotcode.debugSuite",
276-
"category": "RobotCode",
277-
"title": "Debug Suite",
278-
"enablement": "resourceLangId == robotframework && resourceExtname == .robot || explorerResourceIsFolder",
279-
"icon": {
280-
"light": "resources/light/debug_suite.svg",
281-
"dark": "resources/dark/debug_suite.svg"
282-
}
283-
},
284-
{
285-
"command": "robotcode.runTest",
286-
"category": "RobotCode",
287-
"title": "Run Test Case",
288-
"enablement": "resourceLangId == robotframework && resourceExtname == .robot",
289-
"icon": {
290-
"light": "resources/light/run_test.svg",
291-
"dark": "resources/dark/run_test.svg"
292-
}
293-
},
294-
{
295-
"command": "robotcode.debugTest",
296-
"category": "RobotCode",
297-
"title": "Debug Test Case",
298-
"enablement": "resourceLangId == robotframework && resourceExtname == .robot",
299-
"icon": {
300-
"light": "resources/light/debug_test.svg",
301-
"dark": "resources/dark/debug_test.svg"
302-
}
303-
}
304-
],
305-
"menus": {
306-
"editor/title/run": [
307-
{
308-
"command": "robotcode.runTest",
309-
"group": "robotcode@1run@1",
310-
"when": "resourceLangId == robotframework && resourceExtname == .robot && robotCode.editor.inTest && !isInDiffEditor"
311-
},
312-
{
313-
"command": "robotcode.debugTest",
314-
"group": "robotcode@2debug@1",
315-
"when": "resourceLangId == robotframework && resourceExtname == .robot && robotCode.editor.inTest && !isInDiffEditor"
316-
},
317-
{
318-
"command": "robotcode.runSuite",
319-
"group": "robotcode@1run@2",
320-
"when": "resourceLangId == robotframework && resourceExtname == .robot && !isInDiffEditor"
321-
},
322-
{
323-
"command": "robotcode.debugSuite",
324-
"group": "robotcode@2debug@2",
325-
"when": "resourceLangId == robotframework && resourceExtname == .robot && !isInDiffEditor"
326-
}
327-
],
328-
"editor/context": [
329-
{
330-
"command": "robotcode.runTest",
331-
"group": "robotcode@1run@1",
332-
"when": "resourceLangId == robotframework && resourceExtname == .robot && robotCode.editor.inTest && !isInDiffEditor"
333-
},
334-
{
335-
"command": "robotcode.debugTest",
336-
"group": "robotcode@2debug@1",
337-
"when": "resourceLangId == robotframework && resourceExtname == .robot && robotCode.editor.inTest && !isInDiffEditor"
338-
},
339-
{
340-
"command": "robotcode.runSuite",
341-
"group": "robotcode@1run@2",
342-
"when": "resourceLangId == robotframework && resourceExtname == .robot && !isInDiffEditor"
343-
},
344-
{
345-
"command": "robotcode.debugSuite",
346-
"group": "robotcode@2debug@2",
347-
"when": "resourceLangId == robotframework && resourceExtname == .robot && !isInDiffEditor"
348-
}
349-
],
350-
"explorer/context": [
351-
{
352-
"command": "robotcode.runSuite",
353-
"group": "robotcode@1",
354-
"when": "resourceLangId == robotframework && resourceExtname == .robot || explorerResourceIsFolder"
355-
},
356-
{
357-
"command": "robotcode.debugSuite",
358-
"group": "robotcode@2",
359-
"when": "resourceLangId == robotframework && resourceExtname == .robot || explorerResourceIsFolder"
360-
}
361-
]
362-
},
261+
],
363262
"breakpoints": [
364263
{
365264
"language": "robotframework"
@@ -492,52 +391,48 @@
492391
"pretest": "npm run compile && npm run lint",
493392
"lint": "eslint --ext .ts,.tsx,.js .",
494393
"lint-fix": "eslint --ext .ts,.tsx,.js --fix .",
495-
"test": "node ./out/test/runTest.js",
496-
"download-api": "vscode-dts dev",
497-
"postdownload-api": "vscode-dts main",
498-
"postinstall": "npm run download-api"
394+
"test": "node ./out/test/runTest.js"
499395
},
500396
"extensionDependencies": [
501397
"ms-python.python"
502398
],
503399
"dependencies": {
504400
"open": "^8.2.1",
505-
"vscode-debugadapter": "^1.47.0",
506-
"vscode-debugprotocol": "^1.47.0",
401+
"vscode-debugadapter": "^1.49.0",
402+
"vscode-debugprotocol": "^1.49.0",
507403
"vscode-languageclient": "^7.0.0",
508404
"vscode-languageserver-protocol": "^3.16.0",
509405
"vscode-test-adapter-api": "^1.9.0",
510406
"vscode-test-adapter-util": "^0.7.1"
511407
},
512408
"devDependencies": {
513409
"@types/glob": "^7.1.4",
514-
"@types/mocha": "^8.2.3",
515-
"@types/node": "^16.3.1",
516-
"@types/vscode": "^1.58.0",
517-
"@typescript-eslint/eslint-plugin": "^4.28.2",
518-
"@typescript-eslint/parser": "^4.28.2",
519-
"eslint": "^7.30.0",
410+
"@types/mocha": "^9.0.0",
411+
"@types/node": "^16.7.6",
412+
"@types/vscode": "^1.59.0",
413+
"@typescript-eslint/eslint-plugin": "^4.29.3",
414+
"@typescript-eslint/parser": "^4.29.3",
415+
"eslint": "^7.32.0",
520416
"eslint-config-airbnb": "^18.2.1",
521417
"eslint-config-prettier": "^8.3.0",
522418
"eslint-config-standard": "^16.0.3",
523419
"eslint-config-standard-with-typescript": "20.0.0",
524-
"eslint-plugin-import": "^2.23.4",
420+
"eslint-plugin-import": "^2.24.2",
525421
"eslint-plugin-jsx-a11y": "^6.4.1",
526422
"eslint-plugin-node": "^11.1.0",
527-
"eslint-plugin-prettier": "^3.4.0",
423+
"eslint-plugin-prettier": "^3.4.1",
528424
"eslint-plugin-promise": "^5.1.0",
529-
"eslint-plugin-react": "^7.24.0",
425+
"eslint-plugin-react": "^7.25.1",
530426
"eslint-plugin-react-hooks": "^4.2.0",
531427
"glob": "^7.1.7",
532-
"mocha": "^9.0.2",
428+
"mocha": "^9.1.1",
533429
"prettier": "^2.3.2",
534-
"ts-loader": "^9.2.3",
535-
"typescript": "^4.3.5",
536-
"vsce": "^1.95.1",
537-
"vscode-debugadapter-testsupport": "^1.47.0",
538-
"vscode-dts": "^0.3.1",
539-
"vscode-test": "^1.5.2",
540-
"webpack": "^5.44.0",
541-
"webpack-cli": "^4.7.2"
430+
"ts-loader": "^9.2.5",
431+
"typescript": "^4.4.2",
432+
"vsce": "^1.96.2",
433+
"vscode-debugadapter-testsupport": "^1.49.0",
434+
"vscode-test": "^1.6.1",
435+
"webpack": "^5.51.1",
436+
"webpack-cli": "^4.8.0"
542437
}
543438
}

robotcode/language_server/common/parts/document_symbols.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,10 @@ async def _text_document_symbol(
9292
document_symbols: List[DocumentSymbol] = []
9393
symbol_informations: List[SymbolInformation] = []
9494

95-
document = self.parent.documents[text_document.uri]
95+
document = self.parent.documents.get(text_document.uri, None)
96+
if not document:
97+
return None
98+
9699
for result in await self.collect(
97100
self,
98101
document,

robotcode/language_server/robotframework/parts/code_lens.py

Lines changed: 0 additions & 100 deletions
This file was deleted.

0 commit comments

Comments
 (0)