Search in sources :

Example 1 with IStore

use of net.vtst.eclipse.easy.ui.properties.stores.IStore in project ow by vtst.

the class ClosureLinterLaunchShortcut method adaptLaunchConfiguration.

@Override
protected ILaunchConfiguration adaptLaunchConfiguration(ILaunchConfiguration config, IResource selectedResource, String mode) throws CoreException {
    IReadOnlyStore store = new LaunchConfigurationReadOnlyStore(config);
    List<IResource> resources = record.inputResources.get(store);
    if (isSelectedResource(resources, selectedResource))
        return config;
    ILaunchConfigurationWorkingCopy configwc = castILaunchConfigurationAsWorkingCopy(config);
    IStore storewc = new LaunchConfigurationStore(configwc);
    record.inputResources.set(storewc, Collections.singletonList(selectedResource));
    return configwc;
}
Also used : IReadOnlyStore(net.vtst.eclipse.easy.ui.properties.stores.IReadOnlyStore) IStore(net.vtst.eclipse.easy.ui.properties.stores.IStore) LaunchConfigurationStore(net.vtst.eclipse.easy.ui.properties.stores.LaunchConfigurationStore) ILaunchConfigurationWorkingCopy(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy) LaunchConfigurationReadOnlyStore(net.vtst.eclipse.easy.ui.properties.stores.LaunchConfigurationReadOnlyStore) IResource(org.eclipse.core.resources.IResource)

Example 2 with IStore

use of net.vtst.eclipse.easy.ui.properties.stores.IStore 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 3 with IStore

use of net.vtst.eclipse.easy.ui.properties.stores.IStore 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)3 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 IReadOnlyStore (net.vtst.eclipse.easy.ui.properties.stores.IReadOnlyStore)1 LaunchConfigurationReadOnlyStore (net.vtst.eclipse.easy.ui.properties.stores.LaunchConfigurationReadOnlyStore)1 LaunchConfigurationStore (net.vtst.eclipse.easy.ui.properties.stores.LaunchConfigurationStore)1 IResource (org.eclipse.core.resources.IResource)1 ILaunchConfigurationWorkingCopy (org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)1