Web Inspector: generated code should use a framework-style import for *ProtocolArrayC...
authorbburg@apple.com <bburg@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 2 Dec 2016 00:52:22 +0000 (00:52 +0000)
committerbburg@apple.com <bburg@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 2 Dec 2016 00:52:22 +0000 (00:52 +0000)
https://bugs.webkit.org/show_bug.cgi?id=165281
<rdar://problem/29427778>

Reviewed by Joseph Pecoraro.

* inspector/scripts/codegen/generate_objc_protocol_type_conversions_header.py:
(ObjCProtocolTypeConversionsHeaderGenerator.generate_output):
* inspector/scripts/tests/expected/commands-with-async-attribute.json-result:
* inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result:
* inspector/scripts/tests/expected/domains-with-varying-command-sizes.json-result:
* inspector/scripts/tests/expected/enum-values.json-result:
* inspector/scripts/tests/expected/events-with-optional-parameters.json-result:
* inspector/scripts/tests/expected/generate-domains-with-feature-guards.json-result:
* inspector/scripts/tests/expected/same-type-id-different-domain.json-result:
* inspector/scripts/tests/expected/shadowed-optional-type-setters.json-result:
* inspector/scripts/tests/expected/type-declaration-aliased-primitive-type.json-result:
* inspector/scripts/tests/expected/type-declaration-array-type.json-result:
* inspector/scripts/tests/expected/type-declaration-enum-type.json-result:
* inspector/scripts/tests/expected/type-declaration-object-type.json-result:
* inspector/scripts/tests/expected/type-requiring-runtime-casts.json-result:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209222 268f45cc-cd09-0410-ab3c-d52691b4dbfc

15 files changed:
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_protocol_type_conversions_header.py
Source/JavaScriptCore/inspector/scripts/tests/expected/commands-with-async-attribute.json-result
Source/JavaScriptCore/inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result
Source/JavaScriptCore/inspector/scripts/tests/expected/domains-with-varying-command-sizes.json-result
Source/JavaScriptCore/inspector/scripts/tests/expected/enum-values.json-result
Source/JavaScriptCore/inspector/scripts/tests/expected/events-with-optional-parameters.json-result
Source/JavaScriptCore/inspector/scripts/tests/expected/generate-domains-with-feature-guards.json-result
Source/JavaScriptCore/inspector/scripts/tests/expected/same-type-id-different-domain.json-result
Source/JavaScriptCore/inspector/scripts/tests/expected/shadowed-optional-type-setters.json-result
Source/JavaScriptCore/inspector/scripts/tests/expected/type-declaration-aliased-primitive-type.json-result
Source/JavaScriptCore/inspector/scripts/tests/expected/type-declaration-array-type.json-result
Source/JavaScriptCore/inspector/scripts/tests/expected/type-declaration-enum-type.json-result
Source/JavaScriptCore/inspector/scripts/tests/expected/type-declaration-object-type.json-result
Source/JavaScriptCore/inspector/scripts/tests/expected/type-requiring-runtime-casts.json-result

index 53e0d78..d6a3922 100644 (file)
@@ -1,3 +1,27 @@
+2016-12-01  Brian Burg  <bburg@apple.com>
+
+        Web Inspector: generated code should use a framework-style import for *ProtocolArrayConversions.h
+        https://bugs.webkit.org/show_bug.cgi?id=165281
+        <rdar://problem/29427778>
+
+        Reviewed by Joseph Pecoraro.
+
+        * inspector/scripts/codegen/generate_objc_protocol_type_conversions_header.py:
+        (ObjCProtocolTypeConversionsHeaderGenerator.generate_output):
+        * inspector/scripts/tests/expected/commands-with-async-attribute.json-result:
+        * inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result:
+        * inspector/scripts/tests/expected/domains-with-varying-command-sizes.json-result:
+        * inspector/scripts/tests/expected/enum-values.json-result:
+        * inspector/scripts/tests/expected/events-with-optional-parameters.json-result:
+        * inspector/scripts/tests/expected/generate-domains-with-feature-guards.json-result:
+        * inspector/scripts/tests/expected/same-type-id-different-domain.json-result:
+        * inspector/scripts/tests/expected/shadowed-optional-type-setters.json-result:
+        * inspector/scripts/tests/expected/type-declaration-aliased-primitive-type.json-result:
+        * inspector/scripts/tests/expected/type-declaration-array-type.json-result:
+        * inspector/scripts/tests/expected/type-declaration-enum-type.json-result:
+        * inspector/scripts/tests/expected/type-declaration-object-type.json-result:
+        * inspector/scripts/tests/expected/type-requiring-runtime-casts.json-result:
+
 2016-12-01  Geoffrey Garen  <ggaren@apple.com>
 
         SourceCodeKey should use unlinked source code
index 5f59813..55dabf4 100755 (executable)
@@ -30,7 +30,7 @@ import string
 from string import Template
 
 from generator import Generator
-from models import EnumType
+from models import EnumType, Frameworks
 from objc_generator import ObjCGenerator
 from objc_generator_templates import ObjCGeneratorTemplates as ObjCTemplates
 
@@ -56,7 +56,7 @@ class ObjCProtocolTypeConversionsHeaderGenerator(ObjCGenerator):
     def generate_output(self):
         headers = [
             '"%s.h"' % self.protocol_name(),
-            '"%sArrayConversions.h"' % ObjCGenerator.OBJC_STATIC_PREFIX,
+            Generator.string_for_file_include('%sArrayConversions.h' % ObjCGenerator.OBJC_STATIC_PREFIX, Frameworks.WebInspector, self.model().framework),
         ]
         headers.sort()
 
index 442d5cb..f18518b 100644 (file)
@@ -1416,8 +1416,8 @@ __attribute__((visibility ("default")))
 // DO NOT EDIT THIS FILE. It is automatically generated from commands-with-async-attribute.json
 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
 
-#import "RWIProtocolArrayConversions.h"
 #import "TestProtocol.h"
+#import <WebInspector/RWIProtocolArrayConversions.h>
 
 namespace Inspector {
 
index eb16820..4e670c6 100644 (file)
@@ -1271,8 +1271,8 @@ __attribute__((visibility ("default")))
 // DO NOT EDIT THIS FILE. It is automatically generated from commands-with-optional-call-return-parameters.json
 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
 
-#import "RWIProtocolArrayConversions.h"
 #import "TestProtocol.h"
+#import <WebInspector/RWIProtocolArrayConversions.h>
 
 namespace Inspector {
 
index 1fc8ee8..98e1ce6 100644 (file)
@@ -1258,8 +1258,8 @@ using namespace Inspector;
 // DO NOT EDIT THIS FILE. It is automatically generated from domains-with-varying-command-sizes.json
 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
 
-#import "RWIProtocolArrayConversions.h"
 #import "TestProtocol.h"
+#import <WebInspector/RWIProtocolArrayConversions.h>
 
 namespace Inspector {
 
index e033642..fa0553c 100644 (file)
@@ -1053,8 +1053,8 @@ __attribute__((visibility ("default")))
 // DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json
 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
 
-#import "RWIProtocolArrayConversions.h"
 #import "TestProtocol.h"
+#import <WebInspector/RWIProtocolArrayConversions.h>
 
 namespace Inspector {
 
index 52a2345..efa2126 100644 (file)
@@ -985,8 +985,8 @@ __attribute__((visibility ("default")))
 // DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json
 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
 
-#import "RWIProtocolArrayConversions.h"
 #import "TestProtocol.h"
+#import <WebInspector/RWIProtocolArrayConversions.h>
 
 namespace Inspector {
 
index 164887e..061c9e6 100644 (file)
@@ -1034,8 +1034,8 @@ __attribute__((visibility ("default")))
 // DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json
 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
 
-#import "RWIProtocolArrayConversions.h"
 #import "TestProtocol.h"
+#import <WebInspector/RWIProtocolArrayConversions.h>
 
 namespace Inspector {
 
index 37b2e28..8aed2b7 100644 (file)
@@ -753,8 +753,8 @@ using namespace Inspector;
 // DO NOT EDIT THIS FILE. It is automatically generated from same-type-id-different-domain.json
 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
 
-#import "RWIProtocolArrayConversions.h"
 #import "TestProtocol.h"
+#import <WebInspector/RWIProtocolArrayConversions.h>
 
 namespace Inspector {
 
index 15ca6ac..c70dc4b 100644 (file)
@@ -884,8 +884,8 @@ __attribute__((visibility ("default")))
 // DO NOT EDIT THIS FILE. It is automatically generated from shadowed-optional-type-setters.json
 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
 
-#import "RWIProtocolArrayConversions.h"
 #import "TestProtocol.h"
+#import <WebInspector/RWIProtocolArrayConversions.h>
 
 namespace Inspector {
 
index 0944457..167d501 100644 (file)
@@ -742,8 +742,8 @@ using namespace Inspector;
 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-aliased-primitive-type.json
 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
 
-#import "RWIProtocolArrayConversions.h"
 #import "TestProtocol.h"
+#import <WebInspector/RWIProtocolArrayConversions.h>
 
 namespace Inspector {
 
index 4dfc1f2..c467fac 100644 (file)
@@ -831,8 +831,8 @@ typedef NS_ENUM(NSInteger, TestProtocolDebuggerReason) {
 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-array-type.json
 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
 
-#import "RWIProtocolArrayConversions.h"
 #import "TestProtocol.h"
+#import <WebInspector/RWIProtocolArrayConversions.h>
 
 namespace Inspector {
 
index 49a8440..2e64005 100644 (file)
@@ -853,8 +853,8 @@ typedef NS_ENUM(NSInteger, TestProtocolRuntimeTwoLeggedAnimals) {
 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-enum-type.json
 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
 
-#import "RWIProtocolArrayConversions.h"
 #import "TestProtocol.h"
+#import <WebInspector/RWIProtocolArrayConversions.h>
 
 namespace Inspector {
 
index 0da8837..ddecd4c 100644 (file)
@@ -1284,8 +1284,8 @@ __attribute__((visibility ("default")))
 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-object-type.json
 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
 
-#import "RWIProtocolArrayConversions.h"
 #import "TestProtocol.h"
+#import <WebInspector/RWIProtocolArrayConversions.h>
 
 namespace Inspector {
 
index 5be9733..75a25f0 100644 (file)
@@ -1207,8 +1207,8 @@ __attribute__((visibility ("default")))
 // DO NOT EDIT THIS FILE. It is automatically generated from type-requiring-runtime-casts.json
 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
 
-#import "RWIProtocolArrayConversions.h"
 #import "TestProtocol.h"
+#import <WebInspector/RWIProtocolArrayConversions.h>
 
 namespace Inspector {