22 lines
507 B
INI
22 lines
507 B
INI
action: SwitchHeaderAndImpl
|
|
label: _Switch Header And Implementation
|
|
options: need-file
|
|
lang: C
|
|
h_ext = ['.h', '.hh', '.hpp', '.hxx', '.H'];
|
|
c_ext = ['.c', '.cc', '.cpp', '.cxx', '.C'];
|
|
new = none;
|
|
if doc.ext in h_ext then
|
|
new = c_ext;
|
|
elif doc.ext in c_ext then
|
|
new = h_ext;
|
|
else
|
|
return;
|
|
fi;
|
|
for e in new do
|
|
file = doc.dir + '/' + doc.base + e;
|
|
if FileExists(file) then
|
|
Open(file);
|
|
return;
|
|
fi;
|
|
od;
|