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 105021 Details for
Bug 235384
generate jpa entities without persistence.jar on classpath causes model problems
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
proposed patch - HEAD - partial fix
235384.txt (text/plain), 1.78 KB, created by
Karen Butzke
on 2008-06-16 09:51:35 EDT
(
hide
)
Description:
proposed patch - HEAD - partial fix
Filename:
MIME Type:
Creator:
Karen Butzke
Created:
2008-06-16 09:51:35 EDT
Size:
1.78 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jpt.core >Index: src/org/eclipse/jpt/core/internal/resource/java/JavaResourceModelImpl.java >=================================================================== >RCS file: /cvsroot/webtools/org.eclipse.jpa/components/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/JavaResourceModelImpl.java,v >retrieving revision 1.4 >diff -u -r1.4 JavaResourceModelImpl.java >--- src/org/eclipse/jpt/core/internal/resource/java/JavaResourceModelImpl.java 15 May 2008 05:29:14 -0000 1.4 >+++ src/org/eclipse/jpt/core/internal/resource/java/JavaResourceModelImpl.java 16 Jun 2008 13:50:01 -0000 >@@ -85,8 +85,11 @@ > > private void synchWithJavaDelta(IJavaElementDelta delta) { > switch (delta.getElement().getElementType()) { >- case IJavaElement.JAVA_MODEL : > case IJavaElement.JAVA_PROJECT : >+ if (this.updateOnClasspathChanges(delta)) { >+ break; >+ } >+ case IJavaElement.JAVA_MODEL : > case IJavaElement.PACKAGE_FRAGMENT_ROOT : > case IJavaElement.PACKAGE_FRAGMENT : > this.synchChildrenWithJavaDelta(delta); >@@ -123,6 +126,18 @@ > } > } > >+ //bug 235384 - we need to update all compilation units when a classpath change occurs. >+ //The persistence.jar could have been added/removed from the classpath which affects >+ //whether we know about the jpa annotations or not. >+ private boolean updateOnClasspathChanges(IJavaElementDelta delta) { >+ if (BitTools.flagIsSet(delta.getFlags(), IJavaElementDelta.F_RESOLVED_CLASSPATH_CHANGED) || >+ BitTools.flagIsSet(delta.getFlags(), IJavaElementDelta.F_CLASSPATH_CHANGED)) { >+ this.jpaCompilationUnit.updateFromJava(); >+ return true; >+ } >+ return false; >+ } >+ > public void updateFromResource() { > this.jpaCompilationUnit.updateFromJava(); > }
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 235384
: 105021