use of org.uberfire.preferences.shared.PreferenceScopeResolutionStrategy in project kie-wb-common by kiegroup.
the class WorkbenchPreferenceScopeResolutionStrategiesImpl method getUserInfoFor.
@Override
public PreferenceScopeResolutionStrategyInfo getUserInfoFor(final String scopeType, final String scopeKey) {
PreferenceScopeResolutionStrategy scopeResolutionStrategy;
if (scopeType != null) {
PreferenceScope userScope = scopeFactory.createScope(WorkbenchPreferenceScopes.USER);
PreferenceScope userScopedScope;
if (scopeKey != null) {
userScopedScope = scopeFactory.createScope(scopeType, scopeKey);
} else {
userScopedScope = scopeFactory.createScope(scopeType);
}
PreferenceScope projectUserScope = scopeFactory.createScope(userScope, userScopedScope);
scopeResolutionStrategy = new WorkbenchPreferenceScopeResolutionStrategy(scopeFactory, projectUserScope);
} else {
scopeResolutionStrategy = new WorkbenchPreferenceScopeResolutionStrategy(scopeFactory);
}
return scopeResolutionStrategy.getInfo();
}
Aggregations