Intellsense features do not work with !include
ReidWeb opened this issue · 0 comments
Summary of defect
When using this plugin, my team and I really appreciate the Intellisense features that the plugin gives us to predict participant names for example when authoring a sequence diagram.
However based on our testing, we cannot get such prediction to work when the participants are declared in an external file and included.
I believe my workspace is setup correctly, the preview returns with the 'declared name' fine.
Behaviours
Expected
Feature: IntelliSense/Intelligent prediction
Scenario: Predict a participant name for a sequence diagram where participant is declared in an included file
Given I have a participant declared `participant "Service" as SRV`
And that participant is declared in an external file
And I have the PlantUML plugin installed
And I have the `includepaths` setting declared
When I type `S` into VS Code
Then Intellisense should return `SRV` as an option in the prediction
Actual
Feature: IntelliSense/Intelligent prediction
Scenario: Predict a participant name for a sequence diagram where participant is declared in an included file
Given I have a participant declared `participant "Service" as SRV`
And that participant is declared in an external file
And I have the PlantUML plugin installed
And I have the `includepaths` setting declared
When I type `S` into VS Code
Then Intellisense does not return the prediction for SRV
Reproducability
Files as follows
VS Code Settings
{
"plantuml.includepaths": [
"common"
],
}
common/common_segments.puml
@startuml(id=participants)
participant "Service" as SRV
@enduml(id=participants)
diagrams/my_sequence_diagram.puml
@startuml
!include common_segments!participants
S
@enduml
Use case
You might ask, why are we doing this?
We have a series of sequence diagrams describing a complicated feature, we want to break those down into smaller segments with fewer participants and fewer activities; we don't want to have to re-declare the same participant list across all our diagrams. This has the additional benefit of us being able to rename a participant display name, order or grouping once and have it update across all our diagrams in seconds.