blob: e6181c476d662b6e8dcd0d7a9f9c700d114e2bcc (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
/*******************************************************************************
* Copyright (c) 2002, 2008 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* QNX Software Systems - Initial API and implementation
* Anton Leherbauer (Wind River Systems)
*******************************************************************************/
package org.eclipse.cdt.internal.core.model;
import java.util.Map;
import org.eclipse.cdt.core.model.CModelException;
import org.eclipse.cdt.core.model.ICElement;
import org.eclipse.cdt.core.model.ILibraryEntry;
import org.eclipse.cdt.core.model.ILibraryReference;
import org.eclipse.cdt.internal.core.util.MementoTokenizer;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
/**
* @author alain
*/
public class LibraryReference extends Parent implements ILibraryReference {
ILibraryEntry entry;
public LibraryReference(ICElement parent, ILibraryEntry e) {
super(parent, e.getLibraryPath().lastSegment(), ICElement.C_VCONTAINER);
entry = e;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.model.ICElement#getResource()
*/
public IResource getResource() {
return null;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.model.CElement#createElementInfo()
*/
protected CElementInfo createElementInfo() {
return new CElementInfo(this);
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.model.ICElement#getPath()
*/
public IPath getPath() {
return entry.getFullLibraryPath();
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.model.ILibraryReference#getLibraryEntry()
*/
public ILibraryEntry getLibraryEntry() {
return entry;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.model.CElement#generateInfos(java.lang.Object, java.util.Map, org.eclipse.core.runtime.IProgressMonitor)
*/
protected void generateInfos(Object info, Map newElements, IProgressMonitor monitor) throws CModelException {
}
@Override
public ICElement getHandleFromMemento(String token, MementoTokenizer memento) {
return null;
}
@Override
public String getHandleMemento() {
return null;
}
@Override
protected char getHandleMementoDelimiter() {
Assert.isTrue(false, "Should not be called"); //$NON-NLS-1$
return 0;
}
}
|