#52 link to specific nodes in another map

open
nobody
None
5
2005-07-26
2005-07-26
Terry Brown
No

the patch pasted below is against 8.0rc5
freemind/modes/ControllerAdapter.java and changes
loadURL() behavior so that a LINK to ./foo.mm#somewhere
opens foo.mm and selects the node with id='somewhere',
rather than trying to open something in the web browser.

It's a simplistic approach, but it seems to work.

freemind> diff
freemind/freemind/modes/ControllerAdapter.java
freemind-src-0_8_0_rc5/freemind/modes/ControllerAdapter.java
56a57,58
> import java.util.regex.Pattern;
> import java.util.regex.Matcher;
1322a1325,1334
>
> Matcher choppy =
Pattern.compile("\\.[Mm][Mm]#").matcher(relative);
> if (choppy.find()) {
> //
System.out.println(relative.substring(0,choppy.end()-1));
> //
System.out.println(relative.substring(choppy.end()-1));
> loadURL(relative.substring(0,choppy.end()-1));
> loadURL(relative.substring(choppy.end()-1));
> return;
> }
>

Discussion

  • Terry Brown

    Terry Brown - 2005-07-26

    Logged In: YES
    user_id=1054627

    the System.out.println commans were supposed to be commented
    out, but that got broken when I pasted this in

     
  • Leonard (Canada)

    Logged In: YES
    user_id=1424620

    This was some info that I was looking for. I'm new to all of
    this GNU stuff and how it all works. To apply this patch,
    how do I go about applying it? Is there an executable
    available? Do I need to have some sort of editing console?

    Please let me know.

    Thanks in advance,
    Leonard

     

Log in to post a comment.