Introduced new scope @FxApplicationScoped below @Singleton.

This allows us to initialize Dagger before we start the JavaFX application, which will in turn allow us to access Environment from within the IPC classes.

Affects #663
This commit is contained in:
Sebastian Stenzel
2019-02-19 00:11:58 +01:00
parent d7dda7d249
commit 79306ea498
34 changed files with 372 additions and 405 deletions
@@ -1,6 +1,5 @@
package org.cryptomator.common;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Splitter;
import com.google.common.base.Strings;
import org.slf4j.Logger;
@@ -30,7 +29,6 @@ public class Environment {
LOG.debug("cryptomator.settingsPath: {}", System.getProperty("cryptomator.settingsPath"));
LOG.debug("cryptomator.ipcPortPath: {}", System.getProperty("cryptomator.ipcPortPath"));
LOG.debug("cryptomator.keychainPath: {}", System.getProperty("cryptomator.ipcPortPath"));
}
public Stream<Path> getSettingsPath() {
@@ -0,0 +1,13 @@
package org.cryptomator.common;
import javax.inject.Scope;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@Scope
@Documented
@Retention(RetentionPolicy.RUNTIME)
public @interface FxApplicationScoped {
}