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

Problem with nb gradle plugin and nb matisse GUI builder resorces #88

Closed
tzeitler opened this issue Nov 14, 2013 · 7 comments
Closed

Problem with nb gradle plugin and nb matisse GUI builder resorces #88

tzeitler opened this issue Nov 14, 2013 · 7 comments
Labels

Comments

@tzeitler
Copy link

Hi, i am using the Gradle Plugin and i have a project where i'am using gradle for my java project. For my project i want to use the NB Matisse GUI Builder. Unfortunately the matisse do not find the resorces (*.properties) within my gradle-project.

I tried several settings in the Gradle scripts regarding the resource sets, without success.

My resources are placed in /src/main/resources/my/package/structure/resources
My java sources are placed beneath src/main/java/....

My question, is this a NB Mattisse issue or is this a known general problem with the nb gradle plugin?

@kelemen
Copy link
Owner

kelemen commented Nov 14, 2013

I don't know about the feature you are talking about. For what purpose does the GUI builder uses properties files? Internationalization? Anyway, can you please describe me what exactly I should do to reproduce the issue and what I should expect to see?

@swpalmer
Copy link

Matisse is the standard Swing GUI builder in NetBeans. You can point it to a properties file to use for internationalization.
https://netbeans.org/kb/trails/matisse.html

Scott

On Nov 14, 2013, at 5:14 PM, Attila Kelemen notifications@github.com wrote:

I don't know about the feature you are talking about. For what purpose does the GUI builder uses properties files? Internationalization? Anyway, can you please describe me what exactly I should do to reproduce the issue and what I should expect to see?


Reply to this email directly or view it on GitHub.

@kelemen
Copy link
Owner

kelemen commented Nov 15, 2013

I know Matisse, just didn't know about this feature.

@kelemen
Copy link
Owner

kelemen commented Nov 15, 2013

I have just tried this. For me, the properties file is created properly with the appropriate keys and values but when reopening the file it forgets where it should look for the properties file. Strange. Is this what you are talking about?

@tzeitler
Copy link
Author

Seems to be a similar problem.

Here my steps:
I've got a gradle-based project (green gradle symbol in the project explorer tree in NB)

My project structure follows the maven recommandation to have java sources beneath "/src/main/java" and other resources like the properties files (for I18n and text for swing components) beneath "/src/main/resources".

In my case my folder structure looks like: "src/main/resources/my/project/package/resources" (my package strcucture is: my.project.package and beneath resources i want to place my properties files.
E.g. /src/main/resources/my/project/package/resources/mytext.properties)

The NB-Explorer-Tree shows "Source Packages" and "Resources" that is fine.

But, if i create a new JPanel via NB-matissse (Explorer-Tee right mouse click on a package "New->JPanel Form..." now i place a jbutton via matisse on the panel and try to set a text for the JButton with the Properties-Panel (press the "..."-button beside "text" a dialog appear where you be able to put in the text for your button (default is "Plain text") now i choose "Resource Bundle", there i have to select a properties-file, but unfortenatelly the explorer tree, to select a resources-folder or properties-file, does not display my resources-folder at all, here this dialog does not know where resources (properties-files) are.

It seems that the gradle-project does not announce NB (especially for matisse) that there is a resources-folder available for my project even there is one in filesystem. (But in Explorer tree the Resources-Folder is displayed, but not in NB-Matisse)

Do you have an idea?

@kelemen
Copy link
Owner

kelemen commented Nov 15, 2013

I wonder how this list is constructed, I'll check in the NB sources. Hopefully, it needs something trivial.

@kelemen
Copy link
Owner

kelemen commented Nov 15, 2013

Should now be fixed in master. It was surprisingly easy to fix: Just had to add the resource folders to the source classpath as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants