01: /*******************************************************************************
02: * Copyright (c) 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.ui.internal.texteditor.spelling;
11:
12: import org.eclipse.swt.graphics.Image;
13: import org.eclipse.swt.graphics.Point;
14:
15: import org.eclipse.jface.text.IDocument;
16: import org.eclipse.jface.text.contentassist.ICompletionProposal;
17: import org.eclipse.jface.text.contentassist.IContextInformation;
18:
19: /**
20: * Proposal telling that there are no proposals available.
21: * <p>
22: * Applying this proposal does nothing.
23: * </p>
24: *
25: * @since 3.3
26: */
27: public final class NoCompletionsProposal implements ICompletionProposal {
28:
29: /*
30: * @see org.eclipse.jface.text.contentassist.ICompletionProposal#apply(org.eclipse.jface.text.IDocument)
31: */
32: public void apply(IDocument document) {
33: // do nothing
34: }
35:
36: /*
37: * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getAdditionalProposalInfo()
38: */
39: public String getAdditionalProposalInfo() {
40: return null;
41: }
42:
43: /*
44: * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getContextInformation()
45: */
46: public IContextInformation getContextInformation() {
47: return null;
48: }
49:
50: /*
51: * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getDisplayString()
52: */
53: public String getDisplayString() {
54: return SpellingMessages.NoCompletionsProposal_displayString;
55: }
56:
57: /*
58: * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getImage()
59: */
60: public Image getImage() {
61: return null;
62: }
63:
64: /*
65: * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getSelection(org.eclipse.jface.text.IDocument)
66: */
67: public Point getSelection(IDocument document) {
68: return null;
69: }
70:
71: }
|