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

Change preferences API from String-based to Project-based #299

Open
TimvdLippe opened this issue May 1, 2018 · 1 comment
Open

Change preferences API from String-based to Project-based #299

TimvdLippe opened this issue May 1, 2018 · 1 comment

Comments

@TimvdLippe
Copy link
Collaborator

The current API in the Preferences classes is String-based. This means that it is unclear from the caller what the actual value of the String should be. In my case, instead of using WatchDogUtils.getWorkspaceName() I used project.name in the project registration. Since they are both Strings, it would compile fine. However, all other logic and call-sides of the API used the former rather than the latter.

Therefore, to make this more type-safe, changing the API to use Project instead is more clear. In this case, it should be possible to obtain this project in only 1 way, to make sure the API can only be called with that value. That way, it is clear from the call-side how to retrieve the value, as we limit the amount of possibilities.

@Inventitech
Copy link
Contributor

Inventitech commented May 2, 2018

Sounds good. AFAIR, again, the reason for the current implementation are the datatypes the Eclipse persister API supports by default.

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

No branches or pull requests

2 participants