-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Extend architecture tests to javafx and javafx.collections #2719
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for having a look at it. The code looks good.
Concerning your points:
-
Color: was for me a model class (similar to
awt.geom
) and we don't have to work with the color string. The class has no methods to draw etc but is just a wrapper around three integer. Yes, of course, color is inherently connected to GUI concepts. Anyway, if you really dislike it then it should be possible to store the color string in the model class and convert it toColor
in the GUI. But the same GUI-related information will still be present in the model...it is just stored as string. I personally find this worse. -
beans: I think an exception would be fine since it is simlar to collections. But this is more a fundamental question about
bean properties
vsold-style getters and setters, with eventbus
in the model/logic. I like the beans more than the eventbus, but this is personal preference. -
tests: the localization tests need to parse the FXML files to extract the used resource keys; there is no way around it.
Thanks for your reply:
|
I have been thinking a little more about There, we also have all the color codes, but in the gui package and not in model. So what is our reasoning to allow the javafx version of Color in model, but not the awt version? Also, had we used the awt version in model, wouldn't that have meant that we would have had to rewrite all such usages for the javafx migration? If yes, isn't that a good argument for not allowing the javafx version of And interestingly, I found this: https://github.com/JabRef/jabref/blob/master/src/main/java/org/jabref/logic/groups/DefaultGroupsFactory.java#L13 This is a plain violation of our architecture rules. @tobiasdiez Did you do the import like that on purpose, so that the tests do not find it, or was that an accident? |
I think the issue with the I can't remember that I was creative enough to use the full path to hide the dependency from our architecture tests. But good to know that this works, I will now definitely (ab)use it and make my life way easier 😄 . Of course I will fix it (tomorrow). |
@tobiasdiez The fix will go into this PR? |
|
Side comment: Macker seems to be a tool, which also implements architecture checks. Example: https://innig.net/macker/example/layering/src/macker.xml. OK, it is outdated, but I thought, it is nice to know. 😇 |
I still think that making an exception for But if this is the consensus in the team, I'll bow to that. I created exceptions for the remaining FX classes and this PR should be ready to go when the build succeeds on travis. |
* upstream/master: (32 commits) Extend architecture tests to javafx and javafx.collections (#2719) Entry editor goes JavaFX (#2754) Fix tests Implement feedback Update Install4J from 6.1.4 to 6.1.5 Show development information Release v4.0-beta Fix tests Changed the Normalizer from NFKC to NFC to allow superscripts to be converted into unicode Update AUTHORS Return month in JabRef format Extract setDate to new method Fix RisImporter Fix test output Remove year from RepecNepImporterTest as this case does not seem to appear in the wild Add test case for month format behavior Rename getBibtexFormat to getJabRefFormat as this string is something special for JabRef Use BibEntry#parseMonth at BibTeXConverter Use BibEntry#setMonth at RisImporter Change month on MSXMLimport to numeric ...
Extends the architecture tests to also cover
javafx
andjavafx.collections
, as discussed in #2617.It seems that it is high time for this, since javafx classes are already being misused, as this PR uncovers. Thus, this currently fails the build. The misuses are:
Although we might think about making exceptions for the beans and tests, I don't see why the Color class should be directly accessed in the gui.
gradle localizationUpdate
?