本文整理汇总了Java中org.osgi.service.prefs.BackingStoreException.printStackTrace方法的典型用法代码示例。如果您正苦于以下问题:Java BackingStoreException.printStackTrace方法的具体用法?Java BackingStoreException.printStackTrace怎么用?Java BackingStoreException.printStackTrace使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.osgi.service.prefs.BackingStoreException
的用法示例。
在下文中一共展示了BackingStoreException.printStackTrace方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: loadAnnotationPreferenceNodes
import org.osgi.service.prefs.BackingStoreException; //导入方法依赖的package包/类
/**
* @return
*/
private List<EclipsePreferences> loadAnnotationPreferenceNodes() {
Preferences rootNode = ConfigurationScope.INSTANCE.getNode(Activator.BUNDLE_ID);
annotationsNode = (EclipsePreferences) rootNode.node(BTSCorpusConstants.PREF_ANNOTATION_SETTINGS);
List<EclipsePreferences> nodes = new Vector<EclipsePreferences>();
if (annotationsNode != null)
{
try {
for (String n : annotationsNode.childrenNames())
{
if (annotationsNode.nodeExists(n))
{
nodes.add((EclipsePreferences) annotationsNode.node(n));
}
}
} catch (BackingStoreException e) {
e.printStackTrace();
}
}
return nodes;
}
示例2: performOk
import org.osgi.service.prefs.BackingStoreException; //导入方法依赖的package包/类
@Override
public boolean performOk() {
if (settingsEditors == null) return super.performOk();
for (TextAnnotationSettingsEditor editor : settingsEditors)
{
editor.save();
}
try {
annotationsNode.flush();
} catch (BackingStoreException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
eventBroker.post("event_preferences_changed/"+BTSCorpusConstants.PREF_ANNOTATION_SETTINGS,
annotationsNode.absolutePath());
return super.performOk();
}
示例3: delete
import org.osgi.service.prefs.BackingStoreException; //导入方法依赖的package包/类
/**
* @param selectionAdapter
* @param node
*/
public void delete(TextAnnotationSettingsEditor editor, Preferences node) {
annotationsNodes.remove(node);
annotationsNode.remove(node.name());
settingsEditors.remove(editor);
editor.getParent().dispose();
Point p = sc.getSize();
sc.setSize(p.x + variant, p.y);
variant = -variant;
try {
node.removeNode();
} catch (BackingStoreException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
示例4: performOk
import org.osgi.service.prefs.BackingStoreException; //导入方法依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public final boolean performOk() {
final IEclipsePreferences projectPreferences = getProjectPreferences();
for (final PropertyPageField field : fields) {
field.storeValue(projectPreferences);
}
try {
projectPreferences.flush();
}
catch (final BackingStoreException e) {
// settings could not be saved.
e.printStackTrace();
}
return super.performOk();
}
示例5: performOk
import org.osgi.service.prefs.BackingStoreException; //导入方法依赖的package包/类
@Override
public boolean performOk() {
Preferences preferences = ConfigurationScope.INSTANCE.getNode("org.mdpm.lng.plan.preferences");
preferences.putBoolean("sunday", sunday.getSelection());
preferences.putBoolean("monday", monday.getSelection());
preferences.putBoolean("tuesday", tuesday.getSelection());
preferences.putBoolean("wednesday", wednesday.getSelection());
preferences.putBoolean("thursday", thursday.getSelection());
preferences.putBoolean("friday", friday.getSelection());
preferences.putBoolean("saturday", saturday.getSelection());
String tmp="";
if(dates.getItemCount()>0){
for (int k=0; k<dates.getItemCount();k++){
tmp = tmp+dates.getItem(k)+",";
}
}
preferences.put("dates",tmp);
//preferences.put
try {
preferences.flush();
} catch (BackingStoreException e) {
e.printStackTrace();
}
return super.performOk();
}
示例6: loadFromPref
import org.osgi.service.prefs.BackingStoreException; //导入方法依赖的package包/类
private void loadFromPref() {
try {
groups = PrefIO.readConfig();
} catch (BackingStoreException e) {
e.printStackTrace();
}
for(Group g: groups) {
listGroup.add(GROUP + g.getGroupID());
}
if(listGroup.getItemCount() > 0) {
listGroup.select(1);
updateMemberList();
}
updateGroups();
}
示例7: performOk
import org.osgi.service.prefs.BackingStoreException; //导入方法依赖的package包/类
/**
* @see org.eclipse.jface.preference.IPreferencePage#performOk()
*/
public boolean performOk() {
IEclipsePreferences prefs = MsgEditorPreferences.getEclipsePreferenceStore();
prefs.putInt(MsgEditorPreferences.REPORT_MISSING_VALUES_LEVEL, reportMissingVals.getSelectionIndex());
prefs.putInt(MsgEditorPreferences.REPORT_DUPL_VALUES_LEVEL, reportDuplVals.getSelectionIndex());
prefs.putInt(MsgEditorPreferences.REPORT_SIM_VALUES_LEVEL, reportSimVals.getSelectionIndex());
prefs.putBoolean(MsgEditorPreferences.REPORT_SIM_VALUES_WORD_COMPARE,reportSimValsMode[0].getSelection());
prefs.putBoolean(MsgEditorPreferences.REPORT_SIM_VALUES_LEVENSTHEIN, reportSimValsMode[1].getSelection());
double precision = 0.75d;
try{
double textPrecision = Double.parseDouble(reportSimPrecision.getText());
precision = textPrecision;
} catch (NumberFormatException ex){}
prefs.putDouble(MsgEditorPreferences.REPORT_SIM_VALUES_PRECISION, precision);
try {
prefs.flush();
} catch (BackingStoreException e) {
e.printStackTrace();
}
refreshEnabledStatuses();
return super.performOk();
}
示例8: performOk
import org.osgi.service.prefs.BackingStoreException; //导入方法依赖的package包/类
/**
* @see org.eclipse.jface.preference.IPreferencePage#performOk()
*/
public boolean performOk() {
IEclipsePreferences prefs = MsgEditorPreferences.getEclipsePreferenceStore();
prefs.put(MsgEditorPreferences.GROUP__LEVEL_SEPARATOR, keyGroupSeparator.getText());
prefs.put(MsgEditorPreferences.FILTER_LOCALES_STRING_MATCHERS,filterLocales.getText());
prefs.putBoolean(MsgEditorPreferences.UNICODE_UNESCAPE_ENABLED, convertEncodedToUnicode.getSelection());
prefs.putBoolean(MsgEditorPreferences.NL_SUPPORT_ENABLED,supportNL.getSelection());
prefs.putBoolean(MsgEditorPreferences.ADD_MSG_EDITOR_BUILDER_TO_JAVA_PROJECTS, setupRbeNatureAutomatically.getSelection());
prefs.putBoolean(MsgEditorPreferences.KEY_TREE_HIERARCHICAL, keyTreeHierarchical.getSelection());
prefs.putBoolean(MsgEditorPreferences.KEY_TREE_EXPANDED, keyTreeExpanded.getSelection());
prefs.putBoolean(MsgEditorPreferences.FIELD_TAB_INSERTS, fieldTabInserts.getSelection());
try {
prefs.flush();
} catch (BackingStoreException e) {
e.printStackTrace();
}
refreshEnabledStatuses();
return super.performOk();
}
示例9: save
import org.osgi.service.prefs.BackingStoreException; //导入方法依赖的package包/类
/**
* Saves the bundle properties.
*/
public void save() {
this.setGlobal2Preferences();
try {
this.getEclipsePreferences().flush();
} catch (BackingStoreException bsEx) {
bsEx.printStackTrace();
}
}
示例10: persistOptIn
import org.osgi.service.prefs.BackingStoreException; //导入方法依赖的package包/类
public static void persistOptIn(String email, boolean uptodate, String mobileLicense, String desktopLicense) {
PREFERENCES.put(ProjectConstants.PARAM_USER_IDE_OPTIN, "true");
PREFERENCES.put(ProjectConstants.PARAM_USER_EMAIL, email);
PREFERENCES.putBoolean(ProjectConstants.PARAM_USER_UPTODATE, uptodate);
PREFERENCES.put(ProjectConstants.PARAM_USER_LICENSE_MOBILE, mobileLicense);
PREFERENCES.put(ProjectConstants.PARAM_USER_LICENSE_DESKTOP, desktopLicense);
PREFERENCES.put(ProjectConstants.PARAM_USER_MAC_ADDRESS, TemplateUtils.getMacAddress());
PREFERENCES.put(ProjectConstants.PARAM_USER_PLUGIN_VERSION, ProjectConstants.PLUGIN_VERSION);
try {
PREFERENCES.flush();
} catch (BackingStoreException e) {
e.printStackTrace();
}
}
示例11: createPreferences
import org.osgi.service.prefs.BackingStoreException; //导入方法依赖的package包/类
public void createPreferences() {
IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(GlobalSettings.get("AnalysisProject"));
IScopeContext projectScope = new ProjectScope(project);
IEclipsePreferences pref = projectScope.getNode(Activator.PLUGIN_ID);
for (String stmt : getStatementTypes()) {
// pref.putInt(stmt, -16743169);
pref.putInt(stmt, -6037505);
}
try {
pref.flush();
} catch (BackingStoreException e) {
e.printStackTrace();
}
}
示例12: updateColorPreferences
import org.osgi.service.prefs.BackingStoreException; //导入方法依赖的package包/类
public void updateColorPreferences(String stmtType, int color) {
IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(GlobalSettings.get("AnalysisProject"));
IScopeContext projectScope = new ProjectScope(project);
IEclipsePreferences pref = projectScope.getNode(Activator.PLUGIN_ID);
pref.putInt(stmtType, color);
try {
pref.flush();
} catch (BackingStoreException e) {
e.printStackTrace();
}
}
示例13: createAction
import org.osgi.service.prefs.BackingStoreException; //导入方法依赖的package包/类
private Action createAction(final String scopeName, final ITheme theme, boolean whenDark) {
return new Action(theme.getName()) {
@Override
public void run() {
IThemeManager manager = TMUIPlugin.getThemeManager();
IThemeAssociation association = new ThemeAssociation(theme.getId(), scopeName, whenDark);
manager.registerThemeAssociation(association);
try {
manager.save();
} catch (BackingStoreException e) {
e.printStackTrace();
}
}
};
}
示例14: performOk
import org.osgi.service.prefs.BackingStoreException; //导入方法依赖的package包/类
@Override
public boolean performOk() {
try {
// Save the working copy if there are some changed.
grammarRegistryManager.save();
themeManager.save();
} catch (BackingStoreException e) {
e.printStackTrace();
return false;
}
return super.performOk();
}
示例15: performFinish
import org.osgi.service.prefs.BackingStoreException; //导入方法依赖的package包/类
@Override
public boolean performFinish() {
IGrammarDefinition definition = mainPage.getGrammarDefinition();
grammarRegistryManager.registerGrammarDefinition(definition);
if (save) {
try {
grammarRegistryManager.save();
} catch (BackingStoreException e) {
e.printStackTrace();
return false;
}
}
createdDefinition = definition;
return true;
}