From 84bd4c827a9155d8267bbc6de848121ff8fdd606 Mon Sep 17 00:00:00 2001 From: jpinkney Date: Thu, 14 Jun 2018 16:51:51 -0400 Subject: [PATCH 1/2] Added external libraries feature Signed-off-by: jpinkney --- .../browser/che-theia-java-frontend-module.ts | 28 +- .../libraries/chelib-resource-provider.ts | 60 ++++ .../libraries/external-libraries-container.ts | 58 ++++ .../libraries/external-libraries-model.ts | 33 +++ .../libraries/external-libraries-tree.ts | 270 ++++++++++++++++++ .../libraries/external-libraries-widget.tsx | 58 ++++ che-theia-java-extension/tsconfig.json | 1 + yarn.lock | 103 ++++--- 8 files changed, 562 insertions(+), 49 deletions(-) create mode 100644 che-theia-java-extension/src/browser/libraries/chelib-resource-provider.ts create mode 100644 che-theia-java-extension/src/browser/libraries/external-libraries-container.ts create mode 100644 che-theia-java-extension/src/browser/libraries/external-libraries-model.ts create mode 100644 che-theia-java-extension/src/browser/libraries/external-libraries-tree.ts create mode 100644 che-theia-java-extension/src/browser/libraries/external-libraries-widget.tsx diff --git a/che-theia-java-extension/src/browser/che-theia-java-frontend-module.ts b/che-theia-java-extension/src/browser/che-theia-java-frontend-module.ts index a54ac45..f1bbc7b 100644 --- a/che-theia-java-extension/src/browser/che-theia-java-frontend-module.ts +++ b/che-theia-java-extension/src/browser/che-theia-java-frontend-module.ts @@ -13,7 +13,8 @@ import { JavaExtensionContribution } from './che-theia-java-contribution'; import { CommandContribution, - MenuContribution + MenuContribution, + ResourceResolver } from "@theia/core/lib/common"; import { ContainerModule } from 'inversify'; @@ -21,11 +22,17 @@ import { KeybindingContribution, KeybindingContext } from '@theia/core/lib/brows import '../../src/browser/styles/icons.css'; import { FileStructure } from './navigation/file-structure'; -import { FindImplementers } from './navigation/find-implementers'; import { JavaEditorTextFocusContext } from './java-keybinding-contexts'; -export default new ContainerModule((bind) => { +import { ExternalLibrariesWidget, EXTERNAL_LIBRARIES_ID } from './libraries/external-libraries-widget'; +import { createExternalLibrariesWidget } from './libraries/external-libraries-container'; +import { CheLibResourceResolver } from './libraries/chelib-resource-provider'; +import { FileNavigatorWidget } from '@theia/navigator/lib/browser'; + +import "../../src/browser/styles/icons.css"; +import { FindImplementers } from './navigation/find-implementers'; +export default new ContainerModule((bind, unbind, isBound) => { bind(CommandContribution).to(JavaExtensionContribution); bind(MenuContribution).to(JavaExtensionContribution); bind(KeybindingContribution).to(JavaExtensionContribution); @@ -42,4 +49,19 @@ export default new ContainerModule((bind) => { bind(KeybindingContext).to(JavaEditorTextFocusContext).inSingletonScope(); + bind(CheLibResourceResolver).toSelf().inSingletonScope(); + bind(ResourceResolver).toDynamicValue(ctx => ctx.container.get(CheLibResourceResolver)); + + if (isBound(FileNavigatorWidget)) { + unbind(FileNavigatorWidget); + } + + bind(ExternalLibrariesWidget).toDynamicValue(ctx => { + return createExternalLibrariesWidget(ctx.container) + }); + + bind(WidgetFactory).toDynamicValue(context => ({ + id: EXTERNAL_LIBRARIES_ID, + createWidget: () => context.container.get(ExternalLibrariesWidget) + })); }); diff --git a/che-theia-java-extension/src/browser/libraries/chelib-resource-provider.ts b/che-theia-java-extension/src/browser/libraries/chelib-resource-provider.ts new file mode 100644 index 0000000..af0a2ee --- /dev/null +++ b/che-theia-java-extension/src/browser/libraries/chelib-resource-provider.ts @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2012-2018 Red Hat, Inc. + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v2.0 + * which is available at http://www.eclipse.org/legal/epl-2.0.html + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Red Hat, Inc. - initial API and implementation + */ + +import { injectable, inject } from "inversify"; +import URI from "@theia/core/lib/common/uri"; +import { Resource, ResourceResolver } from '@theia/core/lib/common'; +import { ClassFileContentsRequest } from '@theia/java/lib/browser'; +import { LanguageClientProvider } from "@theia/languages/lib/browser/language-client-provider"; +import { ILanguageClient } from "@theia/languages/lib/common"; + +export class CheLibResource implements Resource { + + constructor( + public uri: URI, + protected readonly clientContribution: Promise + ) { } + + dispose(): void { + } + + readContents(options: { encoding?: string }): Promise { + const uri = this.uri.toString(); + return this.clientContribution.then(languageClient => { + if (languageClient) { + languageClient.sendRequest(ClassFileContentsRequest.type, { uri }).then(content => + content || '' + ) + } + return ''; + }); + } + +} + +@injectable() +export class CheLibResourceResolver implements ResourceResolver { + + constructor( + @inject(LanguageClientProvider) + protected readonly languageClientProvider: LanguageClientProvider + ) { } + + resolve(uri: URI): CheLibResource { + if (!(uri.scheme === "chelib")) { + throw new Error("The given URI is not a valid Chelib uri: " + uri); + } + let javaClient = this.languageClientProvider.getLanguageClient("java"); + return new CheLibResource(uri, javaClient); + } + +} diff --git a/che-theia-java-extension/src/browser/libraries/external-libraries-container.ts b/che-theia-java-extension/src/browser/libraries/external-libraries-container.ts new file mode 100644 index 0000000..d4d3bc7 --- /dev/null +++ b/che-theia-java-extension/src/browser/libraries/external-libraries-container.ts @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2012-2018 Red Hat, Inc. + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v2.0 + * which is available at http://www.eclipse.org/legal/epl-2.0.html + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Red Hat, Inc. - initial API and implementation + */ + +import { Container, interfaces } from 'inversify'; +import { TreeModel, TreeProps, defaultTreeProps, Tree, TreeDecoratorService } from "@theia/core/lib/browser"; +import { createFileTreeContainer, FileTreeModel, FileTree } from '@theia/filesystem/lib/browser'; +import { ExternalLibrariesWidget } from './external-libraries-widget'; +import { NavigatorDecoratorService, NavigatorTreeDecorator } from '@theia/navigator/lib/browser'; +import { bindContributionProvider } from '@theia/core'; +import { FileNavigatorSearch } from '@theia/navigator/lib/browser/navigator-search'; +import { FileNavigatorTree } from '@theia/navigator/lib/browser/navigator-tree'; +import { ExternalLibrariesTree } from './external-libraries-tree'; +import { ExternalLibraryModel } from './external-libraries-model'; + +export const FILE_NAVIGATOR_PROPS = { + ...defaultTreeProps, + contextMenuPath: ['navigator-context-menu'], + multiSelect: false +}; + +export function createExternalLibrariesContainer(parent: interfaces.Container): Container { + const child = createFileTreeContainer(parent); + + child.unbind(FileTree); + child.bind(FileNavigatorTree).toSelf(); + child.bind(ExternalLibrariesTree).toSelf(); + child.rebind(Tree).toDynamicValue(ctx => ctx.container.get(ExternalLibrariesTree)); + + child.unbind(FileTreeModel); + child.bind(ExternalLibraryModel).toSelf(); + child.rebind(TreeModel).toDynamicValue(ctx => ctx.container.get(ExternalLibraryModel)); + + child.bind(ExternalLibrariesWidget).toSelf(); + + child.rebind(TreeProps).toConstantValue(FILE_NAVIGATOR_PROPS); + + child.bind(NavigatorDecoratorService).toSelf().inSingletonScope(); + child.rebind(TreeDecoratorService).toDynamicValue(ctx => ctx.container.get(NavigatorDecoratorService)).inSingletonScope(); + bindContributionProvider(child, NavigatorTreeDecorator); + + child.bind(FileNavigatorSearch).toSelf().inSingletonScope(); + child.bind(NavigatorTreeDecorator).toService(FileNavigatorSearch); + + return child; +} + +export function createExternalLibrariesWidget(parent: interfaces.Container): ExternalLibrariesWidget { + return createExternalLibrariesContainer(parent).get(ExternalLibrariesWidget); +} diff --git a/che-theia-java-extension/src/browser/libraries/external-libraries-model.ts b/che-theia-java-extension/src/browser/libraries/external-libraries-model.ts new file mode 100644 index 0000000..ef1cac1 --- /dev/null +++ b/che-theia-java-extension/src/browser/libraries/external-libraries-model.ts @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2012-2018 Red Hat, Inc. + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v2.0 + * which is available at http://www.eclipse.org/legal/epl-2.0.html + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Red Hat, Inc. - initial API and implementation + */ + +import { injectable, inject } from 'inversify'; +import { OpenerService, open, TreeNode } from '@theia/core/lib/browser'; +import { ExternalLibrariesTree, JarFileNode } from './external-libraries-tree'; +import URI from '@theia/core/lib/common/uri'; +import { FileNavigatorModel } from '@theia/navigator/lib/browser'; + +@injectable() +export class ExternalLibraryModel extends FileNavigatorModel { + + @inject(OpenerService) protected readonly openerService!: OpenerService; + @inject(ExternalLibrariesTree) readonly tree!: ExternalLibrariesTree; + + protected doOpenNode(node: TreeNode): void { + if (JarFileNode.is(node)) { + open(this.openerService, new URI(node.jarEntry.uri)); + } else { + super.doOpenNode(node); + } + } + +} diff --git a/che-theia-java-extension/src/browser/libraries/external-libraries-tree.ts b/che-theia-java-extension/src/browser/libraries/external-libraries-tree.ts new file mode 100644 index 0000000..61a0efa --- /dev/null +++ b/che-theia-java-extension/src/browser/libraries/external-libraries-tree.ts @@ -0,0 +1,270 @@ +/* + * Copyright (c) 2012-2018 Red Hat, Inc. + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v2.0 + * which is available at http://www.eclipse.org/legal/epl-2.0.html + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Red Hat, Inc. - initial API and implementation + */ + +import { injectable, inject } from 'inversify'; +import { CompositeTreeNode, TreeNode, SelectableTreeNode, ExpandableTreeNode } from '@theia/core/lib/browser'; +import { LanguageClientProvider } from '@theia/languages/lib/browser/language-client-provider'; +import { ExecuteCommandRequest } from 'monaco-languageclient/lib'; +import { ILanguageClient } from '@theia/languages/lib/common'; +import { GET_EXTERNAL_LIBRARIES_COMMAND, GET_LIBRARY_CHILDREN_COMMAND, GET_EXTERNAL_LIBRARIES_CHILDREN_COMMAND } from '../che-ls-jdt-commands'; +import { FileNavigatorTree } from '@theia/navigator/lib/browser/navigator-tree'; + +@injectable() +export class ExternalLibrariesTree extends FileNavigatorTree { + + @inject(LanguageClientProvider) + protected readonly languageClientProvider!: LanguageClientProvider; + + async resolveChildren(parent: CompositeTreeNode): Promise { + + if (!parent.parent) { + return super.resolveChildren(parent).then((nodes) => { + let isJavaProject = nodes.filter(node => node.id.endsWith("pom.xml") || node.id.endsWith(".gradle")).length >= 1; + if (isJavaProject) { + const libNode = LibraryNode.create(parent.id, parent); + super.addNode(libNode); + return nodes.concat([libNode]); + } + return nodes; + }); + + } + + if(isJavaNode(parent) && !JarFileNode.is(parent)) { + const javaClient = await this.languageClientProvider.getLanguageClient("java"); + + if(!javaClient) { + return Promise.resolve([]); + } + + if (LibraryNode.is(parent)) { + return LibraryNode.doRequest(parent, javaClient); + } else if (JarNode.is(parent)) { + return JarNode.doRequest(parent, javaClient); + } else if (JarFolderNode.is(parent)) { + return JarFolderNode.doRequest(parent, javaClient); + } + } + + return super.resolveChildren(parent); + } + +} + +export function isJavaNode(node: TreeNode) { + return !!node && 'projectURI' in node; +} + +export enum EntryType { + FOLDER = "FOLDER", + PACKAGE = "PACKAGE", + FILE = "FILE", + CLASS_FILE = "CLASS_FILE" +} + +export interface LibraryNode extends SelectableTreeNode, ExpandableTreeNode, CompositeTreeNode { + projectURI: string; +} + +export interface JarNode extends SelectableTreeNode, ExpandableTreeNode, CompositeTreeNode { + jar: Jar; + projectURI: string; +} + +export interface JarFolderNode extends SelectableTreeNode, ExpandableTreeNode, CompositeTreeNode { + jarEntry: JarEntry; + nodeID: string; + projectURI: string; +} + +export interface JarFileNode extends SelectableTreeNode { + jarEntry: JarEntry; + nodeID: string; + projectURI: string; + leaf: boolean; +} + +export namespace LibraryNode { + export function is(node: TreeNode | undefined): node is LibraryNode { + return !!node && 'projectURI' in node && !('jar' in node) && !('jarEntry' in node); + } + + export function create(projectURI: string, parent?: TreeNode): LibraryNode { + const id = "LibraryNode"+projectURI; + return { + id, + name: "External Libraries", + projectURI, + parent, + visible: true, + expanded: false, + selected: false, + children: [], + icon: "java-externalLibraries-icon" + }; + } + + export async function doRequest(parent: Readonly, javaClient: ILanguageClient): Promise { + const result = await javaClient.sendRequest(ExecuteCommandRequest.type, { + command: GET_EXTERNAL_LIBRARIES_COMMAND, + arguments: [ + { + projectUri: parent.projectURI + } + ] + }); + + const jarNodeArr: Array = []; + for (const jar of result as Array) { + const newJarNode = JarNode.create(jar, parent); + jarNodeArr.push(newJarNode); + } + return jarNodeArr; + } + +} + +export namespace JarNode { + export function is(node: TreeNode | undefined): node is JarNode { + return !!node && 'projectURI' in node && 'jar' in node; + } + + export function create(jar: Jar, parent: Readonly): JarNode { + const id = "jarNode-" + jar.name + "-" + jar.id; + return { + id, + name: jar.name, + jar, + projectURI: parent.projectURI, + parent, + visible: true, + expanded: false, + selected: false, + children: [], + icon: "java-jar-icon" + }; + } + + export async function doRequest(parent: Readonly, javaClient: ILanguageClient): Promise { + const result = await javaClient.sendRequest(ExecuteCommandRequest.type, { + command: GET_LIBRARY_CHILDREN_COMMAND, + arguments: [ + { + projectUri: parent.projectURI, + nodeId: parent.jar.id + } + ] + }); + + const jarEntryNodeArr: Array = []; + for (const entry of result as Array) { + const entryType = entry["entryType"]; + if (EntryType.FOLDER === entryType + || EntryType.PACKAGE === entryType) { + jarEntryNodeArr.push(JarFolderNode.create(entry, parent.jar.id, parent)); + } else if (EntryType.FILE === entryType + || EntryType.CLASS_FILE === entryType) { + jarEntryNodeArr.push(JarFileNode.create(entry, parent)); + } + } + + return jarEntryNodeArr; + } + +} + +export interface Jar { + name: string; + id: string; +} + +export interface JarEntry { + name: string; + path: string; + entryType: string; + uri: string; +} + +export namespace JarFolderNode { + export function is(node: TreeNode | undefined): node is JarFolderNode { + return !!node && 'projectURI' in node && 'jarEntry' in node && !("leaf" in node); + } + + export function create(jarEntry: JarEntry, nodeID: string, parent: Readonly): JarFolderNode { + const id = "jarFolderNode-" + jarEntry.name + "-" + jarEntry.path + "-" + jarEntry.uri; + const icon = jarEntry.entryType === EntryType.FOLDER ? "java-folder-icon" : "java-package-icon"; + return { + id, + name: jarEntry.name, + jarEntry, + nodeID: nodeID, + projectURI: parent.projectURI, + parent, + visible: true, + expanded: false, + selected: false, + children: [], + icon: icon + }; + } + + export async function doRequest(parent: Readonly, javaClient: ILanguageClient): Promise { + const result = await javaClient.sendRequest(ExecuteCommandRequest.type, { + command: GET_EXTERNAL_LIBRARIES_CHILDREN_COMMAND, + arguments: [ + { + projectUri: parent.projectURI, + nodePath: parent.jarEntry.path, + nodeId: parent.nodeID + } + ] + }); + + const jarEntryNodeArr: Array = []; + for (const entry of result as Array) { + const entryType = entry["entryType"]; + if (EntryType.FOLDER === entryType + || EntryType.PACKAGE === entryType) { + jarEntryNodeArr.push(JarFolderNode.create(entry, parent.nodeID, parent)); + } else if (EntryType.FILE === entryType + || EntryType.CLASS_FILE === entryType) { + jarEntryNodeArr.push(JarFileNode.create(entry, parent)); + } + } + return jarEntryNodeArr; + } + +} + +export namespace JarFileNode { + export function is(node: TreeNode | undefined): node is JarFileNode { + return !!node && 'projectURI' in node && 'jarEntry' in node && 'leaf' in node; + } + + export function create(jarEntry: JarEntry, parent: Readonly): JarFileNode { + const id = "jarFileNode-" + jarEntry.name + "-" + jarEntry.path + "-" + jarEntry.uri; + const icon = jarEntry.entryType === EntryType.CLASS_FILE ? "java-class-icon" : "java-file-icon"; + return { + id, + name: jarEntry.name, + parent, + jarEntry, + leaf: true, + nodeID: parent.id, + projectURI: parent.projectURI, + visible: true, + selected: false, + icon: icon + }; + } + +} diff --git a/che-theia-java-extension/src/browser/libraries/external-libraries-widget.tsx b/che-theia-java-extension/src/browser/libraries/external-libraries-widget.tsx new file mode 100644 index 0000000..78535af --- /dev/null +++ b/che-theia-java-extension/src/browser/libraries/external-libraries-widget.tsx @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2012-2018 Red Hat, Inc. + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v2.0 + * which is available at http://www.eclipse.org/legal/epl-2.0.html + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Red Hat, Inc. - initial API and implementation + */ + +import { injectable, inject } from 'inversify'; +import { SelectionService, CommandService } from '@theia/core/lib/common'; +import { ContextMenuRenderer, TreeProps, LabelProvider, WidgetManager, TreeNode, NodeProps } from '@theia/core/lib/browser'; +import { WorkspaceService } from '@theia/workspace/lib/browser'; +import { ApplicationShell } from '@theia/core/lib/browser/shell/application-shell'; +import { FileSystem } from '@theia/filesystem/lib/common/filesystem'; +import { EditorManager } from '@theia/editor/lib/browser'; +import { FileNavigatorSearch } from '@theia/navigator/lib/browser/navigator-search'; +import { SearchBoxFactory } from '@theia/navigator/lib/browser/search-box'; +import { FileNavigatorWidget } from '@theia/navigator/lib/browser'; +import { ExternalLibraryModel } from './external-libraries-model'; +import * as React from "react"; + +export const EXTERNAL_LIBRARIES_ID = 'files'; +export const LABEL = 'Files'; +export const CLASS = 'theia-Files'; + +@injectable() +export class ExternalLibrariesWidget extends FileNavigatorWidget { + + constructor( + @inject(TreeProps) readonly props: TreeProps, + @inject(ContextMenuRenderer) contextMenuRenderer: ContextMenuRenderer, + @inject(CommandService) protected readonly commandService: CommandService, + @inject(SelectionService) protected readonly selectionService: SelectionService, + @inject(WorkspaceService) protected readonly workspaceService: WorkspaceService, + @inject(LabelProvider) protected readonly labelProvider: LabelProvider, + @inject(ApplicationShell) protected readonly shell: ApplicationShell, + @inject(FileSystem) protected readonly fileSystem: FileSystem, + @inject(ExternalLibraryModel) readonly model: ExternalLibraryModel, + @inject(WidgetManager) protected readonly widget: WidgetManager, + @inject(EditorManager) protected readonly editorManager: EditorManager, + @inject(FileNavigatorSearch) protected readonly navigatorSearch: FileNavigatorSearch, + @inject(SearchBoxFactory) protected readonly searchBoxFactory: SearchBoxFactory + ) { + super(props, model, contextMenuRenderer, commandService, selectionService, workspaceService, labelProvider, navigatorSearch, searchBoxFactory, shell, fileSystem); + this.id = EXTERNAL_LIBRARIES_ID; + this.title.label = LABEL; + this.addClass(CLASS); + } + + protected renderIcon(node: TreeNode, props: NodeProps): React.ReactNode { + return
; + } + +} diff --git a/che-theia-java-extension/tsconfig.json b/che-theia-java-extension/tsconfig.json index 5e00032..b329dd8 100644 --- a/che-theia-java-extension/tsconfig.json +++ b/che-theia-java-extension/tsconfig.json @@ -8,6 +8,7 @@ "module": "commonjs", "moduleResolution": "node", "target": "es5", + "jsx": "react", "lib": [ "es6", "dom" diff --git a/yarn.lock b/yarn.lock index 83d79f0..27760cb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -496,8 +496,8 @@ "@types/lodash" "*" "@types/lodash@*": - version "4.14.115" - resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.115.tgz#54d171b2ce12c058742443b5f6754760f701b8f9" + version "4.14.116" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.116.tgz#5ccf215653e3e8c786a58390751033a9adca0eb9" "@types/mime-types@^2.1.0": version "2.1.0" @@ -512,12 +512,12 @@ resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" "@types/node@*": - version "10.5.4" - resolved "https://registry.yarnpkg.com/@types/node/-/node-10.5.4.tgz#6eccc158504357d1da91434d75e86acde94bb10b" + version "10.5.7" + resolved "https://registry.yarnpkg.com/@types/node/-/node-10.5.7.tgz#960d9feb3ade2233bcc9843c918d740b4f78a7cf" "@types/node@^8.0.24": - version "8.10.22" - resolved "https://registry.yarnpkg.com/@types/node/-/node-8.10.22.tgz#c095d7c668908d48b95ae11fcc4a6d6b1c116a35" + version "8.10.24" + resolved "https://registry.yarnpkg.com/@types/node/-/node-8.10.24.tgz#302a8f0c00bd1bf364471b6687258617c5d410fc" "@types/prop-types@*": version "15.5.4" @@ -530,23 +530,24 @@ resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.2.tgz#fa8e1ad1d474688a757140c91de6dace6f4abc8d" "@types/react-dom@^16.0.6": - version "16.0.6" - resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-16.0.6.tgz#f1a65a4e7be8ed5d123f8b3b9eacc913e35a1a3c" + version "16.0.7" + resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-16.0.7.tgz#54d0f867a76b90597e8432030d297982f25c20ba" dependencies: "@types/node" "*" "@types/react" "*" "@types/react-virtualized@^9.18.3": - version "9.18.5" - resolved "https://registry.yarnpkg.com/@types/react-virtualized/-/react-virtualized-9.18.5.tgz#8c6b4e739e2fc4a601dd3e5e114dd0deeba56cc7" + version "9.18.6" + resolved "https://registry.yarnpkg.com/@types/react-virtualized/-/react-virtualized-9.18.6.tgz#d5c559bd003a6c58ba9e20d6cda0dde0342f59af" dependencies: "@types/prop-types" "*" "@types/react" "*" "@types/react@*", "@types/react@^16.4.1": - version "16.4.7" - resolved "https://registry.yarnpkg.com/@types/react/-/react-16.4.7.tgz#f33f6d759a7e1833befa15224d68942d178a5a3f" + version "16.4.8" + resolved "https://registry.yarnpkg.com/@types/react/-/react-16.4.8.tgz#ff0440429783df0927bdcd430fa1225f7c08cf36" dependencies: + "@types/prop-types" "*" csstype "^2.2.0" "@types/request@^2.0.3": @@ -974,8 +975,10 @@ asn1.js@^4.0.0: minimalistic-assert "^1.0.0" asn1@~0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" + version "0.2.4" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" + dependencies: + safer-buffer "~2.1.0" assert-plus@1.0.0, assert-plus@^1.0.0: version "1.0.0" @@ -1057,8 +1060,8 @@ aws-sign2@~0.7.0: resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" aws4@^1.2.1, aws4@^1.6.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.7.0.tgz#d4d0e9b9dbfca77bf08eeb0a8a471550fe39e289" + version "1.8.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f" babel-code-frame@^6.11.0, babel-code-frame@^6.26.0: version "6.26.0" @@ -1857,7 +1860,7 @@ buffer-alloc-unsafe@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz#bd7dc26ae2972d0eda253be061dba992349c19f0" -buffer-alloc@^1.1.0: +buffer-alloc@^1.1.0, buffer-alloc@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/buffer-alloc/-/buffer-alloc-1.2.0.tgz#890dd90d923a873e08e10e5fd51a57e5b7cce0ec" dependencies: @@ -1869,8 +1872,8 @@ buffer-fill@^1.0.0: resolved "https://registry.yarnpkg.com/buffer-fill/-/buffer-fill-1.0.0.tgz#f8f78b76789888ef39f205cd637f68e702122b2c" buffer-from@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.0.tgz#87fcaa3a298358e0ade6e442cfce840740d1ad04" + version "1.1.1" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" buffer-xor@^1.0.3: version "1.0.3" @@ -1998,8 +2001,8 @@ caniuse-api@^1.5.2: lodash.uniq "^4.5.0" caniuse-db@^1.0.30000529, caniuse-db@^1.0.30000634, caniuse-db@^1.0.30000639: - version "1.0.30000872" - resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000872.tgz#3f6e53b63d373768bf99e896133d66ef89c49999" + version "1.0.30000875" + resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000875.tgz#6f904fc89120de4029a9ca0f21d7ac3db89a0dce" caseless@~0.12.0: version "0.12.0" @@ -2202,8 +2205,8 @@ clone@^1.0.0, clone@^1.0.2: resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" clone@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.1.tgz#d217d1e961118e3ac9a4b8bba3285553bf647cdb" + version "2.1.2" + resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f" cloneable-readable@^1.0.0: version "1.1.2" @@ -2311,8 +2314,8 @@ command-join@^2.0.0: resolved "https://registry.yarnpkg.com/command-join/-/command-join-2.0.0.tgz#52e8b984f4872d952ff1bdc8b98397d27c7144cf" commander@^2.11.0: - version "2.16.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.16.0.tgz#f16390593996ceb4f3eeb020b31d78528f7f8a50" + version "2.17.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.17.1.tgz#bd77ab7de6de94205ceacc72f1716d29f20a77bf" commander@~2.13.0: version "2.13.0" @@ -3025,8 +3028,8 @@ electron-rebuild@^1.5.11: yargs "^7.0.2" electron-to-chromium@^1.2.7: - version "1.3.52" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.52.tgz#d2d9f1270ba4a3b967b831c40ef71fb4d9ab5ce0" + version "1.3.55" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.55.tgz#f150e10b20b77d9d41afcca312efe0c3b1a7fdce" electron@1.8.2-beta.5: version "1.8.2-beta.5" @@ -3487,8 +3490,8 @@ flatten@^1.0.2: resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.2.tgz#dae46a9d78fbe25292258cc1e780a41d95c03782" flow-parser@^0.*: - version "0.76.0" - resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.76.0.tgz#f7d4c4d26df74805c3a0babd5d8ea4c2cd57190b" + version "0.78.0" + resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.78.0.tgz#4ec829a97fa68cff6e97691dfff7b6ddebbc187c" flush-write-stream@^1.0.0: version "1.0.3" @@ -4504,8 +4507,10 @@ isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" isbinaryfile@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/isbinaryfile/-/isbinaryfile-3.0.2.tgz#4a3e974ec0cba9004d3fc6cde7209ea69368a621" + version "3.0.3" + resolved "https://registry.yarnpkg.com/isbinaryfile/-/isbinaryfile-3.0.3.tgz#5d6def3edebf6e8ca8cae9c30183a804b5f8be80" + dependencies: + buffer-alloc "^1.2.0" isexe@^2.0.0: version "2.0.0" @@ -5921,8 +5926,8 @@ path-key@^2.0.0, path-key@^2.0.1: resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" path-parse@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" + version "1.0.6" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" path-to-regexp@0.1.7: version "0.1.7" @@ -6286,8 +6291,8 @@ preserve@^0.2.0: resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" prettier@^1.5.3: - version "1.14.0" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.14.0.tgz#847c235522035fd988100f1f43cf20a7d24f9372" + version "1.14.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.14.1.tgz#4ead68e66b5ec9e771de311570c90da822f5a17a" pretty-bytes@^1.0.2: version "1.0.4" @@ -6497,8 +6502,8 @@ rc@^1.1.2, rc@^1.1.6, rc@^1.2.7: strip-json-comments "~2.0.1" react-dom@^16.4.1: - version "16.4.1" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.4.1.tgz#7f8b0223b3a5fbe205116c56deb85de32685dad6" + version "16.4.2" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.4.2.tgz#4afed569689f2c561d2b8da0b819669c38a0bda4" dependencies: fbjs "^0.8.16" loose-envify "^1.1.0" @@ -6521,8 +6526,8 @@ react-virtualized@^9.20.0: react-lifecycles-compat "^3.0.4" react@^16.4.1: - version "16.4.1" - resolved "https://registry.yarnpkg.com/react/-/react-16.4.1.tgz#de51ba5764b5dbcd1f9079037b862bd26b82fe32" + version "16.4.2" + resolved "https://registry.yarnpkg.com/react/-/react-16.4.2.tgz#2cd90154e3a9d9dd8da2991149fdca3c260e129f" dependencies: fbjs "^0.8.16" loose-envify "^1.1.0" @@ -6973,7 +6978,7 @@ safe-regex@^1.1.0: dependencies: ret "~0.1.10" -"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0: +"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" @@ -6981,9 +6986,15 @@ sax@^1.2.4, sax@~1.2.1: version "1.2.4" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" +<<<<<<< HEAD schema-utils@^0.4.0, schema-utils@^0.4.4, schema-utils@^0.4.5: version "0.4.5" resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-0.4.5.tgz#21836f0608aac17b78f9e3e24daff14a5ca13a3e" +======= +schema-utils@^0.4.0, schema-utils@^0.4.3, schema-utils@^0.4.4, schema-utils@^0.4.5: + version "0.4.7" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-0.4.7.tgz#ba74f597d2be2ea880131746ee17d0a093c68187" +>>>>>>> Added external libraries feature dependencies: ajv "^6.1.0" ajv-keywords "^3.1.0" @@ -7549,8 +7560,8 @@ tar@^2.0.0: inherits "2" tar@^4, tar@^4.0.0: - version "4.4.4" - resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.4.tgz#ec8409fae9f665a4355cc3b4087d0820232bb8cd" + version "4.4.6" + resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.6.tgz#63110f09c00b4e60ac8bcfe1bf3c8660235fbc9b" dependencies: chownr "^1.0.1" fs-minipass "^1.2.5" @@ -7968,8 +7979,8 @@ valid-filename@^2.0.1: filename-reserved-regex "^2.0.0" validate-npm-package-license@^3.0.1: - version "3.0.3" - resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz#81643bcbef1bdfecd4623793dc4648948ba98338" + version "3.0.4" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" dependencies: spdx-correct "^3.0.0" spdx-expression-parse "^3.0.0" @@ -8154,8 +8165,8 @@ webpack-sources@^1.0.1, webpack-sources@^1.1.0: source-map "~0.6.1" webpack@^4.0.0: - version "4.16.3" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.16.3.tgz#861be3176d81e7e3d71c66c8acc9bba35588b525" + version "4.16.5" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.16.5.tgz#29fb39462823d7eb8aefcab8b45f7f241db0d092" dependencies: "@webassemblyjs/ast" "1.5.13" "@webassemblyjs/helper-module-context" "1.5.13" From 48d7eb4c6b23ff26ca078b93cf1db47668342717 Mon Sep 17 00:00:00 2001 From: jpinkney Date: Wed, 3 Oct 2018 14:34:09 -0400 Subject: [PATCH 2/2] Fixup --- .../src/browser/che-ls-jdt-commands.ts | 2 +- .../browser/che-theia-java-contribution.ts | 2 +- .../browser/che-theia-java-frontend-module.ts | 10 +- che-theia-java-extension/src/browser/index.ts | 2 +- .../libraries/chelib-resource-provider.ts | 49 ++------ .../libraries/external-libraries-container.ts | 6 +- .../libraries/external-libraries-model.ts | 2 +- .../libraries/external-libraries-tree.ts | 19 ++-- .../libraries/external-libraries-widget.tsx | 10 +- .../src/browser/navigation/file-structure.ts | 8 +- .../browser/navigation/find-implementers.ts | 17 +-- .../src/browser/styles/icons.css | 2 +- che-theia-java-extension/src/common/index.ts | 4 +- che-theia-java-extension/src/node/index.ts | 4 +- package.json | 9 +- tslint.json | 81 ++++++++++++++ yarn.lock | 105 ++++++++---------- 17 files changed, 186 insertions(+), 146 deletions(-) create mode 100644 tslint.json diff --git a/che-theia-java-extension/src/browser/che-ls-jdt-commands.ts b/che-theia-java-extension/src/browser/che-ls-jdt-commands.ts index ac47060..c8208f4 100644 --- a/che-theia-java-extension/src/browser/che-ls-jdt-commands.ts +++ b/che-theia-java-extension/src/browser/che-ls-jdt-commands.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2018 Red Hat, Inc. + * Copyright (c) 2018 Red Hat, Inc. * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 * which is available at http://www.eclipse.org/legal/epl-2.0.html diff --git a/che-theia-java-extension/src/browser/che-theia-java-contribution.ts b/che-theia-java-extension/src/browser/che-theia-java-contribution.ts index c29a962..ec583d3 100644 --- a/che-theia-java-extension/src/browser/che-theia-java-contribution.ts +++ b/che-theia-java-extension/src/browser/che-theia-java-contribution.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2018 Red Hat, Inc. + * Copyright (c) 2018 Red Hat, Inc. * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 * which is available at http://www.eclipse.org/legal/epl-2.0.html diff --git a/che-theia-java-extension/src/browser/che-theia-java-frontend-module.ts b/che-theia-java-extension/src/browser/che-theia-java-frontend-module.ts index f1bbc7b..d12460d 100644 --- a/che-theia-java-extension/src/browser/che-theia-java-frontend-module.ts +++ b/che-theia-java-extension/src/browser/che-theia-java-frontend-module.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2018 Red Hat, Inc. + * Copyright (c) 2018 Red Hat, Inc. * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 * which is available at http://www.eclipse.org/legal/epl-2.0.html @@ -18,7 +18,7 @@ import { } from "@theia/core/lib/common"; import { ContainerModule } from 'inversify'; -import { KeybindingContribution, KeybindingContext } from '@theia/core/lib/browser'; +import { KeybindingContribution, KeybindingContext, WidgetFactory} from '@theia/core/lib/browser'; import '../../src/browser/styles/icons.css'; import { FileStructure } from './navigation/file-structure'; @@ -29,7 +29,7 @@ import { createExternalLibrariesWidget } from './libraries/external-libraries-co import { CheLibResourceResolver } from './libraries/chelib-resource-provider'; import { FileNavigatorWidget } from '@theia/navigator/lib/browser'; -import "../../src/browser/styles/icons.css"; +import '../../src/browser/styles/icons.css'; import { FindImplementers } from './navigation/find-implementers'; export default new ContainerModule((bind, unbind, isBound) => { @@ -54,10 +54,10 @@ export default new ContainerModule((bind, unbind, isBound) => { if (isBound(FileNavigatorWidget)) { unbind(FileNavigatorWidget); - } + } bind(ExternalLibrariesWidget).toDynamicValue(ctx => { - return createExternalLibrariesWidget(ctx.container) + return createExternalLibrariesWidget(ctx.container); }); bind(WidgetFactory).toDynamicValue(context => ({ diff --git a/che-theia-java-extension/src/browser/index.ts b/che-theia-java-extension/src/browser/index.ts index 9d029de..b47b137 100644 --- a/che-theia-java-extension/src/browser/index.ts +++ b/che-theia-java-extension/src/browser/index.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2018 Red Hat, Inc. + * Copyright (c) 2018 Red Hat, Inc. * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 * which is available at http://www.eclipse.org/legal/epl-2.0.html diff --git a/che-theia-java-extension/src/browser/libraries/chelib-resource-provider.ts b/che-theia-java-extension/src/browser/libraries/chelib-resource-provider.ts index af0a2ee..ccd5d71 100644 --- a/che-theia-java-extension/src/browser/libraries/chelib-resource-provider.ts +++ b/che-theia-java-extension/src/browser/libraries/chelib-resource-provider.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2018 Red Hat, Inc. + * Copyright (c) 2018 Red Hat, Inc. * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 * which is available at http://www.eclipse.org/legal/epl-2.0.html @@ -10,51 +10,24 @@ * Red Hat, Inc. - initial API and implementation */ -import { injectable, inject } from "inversify"; -import URI from "@theia/core/lib/common/uri"; -import { Resource, ResourceResolver } from '@theia/core/lib/common'; -import { ClassFileContentsRequest } from '@theia/java/lib/browser'; -import { LanguageClientProvider } from "@theia/languages/lib/browser/language-client-provider"; -import { ILanguageClient } from "@theia/languages/lib/common"; - -export class CheLibResource implements Resource { - - constructor( - public uri: URI, - protected readonly clientContribution: Promise - ) { } - - dispose(): void { - } - - readContents(options: { encoding?: string }): Promise { - const uri = this.uri.toString(); - return this.clientContribution.then(languageClient => { - if (languageClient) { - languageClient.sendRequest(ClassFileContentsRequest.type, { uri }).then(content => - content || '' - ) - } - return ''; - }); - } - -} +import { injectable, inject } from 'inversify'; +import URI from '@theia/core/lib/common/uri'; +import { ResourceResolver } from '@theia/core/lib/common'; +import { JavaClientContribution, JavaResource } from '@theia/java/lib/browser'; @injectable() export class CheLibResourceResolver implements ResourceResolver { constructor( - @inject(LanguageClientProvider) - protected readonly languageClientProvider: LanguageClientProvider + @inject(JavaClientContribution) + protected readonly javaClientContribution: JavaClientContribution ) { } - resolve(uri: URI): CheLibResource { - if (!(uri.scheme === "chelib")) { - throw new Error("The given URI is not a valid Chelib uri: " + uri); + resolve(uri: URI): JavaResource { + if (uri.scheme !== 'chelib') { + throw new Error(`The given URI is not a valid Chelib uri: ${uri}`); } - let javaClient = this.languageClientProvider.getLanguageClient("java"); - return new CheLibResource(uri, javaClient); + return new JavaResource(uri, this.javaClientContribution); } } diff --git a/che-theia-java-extension/src/browser/libraries/external-libraries-container.ts b/che-theia-java-extension/src/browser/libraries/external-libraries-container.ts index d4d3bc7..fc56f03 100644 --- a/che-theia-java-extension/src/browser/libraries/external-libraries-container.ts +++ b/che-theia-java-extension/src/browser/libraries/external-libraries-container.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2018 Red Hat, Inc. + * Copyright (c) 2018 Red Hat, Inc. * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 * which is available at http://www.eclipse.org/legal/epl-2.0.html @@ -16,7 +16,6 @@ import { createFileTreeContainer, FileTreeModel, FileTree } from '@theia/filesys import { ExternalLibrariesWidget } from './external-libraries-widget'; import { NavigatorDecoratorService, NavigatorTreeDecorator } from '@theia/navigator/lib/browser'; import { bindContributionProvider } from '@theia/core'; -import { FileNavigatorSearch } from '@theia/navigator/lib/browser/navigator-search'; import { FileNavigatorTree } from '@theia/navigator/lib/browser/navigator-tree'; import { ExternalLibrariesTree } from './external-libraries-tree'; import { ExternalLibraryModel } from './external-libraries-model'; @@ -47,9 +46,6 @@ export function createExternalLibrariesContainer(parent: interfaces.Container): child.rebind(TreeDecoratorService).toDynamicValue(ctx => ctx.container.get(NavigatorDecoratorService)).inSingletonScope(); bindContributionProvider(child, NavigatorTreeDecorator); - child.bind(FileNavigatorSearch).toSelf().inSingletonScope(); - child.bind(NavigatorTreeDecorator).toService(FileNavigatorSearch); - return child; } diff --git a/che-theia-java-extension/src/browser/libraries/external-libraries-model.ts b/che-theia-java-extension/src/browser/libraries/external-libraries-model.ts index ef1cac1..1269cec 100644 --- a/che-theia-java-extension/src/browser/libraries/external-libraries-model.ts +++ b/che-theia-java-extension/src/browser/libraries/external-libraries-model.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2018 Red Hat, Inc. + * Copyright (c) 2018 Red Hat, Inc. * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 * which is available at http://www.eclipse.org/legal/epl-2.0.html diff --git a/che-theia-java-extension/src/browser/libraries/external-libraries-tree.ts b/che-theia-java-extension/src/browser/libraries/external-libraries-tree.ts index 61a0efa..3bf00a8 100644 --- a/che-theia-java-extension/src/browser/libraries/external-libraries-tree.ts +++ b/che-theia-java-extension/src/browser/libraries/external-libraries-tree.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2018 Red Hat, Inc. + * Copyright (c) 2018 Red Hat, Inc. * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 * which is available at http://www.eclipse.org/legal/epl-2.0.html @@ -14,9 +14,9 @@ import { injectable, inject } from 'inversify'; import { CompositeTreeNode, TreeNode, SelectableTreeNode, ExpandableTreeNode } from '@theia/core/lib/browser'; import { LanguageClientProvider } from '@theia/languages/lib/browser/language-client-provider'; import { ExecuteCommandRequest } from 'monaco-languageclient/lib'; -import { ILanguageClient } from '@theia/languages/lib/common'; import { GET_EXTERNAL_LIBRARIES_COMMAND, GET_LIBRARY_CHILDREN_COMMAND, GET_EXTERNAL_LIBRARIES_CHILDREN_COMMAND } from '../che-ls-jdt-commands'; import { FileNavigatorTree } from '@theia/navigator/lib/browser/navigator-tree'; +import { ILanguageClient } from '@theia/languages/lib/browser'; @injectable() export class ExternalLibrariesTree extends FileNavigatorTree { @@ -26,23 +26,24 @@ export class ExternalLibrariesTree extends FileNavigatorTree { async resolveChildren(parent: CompositeTreeNode): Promise { - if (!parent.parent) { + if (this.root && parent.parent && this.root.id === parent.parent.id) { return super.resolveChildren(parent).then((nodes) => { - let isJavaProject = nodes.filter(node => node.id.endsWith("pom.xml") || node.id.endsWith(".gradle")).length >= 1; + const isJavaProject = nodes.filter(node => node.id.endsWith("pom.xml") || node.id.endsWith(".gradle")).length >= 1; if (isJavaProject) { - const libNode = LibraryNode.create(parent.id, parent); + const fixParentID = parent.id.startsWith("/") ? "file://" + parent.id : parent.id; + const libNode = LibraryNode.create(fixParentID, parent); super.addNode(libNode); return nodes.concat([libNode]); } return nodes; }); - } - if(isJavaNode(parent) && !JarFileNode.is(parent)) { + if (isJavaNode(parent) && !JarFileNode.is(parent)) { + const javaClient = await this.languageClientProvider.getLanguageClient("java"); - if(!javaClient) { + if (!javaClient) { return Promise.resolve([]); } @@ -99,7 +100,7 @@ export namespace LibraryNode { } export function create(projectURI: string, parent?: TreeNode): LibraryNode { - const id = "LibraryNode"+projectURI; + const id = "LibraryNode" + projectURI; return { id, name: "External Libraries", diff --git a/che-theia-java-extension/src/browser/libraries/external-libraries-widget.tsx b/che-theia-java-extension/src/browser/libraries/external-libraries-widget.tsx index 78535af..ed0a13c 100644 --- a/che-theia-java-extension/src/browser/libraries/external-libraries-widget.tsx +++ b/che-theia-java-extension/src/browser/libraries/external-libraries-widget.tsx @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2018 Red Hat, Inc. + * Copyright (c) 2018 Red Hat, Inc. * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 * which is available at http://www.eclipse.org/legal/epl-2.0.html @@ -17,8 +17,6 @@ import { WorkspaceService } from '@theia/workspace/lib/browser'; import { ApplicationShell } from '@theia/core/lib/browser/shell/application-shell'; import { FileSystem } from '@theia/filesystem/lib/common/filesystem'; import { EditorManager } from '@theia/editor/lib/browser'; -import { FileNavigatorSearch } from '@theia/navigator/lib/browser/navigator-search'; -import { SearchBoxFactory } from '@theia/navigator/lib/browser/search-box'; import { FileNavigatorWidget } from '@theia/navigator/lib/browser'; import { ExternalLibraryModel } from './external-libraries-model'; import * as React from "react"; @@ -41,11 +39,9 @@ export class ExternalLibrariesWidget extends FileNavigatorWidget { @inject(FileSystem) protected readonly fileSystem: FileSystem, @inject(ExternalLibraryModel) readonly model: ExternalLibraryModel, @inject(WidgetManager) protected readonly widget: WidgetManager, - @inject(EditorManager) protected readonly editorManager: EditorManager, - @inject(FileNavigatorSearch) protected readonly navigatorSearch: FileNavigatorSearch, - @inject(SearchBoxFactory) protected readonly searchBoxFactory: SearchBoxFactory + @inject(EditorManager) protected readonly editorManager: EditorManager ) { - super(props, model, contextMenuRenderer, commandService, selectionService, workspaceService, labelProvider, navigatorSearch, searchBoxFactory, shell, fileSystem); + super(props, model, contextMenuRenderer, commandService, selectionService, workspaceService, shell, fileSystem); this.id = EXTERNAL_LIBRARIES_ID; this.title.label = LABEL; this.addClass(CLASS); diff --git a/che-theia-java-extension/src/browser/navigation/file-structure.ts b/che-theia-java-extension/src/browser/navigation/file-structure.ts index d3e65c7..db10a33 100644 --- a/che-theia-java-extension/src/browser/navigation/file-structure.ts +++ b/che-theia-java-extension/src/browser/navigation/file-structure.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2018 Red Hat, Inc. + * Copyright (c) 2018 Red Hat, Inc. * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 * which is available at http://www.eclipse.org/legal/epl-2.0.html @@ -134,9 +134,9 @@ export class FileStructure implements QuickOpenModel, CommandContribution, Keybi } /** - * Get a string (suitable to show to the user) representing the keyboard - * shortcut used to open the quick file open menu. - */ + * Get a string (suitable to show to the user) representing the keyboard + * shortcut used to open the quick file open menu. + */ private getKeyCommand(): string | undefined { const keyCommand = this.keybindingRegistry.getKeybindingsForCommand(this.command.id); if (keyCommand) { diff --git a/che-theia-java-extension/src/browser/navigation/find-implementers.ts b/che-theia-java-extension/src/browser/navigation/find-implementers.ts index 01e4e8f..86ec5c4 100644 --- a/che-theia-java-extension/src/browser/navigation/find-implementers.ts +++ b/che-theia-java-extension/src/browser/navigation/find-implementers.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2018 Red Hat, Inc. + * Copyright (c) 2018 Red Hat, Inc. * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 * which is available at http://www.eclipse.org/legal/epl-2.0 @@ -45,14 +45,14 @@ export class FindImplementers implements QuickOpenModel, CommandContribution, Ke id: 'java.command.implementation', label: 'Java: Open Implementation(s)' }; - + constructor( @inject(CommandRegistry) protected readonly commands: CommandRegistry, @inject(KeybindingRegistry) protected readonly keybindings: KeybindingRegistry, @inject(QuickOpenService) protected readonly quickOpenService: QuickOpenService, @inject(LanguageClientProvider) protected readonly languageClientProvider: LanguageClientProvider, @inject(EditorManager) protected readonly editorManager: EditorManager - ) { + ) { } async execute() { @@ -69,17 +69,18 @@ export class FindImplementers implements QuickOpenModel, CommandContribution, Ke } this.items = []; - implementersResponse.implementers.map((item: ImplementationItem) => this.items.push(new ImplementerQuickOpenItem(item.name, item.kind, item.location, this.editorManager))); + implementersResponse.implementers.map((item: ImplementationItem) => + this.items.push(new ImplementerQuickOpenItem(item.name, item.kind, item.location, this.editorManager))); - const itemNotFoundMessage = 'Found 0 implementations'; - const itemFoundMessage = `Found ${implementersResponse.implementers.length} implementation(s) for ${implementersResponse.searchedElement}`; + const itemNotFoundMessage = 'Found 0 implementations'; + const itemFoundMessage = `Found ${implementersResponse.implementers.length} implementation(s) for ${implementersResponse.searchedElement}`; this.quickOpenService.open(this, { placeholder: this.items.length > 0 ? itemFoundMessage : itemNotFoundMessage }); } - + } - + isEnabled(): boolean { return !!this.editorManager.currentEditor; } diff --git a/che-theia-java-extension/src/browser/styles/icons.css b/che-theia-java-extension/src/browser/styles/icons.css index 7fa8958..af4ab65 100644 --- a/che-theia-java-extension/src/browser/styles/icons.css +++ b/che-theia-java-extension/src/browser/styles/icons.css @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2018 Red Hat, Inc. + * Copyright (c) 2018 Red Hat, Inc. * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 * which is available at http://www.eclipse.org/legal/epl-2.0.html diff --git a/che-theia-java-extension/src/common/index.ts b/che-theia-java-extension/src/common/index.ts index ec53aea..15ae030 100644 --- a/che-theia-java-extension/src/common/index.ts +++ b/che-theia-java-extension/src/common/index.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2018 Red Hat, Inc. + * Copyright (c) 2018 Red Hat, Inc. * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 * which is available at http://www.eclipse.org/legal/epl-2.0.html @@ -8,4 +8,4 @@ * * Contributors: * Red Hat, Inc. - initial API and implementation - */ \ No newline at end of file + */ diff --git a/che-theia-java-extension/src/node/index.ts b/che-theia-java-extension/src/node/index.ts index eb39590..7e32ea6 100644 --- a/che-theia-java-extension/src/node/index.ts +++ b/che-theia-java-extension/src/node/index.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2018 Red Hat, Inc. + * Copyright (c) 2018 Red Hat, Inc. * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 * which is available at http://www.eclipse.org/legal/epl-2.0.html @@ -10,4 +10,4 @@ * Red Hat, Inc. - initial API and implementation */ -export * from './java-backend-module'; \ No newline at end of file +export * from './java-backend-module'; diff --git a/package.json b/package.json index f7b12d2..daccf23 100644 --- a/package.json +++ b/package.json @@ -3,14 +3,17 @@ "scripts": { "prepare": "lerna run prepare", "rebuild:browser": "theia rebuild:browser", - "rebuild:electron": "theia rebuild:electron" + "rebuild:electron": "theia rebuild:electron", + "tslint-fix": "tslint --fix --project che-theia-java-extension", + "tslint": "tslint --project che-theia-java-extension" }, "devDependencies": { - "lerna": "2.4.0" + "lerna": "2.4.0", + "tslint": "5.10.0" }, "workspaces": [ "che-theia-java-extension", "browser-app", "electron-app" ] -} \ No newline at end of file +} diff --git a/tslint.json b/tslint.json new file mode 100644 index 0000000..911f5f6 --- /dev/null +++ b/tslint.json @@ -0,0 +1,81 @@ +{ + "defaultSeverity": "error", + "rules": { + "file-header": [ + true, + "SPDX-License-Identifier: EPL-2\\.0" + ], + "class-name": true, + "comment-format": [ + true, + "check-space" + ], + "curly": true, + "eofline": true, + "forin": true, + "indent": [ + true, + "spaces" + ], + "jsdoc-format": [ + true, + "check-multiline-start" + ], + "max-line-length": [ + true, + 180 + ], + "no-consecutive-blank-lines": true, + "no-shadowed-variable": true, + "no-string-throw": true, + "no-trailing-whitespace": true, + "no-var-keyword": true, + "one-line": [ + true, + "check-open-brace", + "check-catch", + "check-else", + "check-whitespace" + ], + "prefer-const": { + "options": [ + true, + { + "destructuring": "all" + } + ] + }, + "radix": true, + "semicolon": [ + true, + "always", + "ignore-interfaces" + ], + "trailing-comma": [ + false + ], + "triple-equals": [ + true, + "allow-null-check" + ], + "typedef-whitespace": [ + true, + { + "call-signature": "nospace", + "index-signature": "nospace", + "parameter": "nospace", + "property-declaration": "nospace", + "variable-declaration": "nospace" + } + ], + "variable-name": false, + "whitespace": [ + true, + "check-branch", + "check-decl", + "check-operator", + "check-separator", + "check-type" + ] + } +} \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 27760cb..fd2441c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -496,8 +496,8 @@ "@types/lodash" "*" "@types/lodash@*": - version "4.14.116" - resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.116.tgz#5ccf215653e3e8c786a58390751033a9adca0eb9" + version "4.14.115" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.115.tgz#54d171b2ce12c058742443b5f6754760f701b8f9" "@types/mime-types@^2.1.0": version "2.1.0" @@ -512,12 +512,12 @@ resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" "@types/node@*": - version "10.5.7" - resolved "https://registry.yarnpkg.com/@types/node/-/node-10.5.7.tgz#960d9feb3ade2233bcc9843c918d740b4f78a7cf" + version "10.5.4" + resolved "https://registry.yarnpkg.com/@types/node/-/node-10.5.4.tgz#6eccc158504357d1da91434d75e86acde94bb10b" "@types/node@^8.0.24": - version "8.10.24" - resolved "https://registry.yarnpkg.com/@types/node/-/node-8.10.24.tgz#302a8f0c00bd1bf364471b6687258617c5d410fc" + version "8.10.22" + resolved "https://registry.yarnpkg.com/@types/node/-/node-8.10.22.tgz#c095d7c668908d48b95ae11fcc4a6d6b1c116a35" "@types/prop-types@*": version "15.5.4" @@ -530,24 +530,23 @@ resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.2.tgz#fa8e1ad1d474688a757140c91de6dace6f4abc8d" "@types/react-dom@^16.0.6": - version "16.0.7" - resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-16.0.7.tgz#54d0f867a76b90597e8432030d297982f25c20ba" + version "16.0.6" + resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-16.0.6.tgz#f1a65a4e7be8ed5d123f8b3b9eacc913e35a1a3c" dependencies: "@types/node" "*" "@types/react" "*" "@types/react-virtualized@^9.18.3": - version "9.18.6" - resolved "https://registry.yarnpkg.com/@types/react-virtualized/-/react-virtualized-9.18.6.tgz#d5c559bd003a6c58ba9e20d6cda0dde0342f59af" + version "9.18.5" + resolved "https://registry.yarnpkg.com/@types/react-virtualized/-/react-virtualized-9.18.5.tgz#8c6b4e739e2fc4a601dd3e5e114dd0deeba56cc7" dependencies: "@types/prop-types" "*" "@types/react" "*" "@types/react@*", "@types/react@^16.4.1": - version "16.4.8" - resolved "https://registry.yarnpkg.com/@types/react/-/react-16.4.8.tgz#ff0440429783df0927bdcd430fa1225f7c08cf36" + version "16.4.7" + resolved "https://registry.yarnpkg.com/@types/react/-/react-16.4.7.tgz#f33f6d759a7e1833befa15224d68942d178a5a3f" dependencies: - "@types/prop-types" "*" csstype "^2.2.0" "@types/request@^2.0.3": @@ -975,10 +974,8 @@ asn1.js@^4.0.0: minimalistic-assert "^1.0.0" asn1@~0.2.3: - version "0.2.4" - resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" - dependencies: - safer-buffer "~2.1.0" + version "0.2.3" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" assert-plus@1.0.0, assert-plus@^1.0.0: version "1.0.0" @@ -1060,8 +1057,8 @@ aws-sign2@~0.7.0: resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" aws4@^1.2.1, aws4@^1.6.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f" + version "1.7.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.7.0.tgz#d4d0e9b9dbfca77bf08eeb0a8a471550fe39e289" babel-code-frame@^6.11.0, babel-code-frame@^6.26.0: version "6.26.0" @@ -1860,7 +1857,7 @@ buffer-alloc-unsafe@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz#bd7dc26ae2972d0eda253be061dba992349c19f0" -buffer-alloc@^1.1.0, buffer-alloc@^1.2.0: +buffer-alloc@^1.1.0: version "1.2.0" resolved "https://registry.yarnpkg.com/buffer-alloc/-/buffer-alloc-1.2.0.tgz#890dd90d923a873e08e10e5fd51a57e5b7cce0ec" dependencies: @@ -1872,8 +1869,8 @@ buffer-fill@^1.0.0: resolved "https://registry.yarnpkg.com/buffer-fill/-/buffer-fill-1.0.0.tgz#f8f78b76789888ef39f205cd637f68e702122b2c" buffer-from@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" + version "1.1.0" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.0.tgz#87fcaa3a298358e0ade6e442cfce840740d1ad04" buffer-xor@^1.0.3: version "1.0.3" @@ -2001,8 +1998,8 @@ caniuse-api@^1.5.2: lodash.uniq "^4.5.0" caniuse-db@^1.0.30000529, caniuse-db@^1.0.30000634, caniuse-db@^1.0.30000639: - version "1.0.30000875" - resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000875.tgz#6f904fc89120de4029a9ca0f21d7ac3db89a0dce" + version "1.0.30000872" + resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000872.tgz#3f6e53b63d373768bf99e896133d66ef89c49999" caseless@~0.12.0: version "0.12.0" @@ -2205,8 +2202,8 @@ clone@^1.0.0, clone@^1.0.2: resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" clone@^2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f" + version "2.1.1" + resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.1.tgz#d217d1e961118e3ac9a4b8bba3285553bf647cdb" cloneable-readable@^1.0.0: version "1.1.2" @@ -2314,8 +2311,8 @@ command-join@^2.0.0: resolved "https://registry.yarnpkg.com/command-join/-/command-join-2.0.0.tgz#52e8b984f4872d952ff1bdc8b98397d27c7144cf" commander@^2.11.0: - version "2.17.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.17.1.tgz#bd77ab7de6de94205ceacc72f1716d29f20a77bf" + version "2.16.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.16.0.tgz#f16390593996ceb4f3eeb020b31d78528f7f8a50" commander@~2.13.0: version "2.13.0" @@ -3028,8 +3025,8 @@ electron-rebuild@^1.5.11: yargs "^7.0.2" electron-to-chromium@^1.2.7: - version "1.3.55" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.55.tgz#f150e10b20b77d9d41afcca312efe0c3b1a7fdce" + version "1.3.52" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.52.tgz#d2d9f1270ba4a3b967b831c40ef71fb4d9ab5ce0" electron@1.8.2-beta.5: version "1.8.2-beta.5" @@ -3490,8 +3487,8 @@ flatten@^1.0.2: resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.2.tgz#dae46a9d78fbe25292258cc1e780a41d95c03782" flow-parser@^0.*: - version "0.78.0" - resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.78.0.tgz#4ec829a97fa68cff6e97691dfff7b6ddebbc187c" + version "0.76.0" + resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.76.0.tgz#f7d4c4d26df74805c3a0babd5d8ea4c2cd57190b" flush-write-stream@^1.0.0: version "1.0.3" @@ -4507,10 +4504,8 @@ isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" isbinaryfile@^3.0.2: - version "3.0.3" - resolved "https://registry.yarnpkg.com/isbinaryfile/-/isbinaryfile-3.0.3.tgz#5d6def3edebf6e8ca8cae9c30183a804b5f8be80" - dependencies: - buffer-alloc "^1.2.0" + version "3.0.2" + resolved "https://registry.yarnpkg.com/isbinaryfile/-/isbinaryfile-3.0.2.tgz#4a3e974ec0cba9004d3fc6cde7209ea69368a621" isexe@^2.0.0: version "2.0.0" @@ -5926,8 +5921,8 @@ path-key@^2.0.0, path-key@^2.0.1: resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" path-parse@^1.0.5: - version "1.0.6" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" + version "1.0.5" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" path-to-regexp@0.1.7: version "0.1.7" @@ -6291,8 +6286,8 @@ preserve@^0.2.0: resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" prettier@^1.5.3: - version "1.14.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.14.1.tgz#4ead68e66b5ec9e771de311570c90da822f5a17a" + version "1.14.0" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.14.0.tgz#847c235522035fd988100f1f43cf20a7d24f9372" pretty-bytes@^1.0.2: version "1.0.4" @@ -6502,8 +6497,8 @@ rc@^1.1.2, rc@^1.1.6, rc@^1.2.7: strip-json-comments "~2.0.1" react-dom@^16.4.1: - version "16.4.2" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.4.2.tgz#4afed569689f2c561d2b8da0b819669c38a0bda4" + version "16.4.1" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.4.1.tgz#7f8b0223b3a5fbe205116c56deb85de32685dad6" dependencies: fbjs "^0.8.16" loose-envify "^1.1.0" @@ -6526,8 +6521,8 @@ react-virtualized@^9.20.0: react-lifecycles-compat "^3.0.4" react@^16.4.1: - version "16.4.2" - resolved "https://registry.yarnpkg.com/react/-/react-16.4.2.tgz#2cd90154e3a9d9dd8da2991149fdca3c260e129f" + version "16.4.1" + resolved "https://registry.yarnpkg.com/react/-/react-16.4.1.tgz#de51ba5764b5dbcd1f9079037b862bd26b82fe32" dependencies: fbjs "^0.8.16" loose-envify "^1.1.0" @@ -6978,7 +6973,7 @@ safe-regex@^1.1.0: dependencies: ret "~0.1.10" -"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: +"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0: version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" @@ -6986,15 +6981,9 @@ sax@^1.2.4, sax@~1.2.1: version "1.2.4" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" -<<<<<<< HEAD schema-utils@^0.4.0, schema-utils@^0.4.4, schema-utils@^0.4.5: version "0.4.5" resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-0.4.5.tgz#21836f0608aac17b78f9e3e24daff14a5ca13a3e" -======= -schema-utils@^0.4.0, schema-utils@^0.4.3, schema-utils@^0.4.4, schema-utils@^0.4.5: - version "0.4.7" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-0.4.7.tgz#ba74f597d2be2ea880131746ee17d0a093c68187" ->>>>>>> Added external libraries feature dependencies: ajv "^6.1.0" ajv-keywords "^3.1.0" @@ -7560,8 +7549,8 @@ tar@^2.0.0: inherits "2" tar@^4, tar@^4.0.0: - version "4.4.6" - resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.6.tgz#63110f09c00b4e60ac8bcfe1bf3c8660235fbc9b" + version "4.4.4" + resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.4.tgz#ec8409fae9f665a4355cc3b4087d0820232bb8cd" dependencies: chownr "^1.0.1" fs-minipass "^1.2.5" @@ -7979,8 +7968,8 @@ valid-filename@^2.0.1: filename-reserved-regex "^2.0.0" validate-npm-package-license@^3.0.1: - version "3.0.4" - resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" + version "3.0.3" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz#81643bcbef1bdfecd4623793dc4648948ba98338" dependencies: spdx-correct "^3.0.0" spdx-expression-parse "^3.0.0" @@ -8165,8 +8154,8 @@ webpack-sources@^1.0.1, webpack-sources@^1.1.0: source-map "~0.6.1" webpack@^4.0.0: - version "4.16.5" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.16.5.tgz#29fb39462823d7eb8aefcab8b45f7f241db0d092" + version "4.16.3" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.16.3.tgz#861be3176d81e7e3d71c66c8acc9bba35588b525" dependencies: "@webassemblyjs/ast" "1.5.13" "@webassemblyjs/helper-module-context" "1.5.13" @@ -8495,4 +8484,4 @@ zip-dir@^1.0.2: resolved "https://registry.yarnpkg.com/zip-dir/-/zip-dir-1.0.2.tgz#253f907aead62a21acd8721d8b88032b2411c051" dependencies: async "^1.5.2" - jszip "^2.4.0" + jszip "^2.4.0" \ No newline at end of file