summaryrefslogtreecommitdiff
path: root/test/scaladoc
Commit message (Collapse)AuthorAgeFilesLines
* SI-5784 Scaladoc: Type templatesVlad Ureche2012-07-191-2/+2
| | | | @template and @documentable are now synomims.
* Scaladoc: GroupsVlad Ureche2012-07-192-0/+120
| | | | | | | | | | Group class members based on their semantic relationship. To do this: - @group on members, only need to do it for the non-overridden members - -groups flag passes to scaladoc, groups="on" in ant - @groupdesc Group Group Description to add descriptions - @groupname Group New name for group - @groupprio Group <int> (lower is better) See test/scaladoc/run/groups.scala for a top-to-bottom example
* SI-5784 Scaladoc: {Abstract,Alias} type templatesVlad Ureche2012-07-175-1/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Normally scaladoc won't generate template pages for anything other than packages, classes, traits and objects. But using the @template annotation on {abstract,alias} types, they get their own page and take part as full members in the diagrams. Furthermore, when looking for the companion object, if a value of type T is in scope, T will be taken as the companion object (even though it might be a class) All templates, including types are listed on the left navigation pane, so now adding @template to String can get scaladoc to generate (a no-comments) page for java.lang.String. The {abstract, alias} type icons need to be updated -- I just took the class icons and added a small x to them -- but they shoud be something else (maybe an underscore?)i TO USE THIS PATCH: <pre> /** @contentDiagram */ // tells scaladoc to create a diagram of the // templates contained in trait Base trait Base { /** @template */ // tells scaladoc to create a page for Foo type T < Foo trait Foo { def foo: Int } } /** @contentDiagram */ trait Api extends Base { /** @template */ override type T <: FooApi trait FooApi extends Foo { def bar: String } } </pre>
* Scaladoc: Refactoring the entitiesVlad Ureche2012-07-164-13/+13
| | | | | | | for SI-5784. This commit has been checked with tools/scaladoc-compare and the only difference is that the containing entities in the index are not duplicate anymore, which solves yet another bug we did not know about. :)
* SI-5533 Skip scaladoc packages from documentationVlad Ureche2012-07-163-9/+38
|
* Scaladoc: updated type class descriptionsVlad Ureche2012-07-163-0/+72
| | | | | | | | | | | | The known type class descriptions give you a humanly-understandable explanation for [T: TypeClass] in the implicit conversions. For example [T: Integral] will tell you that T must be an integral type such as Integer and co. Now that the reflection dust settled, I can actually add the test to make sure the well-known type classes are intercepted and explanations are given instead of the usual "the type T is context-bounded by TypeClass"
* SI-3695 SI-4224 SI-4497 SI-5079 scaladoc linksVlad Ureche2012-07-165-4/+102
| | | | | | | | Adds the ability to link to members, classes and objects in scaladoc. The links can now be either qualified names or relative names, they both work. See the test/scaladoc/resources/links.scala for a usage example. Also introduced -no-link-warnings scaladoc flag, in case the build output gets swamped with link warnings.
* SI-4887 Link existentials in scaladocVlad Ureche2012-07-164-1/+80
| | | | | | | | | | | | | Based on an inital patch by Nada Amin. Rewrote some of the code to compress it a bit. Also fixed a problem that was affecting the prefix printing for typerefs: type parameter and existentials won't get prefixes. While I can imagine cases where you'd want to see where they come from, you can always hover over them and see their origin. Also added support for pretty-printing ThisTypes, SuperTypes and SingleTypes (with links)
* SI-4360 Adds prefixes to scaladocVlad Ureche2012-07-168-13/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | This was a long-standing issue in scaladoc: It was unable to disambiguate between entries with the same name. One example is: immutable.Seq: trait Seq[+A] extends Iterable[A] with Seq[A] ... What's that? Seq extends Seq? No, immutable.Seq extends collection.Seq, but scaladoc was unable to show that. Now it does, depending on the template you're in. Prefixes are relative and can go back: -scala.collection.Seq has subclasses *immutable.Seq* and *mutable.Seq* -scala.immutable.Seq extends *collection.Seq* Unfortunately the price we pay for this is high, a 20% slowdown in scaladoc. This is why there is a new flag called -no-prefixes that disables the prefixes in front of types. Btw, it also fixes the notorious "booleanValue: This member is added by an implicit conversion from Boolean to Boolean ...". That's now java.lang.Boolean, so it becomes clear. Conflicts: src/compiler/scala/tools/nsc/doc/model/diagram/DiagramFactory.scala
* Scaladoc: workaround for untypical Map usecasesVlad Ureche2012-07-162-0/+39
| | | | | | | | | | | | | | SI-3448 partial fix: This enables a workaround for the fact that Map takes two type params while $Coll takes only one. But it doesn't fix the problem though, as there's one more piece missing from the puzzle - we need to adjust the `Coll`s in {immutable, mutable, concurrent}.Map to something that makes sense for the usecase. And that's not possible. But I'm committing this nevertheless, maybe other projects can benefit from it. And for SI-3448, the solution lies in automatic usecase generation, whenever that will be ready.
* SI-4324 Scaladoc case class argument curryingVlad Ureche2012-07-162-0/+25
| | | | | case class C(i: Int)(b: Boolean) would appear uncurried in scaladoc: case class C(i: Int, b: Boolean)
* SI-5558 Package object members indexingVlad Ureche2012-07-162-3/+16
| | | | This bug was fixed by the model upgrade in c11427c1. Test case confirmation.
* SI-5965 Scaladoc crashVlad Ureche2012-07-162-0/+25
| | | | This bug was fixed by the model upgrade in c11427c1. Test case confirmation.
* Scaladoc: Inherited templates in diagramsVlad Ureche2012-07-164-3/+119
| | | | | | | | | | | | Related to SI-3314, where we started showing inherited templates that were normally not documented. This patch corrects a problem in parentTypes that was preventing inherited templates from being displayed in diagrams. Also renamed: PackageDiagram => ContentDiagram ClassDiagram => InheritanceDiagram which should have been done much earlier
* SI-3314 SI-4888 Scaladoc: Relative type prefixesVlad Ureche2012-07-1612-98/+272
| | | | | | | | | | | | And adds support for linking to class members, only usable from the model factory now, so no links to members from the doc comment yet, sorry. But it fixes the Enumeration problem once and for all! Also corrected the inTpl for members obtained by implicit conversions, so they're in the correct template and the comment variable expansion is done from the correct (but different) template. Review by @kzys.
* SI-5235 Correct usecase variable expansionVlad Ureche2012-07-162-0/+91
| | | | | | | | | | | | | The bug is related to a couple of other annoyances, also fixed: - usecases without type params were crashing scaladoc due to a change in the PolyTypes class (not allowing empty tparams list) - properly getting rid of backticks (even if the link is not valid) - correct linking for usecases with $Coll = `immutable.Seq` (the symbol searching algorithm was too of restrictive, now we search the entire ownerchain - and the empty package at the end) - give a warning if the type lookup fails - finally, added a $Coll variable to List, for some reason it wasn't there and we were getting immutable.Seq as the result of use cases.
* Diagram tweaks #2Vlad Ureche2012-07-026-0/+311
| | | | | | | | | | - fixed the AnyRef linking (SI-5780) - added tooltips to implicit conversions in diagrams - fixed the intermittent dot error where node images would be left out (dot is not reliable at all -- with all the mechanisms in place to fail gracefully, we still get dot errors crawling their way into diagrams - and that usually means no diagram generated, which is the most appropriate way to fail, I think...)
* Diagram tweaks #1Vlad Ureche2012-07-023-4/+74
| | | | | | | | | | | | | | | | | | | | - relaxed the restrictions on nodes - nodes can be classes, traits and objects, both stand-alone and companion objects -- all are added to the diagram, but usually companion objects are filtered out as they don't have any superclasses - changed the rules for default diagram creation: - classes and traits (and AnyRef) get inheritance diagrams - packages and objects get content diagrams (can be overridden by @contentDiagram [hideDiagram] and @inheritanceDiagram [hideDiagram]) - tweaked the model to register subclasses of Any - hardcoded the scala package diagram to show all relations - enabled @contentDiagram showInheritedNodes by default and changed the setting to hideInheritedNodes (and added a test for this) - better node selection (can select nodes that don't have a corresponding trait) - fixed the docsite link in member selection, which was broken since the first commit :))
* Scaladoc class diagrams part 1Vlad Ureche2012-07-0217-62/+529
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit contains model changes required for adding class diagrams to scaladoc. It also contains an improved implicit shadowing computation, which hides the shadowed implicitly inherited members from the main view and gives instructions on how to access them. This is joint work with Damien Obrist (@damienobrist) on supporting diagram generation in scaladoc, as part of Damien's semester project in the LAMP laborarory at EPFL. The full history is located at: https://github.com/damienobrist/scala/tree/feature/diagrams-dev Commit summary: - diagrams model - diagram settings (Settings.scala, ScalaDoc.scala) - diagram model object (Entity.scala, Diagram.scala) - model: tracking direct superclasses and subclasses, implicit conversions from and to (ModelFactory.scala) - diagram object computation (DiagramFactory.scala, DocFactory.scala) - capacity to filter diagrams (CommentFactory.scala, DiagramDirectiveParser.scala) - diagram statistics object (DiagramStats.scala) - delayed link evaluation (Body.scala, Comment.scala) - tests - improved implicits shadowing information - model shadowing computation (ModelFactoryImplicitSupport.scala, Entity.scala) - html generation for shadowing information (Template.scala) - tests Also fixes an issue reported by @dragos, where single-line comment expansion would lead to the comment disappearing. Review by @kzys, @pedrofurla. Adapted to the new model and fixed a couple of problems: - duplicate implicit conversions in StringAdd/StringFormat - incorrect implicit conversion signature (from X to X) Conflicts: src/compiler/scala/tools/nsc/doc/Settings.scala src/compiler/scala/tools/nsc/doc/html/page/Template.scala src/compiler/scala/tools/nsc/doc/model/Entity.scala src/compiler/scala/tools/nsc/doc/model/ModelFactory.scala src/compiler/scala/tools/nsc/doc/model/ModelFactoryImplicitSupport.scala
* Reorganized scaladoc modelVlad Ureche2012-07-023-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the old model was "interruptible", it was prone to something similar to race conditions -- where the model was creating a template, that template creating was interrupted to creat another template, and so on until a cycle was hit -- then, the loop would be broken by returning the originally not-yet-finished template. Now everything happens in a depth-first order, starting from root, traversing packages and classes all the way to members. The previously interrupting operations are now grouped in two categories: - those that were meant to add entities, like inheriting a class from a template to the other (e.g. trait T { class C }; trait U extends T) => those were moved right after the core model creation - those that were meant to do lookups - like finding the companion object -- those were moved after the model creation and inheritance and are not allowed to create new documentable templates. Now, for the documentable templates we have: DocTemplateImpl - the main documentable template, it represents a Scala template (class, trait, object or package). It may only be created when modelFinished=false by methods in the modelCreation object NoDocTemplateMemberImpl - a non-documented (source not present) template that was inherited. May be used as a member, but does not get its own page NoDocTemplateImpl - a non-documented (source not present) template that may not be used as a member and does not get its own page For model users: you can use anything in the ModelFactory trait at will, but not from the modelCreation object -- that is reserved for the core model creation and using those functions may lead to duplicate templates, invalid links and other ugly problems.
* Revert "Scaladoc class diagrams part 1"Vlad Ureche2012-06-1815-476/+62
| | | | This reverts commit 831f09bb6d00c152bd8aef3ce8bf9e200080fe36.
* Scaladoc class diagrams part 1Vlad Ureche2012-06-1415-62/+476
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit contains model changes required for adding class diagrams to scaladoc. It also contains an improved implicit shadowing computation, which hides the shadowed implicitly inherited members from the main view and gives instructions on how to access them. This is joint work with Damien Obrist (@damienobrist) on supporting diagram generation in scaladoc, as part of Damien's semester project in the LAMP laborarory at EPFL. The full history is located at: https://github.com/damienobrist/scala/tree/feature/diagrams-dev Commit summary: - diagrams model - diagram settings (Settings.scala, ScalaDoc.scala) - diagram model object (Entity.scala, Diagram.scala) - model: tracking direct superclasses and subclasses, implicit conversions from and to (ModelFactory.scala) - diagram object computation (DiagramFactory.scala, DocFactory.scala) - capacity to filter diagrams (CommentFactory.scala, DiagramDirectiveParser.scala) - diagram statistics object (DiagramStats.scala) - delayed link evaluation (Body.scala, Comment.scala) - tests - improved implicits shadowing information - model shadowing computation (ModelFactoryImplicitSupport.scala, Entity.scala) - html generation for shadowing information (Template.scala) - tests Also fixes an issue reported by @dragos, where single-line comment expansion would lead to the comment disappearing. Review by @kzys, @pedrofurla.
* Fix SI-4976 partiallyKato Kazuyoshi2012-05-033-0/+31
| | | | | If a package have a package object, generate the package's "linearization" from the object.
* Fixes the backticks in use case signature crashVlad Ureche2012-05-022-0/+30
| | | | | | | | Suggested by Simon in https://groups.google.com/forum/?hl=en&fromgroups#!topic/scala-internals/z7s1CCRCz74 Now it eliminates backticks and gracefully bails out with an error message when it can't remove the wiki syntax.
* migrates stdlib and compiler to tagsEugene Burmako2012-04-231-1/+2
| | | | | * all usages of ClassManifest and Manifest are replaced with tags * all manifest tests are replaced with tag tests
* Reimplemented shadowing between class membersVlad Ureche2012-04-144-32/+169
| | | | and implicit pimped on members. Thanks to Lukas for pointing it out!
* Adapted implicits testsuite for SIP18Vlad Ureche2012-04-1412-1/+360
|
* disabling scaladoc tests. Don't know how to fix them to make them work under ↵Martin Odersky2012-04-138-345/+0
| | | | SIP 18.
* Scaladoc feature that shows implicit conversionsVlad Ureche2012-04-1315-6/+603
| | | | | | | See https://github.com/VladUreche/scala/tree/feature/doc-implicits for the history. See https://scala-webapps.epfl.ch/jenkins/view/scaladoc/job/scaladoc-implicits-nightly/ for nightlies. Many thanks fly out to Adriaan for his help with implicit search!
* Fixes SI-5373Vlad Ureche2012-03-278-5/+39
| | | | | And adds basic support for scaladoc model tests (class partest.ScaladocModelTest)
* Adapted scaladoc testVlad Ureche2012-03-231-6/+9
|
* Merge branch 'issue/5054-usecase-cleanup'Vlad Ureche2012-03-202-0/+54
|\ | | | | | | | | Conflicts: test/scaladoc/scala/html/HtmlFactoryTest.scala
| * Adapted indentation in scaladoc code blocksVlad Ureche2012-03-202-1/+55
| | | | | | | | | | and fixed a pesky crash in the syntax highlighting caused by invalid chars (0x0E) in MarkupParser.scala.
| |
| \
*-. \ Merge remote-tracking branches 'VladUreche/feature/inheritdoc-clean', ↵Paul Phillips2012-03-165-57/+320
|\ \ \ | |_|/ |/| | | | | 'acruise/t1118', 'hubertp/issue/5572', 'hubertp/topic/nightly-checkinit', 'axel22/feature/pc-ctrie', 'jsuereth/master-version-fixin' and 'axel22/feature/checkinit-transient' into develop
| * | Merged and cleaned the 'feature/inheritdoc' branchVlad Ureche2012-03-165-57/+320
| |/
* | Merge branch 'master' into merge-inlinePaul Phillips2012-03-143-34/+253
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: lib/scala-compiler.jar.desired.sha1 lib/scala-library-src.jar.desired.sha1 lib/scala-library.jar.desired.sha1 src/compiler/scala/reflect/internal/Definitions.scala src/compiler/scala/reflect/internal/Importers.scala src/compiler/scala/reflect/internal/Symbols.scala src/compiler/scala/reflect/internal/Trees.scala src/compiler/scala/reflect/internal/Types.scala src/compiler/scala/tools/nsc/Global.scala src/compiler/scala/tools/nsc/transform/Erasure.scala src/compiler/scala/tools/nsc/transform/LiftCode.scala src/compiler/scala/tools/nsc/transform/UnCurry.scala src/compiler/scala/tools/nsc/typechecker/RefChecks.scala src/compiler/scala/tools/nsc/typechecker/Typers.scala test/files/run/programmatic-main.check test/files/speclib/instrumented.jar.desired.sha1
| * Scaladoc @usecase annotation overriding / SI-5287Vlad Ureche2012-02-063-34/+253
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From now on, the usecases inherit the comments from their parents, such as the explanation and the annotations: @param, @tparam, @return, etc. An example of usecase comment inheritance is: /** * The test function tests the parameter param for ... * * @param theParam the implicit parameter to be tested for ... * @return the result of the test * * * * @usecase def test(): Bool * * The test function tests the parameter taken implicitly from scope. * Example: `test()` * * @return the result of the test for the current scope * * * * @usecase def test(theParam: SomeType): Bool * * This takes the explicit value passed. * Example: `test(3)` * * @param theParam the explicit parameter to be tested for ... */ def test(implicit theParam: SomeType): Bool Notice both usecases override the explanation with their own examples. The first usecase also overrides the "@return" annotation while the 2nd usecase overrides the "@param theParam" annotation. If they didn't override the explanations and annotations, they would inherit the values from the actual implementation, def test(implicit ...) This will be followed by @inheritdoc, which enables more fine-grained control over comment inheritance. The full explanation of using comment inheritance and @inheritdoc and their interaction with variables is given at https://wiki.scala-lang.org/display/SW/Tags+and+Annotations in the "Comment inheritance" and "Inheritance Example" sections.
* | All tests passed... not counting scaladoc.Paul Phillips2012-02-041-21/+21
|/ | | | | | | Disabled failing scaladoc test rather than fixing it because they're too hard to fix, even though it is almost certainly a trivial output change. (The fact that I don't know for sure that it is a trivial output change is also suboptimal.)
* Preserve attribute order in inline XMLSzabolcs Berecz2012-01-141-1/+1
|
* Cleanup after "Fixed equality and string representation of xml attributes ↵Szabolcs Berecz2012-01-121-17/+17
| | | | | | | | | | with null value" This commit reverts the following two commits: 5f2568e36b87d183fd4e4442d5c304db628846c4 - "Revert "Accept prefixed xml attributes with null value" b00002f9049c034510438881b4a4449d73fe2f54 - "Disabling some scaladoc tests." and fixes a scaladoc test broken by: 4787f883604d1344257c0b40c15790c3dde477f2 - "Fixed equality and string representation of xml attributes with null value"
* Disabling some scaladoc tests.Paul Phillips2012-01-111-17/+17
| | | | | | | | | | | These tests are WAY too difficult to work with. I don't have a clue what these failures are telling me, except they are telling me to disable them. Actual output: [partest] Check failed: [partest] HTML: SI_5054_q1classSI_5054_q1extendsAnyRefLinearSupertypesAnyRef,AnyOrderingAlphabeticByinheritanceInheritedHideAllShowallSI_5054_q1AnyRefAnyVisibilityPublicAllInstanceConstructorsnewSI_5054_q1()ValueMembersfinaldef!=(arg0:AnyRef):BooleanDefinitionClassesAnyReffinaldef!=(arg0:Any):BooleanDefinitionClassesAnyfinaldef##():IntDefinitionClassesAnyRefAnyfinaldef==(arg0:AnyRef):BooleanDefinitionClassesAnyReffinaldef==(arg0:Any):BooleanDefinitionClassesAnyfinaldefasInstanceOf[T0]:T0DefinitionClassesAnydefclone():AnyRefAttributesprotected[lang]DefinitionClassesAnyRefAnnotations@throws()finaldefeq(arg0:AnyRef):BooleanDefinitionClassesAnyRefdefequals(arg0:Any):BooleanDefinitionClassesAnyRefAnydeffinalize():UnitAttributesprotected[lang]DefinitionClassesAnyRefAnnotations@throws()finaldefgetClass():Class[_]DefinitionClassesAnyRefAnydefhashCode():IntDefinitionClassesAnyRefAnyfinaldefisInstanceOf[T0]:BooleanDefinitionClassesAnyfinaldefne(arg0:AnyRef):BooleanDefinitionClassesAnyReffinaldefnotify():UnitDefinitionClassesAnyReffinaldefnotifyAll():UnitDefinitionClassesAnyReffinaldefsynchronized[T0](arg0:⇒T0):T0DefinitionClassesAnyRefdeftest():Int[usecase]deftoString():StringDefinitionClassesAnyRefAnyfinaldefwait():UnitDefinitionClassesAnyRefAnnotations@throws()finaldefwait(arg0:Long,arg1:Int):UnitDefinitionClassesAnyRefAnnotations@throws()finaldefwait(arg0:Long):UnitDefinitionClassesAnyRefAnnotations@throws()InheritedfromAnyRefInheritedfromAny
* Fixed "Definition Classes" in bug #5287Vlad Ureche2011-12-165-106/+104
|
* Fixed #5054, #5287Vlad Ureche2011-12-089-14/+173
| | | | | | | | | | | | | | | | | | | | | | | | | | The documents with use cases should be restructured like: /** * The full definition, either used with an implicit value or with an explicit one. * * Some more explanation on implicits... * * @param lost a lost parameter * @return some integer * * @usecase def test(): Int * * This takes the implicit value in scope. * * Example: `test()` * * @usecase def test(explicit: Int): Int * * This takes the explicit value passed. * * Example: `test(3)` */ def test(implicit lost: Int): Int
* Fixes the annoying spaces between name, type params and params in ScalaDoc.Simon Ochsenreither2011-12-061-7/+7
|
* Changed the way use cases are handled in scaladoc.Vlad Ureche2011-11-223-0/+34
| | | | | | | | | | If use cases are present, the original member disappears from the list. References SI-5054, but needs more work on the html part. If use cases are present along with links, scaladoc doesn't crash anymore. Closes SI-4898. Review by kzys.
* Make partest work with spaces in the path (from...Stefan Zeiger2011-11-223-8/+8
| | | | | | | | | | | | | | Make partest work with spaces in the path (from batch script and ant task). - The 'partest' ant task gets a new 'compilerargs' element for scalac - options (like in scalacfork and javac). Fixed argument list handling - in partest task. Further improvements to argument list handling for - all ant tasks. Fixed argument list handling in DirectTest (used by - partest shell scripts) Fixed path handling in several test cases. Closes SI-622. Review by phaller.
* Begone t1737...Hubert Plociniczak2011-11-022-5/+5
|
* Reverting r25787 (caused test.scaladoc failures...Antonio Cunei2011-10-171-19/+2
| | | | | Reverting r25787 (caused test.scaladoc failures on certain systems)
* Add "Google tokens for Scala" for symbolic name...Kato Kazuyoshi2011-10-062-2/+15
| | | | | | | | | | | | | Add "Google tokens for Scala" for symbolic names on Scaladoc. Review by ureche. We can't use Scala's symbolic names on Google. Instead of waiting Google, we'll introduce mapping from the names to equivalent searchable representations. This idea proposed by Grzegorz Kossakowski. https://groups.google.com/group/scala-internals/browse_thread/thread/413 dbc691542f76f
* Add a small "template engine" and separete HTML...Kato Kazuyoshi2011-10-041-2/+19
| | | | | | Add a small "template engine" and separete HTML from Scaladoc's source code. Review by ureche.