KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > internal > ui > refactoring > nls > search > FileEntry


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
12 package org.eclipse.jdt.internal.ui.refactoring.nls.search;
13
14 import org.eclipse.core.resources.IFile;
15 import org.eclipse.core.resources.IResource;
16 import org.eclipse.core.runtime.IAdaptable;
17
18 public class FileEntry implements IAdaptable {
19
20     private IFile fPropertiesFile;
21     private String JavaDoc fMessage;
22
23     public FileEntry(IFile propertiesFile, String JavaDoc message) {
24         fPropertiesFile= propertiesFile;
25         fMessage= message;
26     }
27     
28     public IFile getPropertiesFile() {
29         return fPropertiesFile;
30     }
31
32     public String JavaDoc getMessage() {
33         return fMessage;
34     }
35     
36     public String JavaDoc toString() {
37         return fMessage;
38     }
39     
40     public Object JavaDoc getAdapter(Class JavaDoc adapter) {
41         if (IResource.class.equals(adapter))
42             return fPropertiesFile;
43         return null;
44     }
45 }
46
Popular Tags