| 
| Preference setValue problem [message #56961] | Sat, 18 April 2009 18:52  |  | 
| Eclipse User  |  |  |  |  | Hello, 
 i have the problem that when i set two string values thw output is not the
 same.
 
 Here my code:
 
 Preferences store = Activator.getDefault().getPluginPreferences();
 
 store.setValue(PreferenceConstants.OAUTH_TOKEN, token.getToken());
 System.out.println("A1:"+store.getString(PreferenceConstants.OAUTH_TOKEN));
 
 store.setValue(PreferenceConstants.OAUTH_TOKENSECRET,token.g etTokenSecret());
 System.out.println("B1:"+store.getString(PreferenceConstants.OAUTH_TOKENSECRET));
 
 String a =  store.getString(PreferenceConstants.OAUTH_TOKEN);
 String b =  store.getString(PreferenceConstants.OAUTH_TOKENSECRET);
 System.out.println("A:"+a);
 System.out.println("B:"+b);
 
 
 The thing is that my output for A: and B: shows the same values not like
 for A1: and B1:
 
 Here the result:
 
 A1: 2000-52566-36D555252352352523525
 B1: vbXDDhhka67aRDk5fhPcDJ1j7dppxRR46777
 
 A:vbXDDhhka67aRDk5fhPcDJ1j7dppxRR46777
 B:vbXDDhhka67aRDk5fhPcDJ1j7dppxRR46777
 
 what am i missing ...
 Regards
 Ivan
 |  |  |  | 
| 
| Re: Preference setValue problem [message #56987 is a reply to message #56961] | Sun, 19 April 2009 00:44  |  | 
| Eclipse User  |  |  |  |  | Papic Milan wrote: > Hello,
 > i have the problem that when i set two string values thw output is not
 > the same.
 >
 > Here my code:
 > Preferences store = Activator.getDefault().getPluginPreferences();
 > store.setValue(PreferenceConstants.OAUTH_TOKEN, token.getToken());
 > System.out.println("A1:"+store.getString(PreferenceConstants.OAUTH_TOKEN));
 >
 >  store.setValue(PreferenceConstants.OAUTH_TOKENSECRET,token.g etTokenSecret());
 > System.out.println("B1:"+store.getString(PreferenceConstants.OAUTH_TOKENSECRET));
 >
 >             String a =  store.getString(PreferenceConstants.OAUTH_TOKEN);
 >        String b =  store.getString(PreferenceConstants.OAUTH_TOKENSECRET);
 >        System.out.println("A:"+a);
 >        System.out.println("B:"+b);
 >
 >
 > The thing is that my output for A: and B: shows the same values not like
 > for A1: and B1:
 >
 > Here the result:
 >
 > A1: 2000-52566-36D555252352352523525
 > B1: vbXDDhhka67aRDk5fhPcDJ1j7dppxRR46777
 >
 > A:vbXDDhhka67aRDk5fhPcDJ1j7dppxRR46777
 > B:vbXDDhhka67aRDk5fhPcDJ1j7dppxRR46777
 > what am i missing ... Regards
 > Ivan
 >
 
 1. One possibility is that PreferenceConstants.OAUTH_TOKEN and PreferenceConstants.OAUTH_TOKENSCERT
 constants refer to same string.
 
 2. Whats your eclipse verion? Preferences has been deprecated and IEclipsePreferences is the new
 recommended way to manage the preferences.
 
 --
 hth,
 Ankur..
 |  |  |  | 
| 
| Re: Preference setValue problem [message #595857 is a reply to message #56961] | Sun, 19 April 2009 00:44  |  | 
| Eclipse User  |  |  |  |  | Papic Milan wrote: > Hello,
 > i have the problem that when i set two string values thw output is not
 > the same.
 >
 > Here my code:
 > Preferences store = Activator.getDefault().getPluginPreferences();
 > store.setValue(PreferenceConstants.OAUTH_TOKEN, token.getToken());
 > System.out.println("A1:"+store.getString(PreferenceConstants.OAUTH_TOKEN));
 >
 >  store.setValue(PreferenceConstants.OAUTH_TOKENSECRET,token.g etTokenSecret());
 > System.out.println("B1:"+store.getString(PreferenceConstants.OAUTH_TOKENSECRET));
 >
 >             String a =  store.getString(PreferenceConstants.OAUTH_TOKEN);
 >        String b =  store.getString(PreferenceConstants.OAUTH_TOKENSECRET);
 >        System.out.println("A:"+a);
 >        System.out.println("B:"+b);
 >
 >
 > The thing is that my output for A: and B: shows the same values not like
 > for A1: and B1:
 >
 > Here the result:
 >
 > A1: 2000-52566-36D555252352352523525
 > B1: vbXDDhhka67aRDk5fhPcDJ1j7dppxRR46777
 >
 > A:vbXDDhhka67aRDk5fhPcDJ1j7dppxRR46777
 > B:vbXDDhhka67aRDk5fhPcDJ1j7dppxRR46777
 > what am i missing ... Regards
 > Ivan
 >
 
 1. One possibility is that PreferenceConstants.OAUTH_TOKEN and PreferenceConstants.OAUTH_TOKENSCERT
 constants refer to same string.
 
 2. Whats your eclipse verion? Preferences has been deprecated and IEclipsePreferences is the new
 recommended way to manage the preferences.
 
 --
 hth,
 Ankur..
 |  |  |  | 
Powered by 
FUDForum. Page generated in 0.04430 seconds