Skip to content

Package: RepositoryPropertiesDialog

RepositoryPropertiesDialog

nameinstructionbranchcomplexitylinemethod
RepositoryPropertiesDialog(Shell, boolean, ECPRepository)
M: 14 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%
configureShell(Shell)
M: 7 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%
createSpecialProperties(Composite)
M: 24 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 5 C: 0
0%
M: 1 C: 0
0%
getDescriptionText()
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%
getLabelText()
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%
getNameText()
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%
getProviderText()
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%
getRepository()
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%

Coverage

1: /********************************************************************************
2: * Copyright (c) 2011 Eike Stepper (Berlin, Germany) 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: ********************************************************************************/
14: package org.eclipse.emf.ecp.internal.ui.dialogs;
15:
16: import org.eclipse.emf.ecp.core.ECPRepository;
17: import org.eclipse.emf.ecp.internal.ui.Messages;
18: import org.eclipse.swt.SWT;
19: import org.eclipse.swt.layout.GridLayout;
20: import org.eclipse.swt.widgets.Composite;
21: import org.eclipse.swt.widgets.Shell;
22: import org.eclipse.swt.widgets.Text;
23:
24: /**
25: * @author Eike Stepper
26: */
27: public class RepositoryPropertiesDialog extends PropertiesDialog {
28:         private final ECPRepository repository;
29:
30:         private Text nameText;
31:
32:         private Text labelText;
33:
34:         private Text descriptionText;
35:
36:         private Text providerText;
37:
38:         public RepositoryPropertiesDialog(Shell parentShell, boolean editable, ECPRepository repository) {
39:                 super(parentShell, repository.getLabel(), repository.getDescription(), editable, repository.getProperties());
40:                 this.repository = repository;
41:         }
42:
43:         public final ECPRepository getRepository() {
44:                 return repository;
45:         }
46:
47:         public final Text getNameText() {
48:                 return nameText;
49:         }
50:
51:         public final Text getLabelText() {
52:                 return labelText;
53:         }
54:
55:         public final Text getDescriptionText() {
56:                 return descriptionText;
57:         }
58:
59:         public final Text getProviderText() {
60:                 return providerText;
61:         }
62:
63:         @Override
64:         protected void configureShell(Shell newShell) {
65:                 super.configureShell(newShell);
66:                 newShell.setText(Messages.RepositoryPropertiesDialog_DialogTitle);
67:         }
68:
69:         @Override
70:         protected void createSpecialProperties(Composite parent) {
71:                 final Composite composite = new Composite(parent, SWT.NONE);
72:                 composite.setLayout(new GridLayout(2, false));
73:
74:                 providerText = addTextProperty(composite, Messages.RepositoryPropertiesDialog_RepositoryProvider, repository
75:                         .getProvider().getLabel());
76:         }
77: }