KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > pde > internal > core > plugin > WorkspaceFragmentModel


1 /*******************************************************************************
2  * Copyright (c) 2000, 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 package org.eclipse.pde.internal.core.plugin;
12
13 import org.eclipse.core.resources.IFile;
14 import org.eclipse.pde.core.plugin.IFragment;
15 import org.eclipse.pde.core.plugin.IFragmentModel;
16 import org.eclipse.pde.core.plugin.IPluginBase;
17
18 public class WorkspaceFragmentModel extends WorkspacePluginModelBase implements
19         IFragmentModel {
20
21     private static final long serialVersionUID = 1L;
22
23     public WorkspaceFragmentModel(IFile file, boolean abbreviated) {
24         super(file, abbreviated);
25     }
26
27     public IPluginBase createPluginBase() {
28         Fragment fragment = new Fragment();
29         fragment.setModel(this);
30         return fragment;
31     }
32
33     public IFragment getFragment() {
34         return (IFragment) getPluginBase();
35     }
36
37     public boolean isFragmentModel() {
38         return true;
39     }
40 }
41
Popular Tags