Package: ContextMenuViewModelService
ContextMenuViewModelService
name | instruction | branch | complexity | line | method | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ContextMenuViewModelService() |
|
|
|
|
|
||||||||||||||||||||
getParentControl() |
|
|
|
|
|
||||||||||||||||||||
setParentControl(Control) |
|
|
|
|
|
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: * Alexandra Buzila - initial API and implementation
13: ******************************************************************************/
14: package org.eclipse.emf.ecp.view.internal.swt;
15:
16: // import org.eclipse.e4.ui.model.application.ui.basic.MPart;
17: import org.eclipse.emf.ecp.view.spi.context.ViewModelService;
18: import org.eclipse.swt.widgets.Control;
19:
20: /**
21: * @author Alexandra Buzila
22: * @deprecated use the GenericEditor instead
23: */
24: @Deprecated
25: public abstract class ContextMenuViewModelService implements ViewModelService {
26:
27:         private Control parentControl;
28:
29:         /**
30:          * Set the control to which the context menu should be added.
31:          *
32:          * @param parentControl - the control
33:          */
34:         public void setParentControl(Control parentControl) {
35:                 this.parentControl = parentControl;
36:         }
37:
38:         /**
39:          * Get the control to which the context menu should be added.
40:          *
41:          * @return the control
42:          */
43:         public Control getParentControl() {
44:                 return parentControl;
45:         }
46:
47:         /**
48:          * Implement to register the context menu to the parent control.
49:          *
50:          * @return true if registration was successful
51:          */
52:         public abstract boolean registerContextMenu();
53:
54: }