@@ -255,7 +255,7 @@ private void insertEditorHeaderComponentIfApplicable(@NotNull FileEditorManager
255255 return ;
256256 }
257257 UIUtil .invokeLaterIfNeeded (() -> { // ensure components are created on the swing thread
258- final JComponent headerComponent = createHeaderComponent (fileEditor , editor );
258+ final JComponent headerComponent = createHeaderComponent (fileEditor , editor , file );
259259 editor .setHeaderComponent (headerComponent );
260260 if (editor instanceof EditorEx ) {
261261 ((EditorEx ) editor ).setPermanentHeaderComponent (headerComponent );
@@ -269,7 +269,7 @@ private void insertEditorHeaderComponentIfApplicable(@NotNull FileEditorManager
269269 private static class JSGraphQLEditorHeaderComponent extends EditorHeaderComponent {
270270 }
271271
272- private JComponent createHeaderComponent (FileEditor fileEditor , Editor editor ) {
272+ private JComponent createHeaderComponent (FileEditor fileEditor , Editor editor , VirtualFile file ) {
273273
274274 final JSGraphQLEditorHeaderComponent headerComponent = new JSGraphQLEditorHeaderComponent ();
275275
@@ -288,7 +288,7 @@ private JComponent createHeaderComponent(FileEditor fileEditor, Editor editor) {
288288 final JComponent queryToolbar = createToolbar (queryActions );
289289
290290 // configured endpoints combo box
291- final List <GraphQLConfigEndpoint > endpoints = GraphQLConfigManager .getService (myProject ).getEndpoints (fileEditor . getFile () );
291+ final List <GraphQLConfigEndpoint > endpoints = GraphQLConfigManager .getService (myProject ).getEndpoints (file );
292292 final JSGraphQLEndpointsModel endpointsModel = new JSGraphQLEndpointsModel (endpoints , PropertiesComponent .getInstance (myProject ));
293293 final ComboBox endpointComboBox = new ComboBox (endpointsModel );
294294 endpointComboBox .setToolTipText ("GraphQL endpoint" );
0 commit comments