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

Support injecting @FXMLLoader with @FxView #79

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Eng-Fouad
Copy link
Member

Resolves #75

@CodeSimcoe This is a draft implementation. What do you think?

@Eng-Fouad
Copy link
Member Author

I think it is better to remove adding/applying stylesheets by FxViewRepository/@FxView entirely, because stylesheets can be added to FXML file directly:

/fxml/login.fxml:

<BorderPane xmlns:fx="http://javafx.com/fxml" stylesheets="@/style/login.css">
    <center>
        <Label styleClass="small-label" />

This way IntelliJ will also support navigating to the css file when clicking on the style class on FXML file, and it won't highlight style classes with yellow:

111

@CodeSimcoe WDYT?

@Eng-Fouad Eng-Fouad marked this pull request as ready for review October 10, 2024 11:56
@Eng-Fouad Eng-Fouad requested a review from a team as a code owner October 10, 2024 11:56
@CodeSimcoe
Copy link
Contributor

I think it is better to remove adding/applying stylesheets by FxViewRepository/@FxView entirely, because stylesheets can be added to FXML file directly:

/fxml/login.fxml:

<BorderPane xmlns:fx="http://javafx.com/fxml" stylesheets="@/style/login.css">
    <center>
        <Label styleClass="small-label" />

This way IntelliJ will also support navigating to the css file when clicking on the style class on FXML file, and it won't highlight style classes with yellow:

111

@CodeSimcoe WDYT?

That's a good point indeed.
We shall support live reload though

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

Successfully merging this pull request may close these issues.

Inject @FXMLLoader with a qualifier to bind it to a specific view
2 participants