Quellcode durchsuchen

Adds logging for #18

main
Eric Amodio vor 8 Jahren
Ursprung
Commit
a91afffbb2
6 geänderte Dateien mit 23 neuen und 58 gelöschten Zeilen
  1. +0
    -2
      .vscodeignore
  2. +5
    -0
      CHANGELOG.md
  3. +14
    -14
      package.json
  4. +2
    -0
      src/gitCodeLensProvider.ts
  5. +2
    -9
      tsconfig.json
  6. +0
    -33
      vsc-extension-quickstart.md

+ 0
- 2
.vscodeignore Datei anzeigen

@ -1,5 +1,4 @@
images/*.gif
typings/**
.vscode/**
.vscode-test/**
out/test/**
@ -8,4 +7,3 @@ src/**
**/*.map
.gitignore
tsconfig.json
vsc-extension-quickstart.md

+ 5
- 0
CHANGELOG.md Datei anzeigen

@ -1,6 +1,11 @@
---
## Release Notes
### 1.1.1
- Allows `gitlens.showQuickRepoHistory` command to run without an open editor (falls back to the folder repository)
- Adds logging for tracking [#18](https://github.com/eamodio/vscode-gitlens/issues/18) - GitLens only displayed for some files
### 1.1.0
- Adds new `gitlens.showQuickFileHistory` command to show the file history in a quick-pick list (palette)

+ 14
- 14
package.json Datei anzeigen

@ -1,6 +1,6 @@
{
"name": "gitlens",
"version": "1.1.0",
"version": "1.1.1",
"author": {
"name": "Eric Amodio",
"email": "eamodio@gmail.com"
@ -379,6 +379,14 @@
"activationEvents": [
"*"
],
"scripts": {
"compile": "tsc -watch -p ./",
"lint": "tslint --project tslint.json",
"pack": "git clean -xdf && npm install && vsce package",
"postinstall": "node ./node_modules/vscode/bin/install",
"pub": "git clean -xdf --exclude=node_modules/ && npm install && vsce publish",
"vscode:prepublish": "tsc -p ./"
},
"dependencies": {
"ignore": "^3.2.0",
"lodash.debounce": "^4.0.8",
@ -390,20 +398,12 @@
"tmp": "^0.0.31"
},
"devDependencies": {
"@types/node": "^6.0.51",
"@types/mocha": "^2.2.33",
"@types/tmp": "^0.0.31",
"mocha": "^3.1.2",
"tslint": "^4.0.1",
"tslint": "^4.0.2",
"typescript": "^2.0.10",
"vscode": "^1.0.3",
"@types/node": "^6.0.50",
"@types/mocha": "^2.2.33",
"@types/tmp": "^0.0.31"
},
"scripts": {
"compile": "tsc -watch -p ./",
"lint": "tslint --project tslint.json",
"pack": "git clean -xdf && npm install && vsce package",
"postinstall": "node ./node_modules/vscode/bin/install",
"pub": "git clean -xdf --exclude=node_modules/ && npm install && vsce publish",
"vscode:prepublish": "tsc -p ./"
"vscode": "^1.0.3"
}
}

+ 2
- 0
src/gitCodeLensProvider.ts Datei anzeigen

@ -4,6 +4,7 @@ import { CancellationToken, CodeLens, CodeLensProvider, commands, DocumentSelect
import { BuiltInCommands, Commands, DocumentSchemes } from './constants';
import { CodeLensCommand, CodeLensLocation, IConfig, ICodeLensLanguageLocation } from './configuration';
import GitProvider, { GitCommit, GitUri, IGitBlame, IGitBlameLines } from './gitProvider';
import { Logger } from './logger';
import * as moment from 'moment';
export class GitRecentChangeCodeLens extends CodeLens {
@ -67,6 +68,7 @@ export default class GitCodeLensProvider implements CodeLensProvider {
if (!blame || !blame.lines.length) return lenses;
const symbols = values[1] as SymbolInformation[];
Logger.log('GitCodeLensProvider.provideCodeLenses:', `${symbols.length} symbol(s) found`);
symbols.forEach(sym => this._provideCodeLens(gitUri, document, sym, languageLocations, blame, lenses));
}

+ 2
- 9
tsconfig.json Datei anzeigen

@ -1,9 +1,6 @@
{
"compilerOptions": {
"lib": [
"es6",
"es2015"
],
"lib": [ "es6" ],
"module": "commonjs",
"noFallthroughCasesInSwitch": true,
"noImplicitAny": true,
@ -15,11 +12,7 @@
"rootDir": ".",
"sourceMap": true,
"strictNullChecks": false,
"target": "es6",
"typeRoots": [
"./node_modules/@types",
"./@types"
]
"target": "es6"
},
"exclude": [
"node_modules",

+ 0
- 33
vsc-extension-quickstart.md Datei anzeigen

@ -1,33 +0,0 @@
# Welcome to your first VS Code Extension
## What's in the folder
* This folder contains all of the files necessary for your extension
* `package.json` - this is the manifest file in which you declare your extension and command.
The sample plugin registers a command and defines its title and command name. With this information
VS Code can show the command in the command palette. It doesn’t yet need to load the plugin.
* `src/extension.ts` - this is the main file where you will provide the implementation of your command.
The file exports one function, `activate`, which is called the very first time your extension is
activated (in this case by executing the command). Inside the `activate` function we call `registerCommand`.
We pass the function containing the implementation of the command as the second parameter to
`registerCommand`.
## Get up and running straight away
* press `F5` to open a new window with your extension loaded
* run your command from the command palette by pressing (`Ctrl+Shift+P` or `Cmd+Shift+P` on Mac) and typing `Hello World`
* set breakpoints in your code inside `src/extension.ts` to debug your extension
* find output from your extension in the debug console
## Make changes
* you can relaunch the extension from the debug toolbar after changing code in `src/extension.ts`
* you can also reload (`Ctrl+R` or `Cmd+R` on Mac) the VS Code window with your extension to load your changes
## Explore the API
* you can open the full set of our API when you open the file `node_modules/vscode/vscode.d.ts`
## Run tests
* open the debug viewlet (`Ctrl+Shift+D` or `Cmd+Shift+D` on Mac) and from the launch configuration dropdown pick `Launch Tests`
* press `F5` to run the tests in a new window with your extension loaded
* see the output of the test result in the debug console
* make changes to `test/extension.test.ts` or create new test files inside the `test` folder
* by convention, the test runner will only consider files matching the name pattern `**.test.ts`
* you can create folders inside the `test` folder to structure your tests any way you want

Laden…
Abbrechen
Speichern