diff options
Diffstat (limited to 'xml/xml-psi-impl')
3 files changed, 11 insertions, 21 deletions
diff --git a/xml/xml-psi-impl/src/com/intellij/javaee/CoreExternalResourceManager.java b/xml/xml-psi-impl/src/com/intellij/javaee/CoreExternalResourceManager.java index def0f85fd545..8e2202c697b4 100644 --- a/xml/xml-psi-impl/src/com/intellij/javaee/CoreExternalResourceManager.java +++ b/xml/xml-psi-impl/src/com/intellij/javaee/CoreExternalResourceManager.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 JetBrains s.r.o. + * Copyright 2000-2014 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -183,9 +183,4 @@ public class CoreExternalResourceManager extends ExternalResourceManagerEx { public String[] getResourceUrls(@Nullable FileType fileType, @NonNls String version, boolean includeStandard) { throw new UnsupportedOperationException(); } - - @Override - public long getModificationCount() { - return 0; - } } diff --git a/xml/xml-psi-impl/src/com/intellij/javaee/ExternalResourceManagerExImpl.java b/xml/xml-psi-impl/src/com/intellij/javaee/ExternalResourceManagerExImpl.java index 38f96f052c44..2eee2882613e 100644 --- a/xml/xml-psi-impl/src/com/intellij/javaee/ExternalResourceManagerExImpl.java +++ b/xml/xml-psi-impl/src/com/intellij/javaee/ExternalResourceManagerExImpl.java @@ -92,7 +92,6 @@ public class ExternalResourceManagerExImpl extends ExternalResourceManagerEx { } private final List<ExternalResourceListener> myListeners = ContainerUtil.createLockFreeCopyOnWriteList(); - private long myModificationCount = 0; private final PathMacrosImpl myPathMacros; @NonNls private static final String RESOURCE_ELEMENT = "resource"; @NonNls private static final String URL_ATTR = "url"; @@ -268,7 +267,7 @@ public class ExternalResourceManagerExImpl extends ExternalResourceManagerEx { assert map != null; map.put(url, location); myResourceLocations.add(location); - myModificationCount++; + incModificationCount(); } @Override @@ -285,7 +284,7 @@ public class ExternalResourceManagerExImpl extends ExternalResourceManagerEx { if (location != null) { myResourceLocations.remove(location); } - myModificationCount++; + incModificationCount(); fireExternalResourceChanged(); } } @@ -325,7 +324,7 @@ public class ExternalResourceManagerExImpl extends ExternalResourceManagerEx { ApplicationManager.getApplication().assertWriteAccessAllowed(); clearAllResources(); getProjectResources(project).clearAllResources(); - myModificationCount++; + incModificationCount(); fireExternalResourceChanged(); } @@ -338,14 +337,14 @@ public class ExternalResourceManagerExImpl extends ExternalResourceManagerEx { private void addIgnoredSilently(String url) { myIgnoredResources.add(url); - myModificationCount++; + incModificationCount(); } @Override public void removeIgnoredResource(String url) { ApplicationManager.getApplication().assertWriteAccessAllowed(); if (myIgnoredResources.remove(url)) { - myModificationCount++; + incModificationCount(); fireExternalResourceChanged(); } } @@ -371,11 +370,6 @@ public class ExternalResourceManagerExImpl extends ExternalResourceManagerEx { } @Override - public long getModificationCount() { - return myModificationCount; - } - - @Override public long getModificationCount(@NotNull Project project) { return getProjectResources(project).getModificationCount(); } @@ -385,7 +379,7 @@ public class ExternalResourceManagerExImpl extends ExternalResourceManagerEx { myPathMacros.addMacroExpands(macroExpands); macroExpands.substitute(element, SystemInfo.isFileSystemCaseSensitive); - myModificationCount++; + incModificationCount(); for (final Object o1 : element.getChildren(RESOURCE_ELEMENT)) { Element e = (Element)o1; addSilently(e.getAttributeValue(URL_ATTR), DEFAULT_VERSION, e.getAttributeValue(LOCATION_ATTR).replace('/', File.separatorChar)); @@ -502,7 +496,7 @@ public class ExternalResourceManagerExImpl extends ExternalResourceManagerEx { public void setCatalogPropertiesFile(String filePath) { myCatalogManager = null; myCatalogPropertiesFile = filePath; - myModificationCount++; + incModificationCount(); } @Nullable @@ -514,7 +508,7 @@ public class ExternalResourceManagerExImpl extends ExternalResourceManagerEx { } private void setDefaultHtmlDoctype(String defaultHtmlDoctype) { - myModificationCount++; + incModificationCount(); if (Html5SchemaProvider.getHtml5SchemaLocation().equals(defaultHtmlDoctype)) { myDefaultHtmlDoctype = HTML5_DOCTYPE_ELEMENT; diff --git a/xml/xml-psi-impl/src/com/intellij/psi/impl/source/xml/XmlFileImpl.java b/xml/xml-psi-impl/src/com/intellij/psi/impl/source/xml/XmlFileImpl.java index 780eee70fb51..7fc96844ca09 100644 --- a/xml/xml-psi-impl/src/com/intellij/psi/impl/source/xml/XmlFileImpl.java +++ b/xml/xml-psi-impl/src/com/intellij/psi/impl/source/xml/XmlFileImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2014 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -113,6 +113,7 @@ public class XmlFileImpl extends PsiFileImpl implements XmlFile { } + @NotNull @Override public GlobalSearchScope getFileResolveScope() { return ProjectScope.getAllScope(getProject()); |