Commit 12af5221 authored by thestig's avatar thestig Committed by Commit bot

grit: Reorganize and compact resource_ids.

BUG=585301

Review-Url: https://codereview.chromium.org/2429213007
Cr-Commit-Position: refs/heads/master@{#427236}
parent abfc7f7c
...@@ -12,6 +12,7 @@ import re ...@@ -12,6 +12,7 @@ import re
from functools import partial from functools import partial
from grit import util from grit import util
from grit.format import rc_header
from grit.node import misc from grit.node import misc
...@@ -448,8 +449,10 @@ def FormatInclude(item, lang, output_dir, type=None, process_html=False): ...@@ -448,8 +449,10 @@ def FormatInclude(item, lang, output_dir, type=None, process_html=False):
if isinstance(item, structure.StructureNode) and item.IsExcludedFromRc(): if isinstance(item, structure.StructureNode) and item.IsExcludedFromRc():
return '' return ''
else:
return '%-18s %-18s "%s"\n' % (item.attrs['name'], type, filename) name = item.attrs['name']
item_id = rc_header.GetIds(item.GetRoot())[name]
return '// ID: %d\n%-18s %-18s "%s"\n' % (item_id, name, type, filename)
def _DoNotFormat(item, lang, output_dir): def _DoNotFormat(item, lang, output_dir):
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment