aboutsummaryrefslogtreecommitdiff
path: root/src/eclipseAgent/lombok/eclipse/agent/PatchExtensionMethodCompletionProposalPortal.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/eclipseAgent/lombok/eclipse/agent/PatchExtensionMethodCompletionProposalPortal.java')
-rw-r--r--src/eclipseAgent/lombok/eclipse/agent/PatchExtensionMethodCompletionProposalPortal.java15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/eclipseAgent/lombok/eclipse/agent/PatchExtensionMethodCompletionProposalPortal.java b/src/eclipseAgent/lombok/eclipse/agent/PatchExtensionMethodCompletionProposalPortal.java
index 29aedc81..6dca1901 100644
--- a/src/eclipseAgent/lombok/eclipse/agent/PatchExtensionMethodCompletionProposalPortal.java
+++ b/src/eclipseAgent/lombok/eclipse/agent/PatchExtensionMethodCompletionProposalPortal.java
@@ -24,10 +24,10 @@ package lombok.eclipse.agent;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
-import org.eclipse.jdt.ui.text.java.IJavaCompletionProposal;
-
import lombok.Lombok;
+import org.eclipse.jdt.ui.text.java.IJavaCompletionProposal;
+
public class PatchExtensionMethodCompletionProposalPortal {
private static final String COMPLETION_PROPOSAL_COLLECTOR = "org.eclipse.jdt.ui.text.java.CompletionProposalCollector";
@@ -44,10 +44,15 @@ public class PatchExtensionMethodCompletionProposalPortal {
} catch (IllegalAccessException e) {
throw Lombok.sneakyThrow(e);
} catch (InvocationTargetException e) {
- throw Lombok.sneakyThrow(e);
+ throw Lombok.sneakyThrow(e.getCause());
} catch (NullPointerException e) {
- e.initCause(ReflectionForUi.problem);
- throw e;
+ if (!"false".equals(System.getProperty("lombok.debug.reflection", "false"))) {
+ e.initCause(ReflectionForUi.problem);
+ throw e;
+ }
+ //ignore, we don't have access to the correct ECJ classes, so lombok can't possibly
+ //do anything useful here.
+ return (IJavaCompletionProposal[])javaCompletionProposals;
}
}