|
From: LaurentAKEO <gir...@ak...> - 2009-02-10 18:04:41
|
thank you for Linefilter.bsh all is OK !
Michael Michaud a écrit :
> Hi,
>
> I often use the macro called LineFilter and it works fine.
> From the description, both macros seem very similar.
>
> @Laurent : as-tu essayé la macro qui s'appelle LineFilter. Elle semble
> faire à peu près la même chose et marche plutôt bien.
>
> Michaël
>
> Alan Ezust a écrit :
>> doh. someone needs to update that macro to use java.util.regex.
>>
>>
>> On Sun, Feb 8, 2009 at 11:12 AM, LaurentAKEO
>> <gir...@ak...> wrote:
>>
>>> hello,
>>>
>>> with jedit 4.3 pre16 on linux Ubuntu 8.10
>>>
>>> I can't use the macro "Grep-like-Macro" /Grep_Buffer.bsh
>>>
>>> i have an error message?
>>>
>>> Can you help me please?
>>>
>>> see the error message below
>>>
>>> Sourced file:
>>> /home/laurent/.jedit/macros/Grep-like-Macro/Grep_Buffer.bsh : Class or
>>> variable not found: RESearchMatcher.RE_SYNTAX_JEDIT : at Line: 32 : in
>>> file: /home/laurent/.jedit/macros/Grep-like-Macro/Grep_Buffer.bsh :
>>> RESearchMatcher .RE_SYNTAX_JEDIT
>>>
>>> the Macro below:
>>>
>>> *******************************
>>>
>>> import gnu.regexp.RE;
>>>
>>> RE re = null;
>>> String regexp = Macros.input(view, "Regular Expression");
>>> if(regexp == null)
>>> {
>>> return;
>>> }
>>> try
>>> {
>>> re = new RE(regexp, 0, RESearchMatcher.RE_SYNTAX_JEDIT);
>>> }
>>> catch(REException e)
>>> {
>>> Macros.error(view, "Invalid regular expression");
>>> return;
>>> }
>>> StringBuffer buf = new StringBuffer();
>>> for(int i = 0; i < textArea.getLineCount(); i++)
>>> {
>>> String line = textArea.getLineText(i);
>>> if(re.getMatch(line) != null)
>>> {
>>> buf.append(line).append('\n');
>>> }
>>> }
>>> if(buf.length() > 0)
>>> {
>>> jEdit.newFile(view);
>>> textArea.setSelectedText(buf.toString());
>>> }
>>> else
>>> {
>>> Macros.message(view, "No matching lines in this buffer");
>>> }
>>> ******************************************************************
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>>
>>> Create and Deploy Rich Internet Apps outside the browser with
>>> Adobe(R)AIR(TM)
>>> software. With Adobe AIR, Ajax developers can use existing skills
>>> and code to
>>> build responsive, highly engaging applications that combine the
>>> power of local
>>> resources and data with the reach of the web. Download the Adobe AIR
>>> SDK and
>>> Ajax docs to start building applications
>>> today-http://p.sf.net/sfu/adobe-com
>>> --
>>> -----------------------------------------------
>>> jEdit Users' List
>>> jEd...@li...
>>> https://lists.sourceforge.net/lists/listinfo/jedit-users
>>>
>>>
>>
>> ------------------------------------------------------------------------------
>>
>> Create and Deploy Rich Internet Apps outside the browser with
>> Adobe(R)AIR(TM)
>> software. With Adobe AIR, Ajax developers can use existing skills and
>> code to
>> build responsive, highly engaging applications that combine the power
>> of local
>> resources and data with the reach of the web. Download the Adobe AIR
>> SDK and
>> Ajax docs to start building applications
>> today-http://p.sf.net/sfu/adobe-com
>>
>
>
|