Skip to content

Commit

Permalink
[filesystem] moved browser dependent filesystem-commands from common …
Browse files Browse the repository at this point in the history
…to browser.
  • Loading branch information
svenefftinge committed Apr 20, 2017
1 parent 4d922aa commit 102ae1b
Show file tree
Hide file tree
Showing 12 changed files with 21 additions and 23 deletions.
2 changes: 1 addition & 1 deletion src/application/browser/application-module.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ContainerModule, injectable, inject } from "inversify";

import { BrowserPopupService } from '../../../lib/application/browser/browser-popup-service';
import { BrowserPopupService } from '../browser/browser-popup-service';
import { SelectionService } from '../common/selection-service';
import { CommonCommandContribution, CommonMenuContribution } from '../common/commands-common';
import { TheiaApplication, TheiaPlugin } from './application';
Expand Down
2 changes: 1 addition & 1 deletion src/filesystem/browser/filesystem-client-module.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FileCommandContribution, FileMenuContribution } from '../common/file-system-commands';
import { FileCommandContribution, FileMenuContribution } from '../browser/filesystem-commands';
import {ContainerModule } from "inversify";
import {FileSystem} from "../common";
import {FileSystemClient} from "../common/messaging/filesystem-client";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { injectable, inject } from "inversify";

import { SelectionService, ClipboardService } from '../../application/common';
import { CommandContribution, CommandRegistry, CommandHandler } from "../../application/common/command";
import { ClipboardService, SelectionService } from '../../application/common';
import { PopupService } from '../../application/common';
import { CommandContribution, CommandHandler, CommandRegistry } from '../../application/common/command';
import { MAIN_MENU_BAR, MenuContribution, MenuModelRegistry } from '../../application/common/menu';
import { FileSystem } from "./file-system";
import { promptConfirmPopup, promptNamePopup } from '../browser/filesystem-popup-handlers';
import { FileSystem } from '../common/filesystem';
import { PathSelection } from '../common/filesystem-selection';
import { Path } from '../common/path';
import { inject, injectable } from 'inversify';
import { CommonCommands } from "../../application/common/commands-common";
import { Path } from "./path";
import { PathSelection } from "./fs-selection";
import { PopupService } from "../../application/common";
import { promptNamePopup, promptConfirmPopup } from "../browser/filesystem-popup-handlers";



export namespace Commands {
Expand Down
8 changes: 3 additions & 5 deletions src/filesystem/browser/filesystem-popup-handlers.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Path } from "../common/path";
import { FileSystem } from "../common/file-system";
import { FileSystem } from "../common/filesystem";
import { PopupService } from "../../application/common/popup-service";

export function promptNamePopup(commandId: string, pathFrom: Path, popupService: PopupService, fileSystem: FileSystem): void {
Expand Down Expand Up @@ -122,8 +122,6 @@ export function promptNamePopup(commandId: string, pathFrom: Path, popupService:
}

export function promptConfirmPopup(commandId: string, actionCallback: any, popupService: PopupService, fileSystem: FileSystem): void {
let submitButton: HTMLInputElement
let cancelButton: HTMLInputElement
popupService.createPopup({
id: commandId,
title: 'Confirm the action',
Expand All @@ -133,8 +131,8 @@ export function promptConfirmPopup(commandId: string, actionCallback: any, popup
<input class='popupButton main' id='popupConfirmSubmit' type=submit value='Confirm' />
</form>`,
initCallback: () => {
submitButton = <HTMLInputElement>document.getElementById('popupConfirmSubmit')
cancelButton = <HTMLInputElement>document.getElementById('popupConfirmCancel')
const submitButton = <HTMLInputElement>document.getElementById('popupConfirmSubmit')
const cancelButton = <HTMLInputElement>document.getElementById('popupConfirmCancel')

if (!submitButton || !cancelButton) {
return false
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions src/filesystem/common/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export * from './file-system';
export * from './filesystem';
export * from './path';
export * from './fs-selection';
export * from './filesystem-selection';
export * from './inmemory-module';
2 changes: 1 addition & 1 deletion src/filesystem/common/inmemory-module.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ContainerModule } from "inversify";
import { FileSystem } from "./file-system";
import { FileSystem } from "./filesystem";
import { InMemoryFileSystem } from "./inmemory";
import { Path } from "./path";

Expand Down
2 changes: 1 addition & 1 deletion src/filesystem/common/inmemory.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Path} from "./path";
import {FileSystem, FileChangeType, FileChange, FileChangeEvent, FileSystemWatcher} from "./file-system";
import {FileSystem, FileChangeType, FileChange, FileChangeEvent, FileSystemWatcher} from "./filesystem";
import {Disposable} from "../../application/common";

class InMemoryFileNode {
Expand Down
2 changes: 1 addition & 1 deletion src/filesystem/common/messaging/filesystem-client.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {MessageConnection, RequestType} from "vscode-jsonrpc";
import {FileSystem, FileSystemWatcher, FileChangeEvent, FileChangeType, FileChange} from "../file-system";
import {FileSystem, FileSystemWatcher, FileChangeEvent, FileChangeType, FileChange} from "../filesystem";
import {Path} from "../path";
import {Disposable, DisposableCollection} from "../../../application/common";
import {
Expand Down
2 changes: 1 addition & 1 deletion src/filesystem/common/messaging/filesystem-protocol.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { RequestType, NotificationType } from "vscode-jsonrpc";
import { FileChangeType } from "../file-system";
import { FileChangeType } from "../filesystem";

export interface FileChange {
path: string;
Expand Down
2 changes: 1 addition & 1 deletion src/navigator/browser/navigator-command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { injectable, inject } from "inversify";

import { CommandHandler, CommandContribution, CommandRegistry } from '../../application/common/command';
import { CONTEXT_MENU_PATH } from "./navigator-widget";
import { Commands } from '../../filesystem/common/file-system-commands';
import { Commands } from '../../filesystem/browser/filesystem-commands';
import { MenuContribution, MenuModelRegistry } from "../../application/common/menu";
import { FileSystem, Path } from "../../filesystem/common";
import { FileNavigatorModel } from "./navigator-model";
Expand Down

0 comments on commit 102ae1b

Please sign in to comment.