Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 299437
Collapse All | Expand All

(-)earproject/org/eclipse/jst/j2ee/application/internal/operations/AddComponentToEnterpriseApplicationOp.java (-14 / +16 lines)
Lines 138-157 Link Here
138
										final ICommonApplication application = (ICommonApplication)earModel.getModelObject();
138
										final ICommonApplication application = (ICommonApplication)earModel.getModelObject();
139
										if(application != null) {
139
										if(application != null) {
140
											ICommonModule mod = addModule(application, wc, (String) map.get(wc));
140
											ICommonModule mod = addModule(application, wc, (String) map.get(wc));
141
											if (ref!=null)
141
											if(mod != null){
142
												ref.setDependentObject((EObject)mod);
142
												if (ref!=null)
143
											if (JavaEEProjectUtilities.isStaticWebProject(wc.getProject())
143
													ref.setDependentObject((EObject)mod);
144
													|| JavaEEProjectUtilities.isDynamicWebComponent(wc)) {
144
												if (JavaEEProjectUtilities.isStaticWebProject(wc.getProject())
145
												updateContextRoot(earpj, wc, mod);
145
														|| JavaEEProjectUtilities.isDynamicWebComponent(wc)) {
146
											}
146
													updateContextRoot(earpj, wc, mod);
147
											
147
												}
148
											Resource theResource = ((EObject)mod).eResource();
148
												
149
											if (theResource != null)
149
												Resource theResource = ((EObject)mod).eResource();
150
											{
150
												if (theResource != null)
151
												String frag = null;
151
												{
152
												if (theResource instanceof CompatibilityXMIResource)
152
													String frag = null;
153
													frag = theResource.getURIFragment((EObject)mod);
153
													if (theResource instanceof CompatibilityXMIResource)
154
												((ICommonEMFModule)mod).setId(frag);
154
														frag = theResource.getURIFragment((EObject)mod);
155
													((ICommonEMFModule)mod).setId(frag);
156
												}
155
											}
157
											}
156
										}
158
										}
157
									}						
159
									}						

Return to bug 299437