Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKai Maetzel2002-11-21 17:38:11 +0000
committerKai Maetzel2002-11-21 17:38:11 +0000
commitdaba54fd4f19bbb73bfda35c2618cbde03b99ad7 (patch)
tree6434013cdc9c9b6ef31237073bb444e7d5f8994b /org.eclipse.jface.text/src/org/eclipse/jface/text/information
parentcd90391c59c1a49a44f94912a4fd5df4faf55459 (diff)
downloadeclipse.platform.text-daba54fd4f19bbb73bfda35c2618cbde03b99ad7.tar.gz
eclipse.platform.text-daba54fd4f19bbb73bfda35c2618cbde03b99ad7.tar.xz
eclipse.platform.text-daba54fd4f19bbb73bfda35c2618cbde03b99ad7.zip
*** empty log message ***
Diffstat (limited to 'org.eclipse.jface.text/src/org/eclipse/jface/text/information')
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/information/IInformationProvider.java2
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/information/IInformationProviderExtension.java2
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/information/InformationPresenter.java7
3 files changed, 6 insertions, 5 deletions
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/information/IInformationProvider.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/information/IInformationProvider.java
index e9be43fdac1..176e80d5656 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/information/IInformationProvider.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/information/IInformationProvider.java
@@ -48,7 +48,7 @@ public interface IInformationProvider {
* @param subject the text region constituting the information subject
* @return the information about the subject
* @see IInformationPresenter
+ * @deprecated As of 2.1, replaced by {@link IInformationProviderExtension#getInformation2(ITextViewer, IRegion)}
*/
String getInformation(ITextViewer textViewer, IRegion subject);
}
-
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/information/IInformationProviderExtension.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/information/IInformationProviderExtension.java
index ad68e589ed9..c61244d797a 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/information/IInformationProviderExtension.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/information/IInformationProviderExtension.java
@@ -38,5 +38,5 @@ public interface IInformationProviderExtension {
* @see IInformationProvider#getInformation(ITextViewer, IRegion)
* @see org.eclipse.jface.text.ITextViewer
*/
- Object getElement(ITextViewer textViewer, IRegion subject);
+ Object getInformation2(ITextViewer textViewer, IRegion subject);
}
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/information/InformationPresenter.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/information/InformationPresenter.java
index 0d1c7c55952..4360fe922d5 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/information/InformationPresenter.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/information/InformationPresenter.java
@@ -294,9 +294,10 @@ public class InformationPresenter extends AbstractInformationControlManager impl
if (subject == null)
return;
- if (provider instanceof IInformationProviderExtension)
- setInformation(((IInformationProviderExtension)provider).getElement(fTextViewer, subject), computeArea(subject));
- else
+ if (provider instanceof IInformationProviderExtension) {
+ IInformationProviderExtension extension= (IInformationProviderExtension) provider;
+ setInformation(extension.getInformation2(fTextViewer, subject), computeArea(subject));
+ } else
setInformation(provider.getInformation(fTextViewer, subject), computeArea(subject));
}

Back to the top