Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Improvement Request on Highlighting Implicit Conversions
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  19 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Seyed H. HAERI (Hossein)  
View profile  
 More options Aug 17 2012, 9:38 pm
From: "Seyed H. HAERI (Hossein)" <hossein.ha...@gmail.com>
Date: Sat, 18 Aug 2012 03:38:58 +0200
Local: Fri, Aug 17 2012 9:38 pm
Subject: Improvement Request on Highlighting Implicit Conversions

Dear all,

Let me begin by expressing my excitement about the semantic highlighting of
ScalaIDE. In particular, I find the underlining business extremely useful
for implicit conversions. Yet, I have a suggestion which, IMHO, can make
that even more useful. Consider my following piece of code:

private[this] def materialise(pi: HBNode[Exp], ubs: Map[Idn, Exp]) {
  var ret_pi: HBNLike[Exp] = pi
  for(b <- ubs) ret_pi = hbnizer {//***
    ret_pi match {
      case HBNLike(_, g, xvar, _, vx, "var") if
(xvar.asInstanceOf[Exp#Var].name == b._1) => {
        val x = b._1
        val prem: ProofTree =
           () justifies HBReduction(g - x, vx.asInstanceOf[Exp], g - x, vx)
using "lam"
        prem justifies ((g<b>) <:> xvar >> (g<b>) <:> vx) using "var"
      }
    }
  }

}

What is returned by hbnizer in the line marked with *** above is of type
HBNode[Exp] which gets implicitly converted to an HBNLike[Exp] instance. As
a result of this implicit conversion, all the lines from that one onwards
until the third last are underlined to highlight the implicit. This to some
extends harms readability I'm afraid. The conclusion I would like to draw
is that more ingenuity is needed for this underlining business when it
spans over several lines. For example, in my code snippet above, it would
be nicer if I could get line *** to be underlined -- but, only until the
opening brace -- in addition to the line where the closing brace is. This
would also improve visibility of the rest of implicits between these two
lines.

TIA,
--Hossein

--------------------------------------------------------------------------- -----------------------------------

Seyed H. HAERI (Hossein)

Research Assistant
Institute for Software Systems (STS)
Technical University of Hamburg (TUHH)
Hamburg, Germany

ACCU - Professionalism in programming - http://www.accu.org/
--------------------------------------------------------------------------- -----------------------------------


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mirco Dotta  
View profile   Translate to Translated (View Original)
 More options Aug 18 2012, 4:29 am
From: Mirco Dotta <mirco.do...@typesafe.com>
Date: Sat, 18 Aug 2012 01:29:23 -0700 (PDT)
Local: Sat, Aug 18 2012 4:29 am
Subject: Re: Improvement Request on Highlighting Implicit Conversions
And you are right to think that ;-)

Eclipse > Preferences > Implicits > Only highlight the first line in
an implicit conversion

(and I'd argue that this should be the default)

Have fun!

-- Mirco

On Aug 18, 3:38 am, "Seyed H. HAERI (Hossein)"


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mirko Stocker  
View profile  
 More options Aug 18 2012, 4:57 am
From: Mirko Stocker <m...@misto.ch>
Date: Sat, 18 Aug 2012 10:57:29 +0200
Local: Sat, Aug 18 2012 4:57 am
Subject: Re: [scala-ide-user] Re: Improvement Request on Highlighting Implicit Conversions

On Sat, Aug 18, 2012 at 10:29 AM, Mirco Dotta <mirco.do...@typesafe.com> wrote:
> (and I'd argue that this should be the default)

+1

--
Mirko Stocker | m...@misto.ch
Work: http://ifs.hsr.ch | http://infoq.com
Personal: http://misto.ch | http://twitter.com/m_st


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mirco Dotta  
View profile   Translate to Translated (View Original)
 More options Aug 18 2012, 5:06 am
From: Mirco Dotta <mirco.do...@typesafe.com>
Date: Sat, 18 Aug 2012 02:06:17 -0700 (PDT)
Local: Sat, Aug 18 2012 5:06 am
Subject: Re: Improvement Request on Highlighting Implicit Conversions
https://scala-ide-portfolio.assembla.com/spaces/scala-ide/tickets/100...

If anyone wants to give it a shot during the w/e

-- Mirco

On Aug 18, 10:57 am, Mirko Stocker <m...@misto.ch> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sandro Gržičić  
View profile  
 More options Aug 18 2012, 7:26 pm
From: Sandro Gržičić <seriousw...@gmail.com>
Date: Sat, 18 Aug 2012 16:26:54 -0700 (PDT)
Local: Sat, Aug 18 2012 7:26 pm
Subject: Re: Improvement Request on Highlighting Implicit Conversions

I "fixed" it and made a PR.

https://github.com/scala-ide/scala-ide/pull/186

This is my first Scala IDE pull request, so be harsh in case I messed
something up (hard to do with this commit, but still)! :)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Miles Sabin  
View profile  
 More options Aug 20 2012, 5:34 am
From: Miles Sabin <mi...@milessabin.com>
Date: Mon, 20 Aug 2012 10:34:19 +0100
Local: Mon, Aug 20 2012 5:34 am
Subject: Re: [scala-ide-user] Re: Improvement Request on Highlighting Implicit Conversions

On Sat, Aug 18, 2012 at 9:29 AM, Mirco Dotta <mirco.do...@typesafe.com> wrote:
> And you are right to think that ;-)

> Eclipse > Preferences > Implicits > Only highlight the first line in
> an implicit conversion

> (and I'd argue that this should be the default)

I actually don't much like that, because then the underlining becomes
fairly disconnected from the semantics that it's supposed to be
highlighting.

I think what I'd rather see is the point of application an implicit
being highlighted in the source text with a caret or something like
that. Then you could use the caret to provide hovers (ie. hover over
caret to see expanded source), links (ie. click on caret to link to
implicit definition) and refactorings (ie. right click on caret for
menu of refactorings such as expand inline).

Cheers,

Miles

--
Miles Sabin
tel: +44 7813 944 528
skype: milessabin
gtalk: mi...@milessabin.com
g+: http://www.milessabin.com
http://twitter.com/milessabin


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mirco Dotta  
View profile  
 More options Aug 23 2012, 10:16 am
From: Mirco Dotta <mirco.do...@typesafe.com>
Date: Thu, 23 Aug 2012 16:16:37 +0200
Local: Thurs, Aug 23 2012 10:16 am
Subject: Re: [scala-ide-user] Improvement Request on Highlighting Implicit Conversions

On Aug 20, 2012, at 11:34 AM, Miles Sabin wrote:

Hi Miles,

you have a valid point, but I still feel the current way of highlighting
everything is simply too noisy. So, if I have to pick between the two
currently available options, my vote goes for highlighting only the first
line.

Let's see what the rest of the folks think.

-- Mirco


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Miles Sabin  
View profile  
 More options Aug 23 2012, 11:51 am
From: Miles Sabin <mi...@milessabin.com>
Date: Thu, 23 Aug 2012 16:51:15 +0100
Local: Thurs, Aug 23 2012 11:51 am
Subject: Re: [scala-ide-user] Improvement Request on Highlighting Implicit Conversions

On Thu, Aug 23, 2012 at 3:16 PM, Mirco Dotta <mirco.do...@typesafe.com> wrote:
> you have a valid point, but I still feel the current way of highlighting
> everything is simply too noisy. So, if I have to pick between the two
> currently available options, my vote goes for highlighting only the first
> line.

> Let's see what the rest of the folks think.

I think I should really have said: I actually don't much like that _either_ ;-)

In the light of experience I'd say that underlining doesn't work very
well at all as a highlighting mechanism for implicits. I find the
markers in the margin a lot more useful and I'd be happy to turn the
underlining off completely so long as the markers remained.

A caret or similar at the actual implicit application points would be
even better, but obviously that'd be a new feature.

Cheers,

Miles

--
Miles Sabin
tel: +44 7813 944 528
skype: milessabin
gtalk: mi...@milessabin.com
g+: http://www.milessabin.com
http://twitter.com/milessabin


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Miles Sabin  
View profile  
 More options Aug 23 2012, 11:56 am
From: Miles Sabin <mi...@milessabin.com>
Date: Thu, 23 Aug 2012 16:56:24 +0100
Local: Thurs, Aug 23 2012 11:56 am
Subject: Re: [scala-ide-user] Improvement Request on Highlighting Implicit Conversions

On Thu, Aug 23, 2012 at 4:51 PM, Miles Sabin <mi...@milessabin.com> wrote:
> In the light of experience I'd say that underlining doesn't work very
> well at all as a highlighting mechanism for implicits. I find the
> markers in the margin a lot more useful and I'd be happy to turn the
> underlining off completely so long as the markers remained.

Ahem ... well, I just went and took another look, and what I want is
already possible.

It's in preferences, under,

  General => Editors => Text Editors => Annotations => Scala Implicit

and then deselect the "Text as" option. The underlining goes, but the
markers are still present :-)

Cheers,

Miles

--
Miles Sabin
tel: +44 7813 944 528
skype: milessabin
gtalk: mi...@milessabin.com
g+: http://www.milessabin.com
http://twitter.com/milessabin


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Damian H  
View profile   Translate to Translated (View Original)
 More options Aug 24 2012, 10:37 am
From: Damian H <damianhe...@gmail.com>
Date: Fri, 24 Aug 2012 07:37:05 -0700 (PDT)
Local: Fri, Aug 24 2012 10:37 am
Subject: Re: [scala-ide-user] Improvement Request on Highlighting Implicit Conversions

thanks for pointing that out Miles, the underlining has been making my eyes
hurt!


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rafael de F. Ferreira  
View profile   Translate to Translated (View Original)
 More options Aug 26 2012, 10:54 pm
From: "Rafael de F. Ferreira" <raf...@rafaelferreira.net>
Date: Sun, 26 Aug 2012 23:54:23 -0300
Local: Sun, Aug 26 2012 10:54 pm
Subject: Re: [scala-ide-user] Improvement Request on Highlighting Implicit Conversions
This discussion reminded me of a feature request I've been meaning to
make for a while. Highlighting implicits and showing inferred
semicolons is useful but perhaps already too cluttering, and I think
Scala tooling would benefit from more desugaring info. I'd love to see
a "Code Inspection" panel that mirrored a section of the currently
focused source code (perhaps visually similar to the JDT's Declaration
View) with toggles to show synthesized code such as  "implicits
expansion", "inferred semicolons", "inferred member types",
"for-comprehension desugaring", "extractor desugaring", etc.

It's possible to show all that information on the existing editor
given the appropriate highlights and tooltips, but having it all
available on a separate pane just a glance away would be a net win
IMO. What do you guys think?

--
Rafael de F. Ferreira.
http://www.rafaelferreira.net/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
iulian dragos  
View profile  
 More options Aug 27 2012, 4:18 am
From: iulian dragos <jagua...@gmail.com>
Date: Mon, 27 Aug 2012 10:18:41 +0200
Local: Mon, Aug 27 2012 4:18 am
Subject: Re: [scala-ide-user] Improvement Request on Highlighting Implicit Conversions

On Mon, Aug 27, 2012 at 4:54 AM, Rafael de F. Ferreira <

This is indeed something very useful, especially when developing the IDE
itself. I've been meaning to do a 'dev support plugin' for a while, with
the intention that a separate view shows you information about the current
selection:

- AST nodes
- position information (many times when semantic actions don't work as
expected, it's the position information that is skewed or otherwise
inaccurate)
- symbol and type
- pretty-printed de-sugared trees (this would include expanded macros in
2.10)

It would be a fun project, but I can't fit it in the current milestone
plans, and we're already late. I'd be motivated to kick it off if someone
could lend me a hand.

cheers,
iulian

--
« Je déteste la montagne, ça cache le paysage »
Alphonse Allais

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Seyed H. HAERI (Hossein)  
View profile  
 More options Aug 27 2012, 5:47 am
From: "Seyed H. HAERI (Hossein)" <hossein.ha...@gmail.com>
Date: Mon, 27 Aug 2012 11:47:39 +0200
Local: Mon, Aug 27 2012 5:47 am
Subject: Re: [scala-ide-user] Improvement Request on Highlighting Implicit Conversions
I have absolutely no experience in Eclipse plugin development. But,
this one, I'm sure will be useful to my research too. (I'm a
programming languages guy after all. :p) So, I'm up for it! :) But
will need a lot of startup guidance...

On 27 August 2012 10:18, iulian dragos <jagua...@gmail.com> wrote:

--
--------------------------------------------------------------------------- -----------------------------------

Seyed H. HAERI (Hossein)

Research Assistant
Institute for Software Systems (STS)
Technical University of Hamburg (TUHH)
Hamburg, Germany

ACCU - Professionalism in programming - http://www.accu.org/
--------------------------------------------------------------------------- -----------------------------------


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jeppe Nejsum Madsen  
View profile   Translate to Translated (View Original)
 More options Aug 27 2012, 6:07 am
From: Jeppe Nejsum Madsen <je...@ingolfs.dk>
Date: Mon, 27 Aug 2012 12:07:31 +0200
Local: Mon, Aug 27 2012 6:07 am
Subject: Re: [scala-ide-user] Improvement Request on Highlighting Implicit Conversions
On Mon, Aug 27, 2012 at 4:54 AM, Rafael de F. Ferreira

<raf...@rafaelferreira.net> wrote:
> This discussion reminded me of a feature request I've been meaning to
> make for a while. Highlighting implicits and showing inferred
> semicolons is useful but perhaps already too cluttering, and I think
> Scala tooling would benefit from more desugaring info. I'd love to see
> a "Code Inspection" panel that mirrored a section of the currently
> focused source code (perhaps visually similar to the JDT's Declaration
> View) with toggles to show synthesized code such as  "implicits
> expansion", "inferred semicolons", "inferred member types",
> "for-comprehension desugaring", "extractor desugaring", etc.

> It's possible to show all that information on the existing editor
> given the appropriate highlights and tooltips, but having it all
> available on a separate pane just a glance away would be a net win
> IMO. What do you guys think?

Sounds very nice! I also tend to think there's too much going on with
the current highlights

/Jeppe


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rafael de F. Ferreira  
View profile  
 More options Aug 27 2012, 8:11 pm
From: "Rafael de F. Ferreira" <raf...@rafaelferreira.net>
Date: Mon, 27 Aug 2012 21:11:02 -0300
Local: Mon, Aug 27 2012 8:11 pm
Subject: Re: [scala-ide-user] Improvement Request on Highlighting Implicit Conversions
On Mon, Aug 27, 2012 at 7:07 AM, Jeppe Nejsum Madsen <je...@ingolfs.dk> wrote:

Should I open a feature request on JIRA?

--
Rafael de F. Ferreira.
http://www.rafaelferreira.net/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mirco Dotta  
View profile  
 More options Sep 19 2012, 7:23 am
From: Mirco Dotta <mirco.do...@typesafe.com>
Date: Wed, 19 Sep 2012 13:23:26 +0200
Local: Wed, Sep 19 2012 7:23 am
Subject: Re: [scala-ide-user] Improvement Request on Highlighting Implicit Conversions

> This discussion reminded me of a feature request I've been meaning to
> make for a while. Highlighting implicits and showing inferred
> semicolons is useful but perhaps already too cluttering, and I think
> Scala tooling would benefit from more desugaring info. I'd love to see
> a "Code Inspection" panel that mirrored a section of the currently
> focused source code (perhaps visually similar to the JDT's Declaration
> View) with toggles to show synthesized code such as  "implicits
> expansion", "inferred semicolons", "inferred member types",
> "for-comprehension desugaring", "extractor desugaring", etc.

> It's possible to show all that information on the existing editor
> given the appropriate highlights and tooltips, but having it all
> available on a separate pane just a glance away would be a net win
> IMO. What do you guys think?

Excellent idea!

---------------
Mirco Dotta
Typesafe - The software stack for applications that scale
PSE-D, 1015 Lausanne, Switzerland
Work: +41 (0)21 691 49 65
Twitter: @mircodotta

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
James Moore  
View profile  
 More options Sep 20 2012, 1:29 pm
From: James Moore <ja...@restphone.com>
Date: Thu, 20 Sep 2012 10:28:24 -0700
Local: Thurs, Sep 20 2012 1:28 pm
Subject: Re: [scala-ide-user] Improvement Request on Highlighting Implicit Conversions

On Wed, Sep 19, 2012 at 4:23 AM, Mirco Dotta <mirco.do...@typesafe.com>wrote:

> This discussion reminded me of a feature request I've been meaning to
> make for a while. Highlighting implicits and showing inferred
> semicolons is useful but perhaps already too cluttering, and I think
> Scala tooling would benefit from more desugaring info. I'd love to see
> a "Code Inspection" panel that mirrored a section of the currently
> focused source code (perhaps visually similar to the JDT's Declaration
> View) with toggles to show synthesized code such as  "implicits
> expansion", "inferred semicolons", "inferred member types",
> "for-comprehension desugaring", "extractor desugaring", etc.

That sounds great.  I'd also like it to be able to do the opposite:  take a
chunk of code, and remove everything that could be provided implicitly.
 Take out semicolons, parens, explicit types, etc, as long as the code
compiles to the same thing.  Sort of like a set of lenses for looking at
code - I think there's more than one view visible at a time, too.

I'd also like an option for named parameters (show / hide).

--
James Moore
ja...@restphone.com
http://blog.restphone.com/
http://www.linkedin.com/in/jamesmmooreiv


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
iulian dragos  
View profile  
 More options Oct 3 2012, 3:48 am
From: iulian dragos <jagua...@gmail.com>
Date: Wed, 3 Oct 2012 09:47:51 +0200
Local: Wed, Oct 3 2012 3:47 am
Subject: Re: [scala-ide-user] Improvement Request on Highlighting Implicit Conversions

It happened, after all. Meet the Scala plugin Spy:
https://github.com/scala-ide/scala-ide/pull/203

Like Mr. Bond, this plugin carefully inspects the code under the cursor,
and displays additional information in a View. A more ambitious plugin
would show the AST as a Tree widget, but I didn't go that far. You can see
in the attached screenshot. Contributions welcome :)

iulian

--
« Je déteste la montagne, ça cache le paysage »
Alphonse Allais

  scala-spy.png
36K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Eric Molitor  
View profile  
 More options Oct 3 2012, 11:31 am
From: Eric Molitor <emoli...@molitor.org>
Date: Wed, 3 Oct 2012 08:31:55 -0700 (PDT)
Local: Wed, Oct 3 2012 11:31 am
Subject: Re: [scala-ide-user] Improvement Request on Highlighting Implicit Conversions

I need to pay more attention as I didn't see that pull request until this
message That is very useful!

- Eric


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »