Open extended visual component in project not working anymore #129
Comments
The plugin does nothing to explicitly support this. So, I'm not sure if it's the plugin's fault. However, to find what could be the cause, you could try setting "Tools/Options/Miscellaneous/Gradle/Build script evaluation strategy" to "Idea plugin based" (This strategy is used for Gradle 1.7 but a different for 1.11). If adjusting the strategy solves the problem, then the issue is really related to the plugin. Anyway, I have seen this issue with some components while working perfectly fine with others (so sadly, this is not as simple as this feature is broken in NB). |
We just did some tests :
|
It's in the same project. I will test with all versions |
I have tried that this issue is printed if the project is not built. Otherwise, this seems to work for me. Given that it works for you in 1.2.6, I would guess, that the plugin does not tell NB the approriate build output directory in your case. Did you cusomize the build output directory? Does the project has its own build.gradle in its project directory? |
Also, can you share the relevant parts of ~/NetBeans/X.Y/var/log/messages.log? |
I have done the test with the different versions. It seems only 1.2.6 is working. 1.2.7 is already broken. But clicking on "allow using gradle 1.8 API" does not change the behaviour. Concerning the project, the build output directory is not customized. |
Disabling 1.8 API needs project reloading (preferably even NB restart). Anyway, this is a strange issue and I cannot reproduce it. So, I'll try to look at NB sources and ask NB developers what information this feature relies on. |
Thanks! I am checking on my side if I find a clue. |
I just created a small single project TestExtension with 3 classes :
The TodayBox is simple :
MainJPanel is a JPanel.
|
Thanks, I can reproduce the issue with this. |
Should now be fixed in master. I'm not sure when a new version will be released but you may build the plugin from the sources for now. There were some relatively big refactorings related to project properties which I did not throughly test but seems to work fine (so there shouldn't be any blocker). If you choose to use the plugin built from the sources, feel free to report regressions. |
Just notices that there are quite a few test failures when building with NB 8.0. I believe this to be an NB bug. Anyway, you should ignore test failures (skip tests) for now as these problems are only there while unit testing. I'll try to find a workaround for these test issues. |
As it turned out, the problem is not the version of NB you build with but the JDK. So, tests won't run with JDK 8 for now. |
Thanks a lot! I will compile it directly. |
I have recompiled the plugin at version v1.3.0 with cherry-picking the commit 1798ec1. This works fine (I wanted to keep the most stable version with just the fix, and also with Netbeans running with jdk 1.6). Thanks again. |
We just migrated from gradle 1.7/plugin 1.2.6 to gradle 1.11/plugin 1.3.0 and are facing a new issue :
We have a class in the project which extends a JTextField. When opening forms which contain this class, we get the error
"Error in loading component: [JFrame]->jPanel1->CommentBox
Cannot load component class xxxx" where xxxx is the extended JTextField
We have tried to add the component to the palette, but it does not help.
This was working in our previous installations.
Is there a new dependency to add in the gradle script?
The text was updated successfully, but these errors were encountered: