comparison org.eclipse.jface.text/src/org/eclipse/jface/text/hyperlink/IHyperlinkPresenter.d @ 12:bc29606a740c

Added dwt-addons in original directory structure of eclipse.org
author Frank Benoit <benoit@tionex.de>
date Sat, 14 Mar 2009 18:23:29 +0100
parents
children
comparison
equal deleted inserted replaced
11:43904fec5dca 12:bc29606a740c
1 /*******************************************************************************
2 * Copyright (c) 2000, 2008 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
7 *
8 * Contributors:
9 * IBM Corporation - initial API and implementation
10 * Port to the D programming language:
11 * Frank Benoit <benoit@tionex.de>
12 *******************************************************************************/
13 module org.eclipse.jface.text.hyperlink.IHyperlinkPresenter;
14
15 import org.eclipse.jface.text.hyperlink.IHyperlinkPresenterExtension; // packageimport
16 import org.eclipse.jface.text.hyperlink.MultipleHyperlinkPresenter; // packageimport
17 import org.eclipse.jface.text.hyperlink.HyperlinkManager; // packageimport
18 import org.eclipse.jface.text.hyperlink.URLHyperlink; // packageimport
19 import org.eclipse.jface.text.hyperlink.IHyperlinkDetectorExtension2; // packageimport
20 import org.eclipse.jface.text.hyperlink.IHyperlinkDetector; // packageimport
21 import org.eclipse.jface.text.hyperlink.URLHyperlinkDetector; // packageimport
22 import org.eclipse.jface.text.hyperlink.DefaultHyperlinkPresenter; // packageimport
23 import org.eclipse.jface.text.hyperlink.AbstractHyperlinkDetector; // packageimport
24 import org.eclipse.jface.text.hyperlink.IHyperlinkDetectorExtension; // packageimport
25 import org.eclipse.jface.text.hyperlink.HyperlinkMessages; // packageimport
26 import org.eclipse.jface.text.hyperlink.IHyperlink; // packageimport
27
28
29 import java.lang.all;
30
31 import org.eclipse.jface.text.ITextViewer;
32
33
34 /**
35 * A hyperlink presenter shows hyperlinks on the installed text viewer
36 * and allows to pick one on of the hyperlinks.
37 * <p>
38 * In order to provide backward compatibility for clients of <code>IHyperlinkDetector</code>, extension
39 * interfaces are used to provide a means of evolution. The following extension interfaces exist:
40 * <ul>
41 * <li>{@link IHyperlinkPresenterExtension} since version 3.4,
42 * adds the ability to query whether the currently shown hyperlinks
43 * can be hidden.
44 * </li>
45 * </ul></p>
46 * <p>
47 * Clients may implement this interface. A default implementation is provided
48 * through {@link org.eclipse.jface.text.hyperlink.DefaultHyperlinkPresenter}.
49 * </p>
50 *
51 * @see IHyperlinkPresenterExtension
52 * @since 3.1
53 */
54 public interface IHyperlinkPresenter {
55
56 /**
57 * Tells whether this presenter is able to handle
58 * more than one hyperlink.
59 *
60 * @return <code>true</code> if this presenter can handle more than one hyperlink
61 */
62 bool canShowMultipleHyperlinks();
63
64 /**
65 * Tells this hyperlink presenter to show the given
66 * hyperlinks on the installed text viewer.
67 *
68 * @param hyperlinks the hyperlinks to show
69 * @throws IllegalArgumentException if
70 * <ul>
71 * <li><code>hyperlinks</code> is empty</li>
72 * <li>{@link #canShowMultipleHyperlinks()} returns <code>false</code> and <code>hyperlinks</code> contains more than one element</li>
73 * </ul>
74 */
75 void showHyperlinks(IHyperlink[] hyperlinks) ;
76
77 /**
78 * Tells this hyperlink presenter to hide the hyperlinks
79 * requested to be shown by {@link #showHyperlinks(IHyperlink[])}.
80 */
81 void hideHyperlinks();
82
83 /**
84 * Installs this hyperlink presenter on the given text viewer.
85 *
86 * @param textViewer the text viewer
87 */
88 void install(ITextViewer textViewer);
89
90 /**
91 * Uninstalls this hyperlink presenter.
92 */
93 void uninstall();
94 }