Skip to content

Commit

Permalink
Removing reliance on FrontendApplicationConfigProvider
Browse files Browse the repository at this point in the history
Signed-off-by: Bogdan Stolojan <petre.stolojan@arm.com>
  • Loading branch information
Bogdan Stolojan authored and kittaakos committed Mar 2, 2019
1 parent 9621100 commit 30298af
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
9 changes: 0 additions & 9 deletions dev-packages/application-package/src/application-props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,6 @@ export interface FrontendApplicationConfig extends ApplicationConfig {
*/
readonly applicationName: string;

/**
* The name of the newly created file. `Untitled` by default.
*/
readonly newFileName?: string;

/**
* The extension of the newly created file. `.txt` by default.
*/
readonly newFileExtension?: string;
}

/**
Expand Down
6 changes: 2 additions & 4 deletions packages/workspace/src/browser/workspace-commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import { FileSystem, FileStat } from '@theia/filesystem/lib/common/filesystem';
import { FileDialogService } from '@theia/filesystem/lib/browser';
import { SingleTextInputDialog, ConfirmDialog } from '@theia/core/lib/browser/dialogs';
import { OpenerService, OpenHandler, open, FrontendApplication } from '@theia/core/lib/browser';
import { FrontendApplicationConfigProvider } from '@theia/core/lib/browser/frontend-application-config-provider';
import { UriCommandHandler, UriAwareCommandHandler } from '@theia/core/lib/common/uri-command-handler';
import { WorkspaceService } from './workspace-service';
import { MessageService } from '@theia/core/lib/common/message-service';
Expand Down Expand Up @@ -349,10 +348,9 @@ export class WorkspaceCommandContribution implements CommandContribution {
}

protected getDefaultFileConfig(): { fileName: string, fileExtension: string } {
const { newFileExtension, newFileName } = FrontendApplicationConfigProvider.get();
return {
fileName: newFileName ? newFileName : 'Untitled',
fileExtension: newFileExtension ? newFileExtension : '.txt'
fileName: 'Untitled',
fileExtension: '.txt'
};
}

Expand Down

0 comments on commit 30298af

Please sign in to comment.