nahakiole / staruml-php

PHP extension for StarUML
https://staruml.io/extensions
MIT License
17 stars 8 forks source link

Property "readOnly" won't generate to a class constant #1

Closed sven-ahrens closed 5 years ago

sven-ahrens commented 5 years ago

Attribute property: "readOnly" won't convert to const With StarUML you can create--of course--attributes. Some of them may be constants so there is an option to mark them as such. This property is called readOnly.

Attach the .mdj file .mdj files are not supported which is why I created two sceenshots.

To Reproduce Steps to reproduce the behavior:

  1. Create a class diagram
  2. Create a class
  3. Create an attribute
  4. Click on the attribute to configure
  5. Go under "Properties"
  6. Click "isReadOnly" to mark it as a class constant
  7. Go under Tools > PHP and click on "Generate code"

Expected behavior

  1. Code should be generated
  2. The generated attribute should be a class constant variable

Actual behavior

  1. The readOnly property gets ignored and the generated attribute is a normal class variable.

Screenshots

Bildschirmfoto 2019-03-28 um 22 53 18 Bildschirmfoto 2019-03-28 um 22 53 53
nahakiole commented 5 years ago

Thank you for reporting the bug, I fixed it with https://github.com/nahakiole/staruml-php/commit/80ff72cbad8f2ce73798e96656ebe8e6bb8598f8 and I'll try to release 0.0.2 today which will include the bugfix.