Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
OpenTox ds models pick up changes to OpentoxService without restart
Using InstanceScope to get the preferences.
It now picks up changes without restart.
  • Loading branch information
goglepox committed Feb 15, 2013
1 parent 2ae5cd2 commit c05a33d
Showing 1 changed file with 4 additions and 5 deletions.
Expand Up @@ -12,6 +12,8 @@
import org.eclipse.core.runtime.IExtensionRegistry;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.preferences.ConfigurationScope;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.core.runtime.preferences.InstanceScope;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.ui.preferences.ScopedPreferenceStore;

Expand Down Expand Up @@ -83,12 +85,9 @@ public static List<OpenToxService> readServicesFromPreferences() {
logger.debug("Reading services from preferences...");

List<OpenToxService> services=new ArrayList<OpenToxService>();
ScopedPreferenceStore prefsStore = new ScopedPreferenceStore(
ConfigurationScope.INSTANCE,
OpenToxConstants.PLUGIN_ID );
prefsStore.setSearchContexts( null );
IEclipsePreferences pref = InstanceScope.INSTANCE.getNode( OpenToxConstants.PLUGIN_ID );
String entireString = pref.get( OpenToxConstants.SERVICES, "NA" );

String entireString = prefsStore.getString(OpenToxConstants.SERVICES);
List<String[]> parts = ServicesPreferencePage.convertPreferenceStringToArraylist(entireString);
for (String[] entry : parts){
if (entry.length==3){
Expand Down

0 comments on commit c05a33d

Please sign in to comment.