mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
remove storage verbouse logging [STORAGE], etc
This commit is contained in:
-1
@@ -266,7 +266,6 @@ public class ModuleStoreImpl extends BaseFileConfigurableStoreImpl implements IM
|
||||
|
||||
@Override
|
||||
public void reinitComponents(Set<String> componentNames, boolean reloadData) {
|
||||
LOG.info("[STORAGE] Module: " + myModule.getName());
|
||||
super.reinitComponents(componentNames, reloadData);
|
||||
}
|
||||
|
||||
|
||||
-1
@@ -497,7 +497,6 @@ abstract class ComponentStoreImpl implements IComponentStore {
|
||||
for (String componentName : componentNames) {
|
||||
final PersistentStateComponent component = (PersistentStateComponent)myComponents.get(componentName);
|
||||
if (component != null) {
|
||||
LOG.info("[STORAGE] Reinit component '" + componentName + "'");
|
||||
initPersistentComponent(component, reloadData);
|
||||
}
|
||||
}
|
||||
|
||||
-1
@@ -93,7 +93,6 @@ public class FileBasedStorage extends XmlElementStorage {
|
||||
final Listener listener = messageBus.syncPublisher(STORAGE_TOPIC);
|
||||
virtualFileTracker.addTracker(fileUrl, new VirtualFileAdapter() {
|
||||
public void contentsChanged(final VirtualFileEvent event) {
|
||||
LOG.info("[STORAGE] Changed: " + myFilePath);
|
||||
listener.storageFileChanged(event, FileBasedStorage.this);
|
||||
}
|
||||
}, false, this);
|
||||
|
||||
-4
@@ -624,14 +624,11 @@ class ProjectStoreImpl extends BaseFileConfigurableStoreImpl implements IProject
|
||||
final Set<String> componentNames;
|
||||
try {
|
||||
componentNames = saveSession.analyzeExternalChanges(changedFiles);
|
||||
LOG.info("[STORAGE] Changes affects: " + (componentNames == null ? "[NONE]" :
|
||||
StringUtil.join(componentNames.toArray(new String[componentNames.size()]), ", ")));
|
||||
if (componentNames == null) return false;
|
||||
|
||||
// TODO[mike]: This is a hack to prevent NPE (assert != null) in StateStorageManagerImpl.reload, storage is null for...
|
||||
for (Pair<VirtualFile, StateStorage> pair : changedFiles) {
|
||||
if (pair.second == null) {
|
||||
LOG.info("[STORAGE] Soft reload is not possible: no state for:" + pair.first.getName());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -641,7 +638,6 @@ class ProjectStoreImpl extends BaseFileConfigurableStoreImpl implements IProject
|
||||
}
|
||||
|
||||
if (!isReloadPossible(componentNames)) {
|
||||
LOG.info("[STORAGE] Soft reload is not possible for some components :(");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,9 +116,7 @@ public class ProjectManagerImpl extends ProjectManagerEx implements NamedJDOMExt
|
||||
connection.subscribe(StateStorage.STORAGE_TOPIC, new StateStorage.Listener() {
|
||||
public void storageFileChanged(final VirtualFileEvent event, @NotNull final StateStorage storage) {
|
||||
VirtualFile file = event.getFile();
|
||||
LOG.info("[STORAGE] Check if application reload is required for: " + file.getPath());
|
||||
if (!file.isDirectory() && !(event.getRequestor() instanceof StateStorage.SaveSession)) {
|
||||
LOG.info("[STORAGE] Scheduling application reload triggered by change in: " + file.getPath());
|
||||
saveChangedProjectFile(file, null, storage);
|
||||
}
|
||||
}
|
||||
@@ -133,9 +131,7 @@ public class ProjectManagerImpl extends ProjectManagerEx implements NamedJDOMExt
|
||||
connection.subscribe(StateStorage.STORAGE_TOPIC, new StateStorage.Listener() {
|
||||
public void storageFileChanged(final VirtualFileEvent event, @NotNull final StateStorage storage) {
|
||||
VirtualFile file = event.getFile();
|
||||
LOG.info("[STORAGE] Check if project reload is required for: " + file.getPath());
|
||||
if (!file.isDirectory() && !(event.getRequestor() instanceof StateStorage.SaveSession)) {
|
||||
LOG.info("[STORAGE] Scheduling project reload triggered by change in: " + file.getPath());
|
||||
saveChangedProjectFile(file, project, storage);
|
||||
}
|
||||
}
|
||||
@@ -575,7 +571,6 @@ public class ProjectManagerImpl extends ProjectManagerEx implements NamedJDOMExt
|
||||
}
|
||||
|
||||
private void askToReloadProjectIfConfigFilesChangedExternally() {
|
||||
LOG.info("[STORAGE] trying to reload project while myReloadBlockCount = " + myReloadBlockCount);
|
||||
if (myReloadBlockCount.get() == 0) {
|
||||
Set<Project> projects;
|
||||
|
||||
@@ -584,8 +579,6 @@ public class ProjectManagerImpl extends ProjectManagerEx implements NamedJDOMExt
|
||||
projects = new HashSet<Project>(myChangedProjectFiles.keySet());
|
||||
}
|
||||
|
||||
LOG.info("[STORAGE] iterate over opened project & reload");
|
||||
|
||||
List<Project> projectsToReload = new ArrayList<Project>();
|
||||
|
||||
for (Project project : projects) {
|
||||
@@ -661,8 +654,6 @@ public class ProjectManagerImpl extends ProjectManagerEx implements NamedJDOMExt
|
||||
if (project.isDisposed()) return false;
|
||||
final HashSet<Pair<VirtualFile, StateStorage>> causes = new HashSet<Pair<VirtualFile, StateStorage>>();
|
||||
|
||||
LOG.info("[STORAGE] Should reload project now");
|
||||
|
||||
synchronized (myChangedProjectFiles) {
|
||||
final List<Pair<VirtualFile, StateStorage>> changes = myChangedProjectFiles.remove(project);
|
||||
if (changes != null) {
|
||||
@@ -677,7 +668,6 @@ public class ProjectManagerImpl extends ProjectManagerEx implements NamedJDOMExt
|
||||
ApplicationManager.getApplication().runWriteAction(new Runnable() {
|
||||
public void run() {
|
||||
try {
|
||||
LOG.info("[STORAGE] Checking if we could reinit components w/o project reload...");
|
||||
reloadOk[0] = ((ProjectEx)project).getStateStore().reload(causes);
|
||||
}
|
||||
catch (StateStorage.StateStorageException e) {
|
||||
@@ -692,8 +682,6 @@ public class ProjectManagerImpl extends ProjectManagerEx implements NamedJDOMExt
|
||||
});
|
||||
if (reloadOk[0]) return false;
|
||||
|
||||
LOG.info("[STORAGE] Unable to reinit components, scheduling full project reload...");
|
||||
|
||||
String message;
|
||||
if (causes.size() == 1) {
|
||||
message = ProjectBundle.message("project.reload.external.change.single", causes.iterator().next().first.getPresentableUrl());
|
||||
@@ -730,13 +718,9 @@ public class ProjectManagerImpl extends ProjectManagerEx implements NamedJDOMExt
|
||||
}
|
||||
|
||||
private void scheduleReloadApplicationAndProject() {
|
||||
LOG.info("[STORAGE] Scheduling reload with myReloadBlockCount = " + myReloadBlockCount);
|
||||
|
||||
ApplicationManager.getApplication().invokeLater(new Runnable() {
|
||||
public void run() {
|
||||
LOG.info("[STORAGE] trying reloading application and should reload project");
|
||||
if (!tryToReloadApplication()) return;
|
||||
LOG.info("[STORAGE] reloading project");
|
||||
askToReloadProjectIfConfigFilesChangedExternally();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user