[SCM] eclipse - Powerful IDE written in java - Debian package. branch, karmic, updated. 894f3959c7e3b3f3384834ea2af84503e56acc07

Niels Thykier nthykier-guest at alioth.debian.org
Thu Mar 25 08:50:50 UTC 2010


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "eclipse - Powerful IDE written in java - Debian package.".

The branch, karmic has been updated
       via  894f3959c7e3b3f3384834ea2af84503e56acc07 (commit)
       via  a6aed704d25d5728a680b2a3625ff9d01e12069e (commit)
       via  651ec5be11115dd78336d45ad7996cdac8c9b5ce (commit)
       via  c7e73c8e664a31fc479ac24b5ba42af0a1a8cd62 (commit)
       via  9adf9fcb8b65409b68bbc9f8d8abd605c89e9aaf (commit)
       via  c2b83c7788a4bcd11bc929d63b2dab055a3715ed (commit)
       via  69141680c79ad5787fdac83a9504e00b9ffb6273 (commit)
       via  339ea7064e66e74ca560e05583021d850785cdf7 (commit)
       via  801a043dd9b5b0ea97948a97eb7f8a7318df9513 (commit)
      from  df0f57344ea4c614dffab2e2b15a4a493c460df5 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 894f3959c7e3b3f3384834ea2af84503e56acc07
Author: Niels Thykier <niels at thykier.net>
Date:   Thu Mar 25 09:50:09 2010 +0100

    Backported fix for slow content assists [java-proposal-hangs.patch].

commit a6aed704d25d5728a680b2a3625ff9d01e12069e
Author: Niels Thykier <niels at thykier.net>
Date:   Thu Mar 25 09:38:39 2010 +0100

    Backported fix for behavior difference between javac and jdt
    [aling-jdt-with-javac.patch].

commit 651ec5be11115dd78336d45ad7996cdac8c9b5ce
Author: Niels Thykier <niels at thykier.net>
Date:   Thu Mar 25 09:26:34 2010 +0100

    Backported fix for Out-Of-Memory issues during searches [indexing-oom.patch].

commit c7e73c8e664a31fc479ac24b5ba42af0a1a8cd62
Author: Niels Thykier <niels at thykier.net>
Date:   Thu Mar 25 09:17:06 2010 +0100

    Refreshed quick-ass-cce.patch to exclude timestamps.
    
    Git-Dch: Ignore

commit 9adf9fcb8b65409b68bbc9f8d8abd605c89e9aaf
Author: Niels Thykier <niels at thykier.net>
Date:   Thu Mar 25 09:16:42 2010 +0100

    Backport fix for ClassCastException in the jdt compiler.

commit c2b83c7788a4bcd11bc929d63b2dab055a3715ed
Author: Niels Thykier <niels at thykier.net>
Date:   Thu Mar 25 09:11:07 2010 +0100

    Backported fix for ClassCastException in the "Quick Assistant".

commit 69141680c79ad5787fdac83a9504e00b9ffb6273
Author: Niels Thykier <niels at thykier.net>
Date:   Thu Mar 25 08:50:23 2010 +0100

    Backported patch from upstream to fix libpango crashes.
    
    Closes: LP: #531376

commit 339ea7064e66e74ca560e05583021d850785cdf7
Author: Niels Thykier <niels at thykier.net>
Date:   Thu Mar 25 08:49:56 2010 +0100

    Made cdbs stop parsing tarballs.

commit 801a043dd9b5b0ea97948a97eb7f8a7318df9513
Author: Niels Thykier <niels at thykier.net>
Date:   Thu Mar 25 08:49:34 2010 +0100

    Refreshed patches.

-----------------------------------------------------------------------

Summary of changes:
 debian/patches/align-jdt-with-javac.patch      |   74 +++++++
 debian/patches/fix-perm.patch                  |    7 +-
 debian/patches/fix-shell-script-perm.patch     |    7 +-
 debian/patches/indexing-oom.patch              |   22 ++
 debian/patches/java-proposal-hangs.patch       |  278 ++++++++++++++++++++++++
 debian/patches/jdt-compiler-cce.patch          |   32 +++
 debian/patches/libpango.patch                  |   33 +++
 debian/patches/preserve-perms-on-install.patch |    6 +-
 debian/patches/quick-ass-cce.patch             |   38 ++++
 debian/patches/series                          |    6 +
 debian/patches/support-extracted-source.patch  |    8 +-
 debian/rules                                   |    3 +
 12 files changed, 498 insertions(+), 16 deletions(-)

diff --git a/debian/patches/align-jdt-with-javac.patch b/debian/patches/align-jdt-with-javac.patch
new file mode 100644
index 0000000..da0e0dc
--- /dev/null
+++ b/debian/patches/align-jdt-with-javac.patch
@@ -0,0 +1,74 @@
+Description: Backported fix for making jdt behave more like javac.
+Origin: https://bugs.eclipse.org/bugs/show_bug.cgi?id=277643
+
+--- a/eclipse-3.5.1/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeDeclaration.java
++++ b/eclipse-3.5.1/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeDeclaration.java
+@@ -393,8 +393,9 @@
+ 	}
+ 
+ 	//============BINDING UPDATE==========================
++	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=277643, align with javac on JLS 15.12.2.6
+ 	ReferenceBinding[] thrownExceptions = eraseThrownExceptions
+-			? this.scope.environment().convertToRawTypes(inheritedConstructorBinding.original().thrownExceptions, true, true)
++			? this.scope.environment().convertToRawTypes(inheritedConstructorBinding.thrownExceptions, true, true)
+ 			: inheritedConstructorBinding.thrownExceptions;
+ 
+ 	SourceTypeBinding sourceType = this.binding;
+--- a/eclipse-3.5.1/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedAllocationExpression.java
++++ b/eclipse-3.5.1/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedAllocationExpression.java
+@@ -83,7 +83,8 @@
+ 		ReferenceBinding[] thrownExceptions;
+ 		if (((thrownExceptions = this.binding.thrownExceptions).length) != 0) {
+ 			if ((this.bits & ASTNode.Unchecked) != 0 && this.genericTypeArguments == null) {
+-				thrownExceptions = currentScope.environment().convertToRawTypes(this.binding.original().thrownExceptions, true, true);
++				// https://bugs.eclipse.org/bugs/show_bug.cgi?id=277643, align with javac on JLS 15.12.2.6
++				thrownExceptions = currentScope.environment().convertToRawTypes(this.binding.thrownExceptions, true, true);
+ 			}			
+ 			// check exception handling
+ 			flowContext.checkExceptionHandlers(
+--- a/eclipse-3.5.1/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java
++++ b/eclipse-3.5.1/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java
+@@ -82,7 +82,8 @@
+ 			ReferenceBinding[] thrownExceptions;
+ 			if ((thrownExceptions = this.binding.thrownExceptions) != Binding.NO_EXCEPTIONS) {
+ 				if ((this.bits & ASTNode.Unchecked) != 0 && this.genericTypeArguments == null) {
+-					thrownExceptions = currentScope.environment().convertToRawTypes(this.binding.original().thrownExceptions, true, true);
++					// https://bugs.eclipse.org/bugs/show_bug.cgi?id=277643, align with javac on JLS 15.12.2.6
++					thrownExceptions = currentScope.environment().convertToRawTypes(this.binding.thrownExceptions, true, true);
+ 				}				
+ 				// check exceptions
+ 				flowContext.checkExceptionHandlers(
+--- a/eclipse-3.5.1/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AllocationExpression.java
++++ b/eclipse-3.5.1/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AllocationExpression.java
+@@ -44,7 +44,8 @@
+ 	ReferenceBinding[] thrownExceptions;
+ 	if (((thrownExceptions = this.binding.thrownExceptions).length) != 0) {
+ 		if ((this.bits & ASTNode.Unchecked) != 0 && this.genericTypeArguments == null) {
+-			thrownExceptions = currentScope.environment().convertToRawTypes(this.binding.original().thrownExceptions, true, true);
++			// https://bugs.eclipse.org/bugs/show_bug.cgi?id=277643, align with javac on JLS 15.12.2.6
++			thrownExceptions = currentScope.environment().convertToRawTypes(this.binding.thrownExceptions, true, true);
+ 		}		
+ 		// check exception handling
+ 		flowContext.checkExceptionHandlers(
+--- a/eclipse-3.5.1/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java
++++ b/eclipse-3.5.1/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java
+@@ -70,7 +70,8 @@
+ 	ReferenceBinding[] thrownExceptions;
+ 	if ((thrownExceptions = this.binding.thrownExceptions) != Binding.NO_EXCEPTIONS) {
+ 		if ((this.bits & ASTNode.Unchecked) != 0 && this.genericTypeArguments == null) {
+-			thrownExceptions = currentScope.environment().convertToRawTypes(this.binding.original().thrownExceptions, true, true);
++			// https://bugs.eclipse.org/bugs/show_bug.cgi?id=277643, align with javac on JLS 15.12.2.6
++			thrownExceptions = currentScope.environment().convertToRawTypes(this.binding.thrownExceptions, true, true);
+ 		}
+ 		// must verify that exceptions potentially thrown by this expression are caught in the method
+ 		flowContext.checkExceptionHandlers(thrownExceptions, this, flowInfo.copy(), currentScope);
+@@ -487,7 +488,8 @@
+ 	} else {
+ 		TypeBinding returnType;
+ 		if ((this.bits & ASTNode.Unchecked) != 0 && this.genericTypeArguments == null) {
+-			returnType = this.binding.original().returnType;
++			// https://bugs.eclipse.org/bugs/show_bug.cgi?id=277643, align with javac on JLS 15.12.2.6
++			returnType = this.binding.returnType;
+ 			if (returnType != null) {
+ 				returnType = scope.environment().convertToRawType(returnType.erasure(), true);
+ 			}
diff --git a/debian/patches/fix-perm.patch b/debian/patches/fix-perm.patch
index 508522a..39d2c18 100644
--- a/debian/patches/fix-perm.patch
+++ b/debian/patches/fix-perm.patch
@@ -1,10 +1,9 @@
 Description: fix permission for ant executable files
 Author: Benjamin Drung <bdrung at ubuntu.com>
 
-diff -pruN a/build.xml b/build.xml
---- a/build.xml	2009-10-12 21:46:39.598436279 +0200
-+++ b/build.xml	2009-10-12 21:59:14.677936277 +0200
-@@ -708,6 +708,10 @@
+--- a/build.xml
++++ b/build.xml
+@@ -751,6 +751,10 @@
  		<symlink link="${destDir}/${prefix}/${libDir}/eclipse/startup.jar" resource="plugins/${startupjarpath}" />
  
  		<echo append="true" file="${destDir}${prefix}/${libDir}/eclipse/eclipse.ini" message="-Dorg.eclipse.equinox.p2.reconciler.dropins.directory=${destDir}${prefix}/share/eclipse/dropins" />
diff --git a/debian/patches/fix-shell-script-perm.patch b/debian/patches/fix-shell-script-perm.patch
index ab49387..a948a15 100644
--- a/debian/patches/fix-shell-script-perm.patch
+++ b/debian/patches/fix-shell-script-perm.patch
@@ -1,10 +1,9 @@
 Description: correct permission after applying patch
 Author: Benjamin Drung <bdrung at ubuntu.com>
 
-diff -pruN a/build.xml b/build.xml
---- a/build.xml	2009-10-17 21:15:16.105935633 +0200
-+++ b/build.xml	2009-10-17 21:16:49.372586004 +0200
-@@ -211,6 +211,7 @@
+--- a/build.xml
++++ b/build.xml
+@@ -216,6 +216,7 @@
  		<patch patchfile="${basedir}/patches/donotstorebuildlogsinfiles.patch" dir="${buildDirectory}" strip="3" />
  		<patch patchfile="${basedir}/patches/donotsetjavahomeandoptimizeliblocalfile.patch" dir="${buildDirectory}" strip="3" />
  		<patch patchfile="${basedir}/patches/eclipse-pde.build-add-package-build.patch" dir="${buildDirectory}/plugins/org.eclipse.pde.build" strip="0" />
diff --git a/debian/patches/indexing-oom.patch b/debian/patches/indexing-oom.patch
new file mode 100644
index 0000000..ffea150
--- /dev/null
+++ b/debian/patches/indexing-oom.patch
@@ -0,0 +1,22 @@
+Description: Backport fix for Out-Of-Memory issues during indexing.
+Origin: https://bugs.eclipse.org/bugs/show_bug.cgi?id=296343
+
+--- a/eclipse-3.5.1/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/processing/JobManager.java
++++ b/eclipse-3.5.1/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/processing/JobManager.java
+@@ -1,5 +1,5 @@
+ /*******************************************************************************
+- * Copyright (c) 2000, 2009 IBM Corporation and others.
++ * Copyright (c) 2000, 2010 IBM Corporation and others.
+  * All rights reserved. This program and the accompanying materials
+  * are made available under the terms of the Eclipse Public License v1.0
+  * which accompanies this distribution, and is available at
+@@ -324,6 +324,9 @@
+ 			this.processingThread.setDaemon(true);
+ 			// less prioritary by default, priority is raised if clients are actively waiting on it
+ 			this.processingThread.setPriority(Thread.NORM_PRIORITY-1);
++			// https://bugs.eclipse.org/bugs/show_bug.cgi?id=296343
++			// set the context loader to avoid leaking the current context loader
++			this.processingThread.setContextClassLoader(this.getClass().getClassLoader());
+ 			this.processingThread.start();
+ 		}
+ 	}
diff --git a/debian/patches/java-proposal-hangs.patch b/debian/patches/java-proposal-hangs.patch
new file mode 100644
index 0000000..5c73c07
--- /dev/null
+++ b/debian/patches/java-proposal-hangs.patch
@@ -0,0 +1,278 @@
+Description: Backported fix for long delays in code assistant.
+Origin: https://bugs.eclipse.org/bugs/show_bug.cgi?id=281575
+
+--- a/eclipse-3.5.1/plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java
++++ b/eclipse-3.5.1/plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java
+@@ -11581,7 +11581,7 @@
+ 	
+ 	private INameEnvironment getNoCacheNameEnvironment() {
+ 		if (this.noCacheNameEnvironment == null) {
+-			JavaModelManager.getJavaModelManager().cacheZipFiles();
++			JavaModelManager.getJavaModelManager().cacheZipFiles(this);
+ 			this.noCacheNameEnvironment = new JavaSearchNameEnvironment(this.javaProject, this.owner == null ? null : JavaModelManager.getJavaModelManager().getWorkingCopies(this.owner, true/*add primary WCs*/));
+ 		}
+ 		return this.noCacheNameEnvironment;
+@@ -12356,7 +12356,7 @@
+ 		if (this.noCacheNameEnvironment != null) {
+ 			this.noCacheNameEnvironment.cleanup();
+ 			this.noCacheNameEnvironment = null;
+-			JavaModelManager.getJavaModelManager().flushZipFiles();
++			JavaModelManager.getJavaModelManager().flushZipFiles(this);
+ 		}
+ 	}
+ 
+--- a/eclipse-3.5.1/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CompilationUnit.java
++++ b/eclipse-3.5.1/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CompilationUnit.java
+@@ -1238,10 +1238,10 @@
+ 	ReconcileWorkingCopyOperation op = new ReconcileWorkingCopyOperation(this, astLevel, reconcileFlags, workingCopyOwner);
+ 	JavaModelManager manager = JavaModelManager.getJavaModelManager();
+ 	try {
+-		manager.cacheZipFiles(); // cache zip files for performance (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=134172)
++		manager.cacheZipFiles(this); // cache zip files for performance (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=134172)
+ 		op.runOperation(monitor);
+ 	} finally {
+-		manager.flushZipFiles();
++		manager.flushZipFiles(this);
+ 	}
+ 	if(ReconcileWorkingCopyOperation.PERF) {
+ 		stats.endRun();
+--- a/eclipse-3.5.1/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaModelManager.java
++++ b/eclipse-3.5.1/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaModelManager.java
+@@ -83,6 +83,42 @@
+ public class JavaModelManager implements ISaveParticipant, IContentTypeChangeListener {
+ 
+ 	/**
++	 * Define a zip cache object.
++	 */
++	static class ZipCache {
++		private Map map;
++		Object owner;
++
++		ZipCache(Object owner) {
++			this.map = new HashMap();
++			this.owner = owner;
++		}
++
++		public void flush() {
++			Thread currentThread = Thread.currentThread();
++			Iterator iterator = this.map.values().iterator();
++			while (iterator.hasNext()) {
++				try {
++					ZipFile zipFile = (ZipFile)iterator.next();
++					if (JavaModelManager.ZIP_ACCESS_VERBOSE) {
++						System.out.println("(" + currentThread + ") [JavaModelManager.flushZipFiles()] Closing ZipFile on " +zipFile.getName()); //$NON-NLS-1$//$NON-NLS-2$
++					}
++					zipFile.close();
++				} catch (IOException e) {
++					// problem occured closing zip file: cannot do much more
++				}
++			}
++		}
++
++		public ZipFile getCache(IPath path) {
++			return (ZipFile) this.map.get(path);
++		}
++
++		public void setCache(IPath path, ZipFile zipFile) {
++			this.map.put(path, zipFile);
++		}
++	}
++	/**
+ 	 * Unique handle onto the JavaModel
+ 	 */
+ 	final JavaModel javaModel = new JavaModel();
+@@ -1496,10 +1532,15 @@
+ 	 * Starts caching ZipFiles.
+ 	 * Ignores if there are already clients.
+ 	 */
+-	public void cacheZipFiles() {
+-		if (this.zipFiles.get() != null) return;
+-		this.zipFiles.set(new HashMap());
++	public void cacheZipFiles(Object owner) {
++		ZipCache zipCache = (ZipCache) this.zipFiles.get();
++		if (zipCache != null) {
++			return;
++		}
++		// the owner will be responsible for flushing the cache
++		this.zipFiles.set(new ZipCache(owner));
+ 	}
++
+ 	public void closeZipFile(ZipFile zipFile) {
+ 		if (zipFile == null) return;
+ 		if (this.zipFiles.get() != null) {
+@@ -1709,22 +1750,16 @@
+ 	/**
+ 	 * Flushes ZipFiles cache if there are no more clients.
+ 	 */
+-	public void flushZipFiles() {
+-		Thread currentThread = Thread.currentThread();
+-		HashMap map = (HashMap)this.zipFiles.get();
+-		if (map == null) return;
+-		this.zipFiles.set(null);
+-		Iterator iterator = map.values().iterator();
+-		while (iterator.hasNext()) {
+-			try {
+-				ZipFile zipFile = (ZipFile)iterator.next();
+-				if (JavaModelManager.ZIP_ACCESS_VERBOSE) {
+-					System.out.println("(" + currentThread + ") [JavaModelManager.flushZipFiles()] Closing ZipFile on " +zipFile.getName()); //$NON-NLS-1$//$NON-NLS-2$
+-				}
+-				zipFile.close();
+-			} catch (IOException e) {
+-				// problem occured closing zip file: cannot do much more
+-			}
++	public void flushZipFiles(Object owner) {
++		ZipCache zipCache = (ZipCache)this.zipFiles.get();
++		if (zipCache == null) {
++			return;
++		}
++		// the owner will be responsible for flushing the cache
++		// we want to check object identity to make sure this is the owner that created the cache
++		if (zipCache.owner == owner) {
++			this.zipFiles.set(null);
++			zipCache.flush();
+ 		}
+ 	}
+ 
+@@ -2388,11 +2423,10 @@
+ 	 */
+ 	public ZipFile getZipFile(IPath path) throws CoreException {
+ 
+-		HashMap map;
++		ZipCache zipCache;
+ 		ZipFile zipFile;
+-		if ((map = (HashMap)this.zipFiles.get()) != null
+-				&& (zipFile = (ZipFile)map.get(path)) != null) {
+-
++		if ((zipCache = (ZipCache)this.zipFiles.get()) != null
++				&& (zipFile = zipCache.getCache(path)) != null) {
+ 			return zipFile;
+ 		}
+ 		File localFile = null;
+@@ -2417,8 +2451,8 @@
+ 				System.out.println("(" + Thread.currentThread() + ") [JavaModelManager.getZipFile(IPath)] Creating ZipFile on " + localFile ); //$NON-NLS-1$ //$NON-NLS-2$
+ 			}
+ 			zipFile = new ZipFile(localFile);
+-			if (map != null) {
+-				map.put(path, zipFile);
++			if (zipCache != null) {
++				zipCache.setCache(path, zipFile);
+ 			}
+ 			return zipFile;
+ 		} catch (IOException e) {
+--- a/eclipse-3.5.1/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SourceMapper.java
++++ b/eclipse-3.5.1/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SourceMapper.java
+@@ -7,6 +7,7 @@
+  *
+  * Contributors:
+  *     IBM Corporation - initial API and implementation
++ *     Kelly Campbell <kellyc at google.com> - Hangs in SourceMapper during java proposals - https://bugs.eclipse.org/bugs/show_bug.cgi?id=281575
+  *******************************************************************************/
+ package org.eclipse.jdt.internal.core;
+ 
+@@ -860,25 +861,32 @@
+ 
+ 		char[] source = null;
+ 
+-		if (this.rootPath != null) {
+-			source = getSourceForRootPath(this.rootPath, name);
+-		}
++		JavaModelManager javaModelManager = JavaModelManager.getJavaModelManager();
++		try {
++			javaModelManager.cacheZipFiles(this); // Cache any zip files we open during this operation
+ 
+-		if (source == null) {
+-			computeAllRootPaths(type);
+-			if (this.rootPaths != null) {
+-				loop: for (Iterator iterator = this.rootPaths.iterator(); iterator.hasNext(); ) {
+-					String currentRootPath = (String) iterator.next();
+-					if (!currentRootPath.equals(this.rootPath)) {
+-						source = getSourceForRootPath(currentRootPath, name);
+-						if (source != null) {
+-							// remember right root path
+-							this.rootPath = currentRootPath;
+-							break loop;
++			if (this.rootPath != null) {
++				source = getSourceForRootPath(this.rootPath, name);
++			}
++	
++			if (source == null) {
++				computeAllRootPaths(type);
++				if (this.rootPaths != null) {
++					loop: for (Iterator iterator = this.rootPaths.iterator(); iterator.hasNext(); ) {
++						String currentRootPath = (String) iterator.next();
++						if (!currentRootPath.equals(this.rootPath)) {
++							source = getSourceForRootPath(currentRootPath, name);
++							if (source != null) {
++								// remember right root path
++								this.rootPath = currentRootPath;
++								break loop;
++							}
+ 						}
+ 					}
+ 				}
+ 			}
++		} finally {
++			javaModelManager.flushZipFiles(this); // clean up cached zip files.
+ 		}
+ 		if (VERBOSE) {
+ 			System.out.println("spent " + (System.currentTimeMillis() - time) + "ms for " + type.getElementName()); //$NON-NLS-1$ //$NON-NLS-2$
+--- a/eclipse-3.5.1/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/hierarchy/IndexBasedHierarchyBuilder.java
++++ b/eclipse-3.5.1/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/hierarchy/IndexBasedHierarchyBuilder.java
+@@ -102,7 +102,7 @@
+ 	JavaModelManager manager = JavaModelManager.getJavaModelManager();
+ 	try {
+ 		// optimize access to zip files while building hierarchy
+-		manager.cacheZipFiles();
++		manager.cacheZipFiles(this);
+ 
+ 		if (computeSubtypes) {
+ 			// Note by construction there always is a focus type here
+@@ -135,7 +135,7 @@
+ 			buildSupertypes();
+ 		}
+ 	} finally {
+-		manager.flushZipFiles();
++		manager.flushZipFiles(this);
+ 	}
+ }
+ private void buildForProject(JavaProject project, ArrayList potentialSubtypes, org.eclipse.jdt.core.ICompilationUnit[] workingCopies, HashSet localTypes, IProgressMonitor monitor) throws JavaModelException {
+--- a/eclipse-3.5.1/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/hierarchy/RegionBasedHierarchyBuilder.java
++++ b/eclipse-3.5.1/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/hierarchy/RegionBasedHierarchyBuilder.java
+@@ -43,7 +43,7 @@
+ 	JavaModelManager manager = JavaModelManager.getJavaModelManager();
+ 	try {
+ 		// optimize access to zip files while building hierarchy
+-		manager.cacheZipFiles();
++		manager.cacheZipFiles(this);
+ 
+ 		if (this.hierarchy.focusType == null || computeSubtypes) {
+ 			IProgressMonitor typeInRegionMonitor =
+@@ -63,7 +63,7 @@
+ 			buildSupertypes();
+ 		}
+ 	} finally {
+-		manager.flushZipFiles();
++		manager.flushZipFiles(this);
+ 	}
+ }
+ /**
+--- a/eclipse-3.5.1/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MatchLocator.java
++++ b/eclipse-3.5.1/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MatchLocator.java
+@@ -1120,7 +1120,7 @@
+ 	this.bindings = new SimpleLookupTable();
+ 	try {
+ 		// optimize access to zip files during search operation
+-		manager.cacheZipFiles();
++		manager.cacheZipFiles(this);
+ 
+ 		// initialize handle factory (used as a cache of handles so as to optimize space)
+ 		if (this.handleFactory == null)
+@@ -1222,7 +1222,7 @@
+ 			this.progressMonitor.done();
+ 		if (this.nameEnvironment != null)
+ 			this.nameEnvironment.cleanup();
+-		manager.flushZipFiles();
++		manager.flushZipFiles(this);
+ 		this.bindings = null;
+ 	}
+ }
diff --git a/debian/patches/jdt-compiler-cce.patch b/debian/patches/jdt-compiler-cce.patch
new file mode 100644
index 0000000..b0b75f9
--- /dev/null
+++ b/debian/patches/jdt-compiler-cce.patch
@@ -0,0 +1,32 @@
+Description: Backport fix for ClassCastException in the jdt compiler.
+ .
+ Note the regression test, which was in the original patch, has been
+ excluded.
+Origin: https://bugs.eclipse.org/bugs/show_bug.cgi?id=295698
+
+--- a/eclipse-3.5.1/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java
++++ b/eclipse-3.5.1/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java
+@@ -6730,12 +6730,12 @@
+ 				methodName,
+ 		        typesAsString(method.isVarargs(), method.parameters, false),
+ 		        new String(method.declaringClass.readableName()),
+-		        typesAsString(method.isVarargs(), genericTypeArguments, false) },
++		        typesAsString(false, genericTypeArguments, false) },
+ 		new String[] {
+ 				methodName,
+ 		        typesAsString(method.isVarargs(), method.parameters, true),
+ 		        new String(method.declaringClass.shortReadableName()),
+-		        typesAsString(method.isVarargs(), genericTypeArguments, true) },
++		        typesAsString(false, genericTypeArguments, true) },
+ 		typeArguments[0].sourceStart,
+ 		typeArguments[typeArguments.length-1].sourceEnd);
+ }
+@@ -6872,7 +6872,7 @@
+ 				new String(rawMethod.declaringClass.sourceName()),
+ 				typesAsString(rawMethod.original().isVarargs(), rawMethod.original().parameters, false),
+ 				new String(rawMethod.declaringClass.readableName()),
+-				typesAsString(rawMethod.original().isVarargs(), argumentTypes, false),
++				typesAsString(false, argumentTypes, false),
+ 			 },
+ 			new String[] {
+ 				new String(rawMethod.declaringClass.sourceName()),
diff --git a/debian/patches/libpango.patch b/debian/patches/libpango.patch
new file mode 100644
index 0000000..c332737
--- /dev/null
+++ b/debian/patches/libpango.patch
@@ -0,0 +1,33 @@
+Description: Backport fix for libpango crashes.
+Origin: https://bugs.eclipse.org/bugs/show_bug.cgi?id=291128
+
+Index: Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/AccessibleObject.java
+===================================================================
+RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/AccessibleObject.java,v
+retrieving revision 1.46
+diff -u -r1.46 AccessibleObject.java
+--- a/eclipse-3.5.1/plugins/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/AccessibleObject.java	29 May 2009 21:30:30 -0000	1.46
++++ b/eclipse-3.5.1/plugins/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/AccessibleObject.java	14 Jan 2010 19:11:16 -0000
+@@ -1176,7 +1176,12 @@
+ 	}
+ 
+ 	static AccessibleObject getAccessibleObject (int /*long*/ atkObject) {
+-		return (AccessibleObject)AccessibleObjects.get (new LONG (atkObject));
++		AccessibleObject object = (AccessibleObject)AccessibleObjects.get (new LONG (atkObject));
++		if (object == null) return null;
++		if (object.accessible == null) return null;
++		Control control = object.accessible.control;
++		if (control == null || control.isDisposed()) return null;
++		return object;
+ 	}
+ 	
+ 	AccessibleObject getChildByHandle (int /*long*/ handle) {
+@@ -1252,7 +1257,7 @@
+ 		GObjectClass objectClassStruct = new GObjectClass ();
+ 		ATK.memmove (objectClassStruct, gObjectClass);
+ 		ATK.call (objectClassStruct.finalize, atkObject);
+-		AccessibleObject object = getAccessibleObject (atkObject);
++		AccessibleObject object = (AccessibleObject)AccessibleObjects.get (new LONG (atkObject));
+ 		if (object != null) {
+ 			AccessibleObjects.remove (new LONG (atkObject));
+ 			object.release ();
diff --git a/debian/patches/preserve-perms-on-install.patch b/debian/patches/preserve-perms-on-install.patch
index f567913..3aadc94 100644
--- a/debian/patches/preserve-perms-on-install.patch
+++ b/debian/patches/preserve-perms-on-install.patch
@@ -1,9 +1,9 @@
 Description: preserve the execution permission when installing files
 Author: Benjamin Drung <bdrung at ubuntu.com>
 
---- a/build.xml	(Revision 23484)
-+++ b/build.xml	(Arbeitskopie)
-@@ -685,9 +685,12 @@
+--- a/build.xml
++++ b/build.xml
+@@ -696,9 +696,12 @@
  
  	<target name="install" depends="provision.sdk">
  		<mkdir dir="${destDir}${prefix}/${libDir}/eclipse" />
diff --git a/debian/patches/quick-ass-cce.patch b/debian/patches/quick-ass-cce.patch
new file mode 100644
index 0000000..9a866ce
--- /dev/null
+++ b/debian/patches/quick-ass-cce.patch
@@ -0,0 +1,38 @@
+Description: Backport of patch to fix ClassCastException in
+ "Quick Assistant".
+Origin: https://bugs.eclipse.org/bugs/show_bug.cgi?id=294662
+
+--- a/eclipse-3.5.1/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/Util.java
++++ b/eclipse-3.5.1/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/Util.java
+@@ -1307,10 +1307,12 @@
+ 	 * Return the java element corresponding to the given compiler binding.
+ 	 */
+ 	public static JavaElement getUnresolvedJavaElement(FieldBinding binding, WorkingCopyOwner workingCopyOwner, BindingsToNodesMap bindingsToNodes) {
+-		if (binding.declaringClass == null) return null; // arraylength
+-		IType declaringType = (IType) getUnresolvedJavaElement(binding.declaringClass, workingCopyOwner, bindingsToNodes);
+-		if (declaringType == null) return null;
+-		return (JavaElement) declaringType.getField(String.valueOf(binding.name));
++		if (binding.declaringClass == null) return null; // array length
++		JavaElement unresolvedJavaElement = getUnresolvedJavaElement(binding.declaringClass, workingCopyOwner, bindingsToNodes);
++		if (unresolvedJavaElement == null || unresolvedJavaElement.getElementType() != IJavaElement.TYPE) {
++			return null;
++		}
++		return (JavaElement) ((IType) unresolvedJavaElement).getField(String.valueOf(binding.name));
+ 	}
+ 
+ 	/**
+@@ -1342,9 +1344,11 @@
+ 	 * Return the java element corresponding to the given compiler binding.
+ 	 */
+ 	public static JavaElement getUnresolvedJavaElement(MethodBinding methodBinding, WorkingCopyOwner workingCopyOwner, BindingsToNodesMap bindingsToNodes) {
+-		IType declaringType = (IType) getUnresolvedJavaElement(methodBinding.declaringClass, workingCopyOwner, bindingsToNodes);
+-
+-		if (declaringType == null) return null;
++		JavaElement unresolvedJavaElement = getUnresolvedJavaElement(methodBinding.declaringClass, workingCopyOwner, bindingsToNodes);
++		if (unresolvedJavaElement == null || unresolvedJavaElement.getElementType() != IJavaElement.TYPE) {
++			return null;
++		}
++		IType declaringType = (IType) unresolvedJavaElement;
+ 
+ 		org.eclipse.jdt.internal.compiler.ast.ASTNode node = bindingsToNodes == null ? null : bindingsToNodes.get(methodBinding);
+ 		if (node != null && !declaringType.isBinary()) {
diff --git a/debian/patches/series b/debian/patches/series
index 21324c7..f02d5b4 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,9 @@ fix-shell-script-perm.patch
 preserve-perms-on-install.patch
 support-extracted-source.patch
 fix-perm.patch
+libpango.patch
+quick-ass-cce.patch
+jdt-compiler-cce.patch
+indexing-oom.patch
+align-jdt-with-javac.patch
+java-proposal-hangs.patch
diff --git a/debian/patches/support-extracted-source.patch b/debian/patches/support-extracted-source.patch
index a3bbc8c..a97a719 100644
--- a/debian/patches/support-extracted-source.patch
+++ b/debian/patches/support-extracted-source.patch
@@ -2,8 +2,6 @@ Description: support extracted source instead of requiring a tarball
 Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=292475
 Author: Benjamin Drung <bdrung at ubuntu.com>
 
-diff --git a/build.xml b/build.xml
-index 9fe198e..126c7b4 100644
 --- a/build.xml
 +++ b/build.xml
 @@ -6,12 +6,27 @@
@@ -35,7 +33,7 @@ index 9fe198e..126c7b4 100644
  	<uptodate property="testsunpack.complete" srcfile="${basedir}/eclipse-sdktests-${buildTag}-fetched-src.tar.bz2" targetfile="testsunpack-stamp" />
  	<uptodate property="buildId.complete" srcfile="unpack-stamp" targetfile="buildId-stamp" />
  	<uptodate property="patch.complete" srcfile="unpack-stamp" targetfile="patch-stamp" />
-@@ -77,7 +92,7 @@
+@@ -80,7 +95,7 @@
  		<ant antfile="pdebuild.xml" target="generateScripts" />
  	</target>
  
@@ -44,7 +42,7 @@ index 9fe198e..126c7b4 100644
  		<fail message="SDK source tarball is not present.  Please either download a file such as eclipse-I20090611-1540-fetched-src.tar.bz2 from http://www.eclipse.org/downloads/download.php?file=/technology/linuxtools/eclipse-build or generate one by running ./buildSDKSource.sh." />
  	</target>
  
-@@ -96,6 +111,21 @@
+@@ -99,6 +114,21 @@
  		-->
  	</target>
  
@@ -66,7 +64,7 @@ index 9fe198e..126c7b4 100644
  	<target name="unpack" depends="fetch,setLibDir" unless="unpack.complete">
  		<delete dir="${topBuildDir}" />
  		<mkdir dir="${topBuildDir}" />
-@@ -110,8 +140,8 @@
+@@ -113,8 +143,8 @@
  		<delete dir="${buildworkspace}" />
  		<mkdir dir="${buildworkspace}" />
  
diff --git a/debian/rules b/debian/rules
index d04545b..8b7ef0e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,5 +1,8 @@
 #!/usr/bin/make -f
 
+# No - we are not building cdbs, quit parsing tarballs!
+DEB_TARBALL := $(NULL)
+
 include /usr/share/cdbs/1/rules/debhelper.mk
 include /usr/share/cdbs/1/class/ant.mk
 include /usr/share/cdbs/1/rules/patchsys-quilt.mk


hooks/post-receive
-- 
eclipse - Powerful IDE written in java - Debian package.



More information about the pkg-java-commits mailing list