KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > pde > internal > ui > editor > feature > FeatureInputContextManager


1 /*******************************************************************************
2  * Copyright (c) 2003, 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  * Created on Mar 1, 2004
13  *
14  * To change the template for this generated file go to
15  * Window - Preferences - Java - Code Generation - Code and Comments
16  */

17 package org.eclipse.pde.internal.ui.editor.feature;
18
19 import org.eclipse.pde.core.IBaseModel;
20 import org.eclipse.pde.internal.ui.editor.PDEFormEditor;
21 import org.eclipse.pde.internal.ui.editor.context.InputContext;
22 import org.eclipse.pde.internal.ui.editor.context.InputContextManager;
23
24 public class FeatureInputContextManager extends InputContextManager {
25     /**
26      *
27      */

28     public FeatureInputContextManager(PDEFormEditor editor) {
29         super(editor);
30     }
31
32     public IBaseModel getAggregateModel() {
33         return findFeatureModel();
34     }
35
36     private IBaseModel findFeatureModel() {
37         InputContext fcontext = findContext(FeatureInputContext.CONTEXT_ID);
38         return (fcontext != null) ? fcontext.getModel() : null;
39     }
40 }
41
Popular Tags