Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Goldthorpe2011-09-23 20:24:28 +0000
committerChris Goldthorpe2011-09-23 20:28:17 +0000
commit405ab60e2267e60bd4cbc1b574828874589d8bcf (patch)
tree61d53fe0e5bbe83d0d9a8927b7f9c2e9b3baa4eb /org.eclipse.help.ui
parentd9167980d227beb3c0fae203d39721a0ac391d4f (diff)
downloadeclipse.platform.ua-405ab60e2267e60bd4cbc1b574828874589d8bcf.tar.gz
eclipse.platform.ua-405ab60e2267e60bd4cbc1b574828874589d8bcf.tar.xz
eclipse.platform.ua-405ab60e2267e60bd4cbc1b574828874589d8bcf.zip
Bug 358775 - [Help] Clean up warnings in Help projects
Diffstat (limited to 'org.eclipse.help.ui')
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/HelpActivitySupport.java5
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/embedded/EmbeddedBrowser.java3
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/HelpContentPreferencePage.java5
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/HelpPreferencePage.java6
4 files changed, 7 insertions, 12 deletions
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/HelpActivitySupport.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/HelpActivitySupport.java
index bc0289fb2..f538a3240 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/HelpActivitySupport.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/HelpActivitySupport.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
@@ -148,8 +148,7 @@ public class HelpActivitySupport implements IHelpActivitySupport {
public void setFilteringEnabled(boolean enabled) {
if (userCanToggleFiltering) {
filteringEnabled = enabled;
- InstanceScope instanceScope = new InstanceScope();
- IEclipsePreferences prefs = instanceScope.getNode(HelpBasePlugin.PLUGIN_ID);
+ IEclipsePreferences prefs = InstanceScope.INSTANCE.getNode(HelpBasePlugin.PLUGIN_ID);
if (enabled) {
prefs.put(PREF_KEY_SHOW_DISABLED_ACTIVITIES,
SHOW_DISABLED_ACTIVITIES_OFF);
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/embedded/EmbeddedBrowser.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/embedded/EmbeddedBrowser.java
index 4bf4ace35..e00c7b488 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/embedded/EmbeddedBrowser.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/embedded/EmbeddedBrowser.java
@@ -108,8 +108,7 @@ public class EmbeddedBrowser {
shell.addDisposeListener(new DisposeListener() {
public void widgetDisposed(DisposeEvent e) {
// save position
- InstanceScope instanceScope = new InstanceScope();
- IEclipsePreferences prefs = instanceScope.getNode(HelpUIPlugin.PLUGIN_ID);
+ IEclipsePreferences prefs = InstanceScope.INSTANCE.getNode(HelpUIPlugin.PLUGIN_ID);
prefs.putInt(BROWSER_X, x);
prefs.putInt(BROWSER_Y, y);
prefs.putInt(BROWSER_WIDTH, w);
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/HelpContentPreferencePage.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/HelpContentPreferencePage.java
index 42c3f2bbe..e0546b089 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/HelpContentPreferencePage.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/HelpContentPreferencePage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2010 IBM Corporation and others.
+ * Copyright (c) 2006, 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
@@ -120,8 +120,7 @@ public class HelpContentPreferencePage extends PreferencePage implements
HelpContentBlock currentBlock;
RemoteIC[] currentRemoteICArray;
- InstanceScope instanceScope = new InstanceScope();
- IEclipsePreferences prefs = instanceScope.getNode(HelpBasePlugin.PLUGIN_ID);
+ IEclipsePreferences prefs = InstanceScope.INSTANCE.getNode(HelpBasePlugin.PLUGIN_ID);
/*
* (non-Javadoc)
*
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/HelpPreferencePage.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/HelpPreferencePage.java
index a02558da8..6a7dc3b2d 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/HelpPreferencePage.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/HelpPreferencePage.java
@@ -228,8 +228,7 @@ public class HelpPreferencePage extends PreferencePage implements
* </p>
*/
protected void performDefaults() {
- DefaultScope defaultScope = new DefaultScope();
- IEclipsePreferences defaults = defaultScope.getNode(HelpBasePlugin.PLUGIN_ID);
+ IEclipsePreferences defaults = DefaultScope.INSTANCE.getNode(HelpBasePlugin.PLUGIN_ID);
if (useExternalCombo != null) {
boolean useExternal = defaults.getBoolean(
IHelpBaseConstants.P_KEY_ALWAYS_EXTERNAL_BROWSER, false);
@@ -258,8 +257,7 @@ public class HelpPreferencePage extends PreferencePage implements
* @see IPreferencePage
*/
public boolean performOk() {
- InstanceScope instanceScope = new InstanceScope();
- IEclipsePreferences pref = instanceScope.getNode(HelpBasePlugin.PLUGIN_ID);
+ IEclipsePreferences pref = InstanceScope.INSTANCE.getNode(HelpBasePlugin.PLUGIN_ID);
if (useExternalCombo != null) {
boolean isExternalBrowser = useExternalCombo.getText().equals(Messages.HelpPreferencePage_externalBrowser);
pref.putBoolean(IHelpBaseConstants.P_KEY_ALWAYS_EXTERNAL_BROWSER,

Back to the top