-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix rendering, freezes and vscode shortcuts (#105)
* Fix blurry children caused by css filter * Fix wrapping edge breaking points in free form layout * Disable association navigable property * Update demo example to use association * Propagate set dirty action to webview in vscode * Exclude layout and svg export commands * Trigger extension shortcuts only if in correct context * Use tree kill package for stopping server processes * Show name in the center of association edge * Add vscode extension readme
- Loading branch information
1 parent
ad3e40e
commit 1420a38
Showing
23 changed files
with
267 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
client/packages/uml-glsp/src/graph/layout/uml-freeform.layout.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/******************************************************************************** | ||
* Copyright (c) 2023 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 { isSizeable, LayoutContainer, SParentElement, StatefulLayouter } from '@eclipse-glsp/client'; | ||
import { FreeFormLayouter } from '@eclipse-glsp/client/lib/features/layout/freeform-layout'; | ||
import { Dimension } from '@eclipse-glsp/protocol'; | ||
import { injectable } from 'inversify'; | ||
import { AbstractLayoutOptions } from 'sprotty/lib/features/bounds/layout-options'; | ||
|
||
@injectable() | ||
export class UmlFreeFormLayouter extends FreeFormLayouter { | ||
static override KIND = 'uml-freeform'; | ||
|
||
protected override getChildrenSize( | ||
container: SParentElement & LayoutContainer, | ||
containerOptions: AbstractLayoutOptions, | ||
layouter: StatefulLayouter | ||
): Dimension { | ||
let maxX = 0; | ||
let maxY = 0; | ||
container.children | ||
.filter(child => isSizeable(child)) | ||
.forEach(child => { | ||
const bounds = layouter.getBoundsData(child).bounds; | ||
if (bounds !== undefined && Dimension.isValid(bounds)) { | ||
const childMaxX = bounds.x + bounds.width; | ||
const childMaxY = bounds.y + bounds.height; | ||
maxX = Math.max(maxX, childMaxX); | ||
maxY = Math.max(maxY, childMaxY); | ||
} | ||
}); | ||
return { | ||
width: maxX, | ||
height: maxY | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.vsix |
50 changes: 50 additions & 0 deletions
50
client/packages/uml-vscode-integration/extension/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# bigUML - VS Code Extension | ||
|
||
<!-- DESCRIPTION --> | ||
|
||
> [Open-source](https://github.com/borkdominik/bigUML) **UML Modeling Tool** for [Visual Studio Code](https://code.visualstudio.com/) supporting graphical editing diagrams. | ||
<p align="center"> | ||
<img src="./resources/biguml-vscode.png" alt="Demo" width="800" /> | ||
</p> | ||
|
||
<br /> | ||
|
||
**📖 Table of Contents** | ||
|
||
1. [Diagrams](#diagrams) | ||
2. [Requirements](#requirements) | ||
3. [Examples](#examples) | ||
- [Create new model](#create-new-model) | ||
|
||
<br /> | ||
|
||
## Diagrams | ||
|
||
The supported diagrams are visible in the table. More diagrams will be supported in the future. | ||
|
||
### Structure Diagrams | ||
|
||
| SD | Class | Component | Deployment | Object | Package | Profile | Composite | | ||
| ------ | ----------- | --------- | ---------- | ------ | ------- | ------- | --------- | | ||
| Status | In progress | - | - | - | - | - | - | | ||
|
||
### Behavior Diagrams | ||
|
||
| BD | Use Case | Activity | State Machine | Sequence | Communication | Interaction | Timing | | ||
| ------ | -------- | -------- | ------------- | ------------------------ | ------------------- | ----------- | ------ | | ||
| Status | - | - | - | Contribution in progress | Development started | - | - | | ||
|
||
## Requirements | ||
|
||
This extension requires Java JRE 11+ to run. | ||
|
||
_In the background two Java-based language servers will be started._ | ||
|
||
## Examples | ||
|
||
### Create new model | ||
|
||
You can create a new model by either using the command `bigUML: New Empty UML Diagram` or with `File -> New File`. | ||
|
||
![New File Command](./resources/new-model-command.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+150 KB
client/packages/uml-vscode-integration/extension/resources/biguml-vscode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+37.3 KB
client/packages/uml-vscode-integration/extension/resources/new-model-command.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.