manifold-systems / manifold

Manifold is a Java compiler plugin, its features include Metaprogramming, Properties, Extension Methods, Operator Overloading, Templates, a Preprocessor, and more.
http://manifold.systems/
Apache License 2.0
2.42k stars 125 forks source link

String Templates in Text Blocks #585

Closed Benjamin-Bergman closed 6 months ago

Benjamin-Bergman commented 6 months ago

Describe the bug The IntelliJ plugin will not perform syntax highlighting or code completion for interpolated values in a multi-line text block.

To Reproduce Steps to reproduce the behavior:

  1. Create a minimal project using manifold-strings
  2. Attempt to interpolate a value into a text block

Expected behavior IntelliJ should provide syntax highlighting and code completion for the interpolated value.

Screenshots image

Desktop (please complete the following information):

Additional context It still compiles correctly, and in fact, the example program compiles identical bytecode for either method (text block vs not).

Here's my pom.xml:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://maven.apache.org/POM/4.0.0"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.testing</groupId>
    <artifactId>Test</artifactId>
    <version>1.0</version>

    <properties>
        <maven.compiler.source>17</maven.compiler.source>
        <maven.compiler.target>17</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.0</version>
                <configuration>
                    <source>17</source>
                    <target>17</target>
                    <encoding>UTF-8</encoding>
                    <compilerArgs>
                        <arg>-Xplugin:Manifold</arg>
                    </compilerArgs>
                    <annotationProcessorPaths>
                        <path>
                            <groupId>systems.manifold</groupId>
                            <artifactId>manifold-strings</artifactId>
                            <version>2024.1.14</version>
                        </path>
                    </annotationProcessorPaths>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
rsmckinney commented 6 months ago

Fix available with latest plugin releases by EOD Thursday, May 9. Thanks for reporting this!