Skip to content

Commit 019ba95

Browse files
committed
Removed unused v1 code (#164)
- PSI, language and file types - Various IDE functionality - Node.js-based language service
1 parent 06810c8 commit 019ba95

File tree

112 files changed

+135
-7273
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+135
-7273
lines changed

resources/META-INF/graphql.config.json

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

resources/META-INF/plugin.xml

Lines changed: 7 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -128,33 +128,16 @@
128128
<projectViewNestingRulesProvider implementation="com.intellij.lang.jsgraphql.ide.project.GraphQLIntrospectionProjectViewNestingRulesProvider" />
129129
<editorTabTitleProvider implementation="com.intellij.lang.jsgraphql.ide.editor.GraphQLIntrospectionEditorTabTitleProvider" />
130130

131-
132-
<!-- v2 above this point -->
133-
134-
135131
<!-- Project Language services -->
136-
<!--
137-
<projectService serviceInterface="JSGraphQLLanguageUIProjectService" serviceImplementation="JSGraphQLLanguageUIProjectService" />
138-
<projectService serviceInterface="JSGraphQLSchemaLanguageProjectService" serviceImplementation="JSGraphQLSchemaLanguageProjectService" />
139-
-->
140132
<projectService serviceInterface="com.intellij.lang.jsgraphql.v1.ide.configuration.JSGraphQLConfigurationProvider" serviceImplementation="com.intellij.lang.jsgraphql.v1.ide.configuration.JSGraphQLConfigurationProvider" />
141133
<projectService serviceInterface="com.intellij.lang.jsgraphql.endpoint.ide.project.JSGraphQLEndpointNamedTypeRegistry" serviceImplementation="com.intellij.lang.jsgraphql.endpoint.ide.project.JSGraphQLEndpointNamedTypeRegistry" />
142-
<!--
143-
<projectService serviceInterface="JSGraphQLPsiSearchHelper" serviceImplementation="JSGraphQLPsiSearchHelper" />
144-
-->
145134

146135

147136
<!-- Spellchecking and to-do view-->
148137
<spellchecker.support language="GraphQL Endpoint" implementationClass="com.intellij.lang.jsgraphql.endpoint.JSGraphQLEndpointSpellcheckingStrategy" />
149138
<todoIndexer filetype="GraphQL Endpoint" implementationClass="com.intellij.lang.jsgraphql.endpoint.JSGraphQLEndpointTodoIndexer"/>
150139

151140

152-
<!-- Project tree -->
153-
<!--
154-
<treeStructureProvider implementation="JSGraphQLSchemaTreeStructureProvider" />
155-
-->
156-
157-
158141
<!-- File types -->
159142
<fileTypeFactory implementation="com.intellij.lang.jsgraphql.endpoint.JSGraphQLEndpointFileTypeFactory"/>
160143
<fileTypeFactory implementation="com.intellij.lang.jsgraphql.endpoint.doc.JSGraphQLEndpointDocFileTypeFactory"/>
@@ -165,48 +148,25 @@
165148

166149
<lang.parserDefinition language="GraphQL Endpoint" implementationClass="com.intellij.lang.jsgraphql.endpoint.JSGraphQLEndpointParserDefinition"/>
167150
<lang.parserDefinition language="GraphQL Endpoint Doc" implementationClass="com.intellij.lang.jsgraphql.endpoint.doc.JSGraphQLEndpointDocParserDefinition"/>
168-
<!--
169-
<lang.syntaxHighlighterFactory language="GraphQL" implementationClass="JSGraphQLSyntaxHighlighterFactory"/>
170-
<lang.syntaxHighlighterFactory language="GraphQL Schema" implementationClass="JSGraphQLSyntaxHighlighterFactory"/>
171-
-->
151+
172152
<lang.syntaxHighlighterFactory language="GraphQL Endpoint" implementationClass="com.intellij.lang.jsgraphql.endpoint.ide.highlighting.JSGraphQLEndpointSyntaxHighlighterFactory"/>
173153
<lang.syntaxHighlighterFactory language="GraphQL Endpoint Doc" implementationClass="com.intellij.lang.jsgraphql.endpoint.doc.ide.highlighting.JSGraphQLEndpointDocSyntaxHighlighterFactory"/>
174-
<!--
175-
<lang.commenter language="GraphQL" implementationClass="JSGraphQLCommenter"/>
176-
<lang.commenter language="GraphQL Schema" implementationClass="JSGraphQLCommenter"/>
177-
-->
154+
178155
<lang.commenter language="GraphQL Endpoint" implementationClass="com.intellij.lang.jsgraphql.v1.ide.editor.JSGraphQLCommenter"/>
179-
<!--
180-
<lang.braceMatcher language="GraphQL" implementationClass="JSGraphQLBraceMatcher" />
181-
<lang.braceMatcher language="GraphQL Schema" implementationClass="JSGraphQLBraceMatcher" />
182-
-->
156+
183157
<lang.braceMatcher language="GraphQL Endpoint" implementationClass="com.intellij.lang.jsgraphql.endpoint.ide.editor.JSGraphQLEndpointBraceMatcher" />
184158
<lang.psiStructureViewFactory language="GraphQL" implementationClass="com.intellij.lang.jsgraphql.ide.structureView.GraphQLPsiStructureViewFactory"/>
185-
<!--
186-
<lang.fileViewProviderFactory language="GraphQL Schema" implementationClass="JSGraphQLSchemaFileViewProviderFactory" />
187-
<lang.psiStructureViewFactory language="GraphQL Schema" implementationClass="JSGraphQLPsiStructureViewFactory"/>
188-
-->
159+
189160
<lang.psiStructureViewFactory language="GraphQL Endpoint" implementationClass="com.intellij.lang.jsgraphql.endpoint.ide.structureView.JSGraphQLEndpointPsiStructureViewFactory"/>
190161
<iconProvider implementation="com.intellij.lang.jsgraphql.endpoint.psi.JSGraphQLEndpointIconProvider" />
191162
<enterHandlerDelegate implementation="com.intellij.lang.jsgraphql.endpoint.ide.editor.JSGraphQLEndpointEnterHandlerDelegate" />
192163

193164
<!-- Completion -->
194-
<!--
195-
<completion.contributor language="GraphQL" implementationClass="JSGraphQLCompletionContributor"/>
196-
-->
197165
<completion.contributor language="GraphQL Endpoint" implementationClass="com.intellij.lang.jsgraphql.endpoint.ide.completion.JSGraphQLEndpointCompletionContributor"/>
198166
<completion.contributor language="GraphQL Endpoint Doc" implementationClass="com.intellij.lang.jsgraphql.endpoint.doc.ide.completion.JSGraphQLEndpointDocCompletionContributor"/>
199167

200168

201169
<!-- Error highlighting and annotations -->
202-
<!--
203-
<externalAnnotator language="GraphQL" implementationClass="JSGraphQLAnnotator" />
204-
<externalAnnotator language="GraphQL Schema" implementationClass="JSGraphQLAnnotator" />
205-
<externalAnnotator language="JavaScript" implementationClass="JSGraphQLAnnotator" />
206-
<externalAnnotator language="TypeScript" implementationClass="JSGraphQLAnnotator" /><!## Own reg required ##>
207-
<annotator language="JavaScript" implementationClass="JSGraphQLRelayTemplateAnnotator" /><!## Using the JSX dialect overwrites the default annotator ##>
208-
<annotator language="TypeScript" implementationClass="JSGraphQLRelayTemplateAnnotator" /><!## Using the JSX dialect overwrites the default annotator ##>
209-
-->
210170
<annotator language="GraphQL Endpoint" implementationClass="com.intellij.lang.jsgraphql.endpoint.ide.annotator.JSGraphQLEndpointHighlightAnnotator" />
211171
<annotator language="GraphQL Endpoint" implementationClass="com.intellij.lang.jsgraphql.endpoint.ide.annotator.JSGraphQLEndpointErrorAnnotator" />
212172
<annotator language="GraphQL Endpoint Doc" implementationClass="com.intellij.lang.jsgraphql.endpoint.doc.ide.annotator.JSGraphQLEndpointDocHighlightAnnotator" />
@@ -217,89 +177,31 @@
217177

218178

219179
<!-- Formatting -->
220-
<!--
221-
<lang.formatter language="GraphQL" implementationClass="JSGraphQLFormattingModelBuilder"/>
222-
<lang.formatter language="GraphQL Schema" implementationClass="JSGraphQLFormattingModelBuilder"/>
223-
-->
224180
<lang.formatter language="GraphQL Endpoint" implementationClass="com.intellij.lang.jsgraphql.endpoint.ide.formatter.JSGraphQLEndpointFormattingModelBuilder"/>
225-
<!--
226-
<lang.foldingBuilder language="GraphQL" implementationClass="JSGraphQLFoldingBuilder"/>
227-
<lang.foldingBuilder language="GraphQL Schema" implementationClass="JSGraphQLFoldingBuilder"/>
228-
-->
181+
229182
<lang.foldingBuilder language="GraphQL Endpoint" implementationClass="com.intellij.lang.jsgraphql.endpoint.ide.editor.JSGraphQLEndpointFoldingBuilder"/>
230-
<!--
231-
<lang.quoteHandler language="GraphQL" implementationClass="JSGraphQLQuoteHandler" />
232-
<lang.quoteHandler language="GraphQL Schema" implementationClass="JSGraphQLQuoteHandler" />
233-
-->
234-
<lang.quoteHandler language="GraphQL Endpoint" implementationClass="com.intellij.lang.jsgraphql.endpoint.ide.editor.JSGraphQLEndpointQuoteHandler" />
235-
<!--
236-
<enterHandlerDelegate implementation="JSGraphQLEnterHandlerDelegate" />
237-
<enterHandlerDelegate implementation="JSGraphQLEnterInEmptyListHandler"/>
238-
-->
239-
<!--
240-
<langCodeStyleSettingsProvider implementation="JSGraphQLLanguageCodeStyleSettingsProvider"/>
241-
<codeStyleSettingsProvider implementation="JSGraphQLCodeStyleSettingsProvider" />
242-
-->
243183

184+
<lang.quoteHandler language="GraphQL Endpoint" implementationClass="com.intellij.lang.jsgraphql.endpoint.ide.editor.JSGraphQLEndpointQuoteHandler" />
244185

245186
<!-- Find usages -->
246-
<!--
247-
<lang.findUsagesProvider language="GraphQL" implementationClass="JSGraphQLFindUsagesProvider" />
248-
-->
249187
<lang.findUsagesProvider language="GraphQL Endpoint" implementationClass="com.intellij.lang.jsgraphql.endpoint.ide.findUsages.JSGraphQLEndpointFindUsagesProvider" />
250-
<usageTypeProvider implementation="com.intellij.lang.jsgraphql.v1.ide.findUsages.JSGraphQLUsageTypeProvider" />
251-
<!--
252-
<findUsagesHandlerFactory id="GraphQL" implementation="JSGraphQLFindUsagesHandlerFactory"/>
253-
-->
254188
<findUsagesHandlerFactory id="GraphQL Endpoint" implementation="com.intellij.lang.jsgraphql.endpoint.ide.findUsages.JSGraphQLEndpointFindUsagesHandlerFactory"/>
255189

256-
257-
<!-- Renaming -->
258-
<!--
259-
<vetoRenameCondition implementation="JSGraphQLRenameVetoCondition" />
260-
-->
261-
262-
263190
<!-- Schema documentation -->
264191
<lang.documentationProvider language="GraphQL" implementationClass="com.intellij.lang.jsgraphql.ide.documentation.GraphQLDocumentationProvider" />
265-
-->
192+
266193
<!-- Note: JSX/TSX documentation providers are registered in their base language (JS), so we do the same to not take over the entire doc impl -->
267194
<lang.documentationProvider language="JavaScript" implementationClass="com.intellij.lang.jsgraphql.ide.documentation.GraphQLDocumentationProvider" />
268195

269-
270-
<!-- Editor notification bars and markers -->
271-
<!--
272-
<editorNotificationProvider implementation="JSGraphQLApolloLokkaEditorNotificationProvider"/>
273-
-->
274-
<!--
275-
<codeInsight.lineMarkerProvider language="JavaScript" implementationClass="JSGraphQLLineMarkerProvider" />
276-
-->
277-
278-
<!--
279-
<editorTabColorProvider implementation="JSGraphQLSchemaEditorTabColorProvider" />
280-
-->
281-
282196
<!-- Language injection -->
283-
<!--
284-
<multiHostInjector implementation="JSGraphQLTemplateFragmentLanguageInjector" order="first" />
285-
-->
286197
<languageInjector implementation="com.intellij.lang.jsgraphql.endpoint.doc.ide.injection.JSGraphQLEndpointDocInjector" />
287198

288-
289-
<!-- Settings -->
290-
<!--
291-
<colorSettingsPage implementation="JSGraphQLColorSettingsPage" />
292-
-->
293-
294199
<!-- Query execution (see com.intellij.openapi.actionSystem.IdeActions.ACTION_EDITOR_SPLIT which is ctrl+enter by default) -->
295200
<editorActionHandler action="EditorSplitLine" implementationClass="com.intellij.lang.jsgraphql.v1.ide.actions.JSGraphQLExecuteEditorActionHandler" order="first" />
296201
<highlightErrorFilter implementation="com.intellij.lang.jsgraphql.v1.ide.editor.JSGraphQLVariablesHighlightErrorFilter" />
297202

298203

299204
<!-- Search (find implementations etc.) -->
300-
<!--
301-
<definitionsSearch implementation="JSGraphQLDefinitionsSearchExecutor"/>
302-
-->
303205
<definitionsSearch implementation="com.intellij.lang.jsgraphql.endpoint.ide.search.JSGraphQLEndpointDefinitionsSearchExecutor"/>
304206

305207

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

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

src/main/com/intellij/lang/jsgraphql/endpoint/doc/ide/highlighting/JSGraphQLEndpointDocSyntaxHighlighter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
*/
88
package com.intellij.lang.jsgraphql.endpoint.doc.ide.highlighting;
99

10+
import com.intellij.lang.jsgraphql.endpoint.ide.highlighting.JSGraphQLEndpointSyntaxHighlighter;
1011
import org.jetbrains.annotations.NotNull;
1112

1213
import com.intellij.lang.jsgraphql.endpoint.doc.lexer.JSGraphQLEndpointDocLexer;
13-
import com.intellij.lang.jsgraphql.v1.ide.highlighting.JSGraphQLSyntaxHighlighter;
1414
import com.intellij.lexer.FlexAdapter;
1515
import com.intellij.lexer.Lexer;
1616
import com.intellij.openapi.editor.colors.TextAttributesKey;
@@ -29,6 +29,6 @@ public Lexer getHighlightingLexer() {
2929
@Override
3030
public TextAttributesKey[] getTokenHighlights(IElementType tokenType) {
3131
// highlight as comment until highlight annotator does a pass
32-
return JSGraphQLSyntaxHighlighter.COMMENT_KEYS;
32+
return JSGraphQLEndpointSyntaxHighlighter.COMMENT_KEYS;
3333
}
3434
}

src/main/com/intellij/lang/jsgraphql/endpoint/doc/psi/JSGraphQLEndpointDocPsiElement.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
*/
88
package com.intellij.lang.jsgraphql.endpoint.doc.psi;
99

10+
import com.intellij.extapi.psi.ASTWrapperPsiElement;
1011
import org.jetbrains.annotations.NotNull;
1112

1213
import com.intellij.lang.ASTNode;
1314
import com.intellij.lang.Language;
1415
import com.intellij.lang.jsgraphql.endpoint.doc.JSGraphQLEndpointDocLanguage;
15-
import com.intellij.lang.jsgraphql.v1.psi.JSGraphQLPsiElement;
1616

17-
public abstract class JSGraphQLEndpointDocPsiElement extends JSGraphQLPsiElement {
17+
public abstract class JSGraphQLEndpointDocPsiElement extends ASTWrapperPsiElement {
1818

1919
public JSGraphQLEndpointDocPsiElement(@NotNull ASTNode node) {
2020
super(node);

src/main/com/intellij/lang/jsgraphql/endpoint/ide/annotator/JSGraphQLEndpointHighlightAnnotator.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
*/
88
package com.intellij.lang.jsgraphql.endpoint.ide.annotator;
99

10+
import com.intellij.lang.jsgraphql.endpoint.ide.highlighting.JSGraphQLEndpointSyntaxHighlighter;
1011
import org.jetbrains.annotations.NotNull;
1112

1213
import com.intellij.lang.annotation.Annotation;
@@ -15,19 +16,18 @@
1516
import com.intellij.lang.jsgraphql.endpoint.psi.JSGraphQLEndpointNamedType;
1617
import com.intellij.lang.jsgraphql.endpoint.psi.JSGraphQLEndpointNamedTypeDef;
1718
import com.intellij.lang.jsgraphql.endpoint.psi.JSGraphQLEndpointProperty;
18-
import com.intellij.lang.jsgraphql.v1.ide.highlighting.JSGraphQLSyntaxHighlighter;
1919
import com.intellij.openapi.editor.colors.TextAttributesKey;
2020
import com.intellij.psi.PsiElement;
2121

2222
public class JSGraphQLEndpointHighlightAnnotator implements Annotator {
2323
@Override
2424
public void annotate(@NotNull PsiElement element, @NotNull AnnotationHolder holder) {
2525
if(element instanceof JSGraphQLEndpointNamedTypeDef) {
26-
setTextAttributes(element, holder, JSGraphQLSyntaxHighlighter.DEF);
26+
setTextAttributes(element, holder, JSGraphQLEndpointSyntaxHighlighter.DEF);
2727
} else if (element instanceof JSGraphQLEndpointProperty) {
28-
setTextAttributes(element, holder, JSGraphQLSyntaxHighlighter.PROPERTY);
28+
setTextAttributes(element, holder, JSGraphQLEndpointSyntaxHighlighter.PROPERTY);
2929
} else if (element instanceof JSGraphQLEndpointNamedType) {
30-
setTextAttributes(element, holder, JSGraphQLSyntaxHighlighter.ATOM);
30+
setTextAttributes(element, holder, JSGraphQLEndpointSyntaxHighlighter.ATOM);
3131
}
3232
}
3333

0 commit comments

Comments
 (0)