Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Intellij Community
Commits
a7940fbe
Commit
a7940fbe
authored
7 years ago
by
Olga Strizhenko
Browse files
Options
Download
Email Patches
Plain Diff
Spellchecker: (minor) cleanup FileLoader(String url)
parent
c3aa704d
Branches unavailable
Tags unavailable
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
spellchecker/src/com/intellij/spellchecker/FileLoader.java
+4
-0
spellchecker/src/com/intellij/spellchecker/FileLoader.java
spellchecker/src/com/intellij/spellchecker/SpellCheckerManager.java
+4
-4
...er/src/com/intellij/spellchecker/SpellCheckerManager.java
with
8 additions
and
4 deletions
+8
-4
spellchecker/src/com/intellij/spellchecker/FileLoader.java
+
4
-
0
View file @
a7940fbe
...
...
@@ -35,6 +35,10 @@ public class FileLoader implements Loader {
this
.
name
=
name
;
}
public
FileLoader
(
String
url
)
{
this
(
url
,
url
);
}
@Override
public
String
getName
()
{
return
name
;
...
...
This diff is collapsed.
Click to expand it.
spellchecker/src/com/intellij/spellchecker/SpellCheckerManager.java
+
4
-
4
View file @
a7940fbe
...
...
@@ -91,7 +91,7 @@ public class SpellCheckerManager implements Disposable {
boolean
customDic
=
FileUtilRt
.
extensionEquals
(
path
,
"dic"
)
&&
settings
.
getDictionaryFoldersPaths
().
stream
().
anyMatch
(
dicFolderPath
->
isAncestor
(
dicFolderPath
,
path
,
true
));
if
(
customDic
)
{
spellChecker
.
loadDictionary
(
new
FileLoader
(
path
,
path
));
spellChecker
.
loadDictionary
(
new
FileLoader
(
path
));
restartInspections
();
}
}
...
...
@@ -103,7 +103,7 @@ public class SpellCheckerManager implements Disposable {
if
(
spellChecker
.
isDictionaryLoad
(
path
))
{
spellChecker
.
removeDictionary
(
path
);
spellChecker
.
loadDictionary
(
new
FileLoader
(
path
,
path
));
spellChecker
.
loadDictionary
(
new
FileLoader
(
path
));
restartInspections
();
}
}
...
...
@@ -146,7 +146,7 @@ public class SpellCheckerManager implements Disposable {
spellChecker
.
removeDictionary
(
s
);
}
else
if
(!
dictionaryIsLoad
&&
dictionaryShouldBeLoad
)
{
spellChecker
.
loadDictionary
(
new
FileLoader
(
s
,
s
));
spellChecker
.
loadDictionary
(
new
FileLoader
(
s
));
}
});
}
...
...
@@ -192,7 +192,7 @@ public class SpellCheckerManager implements Disposable {
for
(
String
folder
:
settings
.
getDictionaryFoldersPaths
())
{
SPFileUtil
.
processFilesRecursively
(
folder
,
s
->
{
if
(!
disabledDictionaries
.
contains
(
s
))
{
loaders
.
add
(
new
FileLoader
(
s
,
s
));
loaders
.
add
(
new
FileLoader
(
s
));
}
});
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help