Skip to content

Package: EMFFormsSWTLayoutDirect

EMFFormsSWTLayoutDirect

nameinstructionbranchcomplexitylinemethod
EMFFormsSWTLayoutDirect()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
layout(Composite)
M: 9 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 4 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2011-2017 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.util.swt.rap;
15:
16: import org.eclipse.emfforms.spi.swt.core.layout.EMFFormsSWTLayoutOptimizer;
17: import org.eclipse.swt.widgets.Composite;
18: import org.osgi.service.component.annotations.Component;
19:
20: /**
21: * EMFFormsSWTLayoutDirect does not cache anything and triggers the layout directly.
22: *
23: * @author Eugen Neufeld
24: * @since 1.12
25: *
26: */
27: @Component
28: public class EMFFormsSWTLayoutDirect implements EMFFormsSWTLayoutOptimizer {
29:         @Override
30:         public synchronized void layout(Composite parent) {
31:•                if (parent.isDisposed()) {
32:                         return;
33:                 }
34:                 parent.layout(true, true);
35:         }
36: }