Skip to content

Conversation

@chinyeungli
Copy link
Contributor

Fix for #1906

Support mapping .class to their corresponding .xtend files.

The reported .class is now mapped with the corresponding .xtend
Screenshot 2025-11-07 103543

Map type is xtend_to_class
Screenshot 2025-11-07 103601

Signed-off-by: Chin Yeung Li <tli@nexb.com>
project=self.project, jvm_lang=jvm.GrammarLanguage, logger=self.log
)

@optional_step("Xtend")
Copy link
Contributor

Choose a reason for hiding this comment

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

Should extend be an optional step or be part of all JVM based languages like Scala, Java and Kotlin ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

aren't the code for Java, Scala and Koltin also treat as an optional step


@optional_step("Scala")

@optional_step("Kotlin")

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, they are. Coz they all are independent of each other. We won't run the same thing for Scala that we are running for Java. But if we are running same things then it wouldn't have been a separate optional step.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here is the background.

Xtend is a flexible and expressive dialect of Java (https://eclipse.dev/Xtext/xtend/)
It compiles .xtend files into readable .java source code, which is then compiled into JVM bytecode (.class files).
Xtend uses a source-to-source compiler, meaning it translates Xtend code into Java before passing it to a standard Java compiler.

There are couple ways to compile .xtend such as

Maven

mvn compile

OR

Gradle

gradle build

Xtend plugin will generate .java files for the above

OR

Eclipse IDE

Just save the .xtend file (Eclipse automatically generates the corresponding .java file)

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.

3 participants