Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Goldthorpe2011-09-23 20:38:44 +0000
committerChris Goldthorpe2011-09-23 20:40:23 +0000
commita517f37e9dc29bf07c73cebf16653ea76bd12a99 (patch)
tree5c7889f6d6152b23e8869cc69a804e8a32042d9a /org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro
parent405ab60e2267e60bd4cbc1b574828874589d8bcf (diff)
downloadeclipse.platform.ua-a517f37e9dc29bf07c73cebf16653ea76bd12a99.tar.gz
eclipse.platform.ua-a517f37e9dc29bf07c73cebf16653ea76bd12a99.tar.xz
eclipse.platform.ua-a517f37e9dc29bf07c73cebf16653ea76bd12a99.zip
Bug 358776 - [Intro][CheatSheets] Fix deprecation warnings in intro
projects
Diffstat (limited to 'org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro')
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/FontSelection.java11
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/presentations/BrowserIntroPartImplementation.java4
2 files changed, 6 insertions, 9 deletions
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/FontSelection.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/FontSelection.java
index 2ba1ad89d..8d4326d91 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/FontSelection.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/FontSelection.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 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
@@ -71,8 +71,7 @@ public class FontSelection {
}
public static void setScalePercentage(int i) {
- InstanceScope instanceScope = new InstanceScope();
- IEclipsePreferences prefs = instanceScope.getNode(IntroPlugin.PLUGIN_ID);
+ IEclipsePreferences prefs = InstanceScope.INSTANCE.getNode(IntroPlugin.PLUGIN_ID);
prefs.putInt(SCALE_FACTOR, i);
try {
prefs.flush();
@@ -82,10 +81,8 @@ public class FontSelection {
// Set the scale factor to it's default
public static void resetScalePercentage() {
- InstanceScope instanceScope = new InstanceScope();
- IEclipsePreferences iprefs = instanceScope.getNode(IntroPlugin.PLUGIN_ID);
- DefaultScope defaultScope = new DefaultScope();
- IEclipsePreferences dprefs = defaultScope.getNode(IntroPlugin.PLUGIN_ID);
+ IEclipsePreferences iprefs = InstanceScope.INSTANCE.getNode(IntroPlugin.PLUGIN_ID);
+ IEclipsePreferences dprefs = DefaultScope.INSTANCE.getNode(IntroPlugin.PLUGIN_ID);
String defaultScale = dprefs.get(SCALE_FACTOR, "0"); //$NON-NLS-1$
iprefs.put(SCALE_FACTOR, defaultScale);
}
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/presentations/BrowserIntroPartImplementation.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/presentations/BrowserIntroPartImplementation.java
index 4254a527d..1a2457c3e 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/presentations/BrowserIntroPartImplementation.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/presentations/BrowserIntroPartImplementation.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * Copyright (c) 2004, 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,7 +148,7 @@ public class BrowserIntroPartImplementation extends
out.close();
IWorkbenchBrowserSupport support = PlatformUI.getWorkbench().getBrowserSupport();
IWebBrowser browser = support.getExternalBrowser();
- browser.openURL(tempFile.toURL());
+ browser.openURL(tempFile.toURI().toURL());
} catch (IOException e) {
} catch (PartInitException e) {
}

Back to the top