diff --git a/core/org.eclipse.cdt.ui/ChangeLog b/core/org.eclipse.cdt.ui/ChangeLog index edb789bc529..6abbb7783f9 100644 --- a/core/org.eclipse.cdt.ui/ChangeLog +++ b/core/org.eclipse.cdt.ui/ChangeLog @@ -1,3 +1,8 @@ +2004-11-02 Tanya Wolff + Fixed content assist extensibility for 77482 - changed context condition + for addProposalsFromCompletionContributors() & fixed cursor position + * src/org/eclipse/cdt/internal/ui/text/contentassist/CCompletionProcessor.java + 2004-11-01 Alain Magloire Patch from Mikhail Voronin to implement 71240. Too many changes to enumerate refer to PR: diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/CCompletionProcessor.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/CCompletionProcessor.java index a084f4392ec..f7913e5bf91 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/CCompletionProcessor.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/CCompletionProcessor.java @@ -445,8 +445,7 @@ public class CCompletionProcessor implements IContentAssistProcessor { int length = prefix.length(); // calling functions should happen only within the context of a code body - if( (completionNode.getCompletionContext() != IASTCompletionNode.CompletionKind.SINGLE_NAME_REFERENCE) - && (completionNode.getCompletionContext() != IASTCompletionNode.CompletionKind.SINGLE_NAME_REFERENCE)) + if (completionNode.getCompletionContext() != null) return; IFunctionSummary[] summary; @@ -487,6 +486,8 @@ public class CCompletionProcessor implements IContentAssistProcessor { if(fargs != null && fargs.length() > 0) { proposal.setContextInformation(new ContextInformation(fname, fargs)); + // set the cursor before the closing bracket + proposal.setCursorPosition(fname.length() - 1); } completions.add(proposal);