File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
ide-common/src/main/java/org/digma/intellij/plugin/document Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 66import org .digma .intellij .plugin .analytics .AnalyticsService ;
77import org .digma .intellij .plugin .analytics .AnalyticsServiceException ;
88import org .digma .intellij .plugin .log .Log ;
9+ import org .digma .intellij .plugin .model .InsightType ;
910import org .digma .intellij .plugin .model .discovery .DocumentInfo ;
1011import org .digma .intellij .plugin .model .discovery .MethodInfo ;
1112import org .digma .intellij .plugin .model .rest .insights .CodeObjectInsight ;
@@ -76,7 +77,9 @@ private void loadAllInsightsForCurrentDocument() {
7677 List <String > objectIds = getObjectIdsForCurrentDocument ();
7778 try {
7879 Log .log (LOGGER ::debug , "Requesting insights with ids {}" , objectIds );
79- insights = analyticsService .getInsights (objectIds );
80+ insights = analyticsService .getInsights (objectIds )
81+ .stream ().filter (codeObjectInsight -> !codeObjectInsight .getType ().equals (InsightType .Unmapped ))
82+ .collect (Collectors .toList ());
8083 Log .log (LOGGER ::debug , "Got next insights: {}" , insights );
8184 } catch (AnalyticsServiceException e ) {
8285 //insights = Collections.emptyList() means there was an error loading insights, usually if the backend is not available.
Original file line number Diff line number Diff line change 77import org .apache .commons .lang3 .mutable .MutableInt ;
88import org .digma .intellij .plugin .analytics .AnalyticsService ;
99import org .digma .intellij .plugin .log .Log ;
10+ import org .digma .intellij .plugin .model .InsightType ;
1011import org .digma .intellij .plugin .model .discovery .DocumentInfo ;
1112import org .digma .intellij .plugin .model .discovery .MethodInfo ;
1213import org .digma .intellij .plugin .model .discovery .MethodUnderCaret ;
@@ -134,10 +135,11 @@ public List<CodeObjectInsight> getCachedMethodInsights(@NotNull MethodInfo metho
134135 if (documentInfoContainer != null ) {
135136 return documentInfoContainer .getAllInsights ().stream ().filter (codeObjectInsight -> {
136137 String codeObjectId = codeObjectInsight .getCodeObjectId ();
137- return methodInfo .getId ().equals (codeObjectId )
138+ return (!codeObjectInsight .getType ().equals (InsightType .Unmapped )) &&
139+ (methodInfo .getId ().equals (codeObjectId )
138140 || methodInfo .idWithType ().equals (codeObjectId )
139141 || methodInfo .getRelatedCodeObjectIds ().contains (codeObjectId )
140- || methodInfo .getRelatedCodeObjectIdsWithType ().contains (codeObjectId );
142+ || methodInfo .getRelatedCodeObjectIdsWithType ().contains (codeObjectId )) ;
141143 }).collect (Collectors .toList ());
142144 }
143145 return new ArrayList <>();
You can’t perform that action at this time.
0 commit comments