Comments (3)
@JanBliznicenko I tried looking into this as well, but I'm not completely sure how to approach it. It would definitely be possible to just add these methods to Note, but I don't think that's exactly a good idea from object design perspective. Another solution might be to not show Notes on there at all, but someone might want to be able to hide them, so it's also probably not the best. Last option I can think of would be to add all elements something like a "displayName" method, and return umlClassName in UML elements and "Note" for Notes.
from openponk.
Two more things:
I noticed that OPNote and OPUMLElement actually don't share any class in the hierarchy besides Object - that means that for the third approach the hierarchy would probably also have to be reworked (having two completely unrelated classes have methods sharing name and calling the two unrelated methods based on the object at hand just screams bad OOP, imo).
I also noticed that OPNote doesn't have option to hide it, unlike most of the objects. That means the second approach might actually be the correct one?
from openponk.
Yes, the Note (and Boundary) are a little special. While all the other elements are parts of the model (root UML package in this case), Note and Boundary are completely outside of the model (even though they have model classes OPNote and OPBoundary).
And as you correctly say, they should not even support the hiding and showing, because "show" basically means "create diagram representation of the model element" and "hide" means "remove diagram representation of the model element, but keep the model element itself". Since note and boundary are not model elements, hide = remove and show makes no sense.
from openponk.
Related Issues (20)
- [Feature request] Make quit dialog modal HOT 3
- [Bug] Note elements break model verification HOT 2
- [Bug] Mouse position detection when aligining arrows seems to be off HOT 2
- [Bug] Text prompts cannot be confirmed with Enter key HOT 3
- [Bug] Mode generalization not accepted by model verificator HOT 2
- [Bug] Displayed information about a Generalization set don't get updated automatically after modification
- [Bug] Immovable line angles HOT 4
- [Feature request] Show current filename HOT 1
- [Bug] Unable to "Export as PNG" to path that includes Unicode characters HOT 3
- [Feature request] Allow hiding individual elements from "By type" tab of "Show / Hide Elements" window
- [Feature request] Allow for vertical resizing of Name and Comment text boxes
- Guide on building and contributing? HOT 2
- [Feature request] Make element name dialog modal HOT 1
- [Bug] Note element text is not shown immediately HOT 3
- [Feature request] Indicate incomplete visibility of element type HOT 1
- Markov Chain Modelling and Simulation HOT 1
- [Feature request] Option to disable guidelines/gridlines HOT 2
- [BUG] chyba BORM při přidávání data flow do diagramu HOT 1
- [Feature] Hiding labels
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openponk.