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
9a022b8e
Unverified
Commit
9a022b8e
authored
7 years ago
by
Vladimir Krivosheev
Browse files
Options
Download
Email Patches
Plain Diff
run manager workspace scheme manager — do not use VFS (more clear code), part 2
parent
9056b8c3
Branches unavailable
Tags unavailable
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
platform/configuration-store-impl/src/SchemeManagerFactoryImpl.kt
+4
-2
.../configuration-store-impl/src/SchemeManagerFactoryImpl.kt
platform/lang-impl/src/com/intellij/execution/impl/RunManagerImpl.kt
+1
-1
...ng-impl/src/com/intellij/execution/impl/RunManagerImpl.kt
platform/projectModel-impl/src/com/intellij/openapi/options/scheme.kt
+2
-1
...jectModel-impl/src/com/intellij/openapi/options/scheme.kt
platform/testFramework/src/com/intellij/testFramework/MockSchemeManagerFactory.kt
+2
-1
...rc/com/intellij/testFramework/MockSchemeManagerFactory.kt
with
9 additions
and
5 deletions
+9
-5
platform/configuration-store-impl/src/SchemeManagerFactoryImpl.kt
+
4
-
2
View file @
9a022b8e
...
...
@@ -13,6 +13,7 @@ import com.intellij.openapi.options.SchemeManagerFactory
import
com.intellij.openapi.options.SchemeProcessor
import
com.intellij.openapi.project.Project
import
com.intellij.util.SmartList
import
com.intellij.util.ThreeState
import
com.intellij.util.containers.ContainerUtil
import
com.intellij.util.lang.CompoundRuntimeException
import
org.jetbrains.annotations.TestOnly
...
...
@@ -36,9 +37,10 @@ sealed class SchemeManagerFactoryBase : SchemeManagerFactory(), SettingsSavingCo
streamProvider
:
StreamProvider
?,
directoryPath
:
Path
?,
isAutoSave
:
Boolean
,
isUseVfs
:
Boolean
):
SchemeManager
<
T
>
{
isUseVfs
:
ThreeState
):
SchemeManager
<
T
>
{
val
path
=
checkPath
(
directoryName
)
val
messageBus
=
componentManager
?.
messageBus
val
isUseVfsEffective
=
if
(
isUseVfs
==
ThreeState
.
UNSURE
)
this
.
isUseVfs
else
isUseVfs
.
toBoolean
()
val
manager
=
SchemeManagerImpl
(
path
,
processor
,
streamProvider
?:
(
componentManager
?.
stateStore
?.
storageManager
as
?
StateStorageManagerImpl
)
?.
compoundStreamProvider
,
...
...
@@ -46,7 +48,7 @@ sealed class SchemeManagerFactoryBase : SchemeManagerFactory(), SettingsSavingCo
roamingType
,
presentableName
,
schemeNameToFileName
,
if
(
isUseVfs
&&
messageBus
!=
null
&&
(
streamProvider
==
null
||
!
streamProvider
.
isApplicable
(
path
,
roamingType
)))
messageBus
else
null
)
if
(
isUseVfs
Effective
&&
messageBus
!=
null
&&
(
streamProvider
==
null
||
!
streamProvider
.
isApplicable
(
path
,
roamingType
)))
messageBus
else
null
)
if
(
isAutoSave
)
{
@Suppress
(
"UNCHECKED_CAST"
)
managers
.
add
(
manager
as
SchemeManagerImpl
<
Scheme
,
Scheme
>)
...
...
This diff is collapsed.
Click to expand it.
platform/lang-impl/src/com/intellij/execution/impl/RunManagerImpl.kt
+
1
-
1
View file @
9a022b8e
...
...
@@ -107,7 +107,7 @@ open class RunManagerImpl(internal val project: Project) : RunManagerEx(), Persi
isShared
=
false
,
isWrapSchemeIntoComponentElement
=
false
),
streamProvider
=
workspaceSchemeManagerProvider
,
isAutoSave
=
false
,
isUseVfs
=
false
)
isAutoSave
=
false
,
isUseVfs
=
ThreeState
.
NO
)
@Suppress
(
"LeakingThis"
)
private
var
projectSchemeManager
=
SchemeManagerFactory
.
getInstance
(
project
).
create
(
"runConfigurations"
,
...
...
This diff is collapsed.
Click to expand it.
platform/projectModel-impl/src/com/intellij/openapi/options/scheme.kt
+
2
-
1
View file @
9a022b8e
...
...
@@ -7,6 +7,7 @@ import com.intellij.configurationStore.StreamProvider
import
com.intellij.openapi.components.RoamingType
import
com.intellij.openapi.components.ServiceManager
import
com.intellij.openapi.project.Project
import
com.intellij.util.ThreeState
import
org.jdom.Parent
import
java.nio.file.Path
...
...
@@ -42,7 +43,7 @@ abstract class SchemeManagerFactory {
streamProvider
:
StreamProvider
?
=
null
,
directoryPath
:
Path
?
=
null
,
isAutoSave
:
Boolean
=
true
,
isUseVfs
:
Boolean
=
true
):
SchemeManager
<
SCHEME
>
isUseVfs
:
ThreeState
=
ThreeState
.
UNSURE
):
SchemeManager
<
SCHEME
>
open
fun
dispose
(
schemeManager
:
SchemeManager
<
*
>)
{
}
...
...
This diff is collapsed.
Click to expand it.
platform/testFramework/src/com/intellij/testFramework/MockSchemeManagerFactory.kt
+
2
-
1
View file @
9a022b8e
...
...
@@ -8,6 +8,7 @@ import com.intellij.openapi.options.EmptySchemesManager
import
com.intellij.openapi.options.SchemeManager
import
com.intellij.openapi.options.SchemeManagerFactory
import
com.intellij.openapi.options.SchemeProcessor
import
com.intellij.util.ThreeState
import
java.nio.file.Path
private
val
EMPTY
=
EmptySchemesManager
()
...
...
@@ -21,7 +22,7 @@ class MockSchemeManagerFactory : SchemeManagerFactory() {
streamProvider
:
StreamProvider
?,
directoryPath
:
Path
?,
isAutoSave
:
Boolean
,
isUseVfs
:
Boolean
):
SchemeManager
<
SCHEME
>
{
isUseVfs
:
ThreeState
):
SchemeManager
<
SCHEME
>
{
@Suppress
(
"UNCHECKED_CAST"
)
return
EMPTY
as
SchemeManager
<
SCHEME
>
}
...
...
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