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.pde.internal.ui.editor.contentassist;
11:
12: import org.eclipse.jface.fieldassist.ContentProposalAdapter;
13: import org.eclipse.jface.fieldassist.IContentProposal;
14: import org.eclipse.jface.fieldassist.IContentProposalListener;
15: import org.eclipse.jface.fieldassist.IContentProposalListener2;
16: import org.eclipse.jface.fieldassist.IContentProposalProvider;
17:
18: /**
19: * TypeContentProposalListener
20: *
21: */
22: public class TypeContentProposalListener implements
23: IContentProposalListener, IContentProposalListener2 {
24:
25: /**
26: *
27: */
28: public TypeContentProposalListener() {
29: // NO-OP
30: }
31:
32: /* (non-Javadoc)
33: * @see org.eclipse.jface.fieldassist.IContentProposalListener#proposalAccepted(org.eclipse.jface.fieldassist.IContentProposal)
34: */
35: public void proposalAccepted(IContentProposal proposal) {
36: // NO-OP
37: }
38:
39: /* (non-Javadoc)
40: * @see org.eclipse.jface.fieldassist.IContentProposalListener2#proposalPopupClosed(org.eclipse.jface.fieldassist.ContentProposalAdapter)
41: */
42: public void proposalPopupClosed(ContentProposalAdapter adapter) {
43: IContentProposalProvider provider = adapter
44: .getContentProposalProvider();
45: if (provider instanceof TypeContentProposalProvider) {
46: // Reset state related information used for filtering existing proposals
47: ((TypeContentProposalProvider) provider).reset();
48: }
49: }
50:
51: /* (non-Javadoc)
52: * @see org.eclipse.jface.fieldassist.IContentProposalListener2#proposalPopupOpened(org.eclipse.jface.fieldassist.ContentProposalAdapter)
53: */
54: public void proposalPopupOpened(ContentProposalAdapter adapter) {
55: // NO-OP
56: }
57:
58: }
|