Skip to content

Package: ECPSelectionStatusValidator

ECPSelectionStatusValidator

nameinstructionbranchcomplexitylinemethod
ECPSelectionStatusValidator()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getTreePath()
M: 0 C: 4
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
setECPViewEditorTreeSelectionDialog(ECPViewEditorTreeSelectionDialog)
M: 0 C: 4
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2011-2014 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: * Eugen Neufeld - initial API and implementation
13: ******************************************************************************/
14: package org.eclipse.emf.ecp.view.internal.editor.controls;
15:
16: import org.eclipse.jface.viewers.TreePath;
17: import org.eclipse.ui.dialogs.ISelectionStatusValidator;
18:
19: /**
20: * An ISelectionStatusValidator allowing to get the {@link TreePath} of the current selection.
21: *
22: * @author Eugen Neufeld
23: *
24: */
25: public abstract class ECPSelectionStatusValidator implements ISelectionStatusValidator {
26:         private ECPViewEditorTreeSelectionDialog dialog;
27:
28:         /**
29:          * Sets the dialog.
30:          *
31:          * @param dialog the dialog
32:          */
33:         public void setECPViewEditorTreeSelectionDialog(ECPViewEditorTreeSelectionDialog dialog) {
34:                 this.dialog = dialog;
35:         }
36:
37:         /**
38:          * The {@link TreePath} of the current selection.
39:          *
40:          * @return the {@link TreePath}
41:          */
42:         protected TreePath getTreePath() {
43:                 return dialog.getTreePath();
44:         }
45: }