-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
After update to 1.1.25 certain diagrams with Windows' line endings don't render #128
Comments
Could you also check the PlantUML source view? |
For me the same. |
If the source view is updated, we at least know that the views are correctly triggered by changes in the editor, but something must be happening when the text is converted to a diagram. No entries in the Error log view? I'm a bit confused when you say "rewritten from scratch", do you mean removing and recreating the file, or clearing the editor before reentering the (same) code? Could you provide a sample file? |
If I create a new txt file from scratch, and write @startuml and so on, the diagram is shown. |
I must admit I haven't a clue, as I couldn't reproduce it. Perhaps we could have a screen sharing session with e.g. Teams where you can show it to me. |
I also tried with the following combination, still same issue: PlantUML Ecore Feature 1.24 It seems the issue depends on PlantUML Feature 1.25 or PlantUML Library 2021. Other combinations are not possible since not compatible (according to the update attempt). |
Probaby one of the following two features for 1.25 introduced the issue:
|
Diagram generation is split in three. First the intention is provided, this happens on the UI thread. Then the source of the diagram is generated, as a background task. This part apparently works, as the source view updates correctly. Finally, if you need an actual diagram, the image is generated (in the same background task) and the UI is updated (naturally on the UI thread). There's logic to prevent the UI to update when a diagram arrives, if it thinks it is about to overwrite a more recently requested diagram. Perhaps this logic is faulty. But as I said, it works for me, and I would assume it works for most others, as there hasn't been reports other than those in this issue. BTW, what platform are you on? I'm not sure that should matter, but it's worth noting. |
Windows 10 64 bits. Tried with both Eclipse 2019 and an Eclipse 2021 freshly installed. |
That's so strange, when an editor opens and triggers my listener, the listener doesn't know whether the file is new or not. |
That's the point. |
I think I understood where the problem is. |
By the way, also math formulas are not shown anymore. |
If you can experiment and identify the precise conditions for when the ending @enduml is missing, it will be very helpful! Please open another issue for the math formulas. |
Simply: |
A cannot reproduce this in either my development eclipse (Eclipse 2020-6) or Luna (the target), sorry. |
Crazy. Did you try with a file where @enduml is followed by some empty lines? |
Yes, tried with lots of combinations of nothing, whitespace and stuff. Encoding of line endings may have something to do with it (I'm on MacOS). |
Yes, it seems to be the reason! |
Probably lines after @enduml does not play any role; the real issue is if the newline on the same line of @enduml is "\n" instead of "\r\n". |
In general I'm used to java converting line endings from platform specific ones to just \n, but that might not be happening when I use the editor (Document) API. I can see if there are places where I look for @enduml (or other tags) followed by just \n. Maybe I can replace that with the platform line ending. It's a bit difficult for me to test, though, since I don't use or have a windows computer. But I may be able to at least insert a \r before the \n to see why/where it fail. |
Note to self: IDocument has a getLineDelimiter(int line) method that maybe should be used in TextDiagramIntentHelper for normalising the end of line, so most code can expect to see only \n |
@danieleb2000 and @Lutz13 |
Ok, so the original problem seems to be solved. This particular error message is due to work on a new feature, that wasn't finished when publishing the snapshot. I'll release 1.1.26 soon with fixes for both. |
Great, thank you! |
So far I was able to edit a digram-code in Eclipse text editor (file extension: *.puml), and the diagram was automatically generated and shown in the PlantUML view.
After updating the plugin to version 1.1.25 today, the diagram is no longer generated, whatever I try.
Eclipse:
Version: 2021-03 (4.19.0)
Build id: 20210312-0638
The text was updated successfully, but these errors were encountered: