Skip to content
Snippets Groups Projects
Commit 3e230b16 authored by Paul Bartetzky's avatar Paul Bartetzky
Browse files

initial

parent f8c7533d
No related branches found
No related tags found
No related merge requests found
Showing
with 714 additions and 0 deletions
{
"extends": "@eclipse-glsp/ts-config/tsconfig.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "lib",
"reactNamespace": "JSX",
"skipLibCheck": true,
"types": [],
"sourceMap": true
},
"include": ["src"]
}
{
"private": "true",
"name": "tasklist-theia",
"version": "2.0.0",
"description": "Theia extension for the TaskList GLSP example",
"license": "(EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR MIT)",
"keywords": [
"theia-extension"
],
"author": {
"name": "Eclipse GLSP"
},
"homepage": "https://www.eclipse.org/glsp/",
"repository": {
"type": "git",
"url": "https://github.com/eclipse-glsp/glsp-examples.git"
},
"bugs": "https://github.com/eclipse-glsp/glsp/issues",
"contributors": [
{
"name": "Eclipse GLSP Project",
"email": "glsp-dev@eclipse.org",
"url": "https://projects.eclipse.org/projects/ecd.glsp"
}
],
"files": [
"lib",
"src"
],
"dependencies": {
"tasklist-glsp": "2.0.0",
"@eclipse-glsp/theia-integration": "2.0.0"
},
"devDependencies": {
"rimraf": "^2.6.1"
},
"scripts": {
"prepare": "yarn clean && yarn build",
"clean": "rimraf lib tsconfig.tsbuildinfo",
"build": "tsc",
"lint": "eslint --ext .ts,.tsx ./src",
"lint:ci": "yarn lint -o eslint.xml -f checkstyle",
"watch": "tsc -w"
},
"theiaExtensions": [
{
"frontend": "lib/browser/frontend-module",
"backend": "lib/node/backend-module"
}
]
}
/********************************************************************************
* Copyright (c) 2024 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 { GLSPCommandHandler, GLSPContextMenu } from '@eclipse-glsp/theia-integration';
import { CommandContribution, CommandRegistry, MenuContribution, MenuModelRegistry } from '@theia/core';
import { ApplicationShell } from '@theia/core/lib/browser';
import { inject, injectable } from 'inversify';
import { CopyToClipboardAction } from 'tasklist-glsp';
export namespace CopyIdCommand {
export const COPY_ID = 'copy-id-command';
}
@injectable()
export class CopyIdCommandContribution implements CommandContribution {
@inject(ApplicationShell) protected readonly shell: ApplicationShell;
registerCommands(commands: CommandRegistry): void {
commands.registerCommand(
{ id: CopyIdCommand.COPY_ID, label: 'Copy Id' },
new GLSPCommandHandler(this.shell, {
actions: context => [CopyToClipboardAction.create(context.selectedElements[0].id)],
isEnabled: context => !context.isReadonly && context.selectedElements.length === 1
})
);
}
}
@injectable()
export class CopyIdMenuContribution implements MenuContribution {
static readonly EDIT = GLSPContextMenu.MENU_PATH.concat('edit');
registerMenus(menus: MenuModelRegistry): void {
menus.registerMenuAction(CopyIdMenuContribution.EDIT, { commandId: CopyIdCommand.COPY_ID });
}
}
/********************************************************************************
* Copyright (c) 2024 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 { SetUIExtensionVisibilityAction } from '@eclipse-glsp/client';
import { GLSPCommandHandler, GLSPContextMenu } from '@eclipse-glsp/theia-integration';
import { CommandContribution, CommandRegistry, MenuContribution, MenuModelRegistry } from '@theia/core';
import { ApplicationShell } from '@theia/core/lib/browser';
import { inject, injectable } from 'inversify';
import { EditInputSignalMenu } from 'tasklist-glsp';
export namespace EditInputSignalsMenuCommand {
export const EDIT_INPUT_SIGNALS_MENU = 'edit-input-signals-menu-command';
}
@injectable()
export class EditInputSignalsMenuCommandContribution implements CommandContribution {
@inject(ApplicationShell) protected readonly shell: ApplicationShell;
registerCommands(commands: CommandRegistry): void {
commands.registerCommand(
{ id: EditInputSignalsMenuCommand.EDIT_INPUT_SIGNALS_MENU, label: 'Edit Input Signals' },
new GLSPCommandHandler(this.shell, {
actions: context => [
SetUIExtensionVisibilityAction.create({
extensionId: EditInputSignalMenu.ID,
visible: true
})
],
isEnabled: context => !context.isReadonly
})
);
}
}
@injectable()
export class EditInputSignalsMenuMenuContribution implements MenuContribution {
static readonly EDIT = GLSPContextMenu.MENU_PATH.concat('edit');
registerMenus(menus: MenuModelRegistry): void {
menus.registerMenuAction(EditInputSignalsMenuMenuContribution.EDIT, {
commandId: EditInputSignalsMenuCommand.EDIT_INPUT_SIGNALS_MENU
});
}
}
/********************************************************************************
* Copyright (c) 2024 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 { SetUIExtensionVisibilityAction } from '@eclipse-glsp/client';
import { GLSPCommandHandler, GLSPContextMenu } from '@eclipse-glsp/theia-integration';
import { CommandContribution, CommandRegistry, MenuContribution, MenuModelRegistry } from '@theia/core';
import { ApplicationShell } from '@theia/core/lib/browser';
import { inject, injectable } from 'inversify';
import { EditTokensMenu, isPlace } from 'tasklist-glsp';
export namespace EditTokensMenuCommand {
export const EDIT_TOKENS_MENU = 'edit-tokens-menu-command';
}
@injectable()
export class EditTokensMenuCommandContribution implements CommandContribution {
@inject(ApplicationShell) protected readonly shell: ApplicationShell;
registerCommands(commands: CommandRegistry): void {
commands.registerCommand(
{ id: EditTokensMenuCommand.EDIT_TOKENS_MENU, label: 'Edit Tokens' },
new GLSPCommandHandler(this.shell, {
actions: context => [
SetUIExtensionVisibilityAction.create({
extensionId: EditTokensMenu.ID,
visible: true,
contextElementsId: [context.selectedElements[0].id]
})
],
isEnabled: context => !context.isReadonly && context.selectedElements.filter(isPlace).length === 1
})
);
}
}
@injectable()
export class EditTokensMenuMenuContribution implements MenuContribution {
static readonly EDIT = GLSPContextMenu.MENU_PATH.concat('edit');
registerMenus(menus: MenuModelRegistry): void {
menus.registerMenuAction(EditTokensMenuMenuContribution.EDIT, { commandId: EditTokensMenuCommand.EDIT_TOKENS_MENU });
}
}
/********************************************************************************
* Copyright (c) 2024 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 { GLSPCommandHandler, GLSPContextMenu } from '@eclipse-glsp/theia-integration';
import { CommandContribution, CommandRegistry, MenuContribution, MenuModelRegistry } from '@theia/core';
import { ApplicationShell } from '@theia/core/lib/browser';
import { inject, injectable } from 'inversify';
import { FireTransitionOperation, isTransition } from 'tasklist-glsp';
export namespace FireTransitionCommand {
export const FIRE_TRANSITION = 'fire-transition-command';
}
@injectable()
export class FireTransitionCommandContribution implements CommandContribution {
@inject(ApplicationShell) protected readonly shell: ApplicationShell;
registerCommands(commands: CommandRegistry): void {
commands.registerCommand(
{ id: FireTransitionCommand.FIRE_TRANSITION, label: 'Fire Transition' },
new GLSPCommandHandler(this.shell, {
actions: context => [FireTransitionOperation.create(context.selectedElements.filter(isTransition)[0].id)],
isEnabled: context => !context.isReadonly && context.selectedElements.filter(isTransition).length === 1
})
);
}
}
@injectable()
export class FireTransitionMenuContribution implements MenuContribution {
static readonly EDIT = GLSPContextMenu.MENU_PATH.concat('edit');
registerMenus(menus: MenuModelRegistry): void {
menus.registerMenuAction(FireTransitionMenuContribution.EDIT, { commandId: FireTransitionCommand.FIRE_TRANSITION });
}
}
/********************************************************************************
* Copyright (c) 2024 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 { GLSPCommandHandler, GLSPContextMenu } from '@eclipse-glsp/theia-integration';
import { CommandContribution, CommandRegistry, MenuContribution, MenuModelRegistry } from '@theia/core';
import { ApplicationShell } from '@theia/core/lib/browser';
import { inject, injectable } from 'inversify';
import { ResetMarkingsOperation } from 'tasklist-glsp';
export namespace ResetMarkingsCommand {
export const RESET_MARKINGS = 'reset-markings-command';
}
@injectable()
export class ResetMarkingsCommandContribution implements CommandContribution {
@inject(ApplicationShell) protected readonly shell: ApplicationShell;
registerCommands(commands: CommandRegistry): void {
commands.registerCommand(
{ id: ResetMarkingsCommand.RESET_MARKINGS, label: 'Reset Markings' },
new GLSPCommandHandler(this.shell, {
actions: context => [ResetMarkingsOperation.create()],
isEnabled: context => !context.isReadonly
})
);
}
}
@injectable()
export class ResetMarkingsMenuContribution implements MenuContribution {
static readonly EDIT = GLSPContextMenu.MENU_PATH.concat('edit');
registerMenus(menus: MenuModelRegistry): void {
menus.registerMenuAction(ResetMarkingsMenuContribution.EDIT, { commandId: ResetMarkingsCommand.RESET_MARKINGS });
}
}
/********************************************************************************
* Copyright (c) 2024 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 { SetUIExtensionVisibilityAction } from '@eclipse-glsp/client';
import { GLSPCommandHandler, GLSPContextMenu } from '@eclipse-glsp/theia-integration';
import { CommandContribution, CommandRegistry, MenuContribution, MenuModelRegistry } from '@theia/core';
import { ApplicationShell } from '@theia/core/lib/browser';
import { inject, injectable } from 'inversify';
import { isTransition, SignalClauseMenu } from 'tasklist-glsp';
export namespace SignalClauseMenuCommand {
export const SIGNAL_CLAUSE_MENU = 'signal-clause-menu-command';
}
@injectable()
export class SignalClauseMenuCommandContribution implements CommandContribution {
@inject(ApplicationShell) protected readonly shell: ApplicationShell;
registerCommands(commands: CommandRegistry): void {
commands.registerCommand(
{ id: SignalClauseMenuCommand.SIGNAL_CLAUSE_MENU, label: 'Edit Signal Clause' },
new GLSPCommandHandler(this.shell, {
actions: context => [
SetUIExtensionVisibilityAction.create({
extensionId: SignalClauseMenu.ID,
visible: true,
contextElementsId: [context.selectedElements[0].id]
})
],
isEnabled: context => !context.isReadonly && context.selectedElements.filter(isTransition).length === 1
})
);
}
}
@injectable()
export class SignalClauseMenuMenuContribution implements MenuContribution {
static readonly EDIT = GLSPContextMenu.MENU_PATH.concat('edit');
registerMenus(menus: MenuModelRegistry): void {
menus.registerMenuAction(SignalClauseMenuMenuContribution.EDIT, { commandId: SignalClauseMenuCommand.SIGNAL_CLAUSE_MENU });
}
}
/********************************************************************************
* Copyright (c) 2022 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
* -- MIT License which is available at https://opensource.org/license/mit.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR MIT
********************************************************************************/
import { ContainerConfiguration } from '@eclipse-glsp/protocol';
import { GLSPDiagramConfiguration } from '@eclipse-glsp/theia-integration/lib/browser';
import { Container, injectable } from '@theia/core/shared/inversify';
import { initializeTasklistDiagramContainer } from 'tasklist-glsp';
import { TaskListLanguage } from '../../common/tasklist-language';
@injectable()
export class TaskListDiagramConfiguration extends GLSPDiagramConfiguration {
readonly diagramType = TaskListLanguage.diagramType;
override configureContainer(container: Container, ...containerConfiguration: ContainerConfiguration): void {
initializeTasklistDiagramContainer(container, ...containerConfiguration);
}
}
/********************************************************************************
* Copyright (c) 2024 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 { SetUIExtensionVisibilityAction } from '@eclipse-glsp/client';
import { GLSPCommandHandler, GLSPContextMenu } from '@eclipse-glsp/theia-integration';
import { CommandContribution, CommandRegistry, MenuContribution, MenuModelRegistry } from '@theia/core';
import { ApplicationShell } from '@theia/core/lib/browser';
import { inject, injectable } from 'inversify';
import { TinaMenu } from 'tasklist-glsp';
export namespace TinaMenuCommand {
export const TINA_MENU = 'tina-menu-command';
}
@injectable()
export class TinaMenuCommandContribution implements CommandContribution {
@inject(ApplicationShell) protected readonly shell: ApplicationShell;
registerCommands(commands: CommandRegistry): void {
commands.registerCommand(
{ id: TinaMenuCommand.TINA_MENU, label: 'Tina' },
new GLSPCommandHandler(this.shell, {
actions: context => [
SetUIExtensionVisibilityAction.create({
extensionId: TinaMenu.ID,
visible: true
})
],
isEnabled: context => !context.isReadonly
})
);
}
}
@injectable()
export class TinaMenuMenuContribution implements MenuContribution {
static readonly EDIT = GLSPContextMenu.MENU_PATH.concat('edit');
registerMenus(menus: MenuModelRegistry): void {
menus.registerMenuAction(TinaMenuMenuContribution.EDIT, { commandId: TinaMenuCommand.TINA_MENU });
}
}
/********************************************************************************
* Copyright (c) 2022 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
* -- MIT License which is available at https://opensource.org/license/mit.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR MIT
********************************************************************************/
import { ContainerContext, DiagramConfiguration, GLSPTheiaFrontendModule } from '@eclipse-glsp/theia-integration';
import { CommandContribution, MenuContribution } from '@theia/core';
import { TaskListLanguage } from '../common/tasklist-language';
import { CopyIdCommandContribution, CopyIdMenuContribution } from './diagram/copy-id-context-menu';
import { EditInputSignalsMenuCommandContribution, EditInputSignalsMenuMenuContribution } from './diagram/edit-input-signals-context-menu';
import { EditTokensMenuCommandContribution, EditTokensMenuMenuContribution } from './diagram/edit-tokens-context-menu';
import { FireTransitionCommandContribution, FireTransitionMenuContribution } from './diagram/fire-transtition-context-menu';
import { ResetMarkingsCommandContribution, ResetMarkingsMenuContribution } from './diagram/reset-markings-context-menu';
import { SignalClauseMenuCommandContribution, SignalClauseMenuMenuContribution } from './diagram/signal-clause-context-menu';
import { TaskListDiagramConfiguration } from './diagram/tasklist-diagram-configuration';
import { TinaMenuCommandContribution, TinaMenuMenuContribution } from './diagram/tina-context-menu';
export class TaskListTheiaFrontendModule extends GLSPTheiaFrontendModule {
readonly diagramLanguage = TaskListLanguage;
bindDiagramConfiguration(context: ContainerContext): void {
context.bind(DiagramConfiguration).to(TaskListDiagramConfiguration);
}
override configure(context: ContainerContext): void {
context.bind(CommandContribution).to(FireTransitionCommandContribution);
context.bind(MenuContribution).to(FireTransitionMenuContribution);
context.bind(CommandContribution).to(ResetMarkingsCommandContribution);
context.bind(MenuContribution).to(ResetMarkingsMenuContribution);
context.bind(CommandContribution).to(TinaMenuCommandContribution);
context.bind(MenuContribution).to(TinaMenuMenuContribution);
context.bind(CommandContribution).to(SignalClauseMenuCommandContribution);
context.bind(MenuContribution).to(SignalClauseMenuMenuContribution);
context.bind(CommandContribution).to(EditInputSignalsMenuCommandContribution);
context.bind(MenuContribution).to(EditInputSignalsMenuMenuContribution);
context.bind(CommandContribution).to(EditTokensMenuCommandContribution);
context.bind(MenuContribution).to(EditTokensMenuMenuContribution);
context.bind(CommandContribution).to(CopyIdCommandContribution);
context.bind(MenuContribution).to(CopyIdMenuContribution);
}
}
export default new TaskListTheiaFrontendModule();
/********************************************************************************
* Copyright (c) 2022 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
* -- MIT License which is available at https://opensource.org/license/mit.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR MIT
********************************************************************************/
import { GLSPDiagramLanguage } from '@eclipse-glsp/theia-integration/lib/common';
export const TaskListLanguage: GLSPDiagramLanguage = {
contributionId: 'TaskList',
label: 'PNML Diagram',
diagramType: 'tasklist-diagram',
iconClass: 'codicon codicon-tasklist',
fileExtensions: ['.pnml']
};
/********************************************************************************
* Copyright (c) 2022 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
* -- MIT License which is available at https://opensource.org/license/mit.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR MIT
********************************************************************************/
import { GLSPServerContribution } from '@eclipse-glsp/theia-integration/lib/node';
import { ContainerModule } from '@theia/core/shared/inversify';
import { TaskListGLSPServerContribution } from './glsp-server-contribution';
export default new ContainerModule(bind => {
bind(TaskListGLSPServerContribution).toSelf().inSingletonScope();
bind(GLSPServerContribution).toService(TaskListGLSPServerContribution);
});
/********************************************************************************
* Copyright (c) 2022 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
* -- MIT License which is available at https://opensource.org/license/mit.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR MIT
********************************************************************************/
import { getPort, GLSPSocketServerContribution, GLSPSocketServerContributionOptions } from '@eclipse-glsp/theia-integration/lib/node';
import { injectable } from '@theia/core/shared/inversify';
import { join, resolve } from 'path';
import { TaskListLanguage } from '../common/tasklist-language';
export const DEFAULT_PORT = 0;
export const PORT_ARG_KEY = 'TASKLIST_GLSP';
export const LOG_DIR = join(__dirname, '..', '..', 'logs');
const JAR_FILE = resolve(
join(__dirname, '..', '..', '..', '..', 'glsp-server', 'target', 'org.eclipse.glsp.example.javaemf-2.0.0-glsp.jar')
);
@injectable()
export class TaskListGLSPServerContribution extends GLSPSocketServerContribution {
readonly id = TaskListLanguage.contributionId;
createContributionOptions(): Partial<GLSPSocketServerContributionOptions> {
return {
executable: JAR_FILE,
additionalArgs: ['--consoleLog', 'false', '--fileLog', 'true', '--logDir', LOG_DIR],
socketConnectionOptions: {
port: getPort(PORT_ARG_KEY, DEFAULT_PORT)
}
};
}
}
{
"extends": "@eclipse-glsp/ts-config/tsconfig.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "lib",
"sourceMap": true
},
"include": ["src"],
"exclude": ["node_modules"]
}
{
"$schema": "https://json.schemastore.org/tsconfig",
"extends": "@eclipse-glsp/ts-config/tsconfig.json",
"compilerOptions": {
"noEmit": true
},
"exclude": ["**/node_modules", "**/.eslintrc.js"],
"include": ["tasklist-glsp/src", "tasklist-theia/src"]
}
{
"compilerOptions": {
"sourceMap": true
}
}
\ No newline at end of file
{
"files.autoSave": "off",
"workbench.iconTheme": "theia-file-icons"
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<pnml xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns="http://www.pnml.org/version-2009/grammar/pnml">
<net id="example">
<page id="9335acf6-4b97-4d53-a051-ea9e3dc9bd52">
<name text="NewPage0"/>
<nodegraphics>
<position x="760" y="807"/>
<dimension x="1095" y="890"/>
</nodegraphics>
<arc id="08b7ced5-4a93-4bb2-b69d-f5c2bf9d3eff" source="e0726e15-25f1-46cb-aa92-ae1b0503a85e" target="961881c5-6820-4ab1-b329-06a5af2c8c5f">
<name text="NewArc0"/>
</arc>
<arc id="19bc3945-6ca5-43ac-85b0-1f63d2e22571" source="961881c5-6820-4ab1-b329-06a5af2c8c5f" target="7c12def4-f37f-4948-96c7-a248088d1bee">
<name text="NewArc1"/>
</arc>
<arc id="4d63045d-3913-4221-97a1-909b7b5b0b15" source="7c12def4-f37f-4948-96c7-a248088d1bee" target="8cb0c834-2b84-4b36-9395-f4238125bf40">
<name text="NewArc2"/>
</arc>
<arc id="0b1721df-9724-48d2-87a5-001d19ce4131" source="02cb7814-11e3-496b-9d6a-4be829073826" target="7c12def4-f37f-4948-96c7-a248088d1bee">
<name text="NewArc3"/>
<inscription text="2"/>
</arc>
<place id="961881c5-6820-4ab1-b329-06a5af2c8c5f" InArcs="08b7ced5-4a93-4bb2-b69d-f5c2bf9d3eff" OutArcs="19bc3945-6ca5-43ac-85b0-1f63d2e22571">
<name text="NewPlace1"/>
<nodegraphics>
<position x="733" y="399"/>
<dimension x="70" y="70"/>
</nodegraphics>
<initialMarking text="4"/>
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1" node="9335acf6-4b97-4d53-a051-ea9e3dc9bd52" subnet="">
<balloonMarking>
<tokens>
<token>Nominativ</token>
<token>Genitiv</token>
<token>Dativ</token>
<token>Akkusativ</token>
</tokens>
</balloonMarking>
</toolspecific>
</place>
<place id="8cb0c834-2b84-4b36-9395-f4238125bf40" InArcs="4d63045d-3913-4221-97a1-909b7b5b0b15">
<name text="NewPlace6"/>
<nodegraphics>
<position x="305" y="295"/>
<dimension x="70" y="70"/>
</nodegraphics>
<initialMarking text="2"/>
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1" node="9335acf6-4b97-4d53-a051-ea9e3dc9bd52" subnet="">
<balloonMarking>
<tokens>
<token>abc</token>
<token>xyz</token>
</tokens>
</balloonMarking>
</toolspecific>
</place>
<place id="02cb7814-11e3-496b-9d6a-4be829073826" OutArcs="0b1721df-9724-48d2-87a5-001d19ce4131">
<name text="NewPlace11"/>
<nodegraphics>
<position x="776" y="202"/>
<dimension x="70" y="70"/>
</nodegraphics>
<initialMarking text="3"/>
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1" node="9335acf6-4b97-4d53-a051-ea9e3dc9bd52" subnet="">
<balloonMarking>
<tokens>
<token>Hund</token>
<token>Katze</token>
<token>Maus</token>
</tokens>
</balloonMarking>
</toolspecific>
</place>
<transition id="7c12def4-f37f-4948-96c7-a248088d1bee" InArcs="19bc3945-6ca5-43ac-85b0-1f63d2e22571 0b1721df-9724-48d2-87a5-001d19ce4131" OutArcs="4d63045d-3913-4221-97a1-909b7b5b0b15">
<name text="NewTransition3"/>
<nodegraphics>
<position x="537" y="280"/>
<dimension x="30" y="70"/>
</nodegraphics>
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1" type="discreteTransitionType" node="9335acf6-4b97-4d53-a051-ea9e3dc9bd52" subnet=""/>
</transition>
<transition id="e0726e15-25f1-46cb-aa92-ae1b0503a85e" OutArcs="08b7ced5-4a93-4bb2-b69d-f5c2bf9d3eff">
<name text="NewTransition8"/>
<nodegraphics>
<position x="511" y="561"/>
<dimension x="30" y="70"/>
</nodegraphics>
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1" type="discreteTransitionType" node="9335acf6-4b97-4d53-a051-ea9e3dc9bd52" subnet="" inputsignalclause="Red and Blue"/>
</transition>
</page>
<toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
<inputsignals>
<inputsignal inputsignalID="Red"/>
<inputsignal inputsignalID="Blue"/>
</inputsignals>
</toolspecific>
</net>
</pnml>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment