KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > pde > internal > ui > editor > cheatsheet > comp > CompCSInputContextManager


1 /*******************************************************************************
2  * Copyright (c) 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11
12 package org.eclipse.pde.internal.ui.editor.cheatsheet.comp;
13
14 import org.eclipse.pde.core.IBaseModel;
15 import org.eclipse.pde.internal.ui.editor.PDEFormEditor;
16 import org.eclipse.pde.internal.ui.editor.context.InputContext;
17 import org.eclipse.pde.internal.ui.editor.context.InputContextManager;
18
19 /**
20  * CompCSInputContextManager
21  *
22  */

23 public class CompCSInputContextManager extends InputContextManager {
24
25     /**
26      * @param editor
27      */

28     public CompCSInputContextManager(PDEFormEditor editor) {
29         super(editor);
30     }
31
32     /* (non-Javadoc)
33      * @see org.eclipse.pde.internal.ui.editor.context.InputContextManager#getAggregateModel()
34      */

35     public IBaseModel getAggregateModel() {
36         InputContext context = findContext(CompCSInputContext.CONTEXT_ID);
37         if (context == null) {
38             return null;
39         }
40         return context.getModel();
41     }
42
43 }
44
Popular Tags