30 lines
658 B
INI
30 lines
658 B
INI
action: SwitchHeaderAndImpl
|
|
label: _Switch Header And Implementation
|
|
options: need-file
|
|
lang: C, GAP
|
|
extensions = [[['.h', '.hh', '.hpp', '.hxx', '.H'], ['.c', '.cc', '.cpp', '.cxx', '.C']],
|
|
[['.gd'], ['.gi']]];
|
|
new = none;
|
|
|
|
for p in extensions do
|
|
if doc.ext in p[0] then
|
|
new = p[1];
|
|
break;
|
|
elif doc.ext in p[1] then
|
|
new = p[0];
|
|
break;
|
|
fi;
|
|
od;
|
|
|
|
if not new then
|
|
return;
|
|
fi;
|
|
|
|
for e in new do
|
|
file = doc.dir + '/' + doc.base + e;
|
|
if FileExists(file) then
|
|
Open(file);
|
|
return;
|
|
fi;
|
|
od;
|