You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The scaladoc of enumerations only appear as "Value" and in the hover just show scala.Enumeration.Value and not the actual enumeration class. For this to be useful, it needs to show the specific enumeration object.
Trond Olsen (tolsen77) said (edited on Feb 24, 2012 6:02:11 PM UTC):
An example in the interpreter shows that the compiler generates the correct type for inner classes in the outer object:
scala>:paste
// Entering paste mode (ctrl-D to finish)classEnum {
abstractclassValueclassValextendsValuedefValue():Value=newVal
}
objectConstantsextendsEnum {
vala=Value
}
// Exiting paste mode, now interpreting.
defined classEnum
defined module Constants
scala>Constants.a
res23:Constants.Value=Enum$Val@d5454d
While the generated Scaladoc reference the parent class, ignoring the outer object of the inner class:
@VladUreche said:
Indeed, type printing in Scaladoc has some missing cases (existentials, enums ...).
I'm willing to help anyone interested in fixing it.
The scaladoc of enumerations only appear as "Value" and in the hover just show scala.Enumeration.Value and not the actual enumeration class. For this to be useful, it needs to show the specific enumeration object.
Examples:
scala.swing.ScrollBar has 'def orientation: Value' and users must guess about which enumeration is required. Should have a link to ScrollBar.Orientation in the docs. Compare this to how JavaDoc provides direct links to the specific enums: http://java.sun.com/javase/6/docs/api/javax/swing/JList.html#setDropMode%28javax.swing.DropMode%29
The text was updated successfully, but these errors were encountered: