Skip to content

Conversation

@bobjacobsen
Copy link
Contributor

This extends the class diagram support to include Protocol and Struct types with circle-P and circle-S letters respectively. This allows use of the diagrams for the Swift language.

Classes

This PR doesn't include updates for the web pages (see the "Declaring element" section, as couldn't find where that was maintained. All that's needed is to add "protocol" and "struct" examples to that section.

@arnaudroques arnaudroques merged commit f6b47e6 into plantuml:master Jun 6, 2022
@The-Lum
Copy link
Collaborator

The-Lum commented Jun 6, 2022

Hello all,

This PR doesn't include updates for the web pages (see the "Declaring element" section, as couldn't find where that was maintained. All that's needed is to add "protocol" and "struct" examples to that section.

FYI: I just add protocol and struct on the alpha-doc.

The-Lum added a commit to The-Lum/vscode-plantuml that referenced this pull request Jun 7, 2022
To follow this new PlantUML functionality:
- plantuml/plantuml#1028

Adding on `line begin keywords`: 
- `protocol`
- `struct`
qjebbs pushed a commit to qjebbs/vscode-plantuml that referenced this pull request Jun 22, 2022
…ords (`remove`, `compact`, ...) (#491)

* upd: add keywords on `hide & show`

Add on `hide & show` section:
- `remove` 
- `empty description`
- `@unlinked`
- `$tag`

* upd: add keywords (on `line begin keywords`)

Add on `line begin keywords`:
- `json`
- `compact` [TODO: `mode compact`]

* upd: add `protocol` and `struct` on `keywords`

To follow this new PlantUML functionality:
- plantuml/plantuml#1028

Adding on `line begin keywords`: 
- `protocol`
- `struct`
gender = EntityGenderUtils.byEntityType(LeafType.ABSTRACT_CLASS);
} else if (arg1.equalsIgnoreCase("annotation")) {
gender = EntityGenderUtils.byEntityType(LeafType.ANNOTATION);
} else if (arg1.equalsIgnoreCase("protocol")) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @bobjacobsen, and all,

Why the executeDescriptionDiagram function (see line 134):

https://github.com/bobjacobsen/plantuml/blob/2b337ac940996904fa2f41d3135728b63986fcf0/src/net/sourceforge/plantuml/classdiagram/command/CommandHideShowByGender.java#L133-L134

does not have the same lines:

		} else if (arg1.equalsIgnoreCase("protocol")) {
			gender = EntityGenderUtils.byEntityType(LeafType.PROTOCOL);
		} else if (arg1.equalsIgnoreCase("struct")) {
			gender = EntityGenderUtils.byEntityType(LeafType.STRUCT);

@bobjacobsen
Copy link
Contributor Author

My apologies. I didn't realize that code was there. Should I create another PR with that added?

The-Lum added a commit to The-Lum/puml-themes-gallery that referenced this pull request Jul 15, 2022
Add new types:
- protocol
- struct
- exception

_Ref.:_
- plantuml/plantuml#1028
- plantuml/plantuml#1056
@FOTSOWOMGNESYLVESTRECHRISTIAN

@startuml
class Etudiant {
+id : int
+matricule : string
+nom_complet : string
+specialite_id : int
+filiere_id : int
+statut : string
}

class Specialite {
+id : int
+nom : string
}

class Filiere {
+id : int
+nom : string
+specialite_id : int
}

class Matiere {
+id : int
+nom : string
}

class Admin {
+id : int
+nom_utilisateur : string
+mot_de_passe : string
}

class Presence {
+id : int
+etudiant_id : int
+matiere_id : int
+date_presence : date
+statut : string
}

Etudiant --> Filiere
Filiere --> Specialite
Etudiant --> Presence
Matiere --> Presence
@enduml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants