sialcasa / mvvmFX

an Application Framework for implementing the MVVM Pattern with JavaFX
Apache License 2.0
489 stars 104 forks source link

Incorrect exception message in ViewLoaderReflectionUtils #543

Closed nils-christian closed 6 years ago

nils-christian commented 6 years ago

Hi,

I think I found a minor bug (it is more an incorrect description in an exception message). Trying to use a scope without scope provider leads to the following message:

A scope was requested but no @ScopeProvider found in the hirarchy. Declare it like this: @ScopeProvider(kieker.diagnosis.ui.scopes.ProgressDialogScope)

Correct hirarchy to hierarchy and it should rather be Declare it like this: @ScopeProvider ( scopes = ProgressDialogScope.class ) or Declare it like this: @ScopeProvider ( scopes = kieker.diagnosis.ui.scopes.ProgressDialogScope.class )

As an alternative, you could also add values as a name alias for scopes, which would allow to do this: @ScopeProvider ( ProgressDialogScope.class )

The exception is thrown in ViewLoaderReflectionUtils.injectScopeIntoField.

manuel-mauky commented 6 years ago

Thanks for the hint. You are right, this has to be fixed. I also like the idea of "values" as alias in the annotation.

If you like you could provide a Pull-Request for this?

nils-christian commented 6 years ago

Hi,

Yes, of course. I opened a pull request. Details are provided in said request.

nils-christian commented 6 years ago

Hi,

I think we can close this ticket, right?

Best regards,

Nils