@Test(expected = InvalidPreferenceScopeException.class) public void tryResolveWithNoScopeTypesTest() { scopeResolver.resolve(); }
@Override public PreferenceScope resolve( final String... scopeTypes ) { if ( scopeTypes != null && scopeTypes.length == 1 ) { if ( WorkbenchPreferenceScopes.getUserScopedScopes().contains( scopeTypes[0] ) ) { return getScopeFromOrder( WorkbenchPreferenceScopes.USER, scopeTypes[0] ); } return getScopeFromOrder( scopeTypes ); } throw new InvalidPreferenceScopeException( "The passed scope types are invalid." ); }
WorkbenchPreferenceScopeResolver implements PreferenceScopeResolver { @Override public PreferenceScope resolve( final String... scopeTypes ) { if ( scopeTypes != null && scopeTypes.length == 1 ) { if ( WorkbenchPreferenceScopes.getUserScopedScopes().contains( scopeTypes[0] ) ) { return getScopeFromOrder( WorkbenchPreferenceScopes.USER, scopeTypes[0] ); } return getScopeFromOrder( scopeTypes ); } throw new InvalidPreferenceScopeException( "The passed scope types are invalid." ); } }
WorkbenchPreferenceScopeResolver implements PreferenceScopeResolver { @Override public PreferenceScope resolve( final String... scopeTypes ) { if ( scopeTypes != null && scopeTypes.length == 1 ) { if ( WorkbenchPreferenceScopes.getUserScopedScopes().contains( scopeTypes[0] ) ) { return getScopeFromOrder( WorkbenchPreferenceScopes.USER, scopeTypes[0] ); } return getScopeFromOrder( scopeTypes ); } throw new InvalidPreferenceScopeException( "The passed scope types are invalid." ); } WorkbenchPreferenceScopeResolver( @MapsTo("order") final List<PreferenceScope> order ); }
WorkbenchPreferenceScopeResolver implements PreferenceScopeResolver { @Override public PreferenceScope resolve( final String... scopeTypes ) { if ( scopeTypes != null && scopeTypes.length == 1 ) { if ( WorkbenchPreferenceScopes.getUserScopedScopes().contains( scopeTypes[0] ) ) { return getScopeFromOrder( WorkbenchPreferenceScopes.USER, scopeTypes[0] ); } return getScopeFromOrder( scopeTypes ); } throw new InvalidPreferenceScopeException( "The passed scope types are invalid." ); } WorkbenchPreferenceScopeResolver( @MapsTo("order") final List<PreferenceScope> order ); @Override PreferenceScope resolve( final String... scopeTypes ); }
WorkbenchPreferenceScopeResolver implements PreferenceScopeResolver { @Override public PreferenceScope resolve( final String... scopeTypes ) { if ( scopeTypes != null && scopeTypes.length == 1 ) { if ( WorkbenchPreferenceScopes.getUserScopedScopes().contains( scopeTypes[0] ) ) { return getScopeFromOrder( WorkbenchPreferenceScopes.USER, scopeTypes[0] ); } return getScopeFromOrder( scopeTypes ); } throw new InvalidPreferenceScopeException( "The passed scope types are invalid." ); } WorkbenchPreferenceScopeResolver( @MapsTo("order") final List<PreferenceScope> order ); @Override PreferenceScope resolve( final String... scopeTypes );  }