diff options
author | Chris Goldthorpe | 2008-10-20 20:27:48 +0000 |
---|---|---|
committer | Chris Goldthorpe | 2008-10-20 20:27:48 +0000 |
commit | e7e6426d81a3182b6e63cd3da8304b67b919e60d (patch) | |
tree | a7e849cc7f6ff5e0ce3c516c9bd952a031c874e1 /org.eclipse.ui.cheatsheets | |
parent | 24d15ab2cdb11697c5ee803796a4269c01b677cd (diff) | |
download | eclipse.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.java | 16 |
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; } |