use of com.jetbrains.jsonSchema.JsonSchemaMappingsConfigurable in project intellij-community by JetBrains.
the class JsonSchemaConflictNotificationProvider method createNotificationPanel.
@Nullable
@Override
public EditorNotificationPanel createNotificationPanel(@NotNull VirtualFile file, @NotNull FileEditor fileEditor) {
final List<Pair<Boolean, String>> descriptors = myJsonSchemaService.getMatchingSchemaDescriptors(file);
if (descriptors == null || descriptors.size() <= 1)
return null;
final Worker worker = new Worker();
final String message = worker.createMessage(descriptors);
if (message == null)
return null;
final EditorNotificationPanel panel = new EditorNotificationPanel(LightColors.RED);
panel.setText(message);
panel.createActionLabel("Edit JSON Schema Mappings", () -> {
ShowSettingsUtil.getInstance().editConfigurable(myProject, new JsonSchemaMappingsConfigurable(myProject));
EditorNotifications.getInstance(myProject).updateNotifications(file);
});
return panel;
}
Aggregations