bowbahdoe / magic-bean

A very basic library which will generate getters and setters.
Other
84 stars 10 forks source link

Is IDE support possible at this stage? #1

Closed ak-seyam closed 2 years ago

bowbahdoe commented 2 years ago

Yep. Most IDEs should already handle this via their generic support for generated sources.

Here is a recording of the workflow in IntelliJ

ide-support

ak-seyam commented 2 years ago

Unfortunately, my case is different.

https://user-images.githubusercontent.com/34966791/150657138-0b77d9b5-6f8d-41bf-bb9a-c0c1d1379bbd.mp4

These are my settings for SDK version and compiler Screenshot from 2022-01-23 00-20-13 Screenshot from 2022-01-23 00-20-36

Any troubleshooting steps?

Thanks.

bowbahdoe commented 2 years ago

I'll dig into how to make it happen automatically - I'm sure there is a way - but what I'm doing is just right clicking the generated source folder under target and clicking "Mark as generated sources root"

bowbahdoe commented 2 years ago

I think for maven adding this snippet will let intelliJ automatically detect it

https://stackoverflow.com/questions/5170620/unable-to-use-intellij-with-a-generated-sources-folder

<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>build-helper-maven-plugin</artifactId>
    <version>1.4</version>
    <executions>
        <execution>
            <id>test</id>
            <phase>generate-sources</phase>
            <goals>
                <goal>add-source</goal>
            </goals>
            <configuration>
                <sources>
                    <source>${basedir}/target/generated-sources</source>
                </sources>
            </configuration>
        </execution>
    </executions>
</plugin>

A little strange, but take that up with Maven/Jetbrains

bowbahdoe commented 2 years ago

mark

ak-seyam commented 2 years ago

I think for maven adding this snippet will let intelliJ automatically detect it

https://stackoverflow.com/questions/5170620/unable-to-use-intellij-with-a-generated-sources-folder

<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>build-helper-maven-plugin</artifactId>
    <version>1.4</version>
    <executions>
        <execution>
            <id>test</id>
            <phase>generate-sources</phase>
            <goals>
                <goal>add-source</goal>
            </goals>
            <configuration>
                <sources>
                    <source>${basedir}/target/generated-sources</source>
                </sources>
            </configuration>
        </execution>
    </executions>
</plugin>

A little strange, but take that up with Maven/Jetbrains

This worked for me, thanks