diff options
author | Dani Megert | 2011-01-04 14:55:13 +0000 |
---|---|---|
committer | Dani Megert | 2011-01-04 14:55:13 +0000 |
commit | 5035e10ee354ccc2827f15a188987d9b1975bae7 (patch) | |
tree | c58e82f0773bce8eadab1a96ee61d981f331455b /org.eclipse.ui.examples.javaeditor | |
parent | eb4fae6229c4982da88a6fff6cf80dc849631d01 (diff) | |
download | eclipse.platform.text-5035e10ee354ccc2827f15a188987d9b1975bae7.tar.gz eclipse.platform.text-5035e10ee354ccc2827f15a188987d9b1975bae7.tar.xz eclipse.platform.text-5035e10ee354ccc2827f15a188987d9b1975bae7.zip |
Replaced deprecated code.
Diffstat (limited to 'org.eclipse.ui.examples.javaeditor')
-rw-r--r-- | org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/editors/TemplateEditorUI.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/editors/TemplateEditorUI.java b/org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/editors/TemplateEditorUI.java index aca2064e375..a72cadcafcb 100644 --- a/org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/editors/TemplateEditorUI.java +++ b/org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/editors/TemplateEditorUI.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2008 IBM Corporation and others. + * Copyright (c) 2000, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -13,8 +13,11 @@ package org.eclipse.ui.examples.templateeditor.editors; import java.io.IOException; +import org.osgi.service.prefs.BackingStoreException; + import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; +import org.eclipse.core.runtime.preferences.InstanceScope; import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.jface.resource.ImageDescriptor; @@ -104,7 +107,11 @@ public class TemplateEditorUI { } public void savePluginPreferences() { - JavaEditorExamplePlugin.getDefault().savePluginPreferences(); + try { + InstanceScope.INSTANCE.getNode(JavaEditorExamplePlugin.PLUGIN_ID).flush(); + } catch (BackingStoreException e) { + JavaEditorExamplePlugin.log(e); + } } } |