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 92349 Details for
Bug 222399
Regression in several Model performance tests
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix
222399.txt (text/plain), 2.86 KB, created by
Jerome Lanneluc
on 2008-03-12 14:08:59 EDT
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Jerome Lanneluc
Created:
2008-03-12 14:08:59 EDT
Size:
2.86 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: model/org/eclipse/jdt/internal/core/PackageFragmentRoot.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/PackageFragmentRoot.java,v >retrieving revision 1.127 >diff -u -r1.127 PackageFragmentRoot.java >--- model/org/eclipse/jdt/internal/core/PackageFragmentRoot.java 26 Feb 2008 10:11:46 -0000 1.127 >+++ model/org/eclipse/jdt/internal/core/PackageFragmentRoot.java 12 Mar 2008 18:03:19 -0000 >@@ -405,7 +405,7 @@ > public char[][] fullExclusionPatternChars() { > try { > if (this.isOpen() && this.getKind() != IPackageFragmentRoot.K_SOURCE) return null; >- ClasspathEntry entry = (ClasspathEntry)getRawClasspathEntry(); >+ ClasspathEntry entry = (ClasspathEntry) getRawClasspathEntry(); > if (entry == null) { > return null; > } else { >@@ -507,6 +507,20 @@ > return ((PackageFragmentRootInfo)getElementInfo()).getRootKind(); > } > >+/* >+ * A version of getKind() that doesn't update the timestamp of the info in the Java model cache >+ * to speed things up >+ */ >+int internalKind() throws JavaModelException { >+ JavaModelManager manager = JavaModelManager.getJavaModelManager(); >+ PackageFragmentRootInfo info = (PackageFragmentRootInfo) manager.peekAtInfo(this); >+ if (info == null) { >+ // default to regular getKind() >+ return getKind(); >+ } >+ return info.getRootKind(); >+} >+ > /** > * Returns an array of non-java resources contained in the receiver. > */ >@@ -572,6 +586,12 @@ > return rawEntry; > } > >+ >+public IResource resource() { >+ if (this.resource instanceof IResource) // perf improvement to avoid message send in resource() >+ return (IResource) this.resource; >+ return super.resource(); >+} > /* > * @see IJavaElement > */ >Index: model/org/eclipse/jdt/internal/core/NameLookup.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/NameLookup.java,v >retrieving revision 1.118 >diff -u -r1.118 NameLookup.java >--- model/org/eclipse/jdt/internal/core/NameLookup.java 14 Aug 2007 12:44:32 -0000 1.118 >+++ model/org/eclipse/jdt/internal/core/NameLookup.java 12 Mar 2008 18:03:18 -0000 >@@ -950,13 +950,13 @@ > findAllTypes(matchName, partialMatch, acceptFlags, requestor); > return; > } >- IPackageFragmentRoot root= (IPackageFragmentRoot) pkg.getParent(); >+ PackageFragmentRoot root= (PackageFragmentRoot) pkg.getParent(); > try { > > // look in working copies first > int firstDot = -1; > String topLevelTypeName = null; >- int packageFlavor= root.getKind(); >+ int packageFlavor= root.internalKind(); > if (this.typesInWorkingCopies != null || packageFlavor == IPackageFragmentRoot.K_SOURCE) { > firstDot = matchName.indexOf('.'); > if (!partialMatch)
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 222399
: 92349