@@ -311,15 +311,15 @@ private HighlightInfo processLocalVariable(
311311 ? QuickFixFactory .getInstance ().createRenameToIgnoredFix (variable )
312312 : QuickFixFactory .getInstance ().createRemoveUnusedVariableFix (variable );
313313 return UnusedSymbolUtil .createUnusedSymbolInfo (identifier , message , myDeadCodeInfoType )
314- .registerFix (fix , null , null , null , myDeadCodeKey )
314+ .registerFix (fix , null , LocalizeValue . of () , null , myDeadCodeKey )
315315 .create ();
316316 }
317317
318318 boolean referenced = myRefCountHolder .isReferencedForRead (variable );
319319 if (!referenced && !UnusedSymbolUtil .isImplicitRead (myProject , variable , progress )) {
320320 LocalizeValue message = JavaErrorLocalize .localVariableIsNotUsedForReading (identifier .getText ());
321321 return UnusedSymbolUtil .createUnusedSymbolInfo (identifier , message , myDeadCodeInfoType )
322- .registerFix (QuickFixFactory .getInstance ().createRemoveUnusedVariableFix (variable ), null , null , null , myDeadCodeKey )
322+ .registerFix (QuickFixFactory .getInstance ().createRemoveUnusedVariableFix (variable ), null , LocalizeValue . of () , null , myDeadCodeKey )
323323 .create ();
324324 }
325325
@@ -328,7 +328,7 @@ private HighlightInfo processLocalVariable(
328328 if (!referenced && !UnusedSymbolUtil .isImplicitWrite (myProject , variable , progress )) {
329329 LocalizeValue message = JavaErrorLocalize .localVariableIsNotAssigned (identifier .getText ());
330330 return UnusedSymbolUtil .createUnusedSymbolInfo (identifier , message , myDeadCodeInfoType )
331- .registerFix (new EmptyIntentionAction (UnusedSymbolLocalInspectionBase .DISPLAY_NAME ), null , null , null , myDeadCodeKey )
331+ .registerFix (new EmptyIntentionAction (UnusedSymbolLocalInspectionBase .DISPLAY_NAME ), null , LocalizeValue . of () , null , myDeadCodeKey )
332332 .create ();
333333 }
334334 }
@@ -377,7 +377,7 @@ private HighlightInfo processField(
377377 LocalizeValue message = JavaErrorLocalize .privateFieldIsNotAssigned (identifier .getText ());
378378 HighlightInfo .Builder hlBuilder = UnusedSymbolUtil .createUnusedSymbolInfo (identifier , message , myDeadCodeInfoType );
379379
380- hlBuilder .registerFix (quickFixFactory .createCreateGetterOrSetterFix (false , true , field ), null , null , null , myDeadCodeKey );
380+ hlBuilder .registerFix (quickFixFactory .createCreateGetterOrSetterFix (false , true , field ), null , LocalizeValue . of () , null , myDeadCodeKey );
381381 if (!field .isFinal ()) {
382382 hlBuilder .registerFix (
383383 quickFixFactory .createCreateConstructorParameterFromFieldFix (field ),
@@ -402,7 +402,7 @@ else if (UnusedSymbolUtil.isFieldUnused(myProject, myFile, field, progress, help
402402 if (UnusedSymbolUtil .isImplicitWrite (myProject , field , progress )) {
403403 LocalizeValue message = JavaErrorLocalize .privateFieldIsNotUsedForReading (identifier .getText ());
404404 return UnusedSymbolUtil .createUnusedSymbolInfo (identifier , message , myDeadCodeInfoType )
405- .registerFix (QuickFixFactory .getInstance ().createSafeDeleteFix (field ), null , null , null , myDeadCodeKey )
405+ .registerFix (QuickFixFactory .getInstance ().createSafeDeleteFix (field ), null , LocalizeValue . of () , null , myDeadCodeKey )
406406 .create ();
407407 }
408408 return formatUnusedSymbolHighlightInfo (
@@ -427,10 +427,10 @@ private HighlightInfo.Builder suggestionsToMakeFieldUsed(
427427 ) {
428428 QuickFixFactory fixFactory = QuickFixFactory .getInstance ();
429429 return UnusedSymbolUtil .createUnusedSymbolInfo (identifier , message , myDeadCodeInfoType )
430- .registerFix (fixFactory .createRemoveUnusedVariableFix (field ), null , null , null , myDeadCodeKey )
431- .registerFix (fixFactory .createCreateGetterOrSetterFix (true , false , field ), null , null , null , myDeadCodeKey )
432- .registerFix (fixFactory .createCreateGetterOrSetterFix (false , true , field ), null , null , null , myDeadCodeKey )
433- .registerFix (fixFactory .createCreateGetterOrSetterFix (true , true , field ), null , null , null , myDeadCodeKey );
430+ .registerFix (fixFactory .createRemoveUnusedVariableFix (field ), null , LocalizeValue . of () , null , myDeadCodeKey )
431+ .registerFix (fixFactory .createCreateGetterOrSetterFix (true , false , field ), null , LocalizeValue . of () , null , myDeadCodeKey )
432+ .registerFix (fixFactory .createCreateGetterOrSetterFix (false , true , field ), null , LocalizeValue . of () , null , myDeadCodeKey )
433+ .registerFix (fixFactory .createCreateGetterOrSetterFix (true , true , field ), null , LocalizeValue . of () , null , myDeadCodeKey );
434434 }
435435
436436 private final Map <PsiMethod , Boolean > isOverriddenOrOverrides = ConcurrentFactoryMap .createMap (method -> {
@@ -477,7 +477,7 @@ else if (declarationScope instanceof PsiForeachStatement && !PsiUtil.isIgnoredNa
477477 HighlightInfo .Builder hlBuilder = checkUnusedParameter (parameter , identifier , progress );
478478 if (hlBuilder != null ) {
479479 return hlBuilder
480- .registerFix (QuickFixFactory .getInstance ().createRenameToIgnoredFix (parameter ), null , null , null , myDeadCodeKey )
480+ .registerFix (QuickFixFactory .getInstance ().createRenameToIgnoredFix (parameter ), null , LocalizeValue . of () , null , myDeadCodeKey )
481481 .create ();
482482 }
483483 }
@@ -521,7 +521,7 @@ private HighlightInfo processMethod(
521521 LocalizeValue symbolName = HighlightMessageUtil .getSymbolName (method , PsiSubstitutor .EMPTY );
522522 LocalizeValue message = key .apply (symbolName );
523523 HighlightInfo .Builder hlBuilder = UnusedSymbolUtil .createUnusedSymbolInfo (identifier , message , myDeadCodeInfoType );
524- hlBuilder .registerFix (QuickFixFactory .getInstance ().createSafeDeleteFix (method ), null , null , null , myDeadCodeKey );
524+ hlBuilder .registerFix (QuickFixFactory .getInstance ().createSafeDeleteFix (method ), null , LocalizeValue . of () , null , myDeadCodeKey );
525525 SpecialAnnotationsUtilBase .createAddToSpecialAnnotationFixes (
526526 method ,
527527 annoName -> {
@@ -578,7 +578,7 @@ private static HighlightInfo.Builder formatUnusedSymbolHighlightInfo(
578578 LocalizeValue message = pattern .apply (symbolName );
579579 HighlightInfo .Builder hlBuilder = UnusedSymbolUtil .createUnusedSymbolInfo (identifier , message , highlightInfoType );
580580 QuickFixFactory fixFactory = QuickFixFactory .getInstance ();
581- hlBuilder .registerFix (fixFactory .createSafeDeleteFix (aClass ), null , null , null , highlightDisplayKey );
581+ hlBuilder .registerFix (fixFactory .createSafeDeleteFix (aClass ), null , LocalizeValue . of () , null , highlightDisplayKey );
582582 SpecialAnnotationsUtilBase .createAddToSpecialAnnotationFixes (
583583 (PsiModifierListOwner )aClass ,
584584 annoName -> {
@@ -640,8 +640,8 @@ private HighlightInfo registerRedundantImport(
640640 HighlightInfo info = HighlightInfo .newHighlightInfo (JavaHighlightInfoTypes .UNUSED_IMPORT )
641641 .range (importStatement )
642642 .descriptionAndTooltip (InspectionLocalize .unusedImportStatement ())
643- .registerFix (QuickFixFactory .getInstance ().createOptimizeImportsFix (false ), null , null , null , unusedImportKey )
644- .registerFix (QuickFixFactory .getInstance ().createEnableOptimizeImportsOnTheFlyFix (), null , null , null , unusedImportKey )
643+ .registerFix (QuickFixFactory .getInstance ().createOptimizeImportsFix (false ), null , LocalizeValue . of () , null , unusedImportKey )
644+ .registerFix (QuickFixFactory .getInstance ().createEnableOptimizeImportsOnTheFlyFix (), null , LocalizeValue . of () , null , unusedImportKey )
645645 .create ();
646646
647647 myHasRedundantImports = true ;
0 commit comments