01: /*******************************************************************************
02: * Copyright (c) 2005, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.pde.internal.ui.nls;
11:
12: import java.util.ArrayList;
13:
14: import org.eclipse.core.resources.IFile;
15:
16: public class ModelChangeFile {
17: private IFile fFile;
18: private ModelChange fModel;
19: private ArrayList fChanges = new ArrayList();
20: private int fNumChanges = 0;
21:
22: public ModelChangeFile(IFile file, ModelChange model) {
23: fFile = file;
24: fModel = model;
25: }
26:
27: protected IFile getFile() {
28: return fFile;
29: }
30:
31: protected ModelChange getModel() {
32: return fModel;
33: }
34:
35: public void add(ModelChangeElement element) {
36: if (fChanges.add(element))
37: fNumChanges += 1;
38: }
39:
40: protected int getNumChanges() {
41: return fNumChanges;
42: }
43:
44: protected ArrayList getChanges() {
45: return fChanges;
46: }
47: }
|