]>
Commit | Line | Data |
---|---|---|
1b2798f6 EK |
1 | /******************************************************************************* |
2 | * Copyright (c) 2000, 2008 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.jdt.internal.ui.refactoring.nls.search; | |
12 | ||
13 | import org.eclipse.core.runtime.IAdaptable; | |
14 | ||
15 | import org.eclipse.jdt.core.ICompilationUnit; | |
16 | ||
17 | public class CompilationUnitEntry implements IAdaptable { | |
18 | ||
19 | private final String fMessage; | |
20 | private final ICompilationUnit fCompilationUnit; | |
21 | ||
22 | public CompilationUnitEntry(String message, ICompilationUnit compilationUnit) { | |
23 | fMessage= message; | |
24 | fCompilationUnit= compilationUnit; | |
25 | } | |
26 | ||
27 | public String getMessage() { | |
28 | return fMessage; | |
29 | } | |
30 | ||
31 | public ICompilationUnit getCompilationUnit() { | |
32 | return fCompilationUnit; | |
33 | } | |
34 | ||
35 | public Object getAdapter(Class adapter) { | |
36 | if (ICompilationUnit.class.equals(adapter)) | |
37 | return getCompilationUnit(); | |
38 | return null; | |
39 | } | |
40 | ||
41 | } |