orc-lang / orc

Orc programming language implementation
https://orc.csres.utexas.edu/
BSD 3-Clause "New" or "Revised" License
40 stars 3 forks source link

The Orc eclipse plugin does not highlight matching braces #191

Open arthurp opened 7 years ago

arthurp commented 7 years ago

Unlike the Scala/Java editors and the default eclipse text editor, the Orc editor does not highlight the matching brace of the brace before the cursor. This is a small issue, but is a surprisingly important feature for me (since I lose track of brace matching easily).

Is this an easy fix? Can we just turn it on and provide a list of braces? Or would be have to implement it?

arthurp commented 7 years ago

@jthywiss You would be the one who might actually know what would go into making this happen. I'd like to address this if it will take less than a few hours of work since I've realized that improving the plugin is important for me now that I am actually programming in Orc instead of working on the Orc compiler/interpreter.

jthywiss commented 7 years ago

This is implemented in the master head, and I see it functioning in an open Orc editor right now for parentheses, braces, and brackets.

Do you have the master head plug-in? Do your Eclipse prefs have this enabled? Are there more pair types we need to match?

arthurp commented 7 years ago

I have the a recent build of the plug-in. I built it myself at the end of last week from master.

Highlighting is working on both Scala and Java and I cannot find any option that is specific to Orc or any related mode.

Highlighting is currently not working on any kind of brace. We might need to add some kinds later, but for the moment I just want to have it for () and {}.

jthywiss commented 7 years ago

Perhaps we are talking about different functions.

The standard Eclipse source editor highlights the matching character of a pair when your insertion point is next to the start or end of a pair. By default this is a gray outline. This runs in the Orc editor. See OrcEditor.java lines 103–106 for the implementation.

The JDT editor extends several other editor functions involving braces, such as the double-click strategy, folding, and expanding selections. Those are not implemented in the Orc editor, but the double-click strategy enhancement, for instance, would be easy.

arthurp commented 7 years ago

That is exactly what I'm talking about. And it's not working for me. I'll debug more when I have time. I hoped this would be easy.

What version of eclipse are you on? I'm on neon.2.

On Tue, Feb 21, 2017, 11:47 John A. Thywissen notifications@github.com wrote:

Perhaps we are talking about different functions.

The standard Eclipse source editor highlights the matching character of a pair when your insertion point is next to the start or end of a pair. By default this is a gray outline. This runs in the Orc editor. See OrcEditor.java lines 103–106 https://github.com/orc-lang/orc/blob/master/OrcEclipse/src/edu/utexas/cs/orc/orceclipse/edit/OrcEditor.java#L103-L106 for the implementation.

The JDT editor extends several other editor functions involving braces, such as the double-click strategy, folding, and expanding selections. Those are not implemented in the Orc editor, but the double-click strategy enhancement, for instance, would be easy.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/orc-lang/orc/issues/191#issuecomment-281421226, or mute the thread https://github.com/notifications/unsubscribe-auth/AAFYWa8SXZs-VPW9awjRk0gK0rxpDIwFks5reyM6gaJpZM4MFNnY .

jthywiss commented 7 years ago

Eclipse IDE for Eclipse Committers

Version: Neon.2 Release (4.6.2) Build id: 20161208-0600

arthurp commented 7 years ago

I'll try that when I have a chance. I'm running on a Scala IDE release upgraded to neon.2. but I kinda doubt that's the problem since highlighting works in other editors.

I'm gonna drop this for now. To much else to do.

On Tue, Feb 21, 2017, 11:58 John A. Thywissen notifications@github.com wrote:

Eclipse IDE for Eclipse Committers

Version: Neon.2 Release (4.6.2) Build id: 20161208-0600

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/orc-lang/orc/issues/191#issuecomment-281424575, or mute the thread https://github.com/notifications/unsubscribe-auth/AAFYWc3QFQO2I6-vZ8NiF-PlAvAG_oriks5reyW8gaJpZM4MFNnY .