|
Lines 12-19
Link Here
|
| 12 |
|
12 |
|
| 13 |
import org.eclipse.jface.dialogs.Dialog; |
13 |
import org.eclipse.jface.dialogs.Dialog; |
| 14 |
import org.eclipse.jst.ejb.ui.internal.util.EJBUIMessages; |
14 |
import org.eclipse.jst.ejb.ui.internal.util.EJBUIMessages; |
|
|
15 |
import org.eclipse.jst.j2ee.ejb.project.operations.IEjbFacetInstallDataModelProperties; |
| 15 |
import org.eclipse.jst.j2ee.internal.actions.IJ2EEUIContextIds; |
16 |
import org.eclipse.jst.j2ee.internal.actions.IJ2EEUIContextIds; |
| 16 |
import org.eclipse.jst.j2ee.internal.ejb.project.operations.IEjbFacetInstallDataModelProperties; |
|
|
| 17 |
import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages; |
17 |
import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages; |
| 18 |
import org.eclipse.jst.j2ee.internal.wizard.J2EEModuleFacetInstallPage; |
18 |
import org.eclipse.jst.j2ee.internal.wizard.J2EEModuleFacetInstallPage; |
| 19 |
import org.eclipse.swt.SWT; |
19 |
import org.eclipse.swt.SWT; |
|
Lines 22-27
Link Here
|
| 22 |
import org.eclipse.swt.widgets.Button; |
22 |
import org.eclipse.swt.widgets.Button; |
| 23 |
import org.eclipse.swt.widgets.Composite; |
23 |
import org.eclipse.swt.widgets.Composite; |
| 24 |
import org.eclipse.swt.widgets.Control; |
24 |
import org.eclipse.swt.widgets.Control; |
|
|
25 |
import org.eclipse.swt.widgets.Group; |
| 25 |
import org.eclipse.swt.widgets.Label; |
26 |
import org.eclipse.swt.widgets.Label; |
| 26 |
import org.eclipse.swt.widgets.Text; |
27 |
import org.eclipse.swt.widgets.Text; |
| 27 |
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion; |
28 |
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion; |
|
Lines 29-35
Link Here
|
| 29 |
|
30 |
|
| 30 |
|
31 |
|
| 31 |
public class EjbFacetInstallPage extends J2EEModuleFacetInstallPage |
32 |
public class EjbFacetInstallPage extends J2EEModuleFacetInstallPage |
| 32 |
implements IEjbFacetInstallDataModelProperties{ |
33 |
implements IEjbFacetInstallDataModelProperties { |
| 33 |
|
34 |
|
| 34 |
private static final String MODULE_NAME_UI = J2EEUIMessages.getResourceString(J2EEUIMessages.NAME_LABEL); |
35 |
private static final String MODULE_NAME_UI = J2EEUIMessages.getResourceString(J2EEUIMessages.NAME_LABEL); |
| 35 |
|
36 |
|
|
Lines 54-64
Link Here
|
| 54 |
final Composite composite = new Composite(parent, SWT.NONE); |
55 |
final Composite composite = new Composite(parent, SWT.NONE); |
| 55 |
composite.setLayout(new GridLayout(1, false)); |
56 |
composite.setLayout(new GridLayout(1, false)); |
| 56 |
|
57 |
|
| 57 |
//setupEarControl(composite); |
58 |
Composite ejbClientComposite = createEjbClientComposite(composite); |
|
|
59 |
createEJBClientGroup(ejbClientComposite); |
| 60 |
createProjectNameGroup(ejbClientComposite); |
| 61 |
createClientJarURISection(ejbClientComposite); |
| 58 |
|
62 |
|
| 59 |
createEJBClientGroup( composite ); |
63 |
new Label(composite, SWT.NONE); // pad |
| 60 |
createProjectNameGroup( composite ); |
|
|
| 61 |
createClientJarURISection( composite ); |
| 62 |
|
64 |
|
| 63 |
createGenerateDescriptorControl( composite ); |
65 |
createGenerateDescriptorControl( composite ); |
| 64 |
registerFacetVersionChangeListener(); |
66 |
registerFacetVersionChangeListener(); |
|
Lines 73-82
Link Here
|
| 73 |
final IProjectFacetVersion fv = (IProjectFacetVersion) this.model.getProperty( FACET_VERSION ); |
75 |
final IProjectFacetVersion fv = (IProjectFacetVersion) this.model.getProperty( FACET_VERSION ); |
| 74 |
this.addDD.setVisible( fv == EJB_30 ); |
76 |
this.addDD.setVisible( fv == EJB_30 ); |
| 75 |
} |
77 |
} |
|
|
78 |
|
| 79 |
private Composite createEjbClientComposite(Composite parent) { |
| 80 |
Group group = new Group(parent, SWT.NONE); |
| 81 |
group.setLayout(new GridLayout(2, false)); |
| 82 |
group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); |
| 83 |
group.setText(EJBUIMessages.EJB_CLIENT_JAR_GROUP); |
| 84 |
return group; |
| 85 |
} |
| 76 |
|
86 |
|
| 77 |
private void createEJBClientGroup(Composite parent) { |
87 |
private void createEJBClientGroup(Composite parent) { |
| 78 |
// Create Add Client checkbox |
|
|
| 79 |
new Label(parent, SWT.NONE); |
| 80 |
addClient = new Button(parent, SWT.CHECK); |
88 |
addClient = new Button(parent, SWT.CHECK); |
| 81 |
addClient.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.CREATE_EJB_CLIENT_JAR)); |
89 |
addClient.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.CREATE_EJB_CLIENT_JAR)); |
| 82 |
synchHelper.synchCheckbox(addClient, CREATE_CLIENT, null); |
90 |
synchHelper.synchCheckbox(addClient, CREATE_CLIENT, null); |
|
Lines 97-103
Link Here
|
| 97 |
data = new GridData(GridData.FILL_HORIZONTAL); |
105 |
data = new GridData(GridData.FILL_HORIZONTAL); |
| 98 |
//data.widthHint = SIZING_TEXT_FIELD_WIDTH; |
106 |
//data.widthHint = SIZING_TEXT_FIELD_WIDTH; |
| 99 |
clientNameText.setLayoutData(data); |
107 |
clientNameText.setLayoutData(data); |
| 100 |
new Label(parent, SWT.NONE); // pad |
|
|
| 101 |
synchHelper.synchText(clientNameText, CLIENT_NAME, new Control[]{projectNameLabel}); |
108 |
synchHelper.synchText(clientNameText, CLIENT_NAME, new Control[]{projectNameLabel}); |
| 102 |
clientNameText.setFocus(); |
109 |
clientNameText.setFocus(); |
| 103 |
} |
110 |
} |
|
Lines 113-119
Link Here
|
| 113 |
data = new GridData(GridData.FILL_HORIZONTAL); |
120 |
data = new GridData(GridData.FILL_HORIZONTAL); |
| 114 |
//data.widthHint = SIZING_TEXT_FIELD_WIDTH; |
121 |
//data.widthHint = SIZING_TEXT_FIELD_WIDTH; |
| 115 |
clientJarURI.setLayoutData(data); |
122 |
clientJarURI.setLayoutData(data); |
| 116 |
new Label(parent, SWT.NONE); // pad |
|
|
| 117 |
synchHelper.synchText(clientJarURI, CLIENT_URI, new Control[]{clientJarURILabel}); |
123 |
synchHelper.synchText(clientJarURI, CLIENT_URI, new Control[]{clientJarURILabel}); |
| 118 |
} |
124 |
} |
| 119 |
} |
125 |
} |