Skip to content

Package: ECPContainerProperties$Tester

ECPContainerProperties$Tester

nameinstructionbranchcomplexitylinemethod
ECPContainerProperties.Tester()
M: 5 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2011-2012 EclipseSource Muenchen GmbH and others.
3: *
4: * All rights reserved. This program and the accompanying materials
5: * are made available under the terms of the Eclipse Public License 2.0
6: * which accompanies this distribution, and is available at
7: * https://www.eclipse.org/legal/epl-2.0/
8: *
9: * SPDX-License-Identifier: EPL-2.0
10: *
11: * Contributors:
12: * Eike Stepper - initial API and implementation
13: * Eugen Neufeld - JavaDoc
14: *******************************************************************************/
15: package org.eclipse.emf.ecp.internal.core.properties;
16:
17: import org.eclipse.emf.ecp.core.util.ECPContainer;
18: import org.eclipse.net4j.util.properties.DefaultPropertyTester;
19: import org.eclipse.net4j.util.properties.IProperties;
20: import org.eclipse.net4j.util.properties.Properties;
21: import org.eclipse.net4j.util.properties.Property;
22:
23: /**
24: * @author Eugen Neufeld
25: */
26: public final class ECPContainerProperties extends Properties<ECPContainer> {
27:         private static final String CAN_DELETE = "canDelete"; //$NON-NLS-1$
28:         private static final IProperties<ECPContainer> INSTANCE = new ECPContainerProperties();
29:
30:         private ECPContainerProperties() {
31:                 super(ECPContainer.class);
32:
33:                 add(new Property<ECPContainer>(CAN_DELETE) {
34:                         @Override
35:                         protected Object eval(ECPContainer deletable) {
36:                                 return deletable.canDelete();
37:                         }
38:                 });
39:         }
40:
41:         /**
42:          * @author Eike Stepper
43:          */
44:         public static final class Tester extends DefaultPropertyTester<ECPContainer> {
45:                 private static final String NAMESPACE = "org.eclipse.emf.ecp.core.container"; //$NON-NLS-1$
46:
47:                 /** The tester constructor. */
48:                 public Tester() {
49:                         super(NAMESPACE, INSTANCE);
50:                 }
51:         }
52: }