EmptyProperty.java revision 765e52e2d30d0754625b8c7af6c36e93612f15be
1/*******************************************************************************
2 * Copyright (c) 2011 Google, Inc.
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 *    Google, Inc. - initial API and implementation
10 *******************************************************************************/
11package org.eclipse.wb.internal.core.model.property;
12
13import org.eclipse.wb.internal.core.model.property.editor.PropertyEditor;
14import org.eclipse.wb.internal.core.model.property.editor.string.StringPropertyEditor;
15
16/**
17 * Empty {@link Property}, that has no title or value.
18 *
19 * @author scheglov_ke
20 * @coverage core.model.property
21 */
22public class EmptyProperty extends Property {
23  ////////////////////////////////////////////////////////////////////////////
24  //
25  // Constructor
26  //
27  ////////////////////////////////////////////////////////////////////////////
28  public EmptyProperty() {
29    super(StringPropertyEditor.INSTANCE);
30  }
31
32  public EmptyProperty(PropertyEditor editor) {
33    super(editor);
34  }
35
36  ////////////////////////////////////////////////////////////////////////////
37  //
38  // Property
39  //
40  ////////////////////////////////////////////////////////////////////////////
41  @Override
42  public String getTitle() {
43    return null;
44  }
45
46  @Override
47  public boolean isModified() throws Exception {
48    return false;
49  }
50
51  @Override
52  public Object getValue() throws Exception {
53    return UNKNOWN_VALUE;
54  }
55
56  @Override
57  public void setValue(Object value) throws Exception {
58  }
59}
60