インポート/エクスポート ウィザードは、シンボル定義を処理できます。File->Import を使用し、C/C++ Project Settings を選択します。
インポート ウィザードで必要な XML 形式は、アクティブなシンボルのテキスト ファイルから、簡単な使い捨てスクリプトで作成できます。
次の python スクリプトを使用しました。
#
# Tool to import a list of defined symbols into Eclipse IDE for code highlighting.
#
# Takes a _cdef.txt file (generated during library build) and converts to an XML file
# suitable for import into Eclipse
# Use stdin and stdout for input and output.
import sys
import string
header = [
'<?xml version="1.0" encoding="UTF-8"?>',
'<cdtprojectproperties>'
,
'<section name="org.eclipse.cdt.internal.ui.wizards.settingswizards.Macros">',
'<language name="holder for library settings">',
'',
'</language>',
'<language name="GNU C++">',
'',
'</language>',
'<language name="GNU C">',
''
]
sys.stdout.write (string.join(header, '\n'))
text=sys.stdin.readlines()
tokens = string.split(string.strip(text[0]),',')
for curtok in tokens:
lines = ['<macro>',
'<name>' + string.strip(curtok) + '</name><value></value>',
'</macro>', '']
sys.stdout.write(string.join(lines, '\n'))
footer = [
'',
'</language>',
'<language name="Assembly">',
'',
'</language>',
'</section>',
'</cdtprojectproperties>',
'']
sys.stdout.write (string.join(footer, '\n'))
スクリプトへの入力は、カンマで区切られたアクティブ シンボルをすべて最初の行に含むテキスト ファイルです。