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 216318 Details for
Bug 380735
EclipseLink static weaving builder is not removed when JPA facet is removed
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]
proposed patch against HEAD
380735.txt (text/plain), 2.24 KB, created by
Karen Butzke
on 2012-05-25 17:18:43 EDT
(
hide
)
Description:
proposed patch against HEAD
Filename:
MIME Type:
Creator:
Karen Butzke
Created:
2012-05-25 17:18:43 EDT
Size:
2.24 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jpt.jpa.core >Index: src/org/eclipse/jpt/jpa/core/internal/facet/JpaFacetUninstallDelegate.java >=================================================================== >RCS file: /cvsroot/webtools/org.eclipse.jpa/components/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/JpaFacetUninstallDelegate.java,v >retrieving revision 1.3 >diff -u -r1.3 JpaFacetUninstallDelegate.java >--- src/org/eclipse/jpt/jpa/core/internal/facet/JpaFacetUninstallDelegate.java 29 Feb 2012 22:57:27 -0000 1.3 >+++ src/org/eclipse/jpt/jpa/core/internal/facet/JpaFacetUninstallDelegate.java 25 May 2012 21:15:03 -0000 >@@ -9,7 +9,9 @@ > ******************************************************************************/ > package org.eclipse.jpt.jpa.core.internal.facet; > >+import org.eclipse.core.resources.ICommand; > import org.eclipse.core.resources.IProject; >+import org.eclipse.core.resources.IProjectDescription; > import org.eclipse.core.runtime.CoreException; > import org.eclipse.core.runtime.IProgressMonitor; > import org.eclipse.jpt.jpa.core.JptJpaCorePlugin; >@@ -24,6 +26,25 @@ > Object config, IProgressMonitor monitor) throws CoreException { > > (new JpaValidationPreferencesManager(project)).clearProjectPreferences(); >+ removeBuilder(project, STATIC_WEAVING_BUILDER_ID); > JptJpaCorePlugin.clearProjectPersistentProperties(project); > } >+ >+ //TODO hack to fix bug 380735 in RC2. We need to move this code into the eclipselink plug-in >+ private static String STATIC_WEAVING_BUILDER_ID = "org.eclipse.jpt.jpa.eclipselink.core.builder"; //$NON-NLS-1$ >+ >+ private static void removeBuilder(IProject project, String builderId) throws CoreException { >+ IProjectDescription description = project.getDescription(); >+ ICommand[] commands = description.getBuildSpec(); >+ for (int i = 0; i < commands.length; ++i) { >+ if (commands[i].getBuilderName().equals(builderId)) { >+ ICommand[] newCommands = new ICommand[commands.length - 1]; >+ System.arraycopy(commands, 0, newCommands, 0, i); >+ System.arraycopy(commands, i + 1, newCommands, i, commands.length - i - 1); >+ description.setBuildSpec(newCommands); >+ project.setDescription(description, null); >+ return; >+ } >+ } >+ } > }
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 Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 380735
: 216318