Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 144732 Details for
Bug 286859
EJB Projects created by web Service Wizards does not add the ejbModule as a source folder
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
Patch with better performance
286859.txt (text/plain), 3.41 KB, created by
Zina Mostafia
on 2009-08-17 16:27:00 EDT
(
hide
)
Description:
Patch with better performance
Filename:
MIME Type:
Creator:
Zina Mostafia
Created:
2009-08-17 16:27:00 EDT
Size:
3.41 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jst.ws.consumption.ui >Index: src/org/eclipse/jst/ws/internal/consumption/ui/common/FacetOperationDelegate.java >=================================================================== >RCS file: /cvsroot/webtools/webservices/plugins/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/internal/consumption/ui/common/FacetOperationDelegate.java,v >retrieving revision 1.1 >diff -u -r1.1 FacetOperationDelegate.java >--- src/org/eclipse/jst/ws/internal/consumption/ui/common/FacetOperationDelegate.java 3 Mar 2009 21:38:18 -0000 1.1 >+++ src/org/eclipse/jst/ws/internal/consumption/ui/common/FacetOperationDelegate.java 17 Aug 2009 20:28:07 -0000 >@@ -21,12 +21,18 @@ > > import org.eclipse.core.resources.IProject; > import org.eclipse.core.runtime.CoreException; >+import org.eclipse.core.runtime.IPath; > import org.eclipse.core.runtime.IProgressMonitor; > import org.eclipse.core.runtime.IStatus; >+import org.eclipse.core.runtime.Path; > import org.eclipse.core.runtime.Platform; > import org.eclipse.core.runtime.Status; >+import org.eclipse.jdt.core.IClasspathEntry; >+import org.eclipse.jdt.core.IJavaProject; >+import org.eclipse.jdt.core.JavaCore; > import org.eclipse.jem.util.emf.workbench.ProjectUtilities; > import org.eclipse.jface.operation.IRunnableWithProgress; >+import org.eclipse.jst.ws.internal.common.J2EEUtils; > import org.eclipse.jst.ws.internal.consumption.ConsumptionMessages; > import org.eclipse.jst.ws.internal.consumption.common.FacetUtils; > import org.eclipse.jst.ws.internal.consumption.common.IFacetOperationDelegate; >@@ -53,6 +59,7 @@ > public void run(IProgressMonitor shellMonitor) throws InvocationTargetException, InterruptedException { > try { > fproject.modify(actions, shellMonitor); >+ fixEJBClassPath(fproject); > } catch (CoreException e) { > status[0] = getErrorStatusForAddingFacets(fproject.getProject().getName(), projectFacetVersions, e); > } >@@ -71,6 +78,7 @@ > } else { > try { > fproject.modify(actions, null); >+ fixEJBClassPath(fproject); > } catch (CoreException e) { > status[0] = getErrorStatusForAddingFacets(fproject.getProject().getName(), projectFacetVersions, e); > } >@@ -79,6 +87,36 @@ > return status[0]; > } > >+ private void fixEJBClassPath(IFacetedProject project) { >+ if (!J2EEUtils.isEJBComponent(project.getProject())) return; >+ IProject ejbProject = project.getProject(); >+ IJavaProject javaProject = JavaCore.create(ejbProject); >+ Path projectRoot = new Path(Path.ROOT.append(new Path(ejbProject.getName())).toString()); >+ IPath ejbModulePath = projectRoot.append("ejbModule"); >+ try { >+ IClasspathEntry[] originalSet = javaProject.getRawClasspath(); >+ boolean foundEJBModulEntry = false; >+ for (IClasspathEntry entry : originalSet) { >+ if (entry.getPath().equals(ejbModulePath)) >+ foundEJBModulEntry = true; >+ } >+ if (!foundEJBModulEntry) { >+ IClasspathEntry[] newSet = new IClasspathEntry[originalSet.length + 1]; >+ int i=0; >+ >+ for (IClasspathEntry entry : originalSet) { >+ newSet[i++] = entry; >+ } >+ newSet[i] = JavaCore.newSourceEntry(ejbModulePath); >+ javaProject.setRawClasspath(newSet,null); >+ } >+ } >+ catch (Exception e) { >+ // TODO: handle exception >+ } >+ >+ } >+ > public IStatus createNewFacetedProject(final String projectName) { > final IStatus[] status = new IStatus[1]; > status[0] = Status.OK_STATUS;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 286859
:
144720
|
144723
|
144732
|
144862
|
144863
|
144869
|
144875