Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions plantuml/parser/integration_test/activity_diagram/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# *******************************************************************************
# Copyright (c) 2026 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************
filegroup(
name = "activity_diagram_files",
srcs = glob(
[
"**/*.puml",
"**/*.json",
"**/*.yaml",
],
allow_empty = True,
),
visibility = ["//visibility:public"],
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
' *******************************************************************************
' Copyright (c) 2026 Contributors to the Eclipse Foundation
'
' See the NOTICE file(s) distributed with this work for additional
' information regarding copyright ownership.
'
' This program and the accompanying materials are made available under the
' terms of the Apache License Version 2.0 which is available at
' https://www.apache.org/licenses/LICENSE-2.0
'
' SPDX-License-Identifier: Apache-2.0
' *******************************************************************************
@startuml test_activity_beta_syntax
title "Beta Activity Syntax Coverage"

start

:Initialize parser context;
note left: Basic action and note

if (fatal configuration error?) then (yes)
end
else (no)
:Continue setup;
endif

if (beta syntax enabled?) then (yes)
:Enter beta flow;
if (extra validation needed?) then (yes)
:Run nested validation;
else (no)
:Skip nested validation;
endif
else (no)
:Fallback configuration path;
endif

while (retry budget available?) is (yes)
:Try parse step;
if (parse step succeeded?) then (yes)
break
else (no)
:Update retry state;
endif
endwhile

repeat
#LightBlue:Read next activity token;
if (token available?) then (yes)
:Consume token;
else (no)
break
endif
repeat while (more tokens expected?) is (yes)

:Finalize result;
stop

@enduml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
' *******************************************************************************
' Copyright (c) 2026 Contributors to the Eclipse Foundation
'
' See the NOTICE file(s) distributed with this work for additional
' information regarding copyright ownership.
'
' This program and the accompanying materials are made available under the
' terms of the Apache License Version 2.0 which is available at
' https://www.apache.org/licenses/LICENSE-2.0
'
' SPDX-License-Identifier: Apache-2.0
' *******************************************************************************
@startuml action_separated

- A1
- A2
- A3

@enduml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"action_separated.puml": {
"name": "action_separated",
"statements": [
{
"Action": {
"label": "A1"
}
},
{
"Action": {
"label": "A2"
}
},
{
"Action": {
"label": "A3"
}
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
' *******************************************************************************
' Copyright (c) 2026 Contributors to the Eclipse Foundation
'
' See the NOTICE file(s) distributed with this work for additional
' information regarding copyright ownership.
'
' This program and the accompanying materials are made available under the
' terms of the Apache License Version 2.0 which is available at
' https://www.apache.org/licenses/LICENSE-2.0
'
' SPDX-License-Identifier: Apache-2.0
' *******************************************************************************
@startuml action_simple

:Hello ""activity diagram"";
:This block is **defined** on
__several__ ~~lines~~;

@enduml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"action_simple.puml": {
"name": "action_simple",
"statements": [
{
"Action": {
"label": "Hello activity diagram"
}
},
{
"Action": {
"label": "This block is defined on\nseveral lines"
}
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
' *******************************************************************************
' Copyright (c) 2026 Contributors to the Eclipse Foundation
'
' See the NOTICE file(s) distributed with this work for additional
' information regarding copyright ownership.
'
' This program and the accompanying materials are made available under the
' terms of the Apache License Version 2.0 which is available at
' https://www.apache.org/licenses/LICENSE-2.0
'
' SPDX-License-Identifier: Apache-2.0
' *******************************************************************************
@startuml arrows

:foo1;
-> You can put text on arrows;
if (test) then
-[#blue]->
:foo2;
-[#green,dashed]-> The text can
also be on several lines
and **very** long...;
:foo3;
else
-[#black,dotted]->
:foo4;
endif
-[#gray,bold]->
:foo5;

@enduml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{
"arrows.puml": {
"name": "arrows",
"statements": [
{
"Action": {
"label": "foo1"
}
},
{
"Arrow": {
"syntax": "->",
"label": "You can put text on arrows"
}
},
{
"IfStart": {
"condition": "test",
"label": null
}
},
{
"Arrow": {
"syntax": "-[#blue]->",
"label": null
}
},
{
"Action": {
"label": "foo2"
}
},
{
"Arrow": {
"syntax": "-[#green,dashed]->",
"label": "The text can\nalso be on several lines\nand very long..."
}
},
{
"Action": {
"label": "foo3"
}
},
{
"Else": {
"label": null
}
},
{
"Arrow": {
"syntax": "-[#black,dotted]->",
"label": null
}
},
{
"Action": {
"label": "foo4"
}
},
{
"EndIf": null
},
{
"Arrow": {
"syntax": "-[#gray,bold]->",
"label": null
}
},
{
"Action": {
"label": "foo5"
}
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
' *******************************************************************************
' Copyright (c) 2026 Contributors to the Eclipse Foundation
'
' See the NOTICE file(s) distributed with this work for additional
' information regarding copyright ownership.
'
' This program and the accompanying materials are made available under the
' terms of the Apache License Version 2.0 which is available at
' https://www.apache.org/licenses/LICENSE-2.0
'
' SPDX-License-Identifier: Apache-2.0
' *******************************************************************************
@startuml color

#YellowGreen:Hello Activity Diagram;

@enduml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"color.puml": {
"name": "color",
"statements": [
{
"Action": {
"label": "Hello Activity Diagram"
}
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
' *******************************************************************************
' Copyright (c) 2026 Contributors to the Eclipse Foundation
'
' See the NOTICE file(s) distributed with this work for additional
' information regarding copyright ownership.
'
' This program and the accompanying materials are made available under the
' terms of the Apache License Version 2.0 which is available at
' https://www.apache.org/licenses/LICENSE-2.0
'
' SPDX-License-Identifier: Apache-2.0
' *******************************************************************************
@startuml fork

start
fork
:A;
fork again
:B;
end
fork again
:C;
fork again
:D;
end fork
stop

@enduml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"fork.puml": {
"name": "fork",
"statements": [
{
"Start": null
},
{
"ForkStart": null
},
{
"Action": {
"label": "A"
}
},
{
"ForkAgain": null
},
{
"Action": {
"label": "B"
}
},
{
"Stop": null
},
{
"ForkAgain": null
},
{
"Action": {
"label": "C"
}
},
{
"ForkAgain": null
},
{
"Action": {
"label": "D"
}
},
{
"ForkEnd": {
"kind": "EndFork",
"modifier": null
}
},
{
"Stop": null
}
]
}
}
Loading
Loading