Search in sources :

Example 1 with ClosurePreferenceRecord

use of net.vtst.ow.eclipse.js.closure.preferences.ClosurePreferenceRecord in project ow by vtst.

the class JSIncludesProviderForBuilder method getCacheSettingsFromPreferences.

private JSLibrary.CacheSettings getCacheSettingsFromPreferences() {
    ClosurePreferenceRecord record = ClosurePreferenceRecord.getInstance();
    JSLibrary.CacheSettings result = new JSLibrary.CacheSettings();
    IStore store = new PluginPreferenceStore(OwJsClosurePlugin.getDefault().getPreferenceStore());
    try {
        result.cacheDepsFiles = record.cacheLibraryDepsFiles.get(store);
    } catch (CoreException e) {
        result.cacheDepsFiles = record.cacheLibraryDepsFiles.getDefault();
    }
    try {
        result.cacheStrippedFiles = record.cacheLibraryStrippedFiles.get(store);
    } catch (CoreException e) {
        result.cacheStrippedFiles = record.cacheLibraryStrippedFiles.getDefault();
    }
    return result;
}
Also used : IStore(net.vtst.eclipse.easy.ui.properties.stores.IStore) CoreException(org.eclipse.core.runtime.CoreException) PluginPreferenceStore(net.vtst.eclipse.easy.ui.properties.stores.PluginPreferenceStore) JSLibrary(net.vtst.ow.closure.compiler.deps.JSLibrary) ClosurePreferenceRecord(net.vtst.ow.eclipse.js.closure.preferences.ClosurePreferenceRecord)

Example 2 with ClosurePreferenceRecord

use of net.vtst.ow.eclipse.js.closure.preferences.ClosurePreferenceRecord in project ow by vtst.

the class JSIncludesProviderForLaunch method getCacheSettingsFromPreferences.

private JSLibrary.CacheSettings getCacheSettingsFromPreferences() {
    ClosurePreferenceRecord record = ClosurePreferenceRecord.getInstance();
    JSLibrary.CacheSettings result = new JSLibrary.CacheSettings();
    IStore store = new PluginPreferenceStore(OwJsClosurePlugin.getDefault().getPreferenceStore());
    try {
        result.cacheDepsFiles = record.cacheLibraryDepsFiles.get(store);
    } catch (CoreException e) {
        result.cacheDepsFiles = record.cacheLibraryDepsFiles.getDefault();
    }
    result.cacheStrippedFiles = JSLibrary.CacheMode.DISABLED;
    return result;
}
Also used : IStore(net.vtst.eclipse.easy.ui.properties.stores.IStore) CoreException(org.eclipse.core.runtime.CoreException) PluginPreferenceStore(net.vtst.eclipse.easy.ui.properties.stores.PluginPreferenceStore) JSLibrary(net.vtst.ow.closure.compiler.deps.JSLibrary) ClosurePreferenceRecord(net.vtst.ow.eclipse.js.closure.preferences.ClosurePreferenceRecord)

Aggregations

IStore (net.vtst.eclipse.easy.ui.properties.stores.IStore)2 PluginPreferenceStore (net.vtst.eclipse.easy.ui.properties.stores.PluginPreferenceStore)2 JSLibrary (net.vtst.ow.closure.compiler.deps.JSLibrary)2 ClosurePreferenceRecord (net.vtst.ow.eclipse.js.closure.preferences.ClosurePreferenceRecord)2 CoreException (org.eclipse.core.runtime.CoreException)2