Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1329)

Unified Diff: sdk/lib/html/scripts/generator.py

Issue 11365019: Merging dart:html interfaces and implementations (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixing merged classes in dartium not compiling under dartc. Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/_internal/dartdoc/lib/dartdoc.dart ('k') | sdk/lib/html/scripts/htmldartgenerator.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/html/scripts/generator.py
diff --git a/sdk/lib/html/scripts/generator.py b/sdk/lib/html/scripts/generator.py
index a7332a9e5ba5882f4b1f143d258a8147262bbed1..2126d9ac706ad945213ed3a877a71d8141e2a88f 100644
--- a/sdk/lib/html/scripts/generator.py
+++ b/sdk/lib/html/scripts/generator.py
@@ -445,9 +445,6 @@ def TypeName(type_ids, interface):
# Dynamically type this field for now.
return 'dynamic'
-def ImplementationClassNameForInterfaceName(interface_name):
- return '_%sImpl' % interface_name
-
# ------------------------------------------------------------------------------
class Conversion(object):
@@ -686,14 +683,14 @@ class InterfaceIDLTypeInfo(IDLTypeInfo):
if self.idl_type() == 'NodeList':
return 'List<Node>'
if self.list_item_type():
- return ImplementationClassNameForInterfaceName(self.idl_type())
+ return self.idl_type()
# TODO(podivilov): only primitive and collection types should override
# dart_type.
if self._data.dart_type != None:
return self.dart_type()
if IsPureInterface(self.idl_type()):
return self.idl_type()
- return ImplementationClassNameForInterfaceName(self.interface_name())
+ return self.interface_name()
def interface_name(self):
if self.list_item_type() and not self.has_generated_interface():
@@ -702,11 +699,15 @@ class InterfaceIDLTypeInfo(IDLTypeInfo):
def implementation_name(self):
if self.list_item_type():
- return ImplementationClassNameForInterfaceName(self.idl_type())
- implementation_name = ImplementationClassNameForInterfaceName(
- self.interface_name())
+ implementation_name = self.idl_type()
+ else:
+ implementation_name = self.interface_name()
if self.merged_into():
implementation_name = '%s_Merged' % implementation_name
+
+ if not self.has_generated_interface():
+ implementation_name = '_%s' % implementation_name
+
return implementation_name
def has_generated_interface(self):
« no previous file with comments | « sdk/lib/_internal/dartdoc/lib/dartdoc.dart ('k') | sdk/lib/html/scripts/htmldartgenerator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698