mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
use single instance for base factory
This commit is contained in:
+3
-1
@@ -22,9 +22,11 @@ import com.intellij.openapi.roots.impl.RootProviderBaseImpl;
|
||||
* @author yole
|
||||
*/
|
||||
public class JarDirectoryWatcherFactory {
|
||||
private static final JarDirectoryWatcherFactory Instance = new JarDirectoryWatcherFactory();
|
||||
|
||||
public static JarDirectoryWatcherFactory getInstance() {
|
||||
final JarDirectoryWatcherFactory factory = ServiceManager.getService(JarDirectoryWatcherFactory.class);
|
||||
return factory != null ? factory : new JarDirectoryWatcherFactory();
|
||||
return factory != null ? factory : Instance;
|
||||
}
|
||||
|
||||
public JarDirectoryWatcher createWatcher(JarDirectories jarDirectories, RootProviderBaseImpl rootProvider) {
|
||||
|
||||
Reference in New Issue
Block a user