Skip to content

Commit

Permalink
rework scm, recover git extension
Browse files Browse the repository at this point in the history
Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
  • Loading branch information
akosyakov committed Jun 12, 2019
1 parent b6c0d4b commit 8379164
Show file tree
Hide file tree
Showing 53 changed files with 2,370 additions and 3,242 deletions.
1 change: 1 addition & 0 deletions packages/core/src/browser/context-menu-renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export function toAnchor(anchor: HTMLElement | { x: number, y: number }): Anchor
export const ContextMenuRenderer = Symbol('ContextMenuRenderer');
export interface ContextMenuRenderer {
render(options: RenderContextMenuOptions): void;
/** @deprecated since 0.7.2 pass `RenderContextMenuOptions` instead */
render(menuPath: MenuPath, anchor: Anchor, onHide?: () => void): void;
}

Expand Down
9 changes: 9 additions & 0 deletions packages/core/src/browser/resource-context-key.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

import { injectable, inject, postConstruct } from 'inversify';
import URI from '../common/uri';
import Uri from 'vscode-uri';
import { ContextKeyService, ContextKey } from './context-key-service';

@injectable()
Expand All @@ -24,20 +25,28 @@ export class ResourceContextKey {
@inject(ContextKeyService)
protected readonly contextKeyService: ContextKeyService;

protected resource: ContextKey<Uri>;
protected resourceSchemeKey: ContextKey<string>;
protected resourceFileName: ContextKey<string>;
protected resourceExtname: ContextKey<string>;
protected resourceLangId: ContextKey<string>;

@postConstruct()
protected init(): void {
this.resource = this.contextKeyService.createKey<Uri>('resource', undefined);
this.resourceSchemeKey = this.contextKeyService.createKey<string>('resourceScheme', undefined);
this.resourceFileName = this.contextKeyService.createKey<string>('resourceFilename', undefined);
this.resourceExtname = this.contextKeyService.createKey<string>('resourceExtname', undefined);
this.resourceLangId = this.contextKeyService.createKey<string>('resourceLangId', undefined);
}

get(): URI | undefined {
const codeUri = this.resource.get();
return codeUri && new URI(codeUri);
}

set(resourceUri: URI | undefined): void {
this.resource.set(resourceUri && resourceUri['codeUri']);
this.resourceSchemeKey.set(resourceUri && resourceUri.scheme);
this.resourceFileName.set(resourceUri && resourceUri.path.base);
this.resourceExtname.set(resourceUri && resourceUri.path.ext);
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/browser/shell/tab-bar-toolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export class TabBarToolbar extends ReactWidget {

protected renderMore(): React.ReactNode {
return !!this.more.size && <div key='__more__' className={TabBarToolbar.Styles.TAB_BAR_TOOLBAR_ITEM + ' enabled'}>
<div id='__more__' className='fa fa-ellipsis-h' onClick={this.showMoreContextMenu} title='More...' />
<div id='__more__' className='fa fa-ellipsis-h' onClick={this.showMoreContextMenu} title='More Actions...' />
</div>;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/browser/status-bar/status-bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { LabelParser, LabelIcon } from '../label-parser';

export interface StatusBarEntry {
/**
* For icons we use fontawesome. Get more information and the class names
* For icons we use octicons and fontawesome icons. octicons take precedence over fontawesome. Get more information and the class names
* here: http://fontawesome.io/icons/
* To set a text with icon use the following pattern in text string:
* $(fontawesomeClassName)
Expand Down
111 changes: 0 additions & 111 deletions packages/git/src/browser/dirty-diff/content-lines.ts

This file was deleted.

129 changes: 0 additions & 129 deletions packages/git/src/browser/dirty-diff/diff-computer.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
********************************************************************************/

import { inject, injectable } from 'inversify';
import { DirtyDiffDecorator } from '@theia/scm/lib/browser/dirty-diff/dirty-diff-decorator';
import { FrontendApplicationContribution, FrontendApplication } from '@theia/core/lib/browser';
import { DirtyDiffManager } from './dirty-diff-manager';
import { DirtyDiffDecorator } from './dirty-diff-decorator';

@injectable()
export class DirtyDiffContribution implements FrontendApplicationContribution {
Expand Down
68 changes: 0 additions & 68 deletions packages/git/src/browser/dirty-diff/dirty-diff-decorator.ts

This file was deleted.

Loading

0 comments on commit 8379164

Please sign in to comment.