Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Goldthorpe2008-10-20 20:27:48 +0000
committerChris Goldthorpe2008-10-20 20:27:48 +0000
commite7e6426d81a3182b6e63cd3da8304b67b919e60d (patch)
treea7e849cc7f6ff5e0ce3c516c9bd952a031c874e1 /org.eclipse.ui.cheatsheets
parent24d15ab2cdb11697c5ee803796a4269c01b677cd (diff)
downloadeclipse.platform.ua-e7e6426d81a3182b6e63cd3da8304b67b919e60d.tar.gz
eclipse.platform.ua-e7e6426d81a3182b6e63cd3da8304b67b919e60d.tar.xz
eclipse.platform.ua-e7e6426d81a3182b6e63cd3da8304b67b919e60d.zip
Fix API Warnings
Diffstat (limited to 'org.eclipse.ui.cheatsheets')
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/CheatSheetEvaluationContext.java16
1 files changed, 4 insertions, 12 deletions
diff --git a/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/CheatSheetEvaluationContext.java b/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/CheatSheetEvaluationContext.java
index 918001e81..bb4fef016 100644
--- a/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/CheatSheetEvaluationContext.java
+++ b/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/CheatSheetEvaluationContext.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
+ * Copyright (c) 2008 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
@@ -30,17 +30,9 @@ public final class CheatSheetEvaluationContext {
*/
public static EvaluationContext getContext() {
if (context == null) {
- context = new EvaluationContext(null, Platform.class) {
- public Object getVariable(String name) {
- if (VARIABLE_PLATFORM.equals(name)) {
- return Platform.class;
- }
- else if (VARIABLE_WORKBENCH.equals(name)) {
- return PlatformUI.getWorkbench();
- }
- return null;
- }
- };
+ context = new EvaluationContext(null, Platform.class);
+ context.addVariable(VARIABLE_PLATFORM, Platform.class);
+ context.addVariable(VARIABLE_WORKBENCH, PlatformUI.getWorkbench());
}
return context;
}

Back to the top