blob: df1dcfc5645fe04211aea0dca702051fb173b715 (
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
107
108
109
110
111
112
113
114
115
116
|
/*******************************************************************************
* Copyright (c) 2004, 2011 QNX Software Systems 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:
* QNX Software Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.ui.dialogs.cpaths;
import java.util.List;
import org.eclipse.cdt.internal.ui.wizards.dialogfields.DialogField;
import org.eclipse.cdt.internal.ui.wizards.dialogfields.LayoutUtil;
import org.eclipse.cdt.internal.ui.wizards.dialogfields.ListDialogField;
import org.eclipse.cdt.ui.CDTSharedImages;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.layout.PixelConverter;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Composite;
/**
* Export tab for C/C++ Project Paths page for 3.X projects.
*
* @deprecated as of CDT 4.0. This tab was used to set preferences/properties
* for 3.X style projects.
*/
@Deprecated
public class CPathOrderExportPage extends CPathBasePage {
private ListDialogField<?> fCPathList;
public CPathOrderExportPage(ListDialogField<?> cPathList) {
super(CPathEntryMessages.OrderExportsPage_title);
setDescription(CPathEntryMessages.OrderExportsPage_description);
fCPathList = cPathList;
}
/*
* (non-Javadoc)
*
* @see org.eclipse.cdt.ui.dialogs.AbstractCOptionPage#createControl(org.eclipse.swt.widgets.Composite)
*/
@Override
public void createControl(Composite parent) {
PixelConverter converter = new PixelConverter(parent);
Composite composite = new Composite(parent, SWT.NONE);
setControl(composite);
LayoutUtil.doDefaultLayout(composite, new DialogField[] { fCPathList }, true);
LayoutUtil.setHorizontalGrabbing(fCPathList.getListControl(null), true);
int buttonBarWidth = converter.convertWidthInCharsToPixels(24);
fCPathList.setButtonsMinWidth(buttonBarWidth);
}
@Override
public Image getImage() {
return CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_ORDER);
}
/*
* @see BuildPathBasePage#getSelection
*/
@Override
public List<?> getSelection() {
return fCPathList.getSelectedElements();
}
/*
* @see BuildPathBasePage#setSelection
*/
@Override
public void setSelection(List<?> selElements) {
fCPathList.selectElements(new StructuredSelection(selElements));
}
/*
* (non-Javadoc)
*
* @see org.eclipse.jdt.internal.ui.wizards.buildpaths.BuildPathBasePage#isEntryKind(int)
*/
@Override
public boolean isEntryKind(int kind) {
return true;
}
/*
* (non-Javadoc)
*
* @see org.eclipse.cdt.ui.dialogs.AbstractCOptionPage#performApply(org.eclipse.core.runtime.IProgressMonitor)
*/
@Override
public void performApply(IProgressMonitor monitor) throws CoreException {
}
/*
* (non-Javadoc)
*
* @see org.eclipse.cdt.ui.dialogs.AbstractCOptionPage#performDefaults()
*/
@Override
public void performDefaults() {
}
}
|