@@ -13,6 +13,8 @@ import { LoadDFDandDDAction } from "../serialize/loadDFDandDD";
1313import { LoadPalladioAction } from "../serialize/loadPalladio" ;
1414import { SaveImageAction } from "../serialize/image" ;
1515import { SettingsManager } from "../settingsMenu/SettingsManager" ;
16+ import { Action } from "sprotty-protocol" ;
17+ import { LayoutMethod } from "../settingsMenu/LayoutMethod" ;
1618
1719/**
1820 * Provides possible actions for the command palette.
@@ -51,11 +53,33 @@ export class ServerCommandPaletteActionProvider implements ICommandPaletteAction
5153
5254 new LabeledAction ( "Load default diagram" , [ LoadDefaultDiagramAction . create ( ) , commitAction ] , "clear-all" ) ,
5355 new LabeledAction ( "Fit to Screen" , [ fitToScreenAction ] , "screen-normal" ) ,
54- new LabeledAction (
56+ new FolderAction (
5557 "Layout diagram (Method: " + this . settings . layoutMethod + ")" ,
56- [ LayoutModelAction . create ( ) , commitAction , fitToScreenAction ] ,
58+ [
59+ new LabeledAction (
60+ "Layout diagram (Method: Lines)" ,
61+ [ LayoutModelAction . create ( LayoutMethod . LINES ) , commitAction , fitToScreenAction ] ,
62+ "grabber" ,
63+ ) ,
64+ new LabeledAction (
65+ "Layout diagram (Method: Wrapping Lines)" ,
66+ [ LayoutModelAction . create ( LayoutMethod . WRAPPING ) , commitAction , fitToScreenAction ] ,
67+ "word-wrap" ,
68+ ) ,
69+ new LabeledAction (
70+ "Layout diagram (Method: Circles)" ,
71+ [ LayoutModelAction . create ( LayoutMethod . CIRCLES ) , commitAction , fitToScreenAction ] ,
72+ "circle-large" ,
73+ ) ,
74+ ] ,
5775 "layout" ,
76+ [ LayoutModelAction . create ( ) , commitAction , fitToScreenAction ] ,
5877 ) ,
78+ /*new LabeledAction(
79+ "Layout diagram (Method: " + this.settings.layoutMethod + ")",
80+ [LayoutModelAction.create(), commitAction, fitToScreenAction],
81+ "layout",
82+ ),*/
5983 ] ;
6084 }
6185}
@@ -65,7 +89,8 @@ export class FolderAction extends LabeledAction {
6589 label : string ,
6690 readonly children : LabeledAction [ ] ,
6791 icon ?: string ,
92+ actions : Action [ ] = [ ] ,
6893 ) {
69- super ( label , [ ] , icon ) ;
94+ super ( label , actions , icon ) ;
7095 }
7196}
0 commit comments