Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vscode migration #124

Closed
wants to merge 12 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
node_modules
.browser_modules
lib
build
*.log
TraceCompassTutorialTraces
trace-compass-server
trace-compass-server.tar.gz
TraceCompassTutorialTraces.tgz
*-app/*
!*-app/package.json
!*-app/electron-builder.yml
!*-app/resources/
!*-app/scripts
7 changes: 7 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"dbaeumer.vscode-eslint"
]
}
13 changes: 13 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -4,6 +4,19 @@
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.3.0",
"configurations": [
{
"name": "Launch Extension",
"type": "extensionHost",
"request": "launch",
"sourceMaps": true,
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}/packages/vscode-extension"
],
"outFiles": [
"${workspaceFolder}/packages/vscode-extension/build/extension/**/*.js"
]
},
{
"type": "chrome",
"request": "launch",
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -2,4 +2,10 @@
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"search.exclude": {
"lib": true, // set this to false to include "lib" folder in search results
"build": true
},
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
"typescript.tsc.autoDetect": "off"
}
22 changes: 15 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -24,10 +24,11 @@ Here is the step in order to build the trace viewer

## Try the trace extension

This repository contains an example trace-viewer application that includes the trace extension. It has two versions:
This repository contains a vscode extension, as well as example Theia-based applications that includes the trace extension. It has three versions:

- _browser_: a "browser" application, accessed with a web browser
- _electron_: a native desktop application
- _vscode_: The extension runs from a running vscode instance
- _browser_: **temporarily unavailable** a "browser" theia application, accessed with a web browser
- _electron_: **temporarily unavailable** a native theia desktop application

### Run the Trace Server

@@ -42,7 +43,15 @@ You can also build the trace-server yourself using Trace Compass and the Incubat

### Run the example app

From the repo root, run either
To run the vscode extension, open vscode with this repo open

```bash
$ code .
```

Then press `F5` to run the extension.

To run theia applications, rrom the repo root, run either

```bash
$ yarn start:browser
@@ -60,6 +69,8 @@ And use the Electron application.

## Package the Example Theia Trace Viewer Application

**Temporarily unavailable**

It's possible to package the repo's example application with `electron-builder`. After running `yarn` in the repo root, do:

```bash
@@ -99,6 +110,3 @@ Now, you will see 3 sections: **Opened experiments**, **Available analysis** and
### Navigation and zooming
There is only a limited number of such operations and they are only implemented in the Time Graph views (the ones looking like Gantt charts). For Zoom-in/out use CTRL+mouse wheel. Or use left mouse drag on time axis on top. Navigating the trace you can use the scrollbar at the bottom of the experiment container.

### Time Graph Tooltip
Currently, the **Time Graph Tooltip** is populated when selecting a state in a Time Graph view.

22 changes: 11 additions & 11 deletions browser-app/package.json → app/browser/package.json
Original file line number Diff line number Diff line change
@@ -15,28 +15,28 @@
},
"dependencies": {
"@theia/core": "latest",
"@theia/cpp-debug": "latest",
"@theia/editor": "latest",
"@theia/filesystem": "latest",
"@theia/workspace": "latest",
"@theia/preferences": "latest",
"@theia/getting-started": "latest",
"@theia/keymaps": "latest",
"@theia/markers": "latest",
"@theia/messages": "latest",
"@theia/monaco": "latest",
"@theia/navigator": "latest",
"@theia/preferences": "latest",
"@theia/process": "latest",
"@theia/terminal": "latest",
"@theia/editor": "latest",
"@theia/markers": "latest",
"@theia/monaco": "latest",
"@theia/messages": "latest",
"@theia/cpp-debug": "latest",
"@theia/vsx-registry": "latest",
"@theia/keymaps": "latest",
"@theia/getting-started": "latest",
"trace-viewer": "0.0.0"
"@theia/workspace": "latest"
},
"devDependencies": {
"@theia/cli": "latest"
},
"scripts": {
"prepare": "theia build --mode development && yarn download:plugins",
"start": "theia start --plugins=local-dir:./plugins",
"symlink:extension": "mkdir -p plugins && rm -f ./plugins/vscode-extension && ln -s ../../../packages/vscode-extension ./plugins/",
"start": "yarn run symlink:extension && theia start --ssl --cert ./theiaCert.pem --certkey ./theiaPrivKey.pem --plugins=local-dir:./plugins",
"watch": "theia build --watch --mode development",
"download:plugins": "theia download:plugins -p=true"
},
File renamed without changes.
24 changes: 13 additions & 11 deletions electron-app/package.json → app/electron/package.json
Original file line number Diff line number Diff line change
@@ -23,30 +23,32 @@
}
},
"dependencies": {
"@theia/compression-webpack-plugin": "latest",
"@theia/core": "latest",
"@theia/editor": "latest",
"@theia/electron": "latest",
"@theia/filesystem": "latest",
"@theia/workspace": "latest",
"@theia/preferences": "latest",
"@theia/getting-started": "latest",
"@theia/keymaps": "latest",
"@theia/markers": "latest",
"@theia/messages": "latest",
"@theia/monaco": "latest",
"@theia/navigator": "latest",
"@theia/preferences": "latest",
"@theia/process": "latest",
"@theia/terminal": "latest",
"@theia/editor": "latest",
"@theia/markers": "latest",
"@theia/monaco": "latest",
"@theia/messages": "latest",
"@theia/vsx-registry": "latest",
"@theia/keymaps": "latest",
"@theia/getting-started": "latest",
"@theia/electron": "latest",
"trace-viewer": "0.0.0"
"@theia/workspace": "latest",
"circular-dependency-plugin": "^5.2.0"
},
"devDependencies": {
"@theia/cli": "latest",
"electron-builder": "^22.3.2"
},
"scripts": {
"prepare": "theia build --mode development && yarn download:plugins",
"start": "theia start --plugins=local-dir:./plugins",
"symlink:extension": "mkdir -p plugins && rm -f ./plugins/vscode-extension && ln -s ../../../packages/vscode-extension ./plugins/",
"start": "yarn run symlink:extension && theia start --plugins=local-dir:./plugins",
"watch": "theia build --watch --mode development",
"package": "electron-builder",
"package:preview": "electron-builder --dir",
File renamed without changes.
File renamed without changes.
21 changes: 13 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,30 @@
{
"private": true,
"scripts": {
"reinstall": "rimraf ./**/node_modules && yarn install",
"prepare": "lerna run prepare",
"build": "lerna run build",
"rebuild:browser": "theia rebuild:browser",
"rebuild:electron": "theia rebuild:electron",
"start:browser": "yarn rebuild:browser ; yarn --cwd browser-app start",
"start:electron": "yarn rebuild:electron ; yarn --cwd electron-app start",
"build:vscode-extension": "yarn workspace @trace-viewer/vscode-extension build",
"start:browser": "yarn rebuild:browser ; yarn --cwd app/browser start",
"start:electron": "yarn rebuild:electron ; yarn --cwd app/electron start",
"download:sample-traces": "curl -o TraceCompassTutorialTraces.tgz https://raw.githubusercontent.com/tuxology/tracevizlab/master/labs/TraceCompassTutorialTraces.tgz; tar -xf TraceCompassTutorialTraces.tgz",
"download:server": "curl -o trace-compass-server.tar.gz https://download.eclipse.org/tracecompass.incubator/trace-server/rcp/trace-compass-server-latest-linux.gtk.x86_64.tar.gz; tar -xf trace-compass-server.tar.gz",
"start:server": "./trace-compass-server/tracecompass-server",
"start-all:browser": "yarn start:server & yarn start:browser",
"start-all:electron": "yarn start:server & yarn start:electron",
"lint": "yarn workspace trace-viewer run lint",
"test": "echo test"
"lint": "lerna run lint",
"test": "lerna run test",
"vsce:package": "yarn workspace traceviewer run vsce package"
},
"devDependencies": {
"lerna": "2.4.0"
"lerna": "2.4.0",
"rimraf": "^3.0.2"
},
"workspaces": [
"viewer-prototype",
"browser-app",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the intention to drop the example applications?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add entries for the new app folders if you want them built along with the rest:

"app/browser",
"app/electron"

"electron-app"
"packages/base",
"packages/react-components",
"packages/vscode-extension"
]
}
26 changes: 26 additions & 0 deletions packages/base/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/** @type {import('eslint').Linter.Config} */
module.exports = {
root: true,
parser: "@typescript-eslint/parser", // Specifies the ESLint parser
parserOptions: {
ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features
sourceType: "module", // Allows for the use of imports
tsconfigRootDir: __dirname,
project: 'tsconfig.json',
projectFolderIgnoreList: [
'/lib/'
]
},
extends: [
'plugin:@typescript-eslint/recommended',
'../../configs/base.eslintrc.json',
'../../configs/warnings.eslintrc.json',
'../../configs/errors.eslintrc.json'
],
ignorePatterns: [
'node_modules',
'lib',
'.eslintrc.js',
'plugins'
]
};
34 changes: 34 additions & 0 deletions packages/base/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"name": "@trace-viewer/base",
"version": "0.0.0",
"description": "Trace Compass base package, contains trace management utilities",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/theia-ide/theia-trace-extension"
},
"files": [
"lib",
"src"
],
"dependencies": {
"tsp-typescript-client": "next"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^3.4.0",
"@typescript-eslint/parser": "^3.4.0",
"eslint": "^7.3.0",
"eslint-plugin-import": "^2.21.2",
"eslint-plugin-no-null": "^1.0.2",
"eslint-plugin-react": "^7.20.0",
"rimraf": "latest",
"typescript": "latest"
},
"scripts": {
"prepare": "yarn clean && yarn build",
"clean": "rimraf lib",
"build": "tsc",
"watch": "tsc -w",
"lint": "eslint ."
}
}
Loading