Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds comment support #554

Merged
merged 1 commit into from
Apr 14, 2016
Merged

Adds comment support #554

merged 1 commit into from
Apr 14, 2016

Conversation

tdurieux
Copy link
Collaborator

@tdurieux tdurieux commented Mar 9, 2016

No description provided.

@seintur
Copy link
Contributor

seintur commented Mar 9, 2016

Buggy copied/pasted comment in CtVisitor.java

/**
 * Visits an access to a super invocation.
 */
void visitCtComment(CtComment comment);

@tdurieux tdurieux force-pushed the feat_comments branch 9 times, most recently from 599d240 to fb893b6 Compare March 9, 2016 13:10
@monperrus
Copy link
Collaborator

looks promising!

@tdurieux tdurieux force-pushed the feat_comments branch 6 times, most recently from 9987eff to 5ad4ce4 Compare March 14, 2016 10:35
@@ -297,6 +297,16 @@ void report(Processor<?> processor, Level level,
void setGenerateJavadoc(boolean generateJavadoc);

/**
* Returns the value of the option generate-comments.
*/
boolean isGenerateComments();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keepInlineComments

@tdurieux tdurieux force-pushed the feat_comments branch 3 times, most recently from 781a534 to 462c8d4 Compare March 23, 2016 10:47
@tdurieux tdurieux changed the title WIP Adds comments in the AST Adds comment support Apr 5, 2016
* This code element defines a comment
*
*/
public interface CtComment extends CtElement, CtStatement {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only extends CtStatement

@monperrus
Copy link
Collaborator

add Javadoc DocComment in List (and remove the original String field in CtElement)

@monperrus
Copy link
Collaborator

reuse same option as javadoc (and change doc of this doc option)

@tdurieux
Copy link
Collaborator Author

Done

* Get the type of the comment
* @return the comment type
*/
CommentType getType();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getCommentType (in order not to confuse with getType of CtTypedElem

@tdurieux tdurieux force-pushed the feat_comments branch 3 times, most recently from 8d6551f to 16c1593 Compare April 12, 2016 08:58
*/
public interface CtComment extends CtStatement {
enum CommentType {
FILE_COMMENT, // comment at the top of a file
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FILE before the package line (typically the license)

@monperrus
Copy link
Collaborator

doc of comment type enum, depreciation, documentation of contract for java doc

@@ -1,5 +1,7 @@
language: java

sudo: true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tdurieux
Copy link
Collaborator Author

Done

@GerardPaligot GerardPaligot merged commit 5c33091 into INRIA:master Apr 14, 2016
@@ -743,6 +744,11 @@ public void visitCtCircularTypeReference(CtCircularTypeReference reference) {
}

@Override
public void visitCtComment(CtComment comment) {
throw new RuntimeException("Unknow Element");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: Unknow -> Unknown

@tdurieux tdurieux mentioned this pull request Jun 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants