KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > team > internal > ui > synchronize > UnchangedResourceModelElement


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 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.team.internal.ui.synchronize;
12
13 import org.eclipse.compare.structuremergeviewer.IDiffContainer;
14 import org.eclipse.core.resources.IResource;
15 import org.eclipse.core.runtime.Assert;
16 import org.eclipse.core.runtime.IAdaptable;
17
18 /**
19  * DiffNode that represents a resource that is in sync.
20  */

21 public class UnchangedResourceModelElement extends SynchronizeModelElement implements IAdaptable {
22
23     private final IResource resource;
24
25     public UnchangedResourceModelElement(IDiffContainer parent, IResource resource) {
26         super(parent);
27         Assert.isNotNull(resource);
28         this.resource = resource;
29     }
30     
31     /**
32      * @return Returns the resource.
33      */

34     public IResource getResource() {
35         return resource;
36     }
37     
38     /* (non-Javadoc)
39      * @see org.eclipse.compare.structuremergeviewer.DiffNode#getName()
40      */

41     public String JavaDoc getName() {
42         return resource.getName();
43     }
44 }
45
Popular Tags