diff options
author | Jeff Johnston | 2019-11-13 23:55:54 +0000 |
---|---|---|
committer | Noopur Gupta | 2019-11-18 10:16:47 +0000 |
commit | 89890a18182b48a3f12073c8e427a7c754d6beae (patch) | |
tree | ce5440679c915feda300da9914e553bc1d93e635 | |
parent | e507f0c7cbbb650891bc4119da5bcf6d20db0b6f (diff) | |
download | eclipse.jdt.debug-89890a18182b48a3f12073c8e427a7c754d6beae.tar.gz eclipse.jdt.debug-89890a18182b48a3f12073c8e427a7c754d6beae.tar.xz eclipse.jdt.debug-89890a18182b48a3f12073c8e427a7c754d6beae.zip |
Bug 538656 - Make JDT CompletionProcessors not require UI ThreadS4_14_0_RC1I20191201-1800I20191201-0600I20191130-1800I20191130-0600I20191129-1800I20191127-1800I20191127-0600I20191126-2315I20191126-1800I20191126-0600I20191125-1800I20191125-0600I20191124-1800I20191124-0600I20191123-1800I20191123-1115I20191123-0600I20191123-0100I20191122-1800I20191120-2335I20191120-1800I20191120-0840I20191120-0600I20191119-2200I20191119-1800I20191119-1250I20191119-1235I20191119-1215I20191119-1155I20191119-0850I20191119-0725I20191119-0510I20191119-0315I20191119-0020I20191118-2230I20191118-1800
- fix TemplateEngine.complete() calls to use new API
Change-Id: Ife2e26180a420fc393333cd78d990af01af52980
3 files changed, 10 insertions, 7 deletions
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ToggleBreakpointAdapter.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ToggleBreakpointAdapter.java index 90f9548bc..c4bfc078d 100644 --- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ToggleBreakpointAdapter.java +++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ToggleBreakpointAdapter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2017 IBM Corporation and others. + * Copyright (c) 2000, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -1617,7 +1617,7 @@ public class ToggleBreakpointAdapter implements IToggleBreakpointsTargetExtensio IRegion line = document.getLineInformation(textSelection.getStartLine() + 1); Point selectedRange = viewer.getSelectedRange(); viewer.setSelectedRange(selectedRange.x, 0); - statementEngine.complete(viewer, line.getOffset(), cunit); + statementEngine.complete(viewer, selectedRange, line.getOffset(), cunit); viewer.setSelectedRange(selectedRange.x, selectedRange.y); TemplateProposal[] templateProposals = statementEngine.getResults(); for (TemplateProposal templateProposal : templateProposals) { diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/contentassist/JavaDebugContentAssistProcessor.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/contentassist/JavaDebugContentAssistProcessor.java index 4cf51b9a6..e52fcd3f7 100644 --- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/contentassist/JavaDebugContentAssistProcessor.java +++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/contentassist/JavaDebugContentAssistProcessor.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2016 IBM Corporation and others. + * Copyright (c) 2005, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -35,6 +35,7 @@ import org.eclipse.jface.text.contentassist.IContentAssistProcessor; import org.eclipse.jface.text.contentassist.IContextInformation; import org.eclipse.jface.text.contentassist.IContextInformationValidator; import org.eclipse.jface.text.templates.TemplateContextType; +import org.eclipse.swt.graphics.Point; /** * Completion processor for the Java debugger. This completion processor @@ -168,13 +169,15 @@ public class JavaDebugContentAssistProcessor implements IContentAssistProcessor if (fJavaEngine != null) { fJavaEngine.reset(); - fJavaEngine.complete(viewer, documentOffset, null); + Point selectionAsPoint = new Point(selection.getOffset(), selection.getLength()); + fJavaEngine.complete(viewer, selectionAsPoint, documentOffset, null); total.addAll(Arrays.asList(fJavaEngine.getResults())); } if (fStatementEngine != null) { fStatementEngine.reset(); - fStatementEngine.complete(viewer, documentOffset, null); + Point selectionAsPoint = new Point(selection.getOffset(), selection.getLength()); + fStatementEngine.complete(viewer, selectionAsPoint, documentOffset, null); total.addAll(Arrays.asList(fStatementEngine.getResults())); } diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/snippeteditor/JavaSnippetCompletionProcessor.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/snippeteditor/JavaSnippetCompletionProcessor.java index 1d3887601..91440e44a 100644 --- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/snippeteditor/JavaSnippetCompletionProcessor.java +++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/snippeteditor/JavaSnippetCompletionProcessor.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2016 IBM Corporation and others. + * Copyright (c) 2000, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -126,7 +126,7 @@ public class JavaSnippetCompletionProcessor implements IContentAssistProcessor { if (fTemplateEngine != null) { fTemplateEngine.reset(); - fTemplateEngine.complete(viewer, position, null); + fTemplateEngine.complete(viewer, viewer.getSelectedRange(), position, null); TemplateProposal[] templateResults= fTemplateEngine.getResults(); |