]>
Commit | Line | Data |
---|---|---|
1b2798f6 EK |
1 | /******************************************************************************* |
2 | * Copyright (c) 2000, 2011 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.runtime.IAdaptable; | |
15 | ||
16 | import org.eclipse.core.resources.IFile; | |
17 | import org.eclipse.core.resources.IResource; | |
18 | ||
19 | public class FileEntry implements IAdaptable { | |
20 | ||
21 | private IFile fPropertiesFile; | |
22 | private String fMessage; | |
23 | ||
24 | public FileEntry(IFile propertiesFile, String message) { | |
25 | fPropertiesFile= propertiesFile; | |
26 | fMessage= message; | |
27 | } | |
28 | ||
29 | public IFile getPropertiesFile() { | |
30 | return fPropertiesFile; | |
31 | } | |
32 | ||
33 | public String getMessage() { | |
34 | return fMessage; | |
35 | } | |
36 | ||
37 | @Override | |
38 | public String toString() { | |
39 | return fMessage; | |
40 | } | |
41 | ||
42 | public Object getAdapter(Class adapter) { | |
43 | if (IResource.class.equals(adapter)) | |
44 | return fPropertiesFile; | |
45 | return null; | |
46 | } | |
47 | } |