Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Bicker <jan.bicker@typefox.io>
  • Loading branch information
jbicker committed Apr 25, 2018
1 parent bd9c5c1 commit 43e34d2
Show file tree
Hide file tree
Showing 23 changed files with 98 additions and 82 deletions.
1 change: 1 addition & 0 deletions packages/core/src/browser/icons/CollapseAll.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/core/src/browser/icons/CollapseAll_inverse.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/core/src/browser/icons/Refresh.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/core/src/browser/icons/Refresh_inverse.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/core/src/browser/icons/case-sensitive-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/core/src/browser/icons/case-sensitive.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/core/src/browser/icons/clear-search-results.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/core/src/browser/icons/regex-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/core/src/browser/icons/regex.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/core/src/browser/icons/replace-all-inverse.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/core/src/browser/icons/replace-all.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/core/src/browser/icons/replace-inverse.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/core/src/browser/icons/replace.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/core/src/browser/icons/whole-word-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/core/src/browser/icons/whole-word.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import URI from "@theia/core/lib/common/uri";

export const MEMORY_TEXT = "mem-txt";

export class MemoryTextResource implements Resource {
export class InMemoryTextResource implements Resource {

constructor(readonly uri: URI) { }

Expand All @@ -23,11 +23,11 @@ export class MemoryTextResource implements Resource {
}

@injectable()
export class MemoryTextResourceResolver implements ResourceResolver {
export class InMemoryTextResourceResolver implements ResourceResolver {
resolve(uri: URI): Resource | Promise<Resource> {
if (uri.scheme !== MEMORY_TEXT) {
throw new Error(`Expected a URI with ${MEMORY_TEXT} scheme. Was: ${uri}.`);
}
return new MemoryTextResource(uri);
return new InMemoryTextResource(uri);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,11 @@ export class QuickSearchInWorkspace implements QuickOpenModel {
private currentSearchId: number = -1;
protected MAX_RESULTS = 100;

constructor(
@inject(QuickOpenService) protected readonly quickOpenService: QuickOpenService,
@inject(SearchInWorkspaceService) protected readonly searchInWorkspaceService: SearchInWorkspaceService,
@inject(OpenerService) protected readonly openerService: OpenerService,
@inject(LabelProvider) protected readonly labelProvider: LabelProvider,
@inject(ILogger) protected readonly logger: ILogger,
) { }
@inject(QuickOpenService) protected readonly quickOpenService: QuickOpenService;
@inject(SearchInWorkspaceService) protected readonly searchInWorkspaceService: SearchInWorkspaceService;
@inject(OpenerService) protected readonly openerService: OpenerService;
@inject(LabelProvider) protected readonly labelProvider: LabelProvider;
@inject(ILogger) protected readonly logger: ILogger;

isEnabled(): boolean {
return this.searchInWorkspaceService.isEnabled();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { injectable } from "inversify";

export namespace SearchInWorkspaceCommands {
export const OPEN_SIW_WIDGET = {
id: "open-siw-widget"
id: "search-in-workspace.open"
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { CommandContribution, MenuContribution, ResourceResolver } from "@theia/
import { SearchInWorkspaceWidget } from "./search-in-workspace-widget";
import { SearchInWorkspaceResultTreeWidget } from "./search-in-workspace-result-tree-widget";
import { SearchInWorkspaceFrontendContribution } from "./search-in-workspace-frontend-contribution";
import { MemoryTextResourceResolver } from "./memory-text-resource";
import { InMemoryTextResourceResolver } from "./in-memory-text-resource";

import "../../src/browser/styles/index.css";

Expand All @@ -28,9 +28,7 @@ export default new ContainerModule(bind => {

bind(SearchInWorkspaceFrontendContribution).toSelf().inSingletonScope();
for (const identifier of [CommandContribution, MenuContribution, KeybindingContribution]) {
bind(identifier).toDynamicValue(ctx =>
ctx.container.get(SearchInWorkspaceFrontendContribution)
).inSingletonScope();
bind(identifier).toService(SearchInWorkspaceFrontendContribution);
}

bind(QuickSearchInWorkspace).toSelf().inSingletonScope();
Expand All @@ -50,8 +48,8 @@ export default new ContainerModule(bind => {
return WebSocketConnectionProvider.createProxy(ctx.container, '/search-in-workspace', client);
}).inSingletonScope();

bind(MemoryTextResourceResolver).toSelf().inSingletonScope();
bind(ResourceResolver).toService(MemoryTextResourceResolver);
bind(InMemoryTextResourceResolver).toSelf().inSingletonScope();
bind(ResourceResolver).toService(InMemoryTextResourceResolver);
});

export function createSearchTreeWidget(parent: interfaces.Container): SearchInWorkspaceResultTreeWidget {
Expand Down
Loading

0 comments on commit 43e34d2

Please sign in to comment.