@@ -79,22 +79,25 @@ public void processPsiFilesIfNecessary(
79
79
}
80
80
if (!this .storage .isEnabled (this .activation ))
81
81
{
82
- LOGGER .info (String .format ("Action \" %s\" not enabled on %s" , this .activation .getText (), this .project ));
82
+ LOGGER .info (String .format (
83
+ "Action \" %s\" not enabled on %s" ,
84
+ this .activation .getText (),
85
+ this .project .getName ()));
83
86
return ;
84
87
}
85
88
86
89
indicator .setIndeterminate (true );
87
90
final Set <PsiFile > psiFilesEligible = this .getEligiblePsiFiles (indicator , async );
88
91
if (psiFilesEligible .isEmpty ())
89
92
{
90
- LOGGER .info ("No files are eligible" );
93
+ LOGGER .info ("No files are eligible - " + this . project . getName () );
91
94
return ;
92
95
}
93
96
94
97
final List <SaveCommand > processorsEligible = this .getEligibleProcessors (indicator , psiFilesEligible );
95
98
if (processorsEligible .isEmpty ())
96
99
{
97
- LOGGER .info ("No processors are eligible" );
100
+ LOGGER .info ("No processors are eligible - " + this . project . getName () );
98
101
return ;
99
102
}
100
103
@@ -105,7 +108,7 @@ public void processPsiFilesIfNecessary(
105
108
106
109
private Set <PsiFile > getEligiblePsiFiles (final @ NotNull ProgressIndicator indicator , final boolean async )
107
110
{
108
- LOGGER .info (String .format ("Processing %s files %s mode %s" , this .project , this .psiFiles , this .mode ));
111
+ LOGGER .info (String .format ("Processing %s files %s mode %s" , this .project . getName () , this .psiFiles , this .mode ));
109
112
indicator .checkCanceled ();
110
113
indicator .setText2 ("Collecting files to process" );
111
114
@@ -124,7 +127,7 @@ private Set<PsiFile> getEligiblePsiFiles(final @NotNull ProgressIndicator indica
124
127
final @ NotNull ProgressIndicator indicator ,
125
128
final Set <PsiFile > psiFilesEligible )
126
129
{
127
- LOGGER .info (String .format ("Start processors (%d)" , this .processors .size ()));
130
+ LOGGER .info (String .format ("Start processors (%d) - %s " , this .processors .size (), this . project . getName ()));
128
131
indicator .checkCanceled ();
129
132
indicator .setText2 ("Collecting processors" );
130
133
@@ -142,7 +145,7 @@ private void flushPsiFiles(
142
145
final boolean async ,
143
146
final Set <PsiFile > psiFilesEligible )
144
147
{
145
- LOGGER .info (String .format ("Flushing files (%d)" , psiFilesEligible .size ()));
148
+ LOGGER .info (String .format ("Flushing files (%d) - %s " , psiFilesEligible .size (), this . project . getName ()));
146
149
indicator .checkCanceled ();
147
150
indicator .setText2 ("Flushing files" );
148
151
@@ -176,7 +179,11 @@ private void execute(
176
179
final AtomicInteger executedCount = new AtomicInteger ();
177
180
final List <SimpleEntry <Action , Result <ResultCode >>> results = saveCommands .stream ()
178
181
.map (command -> {
179
- LOGGER .info (String .format ("Execute command %s on %d files" , command , psiFilesEligible .size ()));
182
+ LOGGER .info (String .format (
183
+ "Execute command %s on %d files - %s" ,
184
+ command ,
185
+ psiFilesEligible .size (),
186
+ this .project .getName ()));
180
187
181
188
indicator .checkCanceled ();
182
189
indicator .setText2 ("Executing '" + command .getAction ().getText () + "'" );
@@ -189,9 +196,12 @@ private void execute(
189
196
return entry ;
190
197
})
191
198
.toList ();
192
- LOGGER .info (String .format ("Exit engine with results %s" , results .stream ()
193
- .map (entry -> entry .getKey () + ":" + entry .getValue ())
194
- .toList ()));
199
+ LOGGER .info (String .format (
200
+ "Exit engine with results %s - %s" ,
201
+ results .stream ()
202
+ .map (entry -> entry .getKey () + ":" + entry .getValue ())
203
+ .toList (),
204
+ this .project .getName ()));
195
205
}
196
206
197
207
private boolean isPsiFileEligible (final Project project , final PsiFile psiFile )
@@ -211,7 +221,7 @@ private boolean isProjectValid(final Project project)
211
221
final boolean valid = project .isInitialized () && !project .isDisposed ();
212
222
if (!valid )
213
223
{
214
- LOGGER .info ("Project invalid. Either not initialized or disposed." );
224
+ LOGGER .info (String . format ( "Project %s invalid. Either not initialized or disposed" , project . getName ()) );
215
225
}
216
226
return valid ;
217
227
}
@@ -260,7 +270,7 @@ private boolean isPsiFileFresh(final PsiFile psiFile)
260
270
final boolean isFresh = psiFile .getModificationStamp () != 0 ;
261
271
if (!isFresh )
262
272
{
263
- LOGGER .info (String .format ("File %s is not fresh. " , psiFile ));
273
+ LOGGER .info (String .format ("File %s is not fresh" , psiFile ));
264
274
}
265
275
return isFresh ;
266
276
}
@@ -270,7 +280,7 @@ private boolean isPsiFileValid(final PsiFile psiFile)
270
280
final boolean valid = psiFile .isValid ();
271
281
if (!valid )
272
282
{
273
- LOGGER .info (String .format ("File %s is not valid. " , psiFile ));
283
+ LOGGER .info (String .format ("File %s is not valid" , psiFile ));
274
284
}
275
285
return valid ;
276
286
}
@@ -280,7 +290,7 @@ private boolean hasPsiFileText(final PsiFile psiFile)
280
290
final boolean valid = psiFile .getTextRange () != null ;
281
291
if (!valid )
282
292
{
283
- LOGGER .info (String .format ("File %s has no text. " , psiFile ));
293
+ LOGGER .info (String .format ("File %s has no text" , psiFile ));
284
294
}
285
295
return valid ;
286
296
}
0 commit comments