summaryrefslogtreecommitdiff
path: root/propertysheet/src/org/eclipse/wb/internal/core/model/property/EmptyProperty.java
blob: 0f12a5afcc4daaad67a4c24c2bbf456bc173be71 (plain)
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
/*******************************************************************************
 * Copyright (c) 2011 Google, Inc.
 * 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:
 *    Google, Inc. - initial API and implementation
 *******************************************************************************/
package org.eclipse.wb.internal.core.model.property;

import org.eclipse.wb.internal.core.model.property.editor.PropertyEditor;
import org.eclipse.wb.internal.core.model.property.editor.string.StringPropertyEditor;

/**
 * Empty {@link Property}, that has no title or value.
 * 
 * @author scheglov_ke
 * @coverage core.model.property
 */
public class EmptyProperty extends Property {
  ////////////////////////////////////////////////////////////////////////////
  //
  // Constructor
  //
  ////////////////////////////////////////////////////////////////////////////
  public EmptyProperty() {
    super(StringPropertyEditor.INSTANCE);
  }

  public EmptyProperty(PropertyEditor editor) {
    super(editor);
  }

  ////////////////////////////////////////////////////////////////////////////
  //
  // Property
  //
  ////////////////////////////////////////////////////////////////////////////
  @Override
  public String getTitle() {
    return null;
  }

  @Override
  public boolean isModified() throws Exception {
    return false;
  }

  @Override
  public Object getValue() throws Exception {
    return UNKNOWN_VALUE;
  }

  @Override
  public void setValue(Object value) throws Exception {
  }
}