blob: 2c9ac7e50935cabf816732c133b898aa1e1cbbc2 (
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
|
/*******************************************************************************
* Copyright (c) 2006, 2011 Intel Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Intel Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.core.model;
import org.eclipse.cdt.core.model.ICElement;
import org.eclipse.cdt.core.model.ICElementDelta;
import org.eclipse.core.resources.IResourceDelta;
/**
* In this case, no delta for specific element passed
* Instead we'll notify Outline about offsets change.
*
* @author Oleg Krasilnikov
*/
public class CShiftData implements ICElementDelta {
private final ICElement element;
private final int offset;
private final int size;
private final int lines;
public CShiftData(ICElement element, int offset, int size, int lines) {
this.element = element;
this.offset = offset;
this.size = size;
this.lines = lines;
}
public int getOffset() {
return offset;
}
public int getSize() {
return size;
}
public int getLines() {
return lines;
}
@Override
public ICElementDelta[] getAddedChildren() {
return new ICElementDelta[0];
}
@Override
public ICElementDelta[] getAffectedChildren() {
return new ICElementDelta[0];
}
@Override
public ICElementDelta[] getChangedChildren() {
return new ICElementDelta[0];
}
@Override
public ICElement getElement() {
return element;
}
@Override
public int getFlags() {
return 0;
}
@Override
public int getKind() {
return 0;
}
@Override
public ICElement getMovedFromElement() {
return null;
}
@Override
public ICElement getMovedToElement() {
return null;
}
@Override
public ICElementDelta[] getRemovedChildren() {
return new ICElementDelta[0];
}
@Override
public IResourceDelta[] getResourceDeltas() {
return null;
}
@Override
public String toString() {
return ("CShiftData: offset=" + offset + ", size=" + size + ", lines=" + lines); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
}
}
|