AlloyTools / org.alloytools.alloy

Alloy is a language for describing structures and a tool for exploring them. It has been used in a wide range of applications from finding holes in security mechanisms to designing telephone switching networks. This repository contains the code for the tool.
Other
709 stars 124 forks source link

Feature Request: Line Numbers #79

Closed hwayne closed 1 year ago

hwayne commented 5 years ago

The current Alloy IDE doesn't have line numbers. I think this would help a lot!

BElluu commented 4 years ago

Hello. Can I take care of this task?

pkriens commented 4 years ago

Of course, make a PR!

If you do, you might want to think of the Markdown mode. In that case the line numbers should only be active in the Alloy sections to match warnings.

nigelkerr commented 2 years ago

Hello Alloy Friends,

I think to pick this line-numbers in Alloy up. My thought is that it is a boolean Editor preference, propagating down to each instance of OurSyntaxWidget. I base that on how font-family and font-size are set and propagated already. I see at least one strategy that will straight-forwardly apply.

@pkriens suggests in a previous comment that the line number behavior might want to be different in the Markdown mode, and I'd like to understand the suggestion better. I observe that if I load an alloy-bearing .md file, and introduce a syntax error, Alloy reports the error on the line in the whole file, not just relative to the alloy markup sections. Please advise.

pkriens commented 2 years ago

It is true that when I wrote the translate function to turn the markdown to Alloy, I inserted empty lines for each non-alloy line. So line numbers should match up. Not need to do anything special. Sorry for the confusion.

nigelkerr commented 2 years ago

Thank you @pkriens for clarification, I didn't want to miss something important.

pkriens commented 1 year ago

Is implemented