mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
show gdsl errors only for the scripts in the project, or in internal mode. a typical user can anyway do nothing about gdsl errors from his libraries
This commit is contained in:
@@ -20,6 +20,7 @@ import com.intellij.notification.NotificationListener;
|
||||
import com.intellij.notification.NotificationType;
|
||||
import com.intellij.notification.Notifications;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.application.ex.ApplicationManagerEx;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.editor.Document;
|
||||
import com.intellij.openapi.editor.event.DocumentAdapter;
|
||||
@@ -369,6 +370,10 @@ public class GroovyDslFileIndex extends ScalarIndexExtension<String> {
|
||||
final String exceptionText = writer.toString();
|
||||
LOG.info(exceptionText);
|
||||
|
||||
if (!ApplicationManagerEx.getApplicationEx().isInternal() && !ProjectRootManager.getInstance(project).getFileIndex().isInContent(vfile)) {
|
||||
return;
|
||||
}
|
||||
|
||||
ApplicationManager.getApplication().getMessageBus().syncPublisher(Notifications.TOPIC).notify(
|
||||
new Notification("Groovy DSL parsing", "DSL script execution error",
|
||||
"<p>" + e.getMessage() + "</p><p><a href=\"\">Click here to investigate.</a></p>", NotificationType.ERROR,
|
||||
|
||||
Reference in New Issue
Block a user