use of org.pentaho.mantle.client.usersettings.JsSetting in project pentaho-platform by pentaho.
the class SolutionTree method onUserSettingsLoaded.
@Override
public void onUserSettingsLoaded(UserSettingsLoadedEvent event) {
JsArray<JsSetting> settings = event.getSettings();
if (settings != null) {
for (int i = 0; i < settings.length(); i++) {
JsSetting setting = settings.get(i);
if (IMantleUserSettingsConstants.MANTLE_SHOW_LOCALIZED_FILENAMES.equals(setting.getName())) {
// $NON-NLS-1$
boolean showLocalizedFileNames = "true".equals(setting.getName());
setShowLocalizedFileNames(showLocalizedFileNames);
} else if (IMantleUserSettingsConstants.MANTLE_SHOW_DESCRIPTIONS_FOR_TOOLTIPS.equals(setting.getName())) {
// $NON-NLS-1$
boolean useDescriptions = "true".equals(setting.getValue());
setUseDescriptionsForTooltip(useDescriptions);
} else if (IMantleUserSettingsConstants.MANTLE_SHOW_HIDDEN_FILES.equals(setting.getName())) {
// $NON-NLS-1$
boolean showHiddenFiles = "true".equals(setting.getValue());
setShowHiddenFiles(showHiddenFiles);
}
}
}
RepositoryFileTreeManager.getInstance().addRepositoryFileTreeListener(this, null, null, showHiddenFiles);
}
Aggregations