tmf: Make CustomText/Xml test wait until wizard shell is active
[deliverable/tracecompass.git] / tmf / org.eclipse.tracecompass.tmf.ui / src / org / eclipse / tracecompass / tmf / ui / properties / ReadOnlyTextPropertyDescriptor.java
CommitLineData
0505c6fc 1/*******************************************************************************
ed902a2b 2 * Copyright (c) 2013, 2014 Ericsson
0505c6fc
BH
3 *
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
8 *
9 * Contributors:
080600d9 10 * Alexandre Montplaisir - Initial API and implementation
0505c6fc
BH
11 *******************************************************************************/
12
2bdf0193 13package org.eclipse.tracecompass.tmf.ui.properties;
0505c6fc
BH
14
15import org.eclipse.jface.viewers.CellEditor;
16import org.eclipse.jface.viewers.TextCellEditor;
17import org.eclipse.swt.SWT;
18import org.eclipse.swt.widgets.Composite;
19import org.eclipse.ui.views.properties.PropertyDescriptor;
20import org.eclipse.ui.views.properties.TextPropertyDescriptor;
21
22/**
23 * A uneditable version of a {@link TextPropertyDescriptor}.
24 *
25 * @author Alexandre Montplaisir
0505c6fc
BH
26 */
27public class ReadOnlyTextPropertyDescriptor extends PropertyDescriptor {
28
29 /**
30 * Creates an property descriptor with the given id and display name.
31 *
32 * @param id
33 * The id of the property
34 * @param displayName
35 * The name to display for the property
36 */
37 public ReadOnlyTextPropertyDescriptor(Object id, String displayName) {
38 super(id, displayName);
39 }
40
41 @Override
42 public CellEditor createPropertyEditor(Composite parent) {
43 CellEditor editor = new TextCellEditor(parent, SWT.READ_ONLY);
44 if (getValidator() != null) {
45 editor.setValidator(getValidator());
46 }
47 return editor;
48 }
49
50}
This page took 0.06989 seconds and 5 git commands to generate.