Skip to content

Commit

Permalink
Merge pull request #419 from Systems-Modeling/ST6RI-613
Browse files Browse the repository at this point in the history
ST6RI-613: Update PlantUML to 1.2022.7.himi1
  • Loading branch information
seidewitz authored Nov 9, 2022
2 parents 5331c10 + c695427 commit 604154f
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion org.omg.sysml.plantuml/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Bundle-Version: 0.29.0.qualifier
Export-Package: org.omg.sysml.plantuml
Import-Package: com.google.common.collect,
com.google.inject;version="1.3.0",
net.sourceforge.plantuml;version="1.2020.14.himi7",
net.sourceforge.plantuml;version="1.2022.7.himi2",
org.eclipse.emf.common,
org.eclipse.emf.common.util,
org.eclipse.emf.ecore,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,15 @@ public class SysML2PlantUMLStyle {
static {
addp(null,
"Standard B&&W",
"skinparam monochrome true\n"
+ "skinparam classbackgroundcolor white\n"
+ "skinparam shadowing false\n"
"skin sysmlbw\n"
+ "skinparam monochrome true\n"
+ "skinparam wrapWidth 300\n"
+ "hide circle\n", null,
"classic", "true");
addp("STDCOLOR",
"Standard style with colors",
"skinparam wrapWidth 300\n"
"skin sysmlc\n"
+ "skinparam wrapWidth 300\n"
+ "hide circle\n",
new StyleSwitch(new StyleRelDefaultSwitch() {
@Override
Expand All @@ -114,7 +114,8 @@ public String caseBindingConnector(BindingConnector object) {
}, null),
"decoratedRedefined", "true");
addp("PLANTUML",
"PlantUML Style", " ",
"PlantUML Style",
" ",
new StyleSwitch(new StyleRelDefaultSwitch() {
@Override
public String caseConnector(Connector object) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -441,13 +441,18 @@ public List<? extends EObject> setupVisualizationEObjects(EObject eObj) {
}

private void addStyleHeader(StringBuilder sb) {
int start = sb.length();
for (SysML2PlantUMLStyle style: styles) {
if (style.isPrimary()) {
sb.insert(start, style.commandStr);
} else {
sb.append(style.commandStr);
}
}
SysML2PlantUMLStyle s = getVisitorStyle();
if (s != null) {
sb.append(s.commandStr);
}
for (SysML2PlantUMLStyle style: styles) {
sb.append(style.commandStr);
}
sb.append('\n');
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -351,15 +351,12 @@ private String addTitle(String prev, CompartmentEntry ce) {
String title = ce.getTitle();
if (title.equals(prev)) return prev;

/* Still PlantUML fails the indentation and need to be updated.
* if (prev != null) {
* append("____\n");
* }
* append("==== ");
*/
append("--");
if (prev != null) {
append("--\n");
}
append("##//");
append(title);
append("--\n");
append("//##\n");
return title;
}

Expand Down Expand Up @@ -552,10 +549,7 @@ private void addDocumentations() {
if (documentations == null) return;

boolean flag = false;
/* PlantUML needs to be updated to support centering.
* Before that, we do not add a title to documentation compartment.
* append("==== // documentation //\n");
*/
append("##//documentations//##\n");
for (Documentation doc: documentations) {
String name = doc.getName();
if (name != null && !name.isEmpty()) {
Expand Down

0 comments on commit 604154f

Please sign in to comment.