Skip to content

Commit 4fbb825

Browse files
authored
Merge pull request #391 from jimkyndemeyer/file-types
Added .gql file type association (#390)
2 parents c47117e + e62f362 commit 4fbb825

File tree

8 files changed

+16
-118
lines changed

8 files changed

+16
-118
lines changed

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ intellij {
4242
patchPluginXml {
4343
version pluginVersion
4444
sinceBuild pluginSinceBuild
45+
untilBuild pluginUntilBuild
4546

4647
changeNotes """
4748
<p><b>New in $pluginVersion</b></p>

gradle.properties

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ org.gradle.jvmargs=-Xmx3g -XX:MaxPermSize=2048m
66
pluginGroup = com.intellij.lang.jsgraphql
77
pluginName = JS GraphQL
88
pluginVersion = 2.6.0
9-
pluginSinceBuild = 183.6156.11
9+
pluginSinceBuild = 192.7142
10+
pluginUntilBuild = 203.*
1011

1112
platformType = IU
1213
platformVersion = IU-LATEST-EAP-SNAPSHOT

resources/META-INF/plugin.xml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,13 @@
4242
<applicationService serviceImplementation="com.intellij.lang.jsgraphql.ide.references.GraphQLFindUsagesUtil" />
4343

4444
<!-- Language registration -->
45-
<fileTypeFactory implementation="com.intellij.lang.jsgraphql.GraphQLFileTypeFactory"/>
45+
<fileType name="GraphQL" implementationClass="com.intellij.lang.jsgraphql.GraphQLFileType" fieldName="INSTANCE" language="GraphQL"
46+
extensions="graphql;graphqls;gql"/>
4647
<lang.parserDefinition language="GraphQL" implementationClass="com.intellij.lang.jsgraphql.GraphQLParserDefinition"/>
4748

49+
<!-- File templates -->
50+
<internalFileTemplate name="GraphQL File"/>
51+
4852
<!-- Icons -->
4953
<iconProvider implementation="com.intellij.lang.jsgraphql.GraphQLIconProvider" />
5054

@@ -107,10 +111,7 @@
107111
<projectConfigurable groupId="language" instance="com.intellij.lang.jsgraphql.ui.GraphQLProjectConfigurable" />
108112

109113
<!-- .graphqlconfig JSON -->
110-
<fileTypeFactory implementation="com.intellij.lang.jsgraphql.ide.project.graphqlconfig.GraphQLConfigFileTypeFactory" />
111-
112-
<!-- recognize .graphqls as GraphQL for legacy reasons -->
113-
<fileTypeFactory implementation="com.intellij.lang.jsgraphql.ide.project.GraphQLSLegacyFileTypeFactory" />
114+
<fileType name="JSON" extensions="graphqlconfig"/>
114115

115116
<!-- Editor notifications -->
116117
<editorNotificationProvider implementation="com.intellij.lang.jsgraphql.ide.notifications.GraphQLScopeEditorNotificationProvider"/>
@@ -122,20 +123,20 @@
122123
<editorTabTitleProvider implementation="com.intellij.lang.jsgraphql.ide.editor.GraphQLIntrospectionEditorTabTitleProvider" />
123124

124125
<!-- Project Language services -->
125-
<projectService serviceInterface="com.intellij.lang.jsgraphql.v1.ide.configuration.JSGraphQLConfigurationProvider" serviceImplementation="com.intellij.lang.jsgraphql.v1.ide.configuration.JSGraphQLConfigurationProvider" />
126-
<projectService serviceInterface="com.intellij.lang.jsgraphql.endpoint.ide.project.JSGraphQLEndpointNamedTypeRegistry" serviceImplementation="com.intellij.lang.jsgraphql.endpoint.ide.project.JSGraphQLEndpointNamedTypeRegistry" />
126+
<projectService serviceImplementation="com.intellij.lang.jsgraphql.v1.ide.configuration.JSGraphQLConfigurationProvider" />
127+
<projectService serviceImplementation="com.intellij.lang.jsgraphql.endpoint.ide.project.JSGraphQLEndpointNamedTypeRegistry" />
127128

128129

129130
<!-- Spellchecking and to-do view-->
130131
<spellchecker.support language="GraphQL Endpoint" implementationClass="com.intellij.lang.jsgraphql.endpoint.JSGraphQLEndpointSpellcheckingStrategy" />
131132
<todoIndexer filetype="GraphQL Endpoint" implementationClass="com.intellij.lang.jsgraphql.endpoint.JSGraphQLEndpointTodoIndexer"/>
132133

133134

134-
<!-- File types -->
135-
<fileTypeFactory implementation="com.intellij.lang.jsgraphql.endpoint.JSGraphQLEndpointFileTypeFactory"/>
136-
<fileTypeFactory implementation="com.intellij.lang.jsgraphql.endpoint.doc.JSGraphQLEndpointDocFileTypeFactory"/>
137-
<internalFileTemplate name="GraphQL File"/>
138-
135+
<!-- Endpoint File types -->
136+
<fileType name="GraphQL Endpoint" implementationClass="com.intellij.lang.jsgraphql.endpoint.JSGraphQLEndpointFileType"
137+
language="GraphQL Endpoint" extensions="graphqle"/>
138+
<fileType name="GraphQL Endpoint Doc" implementationClass="com.intellij.lang.jsgraphql.endpoint.doc.JSGraphQLEndpointDocFileType"
139+
language="GraphQL Endpoint Doc" extensions="graphqld"/>
139140

140141
<!-- Language -->
141142

src/main/com/intellij/lang/jsgraphql/GraphQLFileTypeFactory.java

Lines changed: 0 additions & 19 deletions
This file was deleted.

src/main/com/intellij/lang/jsgraphql/endpoint/JSGraphQLEndpointFileTypeFactory.java

Lines changed: 0 additions & 20 deletions
This file was deleted.

src/main/com/intellij/lang/jsgraphql/endpoint/doc/JSGraphQLEndpointDocFileTypeFactory.java

Lines changed: 0 additions & 20 deletions
This file was deleted.

src/main/com/intellij/lang/jsgraphql/ide/project/GraphQLSLegacyFileTypeFactory.java

Lines changed: 0 additions & 23 deletions
This file was deleted.

src/main/com/intellij/lang/jsgraphql/ide/project/graphqlconfig/GraphQLConfigFileTypeFactory.java

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)