mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
platform: log updated stub indices
This commit is contained in:
@@ -79,27 +79,27 @@ public class StubIndexImpl extends StubIndex implements ApplicationComponent, Pe
|
||||
public StubIndexImpl(FileBasedIndex fileBasedIndex /* need this to ensure initialization order*/ ) throws IOException {
|
||||
final boolean forceClean = Boolean.TRUE == ourForcedClean.getAndSet(Boolean.FALSE);
|
||||
|
||||
final StubIndexExtension<?, ?>[] extensions = Extensions.getExtensions(StubIndexExtension.EP_NAME);
|
||||
boolean needRebuild = false;
|
||||
StubIndexExtension<?, ?>[] extensions = Extensions.getExtensions(StubIndexExtension.EP_NAME);
|
||||
StringBuilder updated = new StringBuilder();
|
||||
for (StubIndexExtension extension : extensions) {
|
||||
//noinspection unchecked
|
||||
needRebuild |= registerIndexer(extension, forceClean);
|
||||
@SuppressWarnings("unchecked") boolean rebuildRequested = registerIndexer(extension, forceClean);
|
||||
if (rebuildRequested) {
|
||||
updated.append(extension).append(' ');
|
||||
}
|
||||
}
|
||||
if (needRebuild) {
|
||||
if (updated.length() > 0) {
|
||||
if (ApplicationManager.getApplication().isUnitTestMode()) {
|
||||
requestRebuild();
|
||||
}
|
||||
else {
|
||||
final Throwable e = new Throwable();
|
||||
final Throwable e = new Throwable(updated.toString());
|
||||
// avoid direct forceRebuild as it produces dependency cycle (IDEA-105485)
|
||||
ApplicationManager.getApplication().invokeLater(
|
||||
new Runnable() {
|
||||
ApplicationManager.getApplication().invokeLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
forceRebuild(e);
|
||||
}
|
||||
}, ModalityState.NON_MODAL
|
||||
);
|
||||
}, ModalityState.NON_MODAL);
|
||||
}
|
||||
}
|
||||
dropUnregisteredIndices();
|
||||
|
||||
Reference in New Issue
Block a user