-
Notifications
You must be signed in to change notification settings - Fork 12
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
NPE when generating Launch Config for Feature-based Product #15
Comments
Hey, Can you attache the related foo.bar projects? Especially the feature and product definitions and files would be interesting. Generally speaking, the "plugin", "feature" and "content-provider" specify which artifacts to include into the launch. The "application" and "product" define WHAT to launch - but the artifacts providing the "WHAT" need to be provided through either of the three former options. It might be a little confusing as application and product are eclipse extension points defined in any project (where the project also defines it's own transitive dependencies), whereas a .product file is a definition that specifies the content as well as what to launch. LcDsl only uses the /content/ of a .product file (that's why it's called 'content-provider'). The what (application, product) always needs to be specified separately (currently). I prepared some demo projects attached here for your reference... Please check the examples (import the projects into any workspace) and tell me what you would expect to behave different. Automatically use the application/product defined in the .product file too? Cheers, |
Hi, I understand that the DSL should support pretty much everything that launch configurations support as well. So any weird mix of plug-ins, features, applications/products and whatnot. However, I believe that for RCP, feature-based products that contain everything that's required to run the application, are standard nowadays, and hence I think it should be very easy to setup an lc file that runs such a product. Possibly by right-clicking a product-file and generating the lc from it? Really, only the NPEs are what keeps me from using the LCDSL. |
Hi, I agree, such a context menu option would be nice. Currently once you have a .product file you would need to specify the path to the file as well as the name of the product extension point configured in the product as well (I know, you have to repeat yourself - this could definitely be improved). From the exception it looks like the feature looks ... unexpected to LcDsl - something I did not take into account when implementing the resolution algorithm. From the line numbers in your stack traces I can unfotunately not deduce the problem as the generated code for me only shows a return statement at that location. Are you sure you have the latest version from the update site? I will (just to make sure) build a new site from my state, so you will receive an update (should be there already). Then we can be sure the line numbers match. It has problems finding the referenced plugins/features in there. Can you share an anonymized version of the feature.xml? I know it's still some time until then, but I will also be at EclipseCon Europe this year - if you are also there, we could also have a look together directly. Markus |
Looks like I assumed incorrectly it was the latest release version, though I did install it right before I opened this issue. The NPE that I get when, referencing the single feature:
Using the content-provider:
What I can say is that I had similar (or maybe the same) issues when I tried this about half a year ago, with an entirely different RCP application. Both applications have in common though that they have feature-based products, and some of the features contain other features, and they also depend on other features. |
Yeah, I assume that there is a problem in the feature based content resolution algorithm. I will have a look at it. If you could come up with a constructed dummy demo that reproduces the problem, that would be really helpful... |
Would it be possible to add some logging for this case, so I would find e.g. the ID of the problematic feature in the logs? Any information would really help me in trying to prepare a demo. |
I will add some logs. Now with the line numbers provided, it looks like there is a feature referenced in the product that does not exist. The algorithm cannot cope with that (yet). I will fix that. |
I added a fix, can you update and re-test please? |
Generating the launch config works now with both approaches (feature and content-provider). My first impression is that nothing is missing. I will check more thoroughly later. Anyway, thanks for fixing this!
|
Good to hear! Logging would appear on the console of the running Eclipse (not in the error log). But the default would only warn if a non-optional feature is missing. The traces you are seeing are actually not an error at all. They just tell that the generation of the configuration takes ~300 to ~500 milliseconds, which causes the UI to freeze shortly. To "fix" that, generation would need to happen in the background to not freeze the UI. I consider this an optimization for now... You could open a separate issue for that if it hurts you. |
I'm working on a RCP application with a product and a single feature.
When I generate a launch configuration from the product, everything works, and I can start the application.
I would expect to be able to create a working launch configuration from the following LC file as well:
Instead, I get an NPE in my error log:
If I try this it with a content-provider with the pull path of my product as a parameter, I also get an NPE with a different stack-trace
Also, I do not understand why the DSL forces me to add features/plug-ins or a content-provider at all, when the product should contain everything that's necessary to generate a launch configuration.
I'm using Oxygen and the latest LCDSL.
The text was updated successfully, but these errors were encountered: