Open Opposite (Alt-O) - what did it suppose to do?

Started by Arthur, August 04, 2009, 10:20:06 PM

Previous topic - Next topic

Arthur

Open Opposite (Alt-O) - what did it suppose to do?

alex

Hi Arthur,

Open Opposite - opens pair file. It is not relevant to all syntaxes, but for that which has pair file mask maintained (fex C++, header and implementation files):
      <FilePattern mask="*.c;*.cpp;*.cxx;*.hpp;*.hxx;*.inl;*.h">
        <Pair file1="*.cpp" file2="*.h"/>
        <Pair file1="*.cxx" file2="*.h"/>
        <Pair file1="*.cxx" file2="*.hpp"/>
        <Pair file1="*.inl" file2="*.h"/>
        <Pair file1="*.c" file2="*.h"/>
        <Pair file1="*.cc" file2="*.hh"/>
      </FilePattern>


How it works: if you have file test.cpp open and press Open Opposite HE would try to open file test.h, if you do the same with test.h would be open test.cpp. And so on for all combinations of pairs. Maybe for Visual Basic it can be vb file and *.frm file, but name (without extension) should match. If somebody knows cases where logic can be reused or beautified, share it and would do my best ;)

Best regards,
Alex.
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]

Arthur

Got it, thank you, it is an interesting piece of previously unknown to me functionality!
I suggest it be named differently, the reflect its purpose, perhaps say Open Related File?

alex

Yes, you are right. It was called like this because of the same name used in Visual Assist.
But now I see that they have also renamed it to Open Corresponding File, so maybe because of the consistency I would take same name.
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]