Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Highlight a text in an editor
Highlight a text in an editor [message #226436] Wed, 08 August 2007 16:53 Go to next message
Nir Z is currently offline Nir ZFriend
Messages: 9
Registered: July 2009
Junior Member
Hi,
I'm writing my own Editor.
after selecting text I want to highlight all its occurrences in the file
(just like the Java editor).

I don't have an IFile resource, only an IDocument.

any ideas ?
Re: Highlight a text in an editor [message #226629 is a reply to message #226436] Thu, 09 August 2007 12:29 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
Nir wrote:

> Hi,
> I'm writing my own Editor.
> after selecting text I want to highlight all its occurrences in the file
> (just like the Java editor).
>
> I don't have an IFile resource, only an IDocument.
>
> any ideas ?

Check the archive. This has been answered many times.

Dani
Re: Highlight a text in an editor [message #226638 is a reply to message #226629] Thu, 09 August 2007 12:43 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

This is a multi-part message in MIME format.
--------------030109050601090208040805
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Dani,

It would be good if folks were more easily directed for how to search
the archive as part of being directed where the newsgroup is located.
For example, wouldn't it be good if this link has a search button
*before *the write button?

http://www.eclipse.org/newsportal/thread.php?group=eclipse.n ewcomer

Then someone would be more inclined to do the following search rather
than ask a recurring question:

http://www.eclipse.org/search/search.cgi?q=highlight+text&am p;cmd=Search%21&form=extended&wf=574a74&ps=10&am p;m=all&t=5&ul=%2Fnewslists%2Fnews.eclipse.newcomer& amp;wm=wrd&t=News&t=Mail
< http://www.eclipse.org/search/search.cgi?q=highlight+text&am p;cmd=Search%21&form=extended&wf=574a74&ps=10&am p;m=all&t=5&ul=%2Fnewslists%2Fnews.eclipse.newcomer& amp;wm=wrd&t=News&t=Mail>

It would make sense for this page to encourage searching as well:

http://www.eclipse.org/newsgroups/

And for this page to include a link for searching before the link to the
newsgroup itself:
<http://www.eclipse.org/newsgroups/index_project.php>

http://www.eclipse.org/newsgroups/index_project.php

Do you think we should open a bugzilla feature request for the
website(s) to try to guide folks so that they will "search first and ask
questions later"?


Daniel Megert wrote:
> Nir wrote:
>
>> Hi,
>> I'm writing my own Editor.
>> after selecting text I want to highlight all its occurrences in the file
>> (just like the Java editor).
>>
>> I don't have an IFile resource, only an IDocument.
>>
>> any ideas ?
>
> Check the archive. This has been answered many times.
>
> Dani


--------------030109050601090208040805
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Dani,<br>
<br>
It would be good if folks were more easily directed for how to search
the archive as part of being directed where the newsgroup is located.
For example, wouldn't it be good if this link has a search button <b>before
</b>the write button?<br>
<blockquote><a class="moz-txt-link-freetext" href=" http://www.eclipse.org/newsportal/thread.php?group=eclipse.n ewcomer"> http://www.eclipse.org/newsportal/thread.php?group=eclipse.n ewcomer</a><br>
</blockquote>
Then someone would be more inclined to do the following search rather
than ask a recurring question:<br>
<blockquote><a
href=" http://www.eclipse.org/search/search.cgi?q=highlight+text&am p;amp ;cmd=Search%21&amp;form=extended&amp;wf=574a74&a mp;ps=10&amp;m=all&amp;t=5&amp;ul=%2Fnewslists%2 Fnews.eclipse.newcomer&amp;wm=wrd&amp;t=News&amp ;t=Mail "> http://www.eclipse.org/search/search.cgi?q=highlight+text&am p;amp ;cmd=Search%21&amp;form=extended&amp;wf=574a74&a mp;ps=10&amp;m=all&amp;t=5&amp;ul=%2Fnewslists%2 Fnews.eclipse.newcomer&amp;wm=wrd&amp;t=News&amp ;t=Mail </a><br>
</blockquote>
It would make sense for this page to encourage searching as well:<br>
<blockquote><a href="http://www.eclipse.org/newsgroups/">http://www.eclipse.org/newsgroups/</a><br>
</blockquote>
And for this page to include a link for searching before the link to
the newsgroup itself:<a
href="http://www.eclipse.org/newsgroups/index_project.php"><br>
</a>
<blockquote><a
href="http://www.eclipse.org/newsgroups/index_project.php">http://www.eclipse.org/newsgroups/index_project.php</a><br>
</blockquote>
Do you think we should open a bugzilla feature request for the
website(s) to try to guide folks so that they will "search first and
ask questions later"?<br>
<br>
<br>
Daniel Megert wrote:
<blockquote cite="mid:f9f1cf$cc0$1@build.eclipse.org" type="cite">Nir
wrote:
<br>
<br>
<blockquote type="cite">Hi,
<br>
I'm writing my own Editor.
<br>
after selecting text I want to highlight all its occurrences in the
file
<br>
(just like the Java editor).
<br>
<br>
I don't have an IFile resource, only an IDocument.
<br>
<br>
any ideas ?
<br>
</blockquote>
<br>
Check the archive. This has been answered many times.
<br>
<br>
Dani
<br>
</blockquote>
<br>
</body>
</html>

--------------030109050601090208040805--
Re: Highlight a text in an editor [message #226655 is a reply to message #226638] Thu, 09 August 2007 13:00 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
Ed Merks wrote:

> Dani,
>
> It would be good if folks were more easily directed for how to search
> the archive as part of being directed where the newsgroup is located.
> For example, wouldn't it be good if this link has a search button
> *before *the write button?
>
> http://www.eclipse.org/newsportal/thread.php?group=eclipse.n ewcomer
>
> Then someone would be more inclined to do the following search rather
> than ask a recurring question:
>
> http://www.eclipse.org/search/search.cgi?q=highlight+text&am p;cmd=Search%21&form=extended&wf=574a74&ps=10&am p;m=all&t=5&ul=%2Fnewslists%2Fnews.eclipse.newcomer& amp;wm=wrd&t=News&t=Mail
> < http://www.eclipse.org/search/search.cgi?q=highlight+text&am p;cmd=Search%21&form=extended&wf=574a74&ps=10&am p;m=all&t=5&ul=%2Fnewslists%2Fnews.eclipse.newcomer& amp;wm=wrd&t=News&t=Mail>
>
> It would make sense for this page to encourage searching as well:
>
> http://www.eclipse.org/newsgroups/
>
> And for this page to include a link for searching before the link to
> the newsgroup itself:
> <http://www.eclipse.org/newsgroups/index_project.php>
>
> http://www.eclipse.org/newsgroups/index_project.php
>
> Do you think we should open a bugzilla feature request for the
> website(s) to try to guide folks so that they will "search first and
> ask questions later"?

That wouldn't hurt ;-)

Dani

>
>
> Daniel Megert wrote:
>
>> Nir wrote:
>>
>>> Hi,
>>> I'm writing my own Editor.
>>> after selecting text I want to highlight all its occurrences in the
>>> file
>>> (just like the Java editor).
>>>
>>> I don't have an IFile resource, only an IDocument.
>>>
>>> any ideas ?
>>
>>
>> Check the archive. This has been answered many times.
>>
>> Dani
>
>
Re: Highlight a text in an editor [message #226668 is a reply to message #226655] Thu, 09 August 2007 13:20 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Dani,

I opened https://bugs.eclipse.org/bugs/show_bug.cgi?id=199419


Daniel Megert wrote:
> Ed Merks wrote:
>
>> Dani,
>>
>> It would be good if folks were more easily directed for how to search
>> the archive as part of being directed where the newsgroup is located.
>> For example, wouldn't it be good if this link has a search button
>> *before *the write button?
>>
>> http://www.eclipse.org/newsportal/thread.php?group=eclipse.n ewcomer
>>
>> Then someone would be more inclined to do the following search rather
>> than ask a recurring question:
>>
>>
>> http://www.eclipse.org/search/search.cgi?q=highlight+text&am p;cmd=Search%21&form=extended&wf=574a74&ps=10&am p;m=all&t=5&ul=%2Fnewslists%2Fnews.eclipse.newcomer& amp;wm=wrd&t=News&t=Mail
>>
>>
>> < http://www.eclipse.org/search/search.cgi?q=highlight+text&am p;cmd=Search%21&form=extended&wf=574a74&ps=10&am p;m=all&t=5&ul=%2Fnewslists%2Fnews.eclipse.newcomer& amp;wm=wrd&t=News&t=Mail>
>>
>>
>> It would make sense for this page to encourage searching as well:
>>
>> http://www.eclipse.org/newsgroups/
>>
>> And for this page to include a link for searching before the link to
>> the newsgroup itself:
>> <http://www.eclipse.org/newsgroups/index_project.php>
>>
>> http://www.eclipse.org/newsgroups/index_project.php
>>
>> Do you think we should open a bugzilla feature request for the
>> website(s) to try to guide folks so that they will "search first and
>> ask questions later"?
>
> That wouldn't hurt ;-)
>
> Dani
>
>>
>>
>> Daniel Megert wrote:
>>
>>> Nir wrote:
>>>
>>>> Hi,
>>>> I'm writing my own Editor.
>>>> after selecting text I want to highlight all its occurrences in the
>>>> file
>>>> (just like the Java editor).
>>>>
>>>> I don't have an IFile resource, only an IDocument.
>>>>
>>>> any ideas ?
>>>
>>>
>>> Check the archive. This has been answered many times.
>>>
>>> Dani
>>
>>
Re: Highlight a text in an editor [message #226793 is a reply to message #226668] Thu, 09 August 2007 19:25 Go to previous messageGo to next message
Nir Z is currently offline Nir ZFriend
Messages: 9
Registered: July 2009
Junior Member
Ed Merks wrote:

> Dani,

> I opened https://bugs.eclipse.org/bugs/show_bug.cgi?id=199419


> Daniel Megert wrote:
>> Ed Merks wrote:
>>
>>> Dani,
>>>
>>> It would be good if folks were more easily directed for how to search
>>> the archive as part of being directed where the newsgroup is located.
>>> For example, wouldn't it be good if this link has a search button
>>> *before *the write button?
>>>
>>> http://www.eclipse.org/newsportal/thread.php?group=eclipse.n ewcomer
>>>
>>> Then someone would be more inclined to do the following search rather
>>> than ask a recurring question:
>>>
>>>
>>>
http://www.eclipse.org/search/search.cgi?q=highlight+text&am p;cmd=Search%21&form=extended&wf=574a74&ps=10&am p;m=all&t=5&ul=%2Fnewslists%2Fnews.eclipse.newcomer& amp;wm=wrd&t=News&t=Mail
>>>
>>>
>>>
< http://www.eclipse.org/search/search.cgi?q=highlight+text&am p;cmd=Search%21&form=extended&wf=574a74&ps=10&am p;m=all&t=5&ul=%2Fnewslists%2Fnews.eclipse.newcomer& amp;wm=wrd&t=News&t=Mail>
>>>
>>>
>>> It would make sense for this page to encourage searching as well:
>>>
>>> http://www.eclipse.org/newsgroups/
>>>
>>> And for this page to include a link for searching before the link to
>>> the newsgroup itself:
>>> <http://www.eclipse.org/newsgroups/index_project.php>
>>>
>>> http://www.eclipse.org/newsgroups/index_project.php
>>>
>>> Do you think we should open a bugzilla feature request for the
>>> website(s) to try to guide folks so that they will "search first and
>>> ask questions later"?
>>
>> That wouldn't hurt ;-)
>>
>> Dani
>>
>>>
>>>
>>> Daniel Megert wrote:
>>>
>>>> Nir wrote:
>>>>
>>>>> Hi,
>>>>> I'm writing my own Editor.
>>>>> after selecting text I want to highlight all its occurrences in the
>>>>> file
>>>>> (just like the Java editor).
>>>>>
>>>>> I don't have an IFile resource, only an IDocument.
>>>>>
>>>>> any ideas ?
>>>>
>>>>
>>>> Check the archive. This has been answered many times.
>>>>
>>>> Dani
>>>
>>>

I know about the search system,
yet I couldn't find any useful information there.

all I saw there was a suggestion to use annotation, but from what I gather
annotations are on the side ruler and I want to mark the text itself.

so, does anyone know how to do this without annotations ?
(or have an example of how to do this with annotations)

thanks.
Re: Highlight a text in an editor [message #228726 is a reply to message #226793] Wed, 22 August 2007 09:33 Go to previous message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
Nir wrote:

> Ed Merks wrote:
>
>> Dani,
>
>
>> I opened https://bugs.eclipse.org/bugs/show_bug.cgi?id=199419
>
>
>
>> Daniel Megert wrote:
>>
>>> Ed Merks wrote:
>>>
>>>> Dani,
>>>>
>>>> It would be good if folks were more easily directed for how to
>>>> search the archive as part of being directed where the newsgroup is
>>>> located. For example, wouldn't it be good if this link has a search
>>>> button *before *the write button?
>>>>
>>>>
>>>> http://www.eclipse.org/newsportal/thread.php?group=eclipse.n ewcomer
>>>>
>>>> Then someone would be more inclined to do the following search
>>>> rather than ask a recurring question:
>>>>
>>>>
>>>
> http://www.eclipse.org/search/search.cgi?q=highlight+text&am p;cmd=Search%21&form=extended&wf=574a74&ps=10&am p;m=all&t=5&ul=%2Fnewslists%2Fnews.eclipse.newcomer& amp;wm=wrd&t=News&t=Mail
>
>
>>>>
>>>>
>>>
> < http://www.eclipse.org/search/search.cgi?q=highlight+text&am p;cmd=Search%21&form=extended&wf=574a74&ps=10&am p;m=all&t=5&ul=%2Fnewslists%2Fnews.eclipse.newcomer& amp;wm=wrd&t=News&t=Mail>
>
>
>>>>
>>>>
>>>> It would make sense for this page to encourage searching as well:
>>>>
>>>> http://www.eclipse.org/newsgroups/
>>>>
>>>> And for this page to include a link for searching before the link
>>>> to the newsgroup itself:
>>>> <http://www.eclipse.org/newsgroups/index_project.php>
>>>>
>>>> http://www.eclipse.org/newsgroups/index_project.php
>>>>
>>>> Do you think we should open a bugzilla feature request for the
>>>> website(s) to try to guide folks so that they will "search first
>>>> and ask questions later"?
>>>
>>>
>>> That wouldn't hurt ;-)
>>>
>>> Dani
>>>
>>>>
>>>>
>>>> Daniel Megert wrote:
>>>>
>>>>> Nir wrote:
>>>>>
>>>>>> Hi,
>>>>>> I'm writing my own Editor.
>>>>>> after selecting text I want to highlight all its occurrences in
>>>>>> the file
>>>>>> (just like the Java editor).
>>>>>>
>>>>>> I don't have an IFile resource, only an IDocument.
>>>>>>
>>>>>> any ideas ?
>>>>>
>>>>>
>>>>>
>>>>> Check the archive. This has been answered many times.
>>>>>
>>>>> Dani
>>>>
>>>>
>>>>
>
> I know about the search system, yet I couldn't find any useful
> information there.
>
> all I saw there was a suggestion to use annotation, but from what I
> gather annotations are on the side ruler and I want to mark the text
> itself.

Wrong. Annotations are on the document and can appear at many different
places, e.g. inside text like the warning and error squiggles.

Dani

>
> so, does anyone know how to do this without annotations ?
> (or have an example of how to do this with annotations)
>
> thanks.
>
>
>
>
>
>
Previous Topic:New Install: Eclipse
Next Topic:possible END key handling bug in Eclipse?
Goto Forum:
  


Current Time: Fri Apr 26 13:25:55 GMT 2024

Powered by FUDForum. Page generated in 0.08690 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top