Mercurial > projects > dwt-addons
annotate dwtx/jface/text/hyperlink/IHyperlinkPresenter.d @ 192:c3583c6ec027
Added missing default cases for switch statements
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 03 Nov 2008 22:52:26 +0100 |
parents | 93a6ec48fd28 |
children |
rev | line source |
---|---|
129 | 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 dwtx.jface.text.hyperlink.IHyperlinkPresenter; | |
14 | |
131 | 15 import dwtx.jface.text.hyperlink.IHyperlinkPresenterExtension; // packageimport |
16 import dwtx.jface.text.hyperlink.MultipleHyperlinkPresenter; // packageimport | |
17 import dwtx.jface.text.hyperlink.HyperlinkManager; // packageimport | |
18 import dwtx.jface.text.hyperlink.URLHyperlink; // packageimport | |
19 import dwtx.jface.text.hyperlink.IHyperlinkDetectorExtension2; // packageimport | |
20 import dwtx.jface.text.hyperlink.IHyperlinkDetector; // packageimport | |
21 import dwtx.jface.text.hyperlink.URLHyperlinkDetector; // packageimport | |
22 import dwtx.jface.text.hyperlink.DefaultHyperlinkPresenter; // packageimport | |
23 import dwtx.jface.text.hyperlink.AbstractHyperlinkDetector; // packageimport | |
24 import dwtx.jface.text.hyperlink.IHyperlinkDetectorExtension; // packageimport | |
25 import dwtx.jface.text.hyperlink.HyperlinkMessages; // packageimport | |
26 import dwtx.jface.text.hyperlink.IHyperlink; // packageimport | |
27 | |
28 | |
129 | 29 import dwt.dwthelper.utils; |
30 | |
31 import dwtx.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 dwtx.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 */ | |
139
93a6ec48fd28
Regexp throws removal in interfaces
Frank Benoit <benoit@tionex.de>
parents:
131
diff
changeset
|
75 void showHyperlinks(IHyperlink[] hyperlinks) ; |
129 | 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 } |