diff --git a/.gitignore b/.gitignore index c38fa4e..6bbccfc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ .idea *.iml +server/ecore-backend-server/target/ +server/target/ diff --git a/client/theia-ecore/src/browser/EcoreCommandContribution.ts b/client/theia-ecore/src/browser/EcoreCommandContribution.ts new file mode 100644 index 0000000..cddbfd5 --- /dev/null +++ b/client/theia-ecore/src/browser/EcoreCommandContribution.ts @@ -0,0 +1,208 @@ +/******************************************************************************** + * Copyright (c) 2019 EclipseSource and others. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the Eclipse + * Public License v. 2.0 are satisfied: GNU General Public License, version 2 + * with the GNU Classpath Exception which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + ********************************************************************************/ +import { + FrontendApplication, + open, + OpenerService, + QuickOpenItem, + QuickOpenMode, + QuickOpenModel, + QuickOpenOptions, + QuickOpenService +} from "@theia/core/lib/browser"; +import { Command, CommandContribution, CommandRegistry } from "@theia/core/lib/common/command"; +import { MessageService } from "@theia/core/lib/common/message-service"; +import { ProgressService } from "@theia/core/lib/common/progress-service"; +import { SelectionService } from "@theia/core/lib/common/selection-service"; +import URI from "@theia/core/lib/common/uri"; +import { UriAwareCommandHandler, UriCommandHandler } from "@theia/core/lib/common/uri-command-handler"; +import { EDITOR_CONTEXT_MENU } from "@theia/editor/lib/browser"; +import { FileDialogService } from "@theia/filesystem/lib/browser"; +import { FileStat, FileSystem } from "@theia/filesystem/lib/common/filesystem"; +import { NAVIGATOR_CONTEXT_MENU } from "@theia/navigator/lib/browser/navigator-contribution"; +import { WorkspaceService } from "@theia/workspace/lib/browser"; +import { inject, injectable } from "inversify"; + +import { FileGenServer } from "../common/generate-protocol"; + + + +export const EXAMPLE_NAVIGATOR = [...NAVIGATOR_CONTEXT_MENU, 'example']; +export const EXAMPLE_EDITOR = [...EDITOR_CONTEXT_MENU, 'example']; + + + +export const NEW_ECORE_FILE: Command = { + id: 'file.newEcoreFile', + category: 'File', + label: 'New Ecore-File', +}; + +@injectable() +export class EcoreCommandContribution implements CommandContribution { + + @inject(FileSystem) protected readonly fileSystem: FileSystem; + @inject(SelectionService) protected readonly selectionService: SelectionService; + @inject(OpenerService) protected readonly openerService: OpenerService; + @inject(FrontendApplication) protected readonly app: FrontendApplication; + @inject(MessageService) protected readonly messageService: MessageService; + @inject(FileDialogService) protected readonly fileDialogService: FileDialogService; + @inject(WorkspaceService) protected readonly workspaceService: WorkspaceService; + @inject(ProgressService) protected readonly progressService: ProgressService; + @inject(QuickOpenService) protected readonly quickOpenService: QuickOpenService; + @inject(FileGenServer) private readonly fileGenServer: FileGenServer; + + registerCommands(registry: CommandRegistry): void { + registry.registerCommand(NEW_ECORE_FILE, this.newWorkspaceRootUriAwareCommandHandler({ + execute: uri => this.getDirectory(uri).then(parent => { + if (parent) { + const parentUri = new URI(parent.uri); + + const createEcore = (name: string, nsPrefix: string, nsURI: string) => { + if (name) { + this.fileGenServer.generateEcore(name, nsPrefix, nsURI, parentUri.path.toString()).then(() => { + const ecorePath = parentUri.toString() + '/' + name + '.ecore'; + const fileUriEcore = new URI(ecorePath); + open(this.openerService, fileUriEcore); + }); + } + }; + + const showInput = (hint: string, prefix: string, onEnter: (result: string) => void) => { + const quickOpenModel: QuickOpenModel = { + onType(lookFor: string, acceptor: (items: QuickOpenItem[]) => void): void { + const dynamicItems: QuickOpenItem[] = []; + const suffix = "Press 'Enter' to confirm or 'Escape' to cancel."; + + dynamicItems.push(new SingleStringInputOpenItem( + `${prefix}: ${lookFor}. ${suffix}`, + () => onEnter(lookFor), + (mode: QuickOpenMode) => mode === QuickOpenMode.OPEN, + () => false + )); + + acceptor(dynamicItems); + } + }; + this.quickOpenService.open(quickOpenModel, this.getOptions(hint, false)); + }; + + showInput("Name", "Name of Ecore ", (nameOfEcore) => { + showInput("Prefix", "Prefix", (prefix) => { + showInput("URI", "URI:", (ecore_uri) => { + createEcore(nameOfEcore, prefix, ecore_uri); + }); + }); + }); + } + }) + })); + } + + protected withProgress(task: () => Promise): Promise { + return this.progressService.withProgress('', 'scm', task); + } + + protected newUriAwareCommandHandler(handler: UriCommandHandler): UriAwareCommandHandler { + return new UriAwareCommandHandler(this.selectionService, handler); + } + + protected newMultiUriAwareCommandHandler(handler: UriCommandHandler): UriAwareCommandHandler { + return new UriAwareCommandHandler(this.selectionService, handler, { multi: true }); + } + + protected newWorkspaceRootUriAwareCommandHandler(handler: UriCommandHandler): WorkspaceRootUriAwareCommandHandler { + return new WorkspaceRootUriAwareCommandHandler(this.workspaceService, this.selectionService, handler); + } + + protected async getDirectory(candidate: URI): Promise { + const stat = await this.fileSystem.getFileStat(candidate.toString()); + if (stat && stat.isDirectory) { + return stat; + } + return this.getParent(candidate); + } + + protected getParent(candidate: URI): Promise { + return this.fileSystem.getFileStat(candidate.parent.toString()); + } + + private getOptions(placeholder: string, fuzzyMatchLabel: boolean = true, onClose: (canceled: boolean) => void = () => { }): QuickOpenOptions { + return QuickOpenOptions.resolve({ + placeholder, + fuzzyMatchLabel, + fuzzySort: false, + onClose + }); + } +} + +export class WorkspaceRootUriAwareCommandHandler extends UriAwareCommandHandler { + + constructor( + protected readonly workspaceService: WorkspaceService, + protected readonly selectionService: SelectionService, + protected readonly handler: UriCommandHandler + ) { + super(selectionService, handler); + } + + public isEnabled(...args: any[]): boolean { + return super.isEnabled(...args) && !!this.workspaceService.tryGetRoots().length; + } + + public isVisible(...args: any[]): boolean { + return super.isVisible(...args) && !!this.workspaceService.tryGetRoots().length; + } + + protected getUri(...args: any[]): URI | undefined { + const uri = super.getUri(...args); + // If the URI is available, return it immediately. + if (uri) { + return uri; + } + // Return the first root if available. + if (!!this.workspaceService.tryGetRoots().length) { + return new URI(this.workspaceService.tryGetRoots()[0].uri); + } + return undefined; + } +} + +class SingleStringInputOpenItem extends QuickOpenItem { + + constructor( + private readonly label: string, + private readonly execute: (item: QuickOpenItem) => void = () => { }, + private readonly canRun: (mode: QuickOpenMode) => boolean = mode => mode === QuickOpenMode.OPEN, + private readonly canClose: (mode: QuickOpenMode) => boolean = mode => true) { + + super(); + } + + getLabel(): string { + return this.label; + } + + run(mode: QuickOpenMode): boolean { + if (!this.canRun(mode)) { + return false; + } + this.execute(this); + return this.canClose(mode); + } + +} diff --git a/client/theia-ecore/src/browser/frontend-extension.ts b/client/theia-ecore/src/browser/frontend-extension.ts index 9f3050b..68b1c13 100644 --- a/client/theia-ecore/src/browser/frontend-extension.ts +++ b/client/theia-ecore/src/browser/frontend-extension.ts @@ -14,22 +14,28 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ import { GLSPClientContribution } from "@glsp/theia-integration/lib/browser"; -import { FrontendApplicationContribution, OpenHandler, WidgetFactory } from "@theia/core/lib/browser"; +import { CommandContribution } from "@theia/core"; +import { + FrontendApplicationContribution, + OpenHandler, + WebSocketConnectionProvider, + WidgetFactory +} from "@theia/core/lib/browser"; import { ContainerModule, interfaces } from "inversify"; import { DiagramConfiguration, DiagramManager, DiagramManagerProvider } from "sprotty-theia/lib"; +import { FILEGEN_SERVICE_PATH, FileGenServer } from "../common/generate-protocol"; import { EcoreDiagramConfiguration } from "./diagram/ecore-diagram-configuration"; import { EcoreDiagramManager } from "./diagram/ecore-diagram-manager."; import { EcoreGLSPDiagramClient } from "./diagram/ecore-glsp-diagram-client"; import { EcoreGLSPClientContribution } from "./ecore-glsp--contribution"; +import { EcoreCommandContribution } from "./EcoreCommandContribution"; export default new ContainerModule((bind: interfaces.Bind, unbind: interfaces.Unbind, isBound: interfaces.IsBound, rebind: interfaces.Rebind) => { bind(EcoreGLSPClientContribution).toSelf().inSingletonScope(); bind(GLSPClientContribution).toService(EcoreGLSPClientContribution); - bind(EcoreGLSPDiagramClient).toSelf().inSingletonScope(); - bind(DiagramConfiguration).to(EcoreDiagramConfiguration).inSingletonScope(); bind(EcoreDiagramManager).toSelf().inSingletonScope(); bind(FrontendApplicationContribution).toService(EcoreDiagramManager); @@ -43,4 +49,9 @@ export default new ContainerModule((bind: interfaces.Bind, unbind: interfaces.Un }); }; }); + bind(CommandContribution).to(EcoreCommandContribution); + bind(FileGenServer).toDynamicValue(ctx => { + const connection = ctx.container.get(WebSocketConnectionProvider); + return connection.createProxy(FILEGEN_SERVICE_PATH); + }).inSingletonScope(); }); diff --git a/client/theia-ecore/src/common/generate-protocol.ts b/client/theia-ecore/src/common/generate-protocol.ts new file mode 100644 index 0000000..a373adb --- /dev/null +++ b/client/theia-ecore/src/common/generate-protocol.ts @@ -0,0 +1,23 @@ +/*! + * Copyright (C) 2019 EclipseSource and others. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the Eclipse + * Public License v. 2.0 are satisfied: GNU General Public License, version 2 + * with the GNU Classpath Exception which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ +import { JsonRpcServer } from "@theia/core/lib/common/messaging"; + +export const FileGenServer = Symbol('FileGenServer'); +export const FILEGEN_SERVICE_PATH = '/services/codegen'; + +export interface FileGenServer extends JsonRpcServer { + generateEcore(name: string, prefix: string, uri: string, path: string): Promise +} diff --git a/client/theia-ecore/src/node/backend-extension.ts b/client/theia-ecore/src/node/backend-extension.ts index 8a68d0b..2f8d55c 100644 --- a/client/theia-ecore/src/node/backend-extension.ts +++ b/client/theia-ecore/src/node/backend-extension.ts @@ -13,11 +13,22 @@ * * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ +import { ConnectionHandler, JsonRpcConnectionHandler } from "@theia/core"; +import { BackendApplicationContribution } from "@theia/core/lib/node"; import { LanguageServerContribution } from "@theia/languages/lib/node"; import { ContainerModule } from "inversify"; +import { FILEGEN_SERVICE_PATH, FileGenServer } from "../common/generate-protocol"; +import { EcoreFileGenServer } from "./ecore-file-generation"; import { EcoreGLServerContribution } from "./ecore-glsp-server-contribution"; + export default new ContainerModule(bind => { bind(LanguageServerContribution).to(EcoreGLServerContribution).inSingletonScope(); + bind(EcoreFileGenServer).toSelf().inSingletonScope(); + bind(BackendApplicationContribution).toService(EcoreFileGenServer); + bind(ConnectionHandler).toDynamicValue(ctx => + new JsonRpcConnectionHandler(FILEGEN_SERVICE_PATH, () => + ctx.container.get(EcoreFileGenServer)) + ).inSingletonScope(); }); diff --git a/client/theia-ecore/src/node/ecore-file-generation.ts b/client/theia-ecore/src/node/ecore-file-generation.ts new file mode 100644 index 0000000..2689520 --- /dev/null +++ b/client/theia-ecore/src/node/ecore-file-generation.ts @@ -0,0 +1,113 @@ +/******************************************************************************** + * Copyright (c) 2019 EclipseSource and others. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the Eclipse + * Public License v. 2.0 are satisfied: GNU General Public License, version 2 + * with the GNU Classpath Exception which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + ********************************************************************************/ +import { ILogger } from "@theia/core"; +import { BackendApplicationContribution } from "@theia/core/lib/node/backend-application"; +import { RawProcess, RawProcessFactory } from "@theia/process/lib/node/raw-process"; +import { Application } from "express"; +import { inject, injectable } from "inversify"; +import * as path from "path"; + +import { FileGenServer } from "../common/generate-protocol"; + +const os = require('os'); + +@injectable() +export class EcoreFileGenServer implements FileGenServer, BackendApplicationContribution { + + constructor( + @inject(RawProcessFactory) protected readonly processFactory: RawProcessFactory, + @inject(ILogger) private readonly logger: ILogger) { } + + generateEcore(name: string, prefix: string, uri: string, workspacePath: string): Promise { + const jarPath = path.resolve(__dirname, '..', '..', + 'src/server', 'ecore-backend-server-1.0-SNAPSHOT-jar-with-dependencies.jar'); + if (jarPath.length === 0) { + throw new Error('The EcoreGeneration.jar is not found. '); + } + + const command = 'java'; + const args: string[] = []; + let platformWorkspacePath = workspacePath; + if (os.platform() === 'win32') { + platformWorkspacePath = workspacePath.substr(1); + } + + args.push( + '-jar', jarPath, + '-name', name, + '-prefix', prefix, + '-uri', uri, + '-workspacePath', platformWorkspacePath + ); + + return new Promise(resolve => { + const process = this.spawnProcess(command, args); + if (process === undefined || process.process === undefined || process === null || process.process === null) { + resolve('Process not spawned'); + return; + } + + process.process.on('exit', (code: any) => { + switch (code) { + case 0: resolve('OK'); break; + case -10: resolve('Name Parameter missing'); break; + case -11: resolve('NsPrefix Parameter missing'); break; + case -12: resolve('NsURI Parameter missing'); break; + case -13: resolve('Workspace Path Parameter missing'); break; + case -20: resolve('Encoding not found, check Server Log!'); break; + case -30: resolve('IO Exception occurred, check Server Log!'); break; + default: resolve('UNKNOWN ERROR'); break; + } + }); + }); + } + + onStop(app?: Application): void { + this.dispose(); + } + + dispose(): void { + // do nothing + } + + setClient(): void { + // do nothing + } + + private spawnProcess(command: string, args?: string[]): RawProcess | undefined { + const rawProcess = this.processFactory({ command, args }); + if (rawProcess.process === undefined) { + return undefined; + } + rawProcess.process.on('error', this.onDidFailSpawnProcess.bind(this)); + const stderr = rawProcess.process.stderr; + if (stderr) { + stderr.on('data', this.logError.bind(this)); + } + return rawProcess; + } + + protected onDidFailSpawnProcess(error: Error): void { + this.logger.error(error); + } + + protected logError(data: string | Buffer) { + if (data) { + this.logger.error(`Ecore Gen: ${data}`); + } + } + +} diff --git a/client/theia-ecore/src/server/ecore-backend-server-1.0-SNAPSHOT-jar-with-dependencies.jar b/client/theia-ecore/src/server/ecore-backend-server-1.0-SNAPSHOT-jar-with-dependencies.jar new file mode 100644 index 0000000..f236b26 Binary files /dev/null and b/client/theia-ecore/src/server/ecore-backend-server-1.0-SNAPSHOT-jar-with-dependencies.jar differ diff --git a/server/.project b/server/.project index 872abed..de47803 100644 --- a/server/.project +++ b/server/.project @@ -1,25 +1,10 @@ - glsp-ecore + parent-pom - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - org.eclipse.m2e.core.maven2Builder @@ -27,8 +12,6 @@ - org.eclipse.jdt.core.javanature org.eclipse.m2e.core.maven2Nature - org.eclipse.pde.PluginNature diff --git a/server/.classpath b/server/ecore-backend-server/.classpath similarity index 71% rename from server/.classpath rename to server/ecore-backend-server/.classpath index 50471ee..71f5fef 100644 --- a/server/.classpath +++ b/server/ecore-backend-server/.classpath @@ -1,37 +1,42 @@ - + - + + - + - + - + + + + - - + + + diff --git a/server/ecore-backend-server/.project b/server/ecore-backend-server/.project new file mode 100644 index 0000000..e643fc9 --- /dev/null +++ b/server/ecore-backend-server/.project @@ -0,0 +1,23 @@ + + + ecore-backend-server + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + + diff --git a/server/ecore-backend-server/.settings/org.eclipse.core.resources.prefs b/server/ecore-backend-server/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..f9fe345 --- /dev/null +++ b/server/ecore-backend-server/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,4 @@ +eclipse.preferences.version=1 +encoding//src/main/java=UTF-8 +encoding//src/test/java=UTF-8 +encoding/=UTF-8 diff --git a/server/ecore-backend-server/.settings/org.eclipse.jdt.apt.core.prefs b/server/ecore-backend-server/.settings/org.eclipse.jdt.apt.core.prefs new file mode 100644 index 0000000..d4313d4 --- /dev/null +++ b/server/ecore-backend-server/.settings/org.eclipse.jdt.apt.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.apt.aptEnabled=false diff --git a/server/ecore-backend-server/.settings/org.eclipse.jdt.core.prefs b/server/ecore-backend-server/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..b11489f --- /dev/null +++ b/server/ecore-backend-server/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,9 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore +org.eclipse.jdt.core.compiler.processAnnotations=disabled +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.7 diff --git a/server/.settings/org.eclipse.m2e.core.prefs b/server/ecore-backend-server/.settings/org.eclipse.m2e.core.prefs similarity index 100% rename from server/.settings/org.eclipse.m2e.core.prefs rename to server/ecore-backend-server/.settings/org.eclipse.m2e.core.prefs diff --git a/server/ecore-backend-server/pom.xml b/server/ecore-backend-server/pom.xml new file mode 100644 index 0000000..5ba8d51 --- /dev/null +++ b/server/ecore-backend-server/pom.xml @@ -0,0 +1,117 @@ + + + + 4.0.0 + + com.eclipsesource.glsp + ecore-backend-server + 1.0-SNAPSHOT + + ecore-backend-server + + http://www.example.com + + + UTF-8 + 1.7 + 1.7 + + + + + junit + junit + 4.11 + test + + + org.eclipse.emf + org.eclipse.emf.ecore + 2.19.0 + + + org.eclipse.emf + org.eclipse.emf.ecore.xmi + 2.16.0 + + + + + + + maven-assembly-plugin + + + package + + single + + + + + + jar-with-dependencies + + + + com.eclipsesource.glsp.EcoreProvider + + + + + + + + + + maven-clean-plugin + 3.1.0 + + + + maven-resources-plugin + 3.0.2 + + + maven-compiler-plugin + 3.8.0 + + + maven-surefire-plugin + 2.22.1 + + + maven-jar-plugin + 3.0.2 + + + + true + com.eclipsesource.glsp.EcoreProvider + + + + + + maven-install-plugin + 2.5.2 + + + maven-deploy-plugin + 2.8.2 + + + + maven-site-plugin + 3.7.1 + + + maven-project-info-reports-plugin + 3.0.0 + + + + + + diff --git a/server/ecore-backend-server/src/main/java/com/eclipsesource/glsp/EcoreProvider.java b/server/ecore-backend-server/src/main/java/com/eclipsesource/glsp/EcoreProvider.java new file mode 100644 index 0000000..5c32471 --- /dev/null +++ b/server/ecore-backend-server/src/main/java/com/eclipsesource/glsp/EcoreProvider.java @@ -0,0 +1,75 @@ +package com.eclipsesource.glsp; + +import java.io.IOException; +import java.nio.file.Path; +import java.nio.file.Paths; + +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EcoreFactory; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.ResourceSet; +import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; +import org.eclipse.emf.ecore.xmi.XMLResource; +import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl; + +public class EcoreProvider { + public static void main(String[] args) throws IOException + { + String name = null; + String prefix = null; + String uri = null; + Path workspacePath = null; + for (int i = 0; i < args.length; i++) { + String arg = args[i]; + switch (arg) { + case "-name": + i++; + name = args[i]; + break; + case "-prefix": + i++; + prefix = args[i]; + break; + case "-uri": + i++; + uri = args[i]; + break; + case "-workspacePath": + i++; + workspacePath = Paths.get(args[i], name+".ecore"); + break; + } + } + + if (name == null) { + System.exit(-10); + } + if (prefix == null) { + System.exit(-11); + } + if (uri == null) { + System.exit(-12); + } + if (workspacePath == null) { + System.exit(-13); + } + + createEcore(name, prefix, uri, workspacePath); + } + + public static void createEcore(String name, String nsPrefix, String nsURI, Path workspacePath) throws IOException { + ResourceSet resourceSet = new ResourceSetImpl(); + resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put("*", new XMIResourceFactoryImpl()); + XMLResource resource = (XMLResource) resourceSet.createResource(URI.createFileURI(workspacePath.toString())); + + EPackage ePackage = EcoreFactory.eINSTANCE.createEPackage(); + ePackage.setName(name); + ePackage.setNsPrefix(nsPrefix); + ePackage.setNsURI(nsURI); + resource.setEncoding("UTF-8"); + resource.getContents().add(ePackage); + resource.save(null); + } + +} diff --git a/server/ecore-backend-server/src/test/java/com/eclipsesource/glsp/AppTest.java b/server/ecore-backend-server/src/test/java/com/eclipsesource/glsp/AppTest.java new file mode 100644 index 0000000..e558f56 --- /dev/null +++ b/server/ecore-backend-server/src/test/java/com/eclipsesource/glsp/AppTest.java @@ -0,0 +1,20 @@ +package com.eclipsesource.glsp; + +import static org.junit.Assert.assertTrue; + +import org.junit.Test; + +/** + * Unit test for simple App. + */ +public class AppTest +{ + /** + * Rigorous Test :-) + */ + @Test + public void shouldAnswerWithTrue() + { + assertTrue( true ); + } +} diff --git a/server/ecore-glsp/.classpath b/server/ecore-glsp/.classpath new file mode 100644 index 0000000..a5ffae7 --- /dev/null +++ b/server/ecore-glsp/.classpath @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/server/.gitignore b/server/ecore-glsp/.gitignore similarity index 100% rename from server/.gitignore rename to server/ecore-glsp/.gitignore diff --git a/server/ecore-glsp/.project b/server/ecore-glsp/.project new file mode 100644 index 0000000..872abed --- /dev/null +++ b/server/ecore-glsp/.project @@ -0,0 +1,34 @@ + + + glsp-ecore + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + org.eclipse.pde.PluginNature + + diff --git a/server/.settings/org.eclipse.core.resources.prefs b/server/ecore-glsp/.settings/org.eclipse.core.resources.prefs similarity index 100% rename from server/.settings/org.eclipse.core.resources.prefs rename to server/ecore-glsp/.settings/org.eclipse.core.resources.prefs diff --git a/server/ecore-glsp/.settings/org.eclipse.jdt.apt.core.prefs b/server/ecore-glsp/.settings/org.eclipse.jdt.apt.core.prefs new file mode 100644 index 0000000..d4313d4 --- /dev/null +++ b/server/ecore-glsp/.settings/org.eclipse.jdt.apt.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.apt.aptEnabled=false diff --git a/server/.settings/org.eclipse.jdt.core.prefs b/server/ecore-glsp/.settings/org.eclipse.jdt.core.prefs similarity index 87% rename from server/.settings/org.eclipse.jdt.core.prefs rename to server/ecore-glsp/.settings/org.eclipse.jdt.core.prefs index 2af1e7b..46235dc 100644 --- a/server/.settings/org.eclipse.jdt.core.prefs +++ b/server/ecore-glsp/.settings/org.eclipse.jdt.core.prefs @@ -4,5 +4,6 @@ org.eclipse.jdt.core.compiler.compliance=11 org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore +org.eclipse.jdt.core.compiler.processAnnotations=disabled org.eclipse.jdt.core.compiler.release=disabled org.eclipse.jdt.core.compiler.source=11 diff --git a/server/ecore-glsp/.settings/org.eclipse.m2e.core.prefs b/server/ecore-glsp/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/server/ecore-glsp/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/server/META-INF/MANIFEST.MF b/server/ecore-glsp/META-INF/MANIFEST.MF similarity index 100% rename from server/META-INF/MANIFEST.MF rename to server/ecore-glsp/META-INF/MANIFEST.MF diff --git a/server/build.properties b/server/ecore-glsp/build.properties similarity index 100% rename from server/build.properties rename to server/ecore-glsp/build.properties diff --git a/server/plugin.properties b/server/ecore-glsp/plugin.properties similarity index 100% rename from server/plugin.properties rename to server/ecore-glsp/plugin.properties diff --git a/server/plugin.xml b/server/ecore-glsp/plugin.xml similarity index 100% rename from server/plugin.xml rename to server/ecore-glsp/plugin.xml diff --git a/server/ecore-glsp/pom.xml b/server/ecore-glsp/pom.xml new file mode 100644 index 0000000..b6b0fb4 --- /dev/null +++ b/server/ecore-glsp/pom.xml @@ -0,0 +1,183 @@ + + 4.0.0 + com.eclipsesource.glsp + glsp-ecore + 0.0.2-SNAPSHOT + + + sonatype + Sonatype + https://oss.sonatype.org/content/groups/public + + + + UTF-8 + 11 + 11 + + + + org.eclipse.elk + org.eclipse.elk.core + 0.5.0 + + + org.eclipse.elk + org.eclipse.elk.alg.layered + 0.5.0 + + + com.eclipsesource.glsp + glsp-server + 1.2.0-SNAPSHOT + + + com.eclipsesource.glsp + glsp-layout + 1.2.0-SNAPSHOT + + + org.eclipse.emf + org.eclipse.emf.edit + 2.14.0 + + + + + + + src/main/resources + ${project.build.directory} + + log4j.properties + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 1.7 + + + add-source + generate-sources + + add-source + + + + src/main/java-gen + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + copy-dependencies + package + + copy-dependencies + + + ${project.build.directory}/libs + false + false + true + false + + + + + + org.apache.maven.plugins + maven-source-plugin + + + attach-sources + + jar + + + + + + com.googlecode.addjars-maven-plugin + addjars-maven-plugin + 1.0.5 + + + package + + add-jars + + + + + ${project.build.directory}/libs + + + + + + + + org.apache.maven.plugins + maven-shade-plugin + 3.0.0 + + + + com.eclipsesource.glsp.ecore.EcoreServerLauncher + + + + + *:* + + META-INF/INDEX.LIST + META-INF/*.SF + META-INF/*.DSA + META-INF/*.RSA + .options + .api_description + *.profile + *.html + about.* + about_files/* + plugin.xml + modeling32.png + systembundle.properties + profile.list + **/*._trace + **/*.g + **/*.tokens + **/*.mwe2 + **/*.xtext + **/*.xtextbin + + + + true + glsp + false + + + + package + + shade + + + + + + + \ No newline at end of file diff --git a/server/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/Diagram.java b/server/ecore-glsp/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/Diagram.java similarity index 100% rename from server/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/Diagram.java rename to server/ecore-glsp/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/Diagram.java diff --git a/server/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/Edge.java b/server/ecore-glsp/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/Edge.java similarity index 100% rename from server/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/Edge.java rename to server/ecore-glsp/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/Edge.java diff --git a/server/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/EnotationFactory.java b/server/ecore-glsp/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/EnotationFactory.java similarity index 100% rename from server/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/EnotationFactory.java rename to server/ecore-glsp/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/EnotationFactory.java diff --git a/server/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/EnotationPackage.java b/server/ecore-glsp/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/EnotationPackage.java similarity index 100% rename from server/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/EnotationPackage.java rename to server/ecore-glsp/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/EnotationPackage.java diff --git a/server/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/NotationElement.java b/server/ecore-glsp/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/NotationElement.java similarity index 100% rename from server/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/NotationElement.java rename to server/ecore-glsp/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/NotationElement.java diff --git a/server/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/SemanticProxy.java b/server/ecore-glsp/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/SemanticProxy.java similarity index 100% rename from server/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/SemanticProxy.java rename to server/ecore-glsp/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/SemanticProxy.java diff --git a/server/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/Shape.java b/server/ecore-glsp/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/Shape.java similarity index 100% rename from server/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/Shape.java rename to server/ecore-glsp/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/Shape.java diff --git a/server/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/impl/DiagramImpl.java b/server/ecore-glsp/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/impl/DiagramImpl.java similarity index 100% rename from server/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/impl/DiagramImpl.java rename to server/ecore-glsp/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/impl/DiagramImpl.java diff --git a/server/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/impl/EdgeImpl.java b/server/ecore-glsp/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/impl/EdgeImpl.java similarity index 100% rename from server/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/impl/EdgeImpl.java rename to server/ecore-glsp/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/impl/EdgeImpl.java diff --git a/server/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/impl/EnotationFactoryImpl.java b/server/ecore-glsp/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/impl/EnotationFactoryImpl.java similarity index 100% rename from server/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/impl/EnotationFactoryImpl.java rename to server/ecore-glsp/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/impl/EnotationFactoryImpl.java diff --git a/server/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/impl/EnotationPackageImpl.java b/server/ecore-glsp/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/impl/EnotationPackageImpl.java similarity index 100% rename from server/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/impl/EnotationPackageImpl.java rename to server/ecore-glsp/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/impl/EnotationPackageImpl.java diff --git a/server/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/impl/NotationElementImpl.java b/server/ecore-glsp/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/impl/NotationElementImpl.java similarity index 100% rename from server/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/impl/NotationElementImpl.java rename to server/ecore-glsp/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/impl/NotationElementImpl.java diff --git a/server/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/impl/SemanticProxyImpl.java b/server/ecore-glsp/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/impl/SemanticProxyImpl.java similarity index 100% rename from server/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/impl/SemanticProxyImpl.java rename to server/ecore-glsp/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/impl/SemanticProxyImpl.java diff --git a/server/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/impl/ShapeImpl.java b/server/ecore-glsp/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/impl/ShapeImpl.java similarity index 100% rename from server/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/impl/ShapeImpl.java rename to server/ecore-glsp/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/impl/ShapeImpl.java diff --git a/server/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/util/EnotationAdapterFactory.java b/server/ecore-glsp/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/util/EnotationAdapterFactory.java similarity index 100% rename from server/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/util/EnotationAdapterFactory.java rename to server/ecore-glsp/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/util/EnotationAdapterFactory.java diff --git a/server/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/util/EnotationSwitch.java b/server/ecore-glsp/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/util/EnotationSwitch.java similarity index 100% rename from server/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/util/EnotationSwitch.java rename to server/ecore-glsp/src/main/java-gen/com/eclipsesource/glsp/ecore/enotation/util/EnotationSwitch.java diff --git a/server/src/main/java/com/eclipsesource/glsp/ecore/EcoreDiagramConfiguration.java b/server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/EcoreDiagramConfiguration.java similarity index 100% rename from server/src/main/java/com/eclipsesource/glsp/ecore/EcoreDiagramConfiguration.java rename to server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/EcoreDiagramConfiguration.java diff --git a/server/src/main/java/com/eclipsesource/glsp/ecore/EcoreEditorContext.java b/server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/EcoreEditorContext.java similarity index 100% rename from server/src/main/java/com/eclipsesource/glsp/ecore/EcoreEditorContext.java rename to server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/EcoreEditorContext.java diff --git a/server/src/main/java/com/eclipsesource/glsp/ecore/EcoreFacade.java b/server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/EcoreFacade.java similarity index 100% rename from server/src/main/java/com/eclipsesource/glsp/ecore/EcoreFacade.java rename to server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/EcoreFacade.java diff --git a/server/src/main/java/com/eclipsesource/glsp/ecore/EcoreGLSPModule.java b/server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/EcoreGLSPModule.java similarity index 100% rename from server/src/main/java/com/eclipsesource/glsp/ecore/EcoreGLSPModule.java rename to server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/EcoreGLSPModule.java diff --git a/server/src/main/java/com/eclipsesource/glsp/ecore/EcoreLayoutEngine.java b/server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/EcoreLayoutEngine.java similarity index 100% rename from server/src/main/java/com/eclipsesource/glsp/ecore/EcoreLayoutEngine.java rename to server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/EcoreLayoutEngine.java diff --git a/server/src/main/java/com/eclipsesource/glsp/ecore/EcoreModelIndex.java b/server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/EcoreModelIndex.java similarity index 100% rename from server/src/main/java/com/eclipsesource/glsp/ecore/EcoreModelIndex.java rename to server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/EcoreModelIndex.java diff --git a/server/src/main/java/com/eclipsesource/glsp/ecore/EcoreRecordingCommand.java b/server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/EcoreRecordingCommand.java similarity index 100% rename from server/src/main/java/com/eclipsesource/glsp/ecore/EcoreRecordingCommand.java rename to server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/EcoreRecordingCommand.java diff --git a/server/src/main/java/com/eclipsesource/glsp/ecore/EcoreServerConfiguration.java b/server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/EcoreServerConfiguration.java similarity index 100% rename from server/src/main/java/com/eclipsesource/glsp/ecore/EcoreServerConfiguration.java rename to server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/EcoreServerConfiguration.java diff --git a/server/src/main/java/com/eclipsesource/glsp/ecore/EcoreServerLauncher.java b/server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/EcoreServerLauncher.java similarity index 100% rename from server/src/main/java/com/eclipsesource/glsp/ecore/EcoreServerLauncher.java rename to server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/EcoreServerLauncher.java diff --git a/server/src/main/java/com/eclipsesource/glsp/ecore/ResourceManager.java b/server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/ResourceManager.java similarity index 100% rename from server/src/main/java/com/eclipsesource/glsp/ecore/ResourceManager.java rename to server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/ResourceManager.java diff --git a/server/src/main/java/com/eclipsesource/glsp/ecore/actions/AttributeTypesAction.java b/server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/actions/AttributeTypesAction.java similarity index 100% rename from server/src/main/java/com/eclipsesource/glsp/ecore/actions/AttributeTypesAction.java rename to server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/actions/AttributeTypesAction.java diff --git a/server/src/main/java/com/eclipsesource/glsp/ecore/actions/EcoreActionProvider.java b/server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/actions/EcoreActionProvider.java similarity index 100% rename from server/src/main/java/com/eclipsesource/glsp/ecore/actions/EcoreActionProvider.java rename to server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/actions/EcoreActionProvider.java diff --git a/server/src/main/java/com/eclipsesource/glsp/ecore/actions/ReturnAttributeTypesAction.java b/server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/actions/ReturnAttributeTypesAction.java similarity index 100% rename from server/src/main/java/com/eclipsesource/glsp/ecore/actions/ReturnAttributeTypesAction.java rename to server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/actions/ReturnAttributeTypesAction.java diff --git a/server/src/main/java/com/eclipsesource/glsp/ecore/gmodel/AbstractGModelFactory.java b/server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/gmodel/AbstractGModelFactory.java similarity index 100% rename from server/src/main/java/com/eclipsesource/glsp/ecore/gmodel/AbstractGModelFactory.java rename to server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/gmodel/AbstractGModelFactory.java diff --git a/server/src/main/java/com/eclipsesource/glsp/ecore/gmodel/ClassifierNodeFactory.java b/server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/gmodel/ClassifierNodeFactory.java similarity index 100% rename from server/src/main/java/com/eclipsesource/glsp/ecore/gmodel/ClassifierNodeFactory.java rename to server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/gmodel/ClassifierNodeFactory.java diff --git a/server/src/main/java/com/eclipsesource/glsp/ecore/gmodel/GModelFactory.java b/server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/gmodel/GModelFactory.java similarity index 100% rename from server/src/main/java/com/eclipsesource/glsp/ecore/gmodel/GModelFactory.java rename to server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/gmodel/GModelFactory.java diff --git a/server/src/main/java/com/eclipsesource/glsp/ecore/gmodel/LabelFactory.java b/server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/gmodel/LabelFactory.java similarity index 100% rename from server/src/main/java/com/eclipsesource/glsp/ecore/gmodel/LabelFactory.java rename to server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/gmodel/LabelFactory.java diff --git a/server/src/main/java/com/eclipsesource/glsp/ecore/handler/EcoreComputedBoundsActionHandler.java b/server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/handler/EcoreComputedBoundsActionHandler.java similarity index 100% rename from server/src/main/java/com/eclipsesource/glsp/ecore/handler/EcoreComputedBoundsActionHandler.java rename to server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/handler/EcoreComputedBoundsActionHandler.java diff --git a/server/src/main/java/com/eclipsesource/glsp/ecore/handler/EcoreGetAttributeTypesActionHandler.java b/server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/handler/EcoreGetAttributeTypesActionHandler.java similarity index 100% rename from server/src/main/java/com/eclipsesource/glsp/ecore/handler/EcoreGetAttributeTypesActionHandler.java rename to server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/handler/EcoreGetAttributeTypesActionHandler.java diff --git a/server/src/main/java/com/eclipsesource/glsp/ecore/handler/EcoreOperationActionHandler.java b/server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/handler/EcoreOperationActionHandler.java similarity index 100% rename from server/src/main/java/com/eclipsesource/glsp/ecore/handler/EcoreOperationActionHandler.java rename to server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/handler/EcoreOperationActionHandler.java diff --git a/server/src/main/java/com/eclipsesource/glsp/ecore/handler/EcoreSaveModelActionHandler.java b/server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/handler/EcoreSaveModelActionHandler.java similarity index 100% rename from server/src/main/java/com/eclipsesource/glsp/ecore/handler/EcoreSaveModelActionHandler.java rename to server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/handler/EcoreSaveModelActionHandler.java diff --git a/server/src/main/java/com/eclipsesource/glsp/ecore/handler/EcoreUndoRedoActionHandler.java b/server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/handler/EcoreUndoRedoActionHandler.java similarity index 100% rename from server/src/main/java/com/eclipsesource/glsp/ecore/handler/EcoreUndoRedoActionHandler.java rename to server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/handler/EcoreUndoRedoActionHandler.java diff --git a/server/src/main/java/com/eclipsesource/glsp/ecore/model/EcoreModelFactory.java b/server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/model/EcoreModelFactory.java similarity index 100% rename from server/src/main/java/com/eclipsesource/glsp/ecore/model/EcoreModelFactory.java rename to server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/model/EcoreModelFactory.java diff --git a/server/src/main/java/com/eclipsesource/glsp/ecore/model/EcoreModelState.java b/server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/model/EcoreModelState.java similarity index 100% rename from server/src/main/java/com/eclipsesource/glsp/ecore/model/EcoreModelState.java rename to server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/model/EcoreModelState.java diff --git a/server/src/main/java/com/eclipsesource/glsp/ecore/model/EcoreModelStateProvider.java b/server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/model/EcoreModelStateProvider.java similarity index 100% rename from server/src/main/java/com/eclipsesource/glsp/ecore/model/EcoreModelStateProvider.java rename to server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/model/EcoreModelStateProvider.java diff --git a/server/src/main/java/com/eclipsesource/glsp/ecore/operationhandler/CreateClassifierChildNodeOperationHandler.java b/server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/operationhandler/CreateClassifierChildNodeOperationHandler.java similarity index 100% rename from server/src/main/java/com/eclipsesource/glsp/ecore/operationhandler/CreateClassifierChildNodeOperationHandler.java rename to server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/operationhandler/CreateClassifierChildNodeOperationHandler.java diff --git a/server/src/main/java/com/eclipsesource/glsp/ecore/operationhandler/CreateClassifierNodeOperationHandler.java b/server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/operationhandler/CreateClassifierNodeOperationHandler.java similarity index 100% rename from server/src/main/java/com/eclipsesource/glsp/ecore/operationhandler/CreateClassifierNodeOperationHandler.java rename to server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/operationhandler/CreateClassifierNodeOperationHandler.java diff --git a/server/src/main/java/com/eclipsesource/glsp/ecore/operationhandler/CreateEcoreEdgeOperationHandler.java b/server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/operationhandler/CreateEcoreEdgeOperationHandler.java similarity index 100% rename from server/src/main/java/com/eclipsesource/glsp/ecore/operationhandler/CreateEcoreEdgeOperationHandler.java rename to server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/operationhandler/CreateEcoreEdgeOperationHandler.java diff --git a/server/src/main/java/com/eclipsesource/glsp/ecore/operationhandler/EcoreChangeBoundsOperationHandler.java b/server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/operationhandler/EcoreChangeBoundsOperationHandler.java similarity index 100% rename from server/src/main/java/com/eclipsesource/glsp/ecore/operationhandler/EcoreChangeBoundsOperationHandler.java rename to server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/operationhandler/EcoreChangeBoundsOperationHandler.java diff --git a/server/src/main/java/com/eclipsesource/glsp/ecore/operationhandler/EcoreDeleteOperationHandler.java b/server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/operationhandler/EcoreDeleteOperationHandler.java similarity index 100% rename from server/src/main/java/com/eclipsesource/glsp/ecore/operationhandler/EcoreDeleteOperationHandler.java rename to server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/operationhandler/EcoreDeleteOperationHandler.java diff --git a/server/src/main/java/com/eclipsesource/glsp/ecore/operationhandler/EcoreLabelEditOperationHandler.java b/server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/operationhandler/EcoreLabelEditOperationHandler.java similarity index 100% rename from server/src/main/java/com/eclipsesource/glsp/ecore/operationhandler/EcoreLabelEditOperationHandler.java rename to server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/operationhandler/EcoreLabelEditOperationHandler.java diff --git a/server/src/main/java/com/eclipsesource/glsp/ecore/util/EcoreBuilder.java b/server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/util/EcoreBuilder.java similarity index 100% rename from server/src/main/java/com/eclipsesource/glsp/ecore/util/EcoreBuilder.java rename to server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/util/EcoreBuilder.java diff --git a/server/src/main/java/com/eclipsesource/glsp/ecore/util/EcoreConfig.java b/server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/util/EcoreConfig.java similarity index 100% rename from server/src/main/java/com/eclipsesource/glsp/ecore/util/EcoreConfig.java rename to server/ecore-glsp/src/main/java/com/eclipsesource/glsp/ecore/util/EcoreConfig.java diff --git a/server/src/main/resources/enotation.aird b/server/ecore-glsp/src/main/resources/enotation.aird similarity index 100% rename from server/src/main/resources/enotation.aird rename to server/ecore-glsp/src/main/resources/enotation.aird diff --git a/server/src/main/resources/enotation.ecore b/server/ecore-glsp/src/main/resources/enotation.ecore similarity index 100% rename from server/src/main/resources/enotation.ecore rename to server/ecore-glsp/src/main/resources/enotation.ecore diff --git a/server/src/main/resources/enotation.genmodel b/server/ecore-glsp/src/main/resources/enotation.genmodel similarity index 100% rename from server/src/main/resources/enotation.genmodel rename to server/ecore-glsp/src/main/resources/enotation.genmodel diff --git a/server/src/main/resources/log4j.properties b/server/ecore-glsp/src/main/resources/log4j.properties similarity index 100% rename from server/src/main/resources/log4j.properties rename to server/ecore-glsp/src/main/resources/log4j.properties diff --git a/server/pom.xml b/server/pom.xml index b6b0fb4..fbee07d 100644 --- a/server/pom.xml +++ b/server/pom.xml @@ -1,183 +1,17 @@ - 4.0.0 - com.eclipsesource.glsp - glsp-ecore - 0.0.2-SNAPSHOT - - - sonatype - Sonatype - https://oss.sonatype.org/content/groups/public - - - - UTF-8 - 11 - 11 - - - - org.eclipse.elk - org.eclipse.elk.core - 0.5.0 - - - org.eclipse.elk - org.eclipse.elk.alg.layered - 0.5.0 - - - com.eclipsesource.glsp - glsp-server - 1.2.0-SNAPSHOT - - - com.eclipsesource.glsp - glsp-layout - 1.2.0-SNAPSHOT - - - org.eclipse.emf - org.eclipse.emf.edit - 2.14.0 - - + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 + http://maven.apache.org/maven-v4_0_0.xsd"> + 4.0.0 - - - - src/main/resources - ${project.build.directory} - - log4j.properties - - - - - - org.codehaus.mojo - build-helper-maven-plugin - 1.7 - - - add-source - generate-sources - - add-source - - - - src/main/java-gen - - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - copy-dependencies - package - - copy-dependencies - - - ${project.build.directory}/libs - false - false - true - false - - - - - - org.apache.maven.plugins - maven-source-plugin - - - attach-sources - - jar - - - - - - com.googlecode.addjars-maven-plugin - addjars-maven-plugin - 1.0.5 - - - package - - add-jars - - - - - ${project.build.directory}/libs - - - - - - - - org.apache.maven.plugins - maven-shade-plugin - 3.0.0 - - - - com.eclipsesource.glsp.ecore.EcoreServerLauncher - - - - - *:* - - META-INF/INDEX.LIST - META-INF/*.SF - META-INF/*.DSA - META-INF/*.RSA - .options - .api_description - *.profile - *.html - about.* - about_files/* - plugin.xml - modeling32.png - systembundle.properties - profile.list - **/*._trace - **/*.g - **/*.tokens - **/*.mwe2 - **/*.xtext - **/*.xtextbin - - - - true - glsp - false - - - - package - - shade - - - - - - + com.eclipsesource.glsp + parent-pom + pom + 1.0 + ecore-glsp Parent Project + + + ecore-backend-server + ecore-glsp + \ No newline at end of file