[SCM] eclipse - Powerful IDE written in java - Debian package. branch, karmic, updated. 51cf256b44f49470b190400e98aa162f73ca3b78
Niels Thykier
nthykier-guest at alioth.debian.org
Sat Mar 27 21:45:27 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 51cf256b44f49470b190400e98aa162f73ca3b78 (commit)
via 9e336209aadf5c3eca06d376fb574ad23bd4fcb5 (commit)
via fad16ac590910181d38f1b23679d68f8cea6f36a (commit)
from 593088209647f56841ce8ed950db5f3defca42d1 (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 51cf256b44f49470b190400e98aa162f73ca3b78
Author: Niels Thykier <niels at thykier.net>
Date: Sat Mar 27 22:44:51 2010 +0100
Backported fix to prevent eclipse from hiding errors [prevent-error-hiding.patch]
commit 9e336209aadf5c3eca06d376fb574ad23bd4fcb5
Author: Niels Thykier <niels at thykier.net>
Date: Sat Mar 27 21:59:36 2010 +0100
Backported patch to speed-up source looks up [speedup-source-lookup.patch].
commit fad16ac590910181d38f1b23679d68f8cea6f36a
Author: Niels Thykier <niels at thykier.net>
Date: Sat Mar 27 21:46:25 2010 +0100
Backported patch to correct issue in the jdt compiler with generics
[jdt-compiler-gen-bug.patch].
-----------------------------------------------------------------------
Summary of changes:
debian/patches/jdt-compiler-gen-bug.patch | 119 ++++++++++++++++++++++++++++
debian/patches/prevent-error-hiding.patch | 80 +++++++++++++++++++
debian/patches/series | 3 +
debian/patches/speedup-source-lookup.patch | 22 +++++
4 files changed, 224 insertions(+), 0 deletions(-)
diff --git a/debian/patches/jdt-compiler-gen-bug.patch b/debian/patches/jdt-compiler-gen-bug.patch
new file mode 100644
index 0000000..3da25ce
--- /dev/null
+++ b/debian/patches/jdt-compiler-gen-bug.patch
@@ -0,0 +1,119 @@
+Description: Backported fix for a compiler error with generics.
+Origin: backport, https://bugs.eclipse.org/bugs/show_bug.cgi?id=284280
+
+--- a/eclipse-3.5.1/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodBinding.java
++++ b/eclipse-3.5.1/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodBinding.java
+@@ -426,6 +426,21 @@
+ return this.selector;
+ }
+
++public MethodBinding findOriginalInheritedMethod(MethodBinding inheritedMethod) {
++ MethodBinding inheritedOriginal = inheritedMethod.original();
++ TypeBinding superType = this.declaringClass.findSuperTypeOriginatingFrom(inheritedOriginal.declaringClass);
++ if (superType == null || !(superType instanceof ReferenceBinding)) return null;
++
++ if (inheritedOriginal.declaringClass != superType) {
++ // must find inherited method with the same substituted variables
++ MethodBinding[] superMethods = ((ReferenceBinding) superType).getMethods(inheritedOriginal.selector, inheritedOriginal.parameters.length);
++ for (int m = 0, l = superMethods.length; m < l; m++)
++ if (superMethods[m].original() == inheritedOriginal)
++ return superMethods[m];
++ }
++ return inheritedOriginal;
++}
++
+ /**
+ * <pre>
+ *<typeParam1 ... typeParamM>(param1 ... paramN)returnType thrownException1 ... thrownExceptionP
+--- a/eclipse-3.5.1/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier15.java
++++ b/eclipse-3.5.1/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier15.java
+@@ -23,19 +23,11 @@
+ boolean areMethodsCompatible(MethodBinding one, MethodBinding two) {
+ // use the original methods to test compatibility, but do not check visibility, etc
+ one = one.original();
+- two = two.original();
++ two = one.findOriginalInheritedMethod(two);
+
+- TypeBinding match = one.declaringClass.findSuperTypeOriginatingFrom(two.declaringClass);
+- if (!(match instanceof ReferenceBinding))
++ if (two == null)
+ return false; // method's declaringClass does not inherit from inheritedMethod's
+
+- if (match != two.declaringClass) {
+- MethodBinding[] superMethods = ((ReferenceBinding) match).getMethods(two.selector);
+- for (int i = 0, length = superMethods.length; i < length; i++)
+- if (superMethods[i].original() == two)
+- return isParameterSubsignature(one, superMethods[i]);
+- }
+-
+ return isParameterSubsignature(one, two);
+ }
+ boolean areParametersEqual(MethodBinding one, MethodBinding two) {
+@@ -712,16 +704,8 @@
+ if (method.declaringClass.isParameterizedType())
+ method = method.original();
+
+- inheritedMethod = inheritedMethod.original();
+- TypeBinding match = method.declaringClass.findSuperTypeOriginatingFrom(inheritedMethod.declaringClass);
+- if ((match instanceof ReferenceBinding) && match != inheritedMethod.declaringClass) {
+- MethodBinding[] superMethods = ((ReferenceBinding) match).getMethods(inheritedMethod.selector);
+- for (int i = 0, length = superMethods.length; i < length; i++)
+- if (superMethods[i].original() == inheritedMethod.original())
+- return isParameterSubsignature(method, superMethods[i]);
+- }
+-
+- return isParameterSubsignature(method, inheritedMethod);
++ MethodBinding inheritedOriginal = method.findOriginalInheritedMethod(inheritedMethod);
++ return isParameterSubsignature(method, inheritedOriginal == null ? inheritedMethod : inheritedOriginal);
+ }
+ boolean isParameterSubsignature(MethodBinding method, MethodBinding inheritedMethod) {
+ MethodBinding substitute = computeSubstituteMethod(inheritedMethod, method);
+--- a/eclipse-3.5.1/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java
++++ b/eclipse-3.5.1/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java
+@@ -835,9 +835,8 @@
+ MethodBinding compatibleMethod = computeCompatibleMethod(methodBinding, argumentTypes, invocationSite);
+ if (compatibleMethod != null) {
+ if (compatibleMethod.isValidBinding()) {
+- if (concreteMatch != null && concreteMatch.declaringClass.findSuperTypeOriginatingFrom(compatibleMethod.declaringClass) != null)
+- if (environment().methodVerifier().isParameterSubsignature(concreteMatch.original(), compatibleMethod.original()))
+- continue; // can skip this method since concreteMatch overrides it
++ if (concreteMatch != null && environment().methodVerifier().doesMethodOverride(concreteMatch, compatibleMethod))
++ continue; // can skip this method since concreteMatch overrides it
+ if (candidatesCount == 0) {
+ candidates = new MethodBinding[foundSize - startFoundSize + 1];
+ if (concreteMatch != null)
+@@ -1227,7 +1226,9 @@
+ // BUT we can also ignore any overridden method since we already know the better match (fixes 80028)
+ for (int j = 0, max = found.size; j < max; j++) {
+ MethodBinding matchingMethod = (MethodBinding) found.elementAt(j);
+- if (verifier.isParameterSubsignature(matchingMethod.original(), currentMethod.original())) {
++ MethodBinding matchingOriginal = matchingMethod.original();
++ MethodBinding currentOriginal = matchingOriginal.findOriginalInheritedMethod(currentMethod);
++ if (currentOriginal != null && verifier.isParameterSubsignature(matchingOriginal, currentOriginal)) {
+ if (isCompliant15) {
+ if (matchingMethod.isBridge() && !currentMethod.isBridge())
+ continue nextMethod; // keep inherited methods to find concrete method over a bridge method
+@@ -3679,20 +3680,11 @@
+ if (!original.isAbstract()) {
+ if (original2.isAbstract())
+ continue; // only compare current against other concrete methods
+- TypeBinding superType = original.declaringClass.findSuperTypeOriginatingFrom(original2.declaringClass.erasure());
+- if (superType == null)
++
++ original2 = original.findOriginalInheritedMethod(original2);
++ if (original2 == null)
+ continue nextSpecific; // current's declaringClass is not a subtype of next's declaringClass
+ if (current.hasSubstitutedParameters() || original.typeVariables != Binding.NO_TYPE_VARIABLES) {
+- if (original2.declaringClass != superType) {
+- // must find inherited method with the same substituted variables
+- MethodBinding[] superMethods = ((ReferenceBinding) superType).getMethods(original2.selector, argumentTypes.length);
+- for (int m = 0, l = superMethods.length; m < l; m++) {
+- if (superMethods[m].original() == original2) {
+- original2 = superMethods[m];
+- break;
+- }
+- }
+- }
+ if (!environment().methodVerifier().isParameterSubsignature(original, original2))
+ continue nextSpecific; // current does not override next
+ }
diff --git a/debian/patches/prevent-error-hiding.patch b/debian/patches/prevent-error-hiding.patch
new file mode 100644
index 0000000..ef51ba3
--- /dev/null
+++ b/debian/patches/prevent-error-hiding.patch
@@ -0,0 +1,80 @@
+Description: Backported fix to prevent eclipse from hiding errors.
+Origin: backport, https://bugs.eclipse.org/bugs/show_bug.cgi?id=283283
+
+--- a/eclipse-3.5.1/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkingSetManager.java 24 Nov 2006 16:41:35 -0000 1.19
++++ b/eclipse-3.5.1/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkingSetManager.java 22 Jul 2009 13:06:15 -0000
+@@ -15,16 +15,17 @@
+ import java.io.FileInputStream;
+ import java.io.IOException;
+ import java.io.InputStreamReader;
+-
+ import org.eclipse.core.runtime.IPath;
+-import org.eclipse.jface.dialogs.ErrorDialog;
+-import org.eclipse.jface.dialogs.MessageDialog;
+-import org.eclipse.swt.widgets.Shell;
++import org.eclipse.core.runtime.IStatus;
++import org.eclipse.core.runtime.Status;
+ import org.eclipse.ui.IMemento;
+ import org.eclipse.ui.IWorkingSet;
+ import org.eclipse.ui.IWorkingSetManager;
+ import org.eclipse.ui.WorkbenchException;
+ import org.eclipse.ui.XMLMemento;
++import org.eclipse.ui.statushandlers.IStatusAdapterConstants;
++import org.eclipse.ui.statushandlers.StatusAdapter;
++import org.eclipse.ui.statushandlers.StatusManager;
+ import org.osgi.framework.BundleContext;
+ import org.osgi.framework.BundleListener;
+
+@@ -108,18 +110,15 @@
+ restoreMruList(memento);
+ reader.close();
+ } catch (IOException e) {
+- MessageDialog
+- .openError(
+- (Shell) null,
+- WorkbenchMessages.ProblemRestoringWorkingSetState_title,
+- WorkbenchMessages.ProblemRestoringWorkingSetState_message);
++ handleInternalError(
++ e,
++ WorkbenchMessages.ProblemRestoringWorkingSetState_title,
++ WorkbenchMessages.ProblemRestoringWorkingSetState_message);
+ } catch (WorkbenchException e) {
+- ErrorDialog
+- .openError(
+- (Shell) null,
+- WorkbenchMessages.ProblemRestoringWorkingSetState_title,
+- WorkbenchMessages.ProblemRestoringWorkingSetState_message,
+- e.getStatus());
++ handleInternalError(
++ e,
++ WorkbenchMessages.ProblemRestoringWorkingSetState_title,
++ WorkbenchMessages.ProblemRestoringWorkingSetState_message);
+ }
+ }
+ }
+@@ -138,7 +136,7 @@
+ saveState(stateFile);
+ } catch (IOException e) {
+ stateFile.delete();
+- MessageDialog.openError((Shell) null,
++ handleInternalError(e,
+ WorkbenchMessages.ProblemSavingWorkingSetState_title,
+ WorkbenchMessages.ProblemSavingWorkingSetState_message);
+ }
+@@ -160,4 +158,16 @@
+ saveState();
+ super.workingSetChanged(changedWorkingSet, propertyChangeId, oldValue);
+ }
++
++ /**
++ * Show and Log the exception using StatusManager.
++ */
++ private void handleInternalError(Exception exp, String title, String message) {
++ Status status = new Status(IStatus.ERROR, WorkbenchPlugin.PI_WORKBENCH,
++ message, exp);
++ StatusAdapter sa = new StatusAdapter(status);
++ sa.setProperty(IStatusAdapterConstants.TITLE_PROPERTY, title);
++ StatusManager.getManager().handle(sa,
++ StatusManager.SHOW | StatusManager.LOG);
++ }
+ }
diff --git a/debian/patches/series b/debian/patches/series
index f02d5b4..a0289af 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -8,3 +8,6 @@ jdt-compiler-cce.patch
indexing-oom.patch
align-jdt-with-javac.patch
java-proposal-hangs.patch
+jdt-compiler-gen-bug.patch
+speedup-source-lookup.patch
+prevent-error-hiding.patch
diff --git a/debian/patches/speedup-source-lookup.patch b/debian/patches/speedup-source-lookup.patch
new file mode 100644
index 0000000..7eedc11
--- /dev/null
+++ b/debian/patches/speedup-source-lookup.patch
@@ -0,0 +1,22 @@
+Description: Backported patch to speed-up JavaSourceLookupUtil.
+Origin: backport, https://bugs.eclipse.org/bugs/show_bug.cgi?id=285607
+
+--- a/eclipse-3.5.1/plugins/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JavaSourceLookupUtil.java
++++ b/eclipse-3.5.1/plugins/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JavaSourceLookupUtil.java
+@@ -154,6 +154,7 @@
+ // External jars are shared, so it does not matter which project it
+ // originates from
+ IJavaModel model = JavaCore.create(ResourcesPlugin.getWorkspace().getRoot());
++ Path entryPath = new Path(entry.getLocation());
+ try {
+ IJavaProject[] jps = model.getJavaProjects();
+ for (int i = 0; i < jps.length; i++) {
+@@ -163,7 +164,7 @@
+ IPackageFragmentRoot[] allRoots = jp.getPackageFragmentRoots();
+ for (int j = 0; j < allRoots.length; j++) {
+ IPackageFragmentRoot root = allRoots[j];
+- if (root.isExternal() && root.getPath().equals(new Path(entry.getLocation()))) {
++ if (root.isExternal() && root.getPath().equals(entryPath)) {
+ if (isSourceAttachmentEqual(root, entry)) {
+ // use package fragment root
+ return root;
hooks/post-receive
--
eclipse - Powerful IDE written in java - Debian package.
More information about the pkg-java-commits
mailing list