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

File is not part of a jME project but tries to find original model #379

Closed
peedeeboy opened this issue Sep 11, 2022 · 6 comments
Closed
Labels
Milestone

Comments

@peedeeboy
Copy link
Contributor

As reported by @tonihele in #373:

And then there is this, not maybe 100% related but: WARNING [com.jme3.gde.core.assets.ExternalChangeScanner]: File is not part of a jME project but tries to find original model...

If I create a scene file to the Gradle template... It doesn't seem to understand it is a jME project or something....

This only appears to affect SDK3.4 (and latest Dev build) on Windows, Linux seems ok to me

@peedeeboy
Copy link
Contributor Author

peedeeboy commented Sep 11, 2022

So, I got Scenes to open in the latest Dev build on Windows. The problem lies in AssestLookupProvider.java. Line 106:

if (gradle.getSubProjects().containsKey("assets"))

On my Linux machine, getSubProjects() returns the name of the Assets sub-project as assets, but on my Windows box, it gets returned as :assets. Hence on Windows the code in the if block, to create the ProjectAssetManager never executes, and Assets can't be opened via the SDK.

Likewise, further down is:

Path assetsPath = gradle.getSubProjects().get("assets").toPath();

which also need to take into account that the Assets sub-project will be called :assets on a Windows box.

Doing a quick hack to change these 2 to :assets, the Asset node was created in the SDK project view, and it was possible to open Assets such as Scenes:

SceneExplorerWorking

@peedeeboy
Copy link
Contributor Author

peedeeboy commented Sep 11, 2022

As this isn't a problem in SDK3.3, I would sumise that there has been a change to the NB Gradle APIs that now needs to be taken into account? There might be multiple places in the SDK that need to be updated.

@tonihele
Copy link
Contributor

tonihele commented Sep 11, 2022 via email

@tonihele
Copy link
Contributor

tonihele commented Sep 11, 2022

Oh and.. The Netbeans you are using... You won't automatically get the new Netbeans, it should be 15 now in master. But you need to delete the netbeans folder and nbproject/private/platform-private.properties. After next build, a new Netbeans should be at your disposal.

Need to be careful with this if the API indeed changes. And better to do also clean to get rid of old SDK settings when getting the new NB version.

peedeeboy pushed a commit to peedeeboy/sdk that referenced this issue Sep 11, 2022
@peedeeboy
Copy link
Contributor Author

@tonihele - your hunch was right, the reason I saw different behaviour between Windows and Linux is because my copy of the SDK repo on Linux was still using a different underlying version of NB.

Rebuilding the latest version of the SDK with NB15, the same problem (the assets sub-folder name being returned as :assets rather than assets) manifested itself.

A quick grep of the entire SDK code and I can only see the assets sub-project being referenced on the two lines I mentioned, so hopefully, #380 will fix this....

Testing very gratefully received...

@tonihele tonihele added this to the 3.5 release milestone Sep 11, 2022
@tonihele
Copy link
Contributor

I checked that all the SDK version Gradle templates call this subproject as ":assets". So I would say those older Gradle templates are compatible with this fix also.

@neph1 neph1 added the bug label Oct 23, 2022
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