-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make 'appendToComment' work on C-style comments (#165)
Previously, `appendToComment` assumed there was either no existing comment or an existing Javadoc comment. I ran into this situation when compiling Akka with -Yrangepos enabled (hence the test). This change makes `appendToComment` also work when there is an existing C-style comment.
- Loading branch information
Showing
7 changed files
with
49 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
.../src/test/resources/expected_output/rangepos/akka/cluster/ClusterRouterGroupSettings.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package akka.cluster; | ||
public class ClusterRouterGroupSettings { | ||
// not preceding | ||
public ClusterRouterGroupSettings () { throw new RuntimeException(); } | ||
/** | ||
* @deprecated useRole has been replaced with useRoles. Since 2.5.4. | ||
*/ | ||
public scala.Option<java.lang.String> useRole () { throw new RuntimeException(); } | ||
} |
6 changes: 6 additions & 0 deletions
6
plugin/src/test/resources/input/rangepos/akka/cluster/ClusterRouterGroupSettings.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package akka.cluster; | ||
|
||
class ClusterRouterGroupSettings { | ||
@deprecated("useRole has been replaced with useRoles", since = "2.5.4") | ||
def useRole: Option[String] = ??? | ||
} |
18 changes: 18 additions & 0 deletions
18
plugin/src/test/scala/com/typesafe/genjavadoc/RangePosSpec.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.typesafe.genjavadoc | ||
|
||
import java.io.File | ||
|
||
import com.typesafe.genjavadoc.util.CompilerSpec | ||
|
||
class RangePosSpec extends CompilerSpec { | ||
/** Sources to compile. */ | ||
override def sources: Seq[String] = Seq( | ||
new File("src/test/resources/input/rangepos/akka/cluster/ClusterRouterGroupSettings.scala").getAbsolutePath | ||
) | ||
|
||
override def rangepos = true | ||
|
||
/** Root directory that contains expected Java output. */ | ||
override def expectedPath: String = | ||
new File("src/test/resources/expected_output/rangepos").getAbsolutePath | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters