KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > pde > internal > ui > nls > ModelChangeFile


1 /*******************************************************************************
2  * Copyright (c) 2005, 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.ui.nls;
12
13 import java.util.ArrayList JavaDoc;
14
15 import org.eclipse.core.resources.IFile;
16
17 public class ModelChangeFile {
18     private IFile fFile;
19     private ModelChange fModel;
20     private ArrayList JavaDoc fChanges = new ArrayList JavaDoc();
21     private int fNumChanges = 0;
22     public ModelChangeFile (IFile file, ModelChange model) {
23         fFile = file;
24         fModel = model;
25     }
26     protected IFile getFile() {
27         return fFile;
28     }
29     protected ModelChange getModel() {
30         return fModel;
31     }
32     public void add(ModelChangeElement element) {
33         if (fChanges.add(element))
34             fNumChanges += 1;
35     }
36     protected int getNumChanges() {
37         return fNumChanges;
38     }
39     protected ArrayList JavaDoc getChanges() {
40         return fChanges;
41     }
42 }
43
Popular Tags