Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/keenwrite.git

Add default values for directory suppliers

AuthorDaveJarvis <email>
Date2023-01-16 09:28:33 GMT-0800
Commitef9a07373e84c6d3605565841c6915a69a088136
Parentc16aa69
Delta6 lines added, 5 lines removed, 1-line increase
src/main/java/com/keenwrite/processors/ProcessorContext.java
import java.util.function.Supplier;
+import static com.keenwrite.Bootstrap.USER_CACHE_DIR;
import static com.keenwrite.Bootstrap.USER_DATA_DIR;
import static com.keenwrite.constants.Constants.*;
private boolean mConcatenate;
- private Supplier<Path> mThemesPath;
+ private Supplier<Path> mThemesPath = USER_DIRECTORY::toPath;
private Supplier<Locale> mLocale = () -> Locale.ENGLISH;
private Supplier<Map<String, String>> mDefinitions = HashMap::new;
private Supplier<Map<String, String>> mMetadata = HashMap::new;
private Supplier<Caret> mCaret = () -> Caret.builder().build();
- private Supplier<Path> mFontsPath;
+ private Supplier<Path> mFontsPath = () -> getFontDirectory().toPath();
- private Supplier<Path> mImagesPath;
+ private Supplier<Path> mImagesPath = USER_DIRECTORY::toPath;
private Supplier<String> mImageServer = () -> DIAGRAM_SERVER_NAME;
private Supplier<String> mImageOrder = () -> PERSIST_IMAGES_DEFAULT;
- private Supplier<Path> mCachesPath;
+ private Supplier<Path> mCachesPath = USER_CACHE_DIR::toPath;
private Supplier<String> mSigilBegan = () -> DEF_DELIM_BEGAN_DEFAULT;
private Supplier<String> mSigilEnded = () -> DEF_DELIM_ENDED_DEFAULT;
- private Supplier<Path> mRWorkingDir;
+ private Supplier<Path> mRWorkingDir = USER_DIRECTORY::toPath;
private Supplier<String> mRScript = () -> "";