Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Intellij Community
Commits
dedaecfc
Commit
dedaecfc
authored
6 years ago
by
Roman Shevchenko
Browse files
Options
Download
Email Patches
Plain Diff
Cleanup (null check; dead code; formatting)
parent
a3428f89
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
platform/platform-api/src/com/intellij/ide/GeneralSettings.java
+1
-2
...rm/platform-api/src/com/intellij/ide/GeneralSettings.java
platform/platform-impl/src/com/intellij/internal/statistic/persistence/UsageStatisticsPersistenceComponent.java
+7
-18
...stic/persistence/UsageStatisticsPersistenceComponent.java
platform/platform-impl/src/com/intellij/openapi/application/ConfigImportHelper.java
+1
-1
.../com/intellij/openapi/application/ConfigImportHelper.java
platform/projectModel-api/src/com/intellij/openapi/components/Storage.java
+0
-2
...odel-api/src/com/intellij/openapi/components/Storage.java
platform/util/src/com/intellij/openapi/application/PathManager.java
+1
-2
...til/src/com/intellij/openapi/application/PathManager.java
with
10 additions
and
25 deletions
+10
-25
platform/platform-api/src/com/intellij/ide/GeneralSettings.java
+
1
-
2
View file @
dedaecfc
...
...
@@ -223,8 +223,7 @@ public class GeneralSettings implements PersistentStateComponent<GeneralSettings
}
@Deprecated
public
void
setConfirmExtractFiles
(
boolean
value
)
{
}
public
void
setConfirmExtractFiles
(
@SuppressWarnings
(
"unused"
)
boolean
value
)
{
}
public
boolean
isConfirmExit
()
{
return
myConfirmExit
;
...
...
This diff is collapsed.
Click to expand it.
platform/platform-impl/src/com/intellij/internal/statistic/persistence/UsageStatisticsPersistenceComponent.java
+
7
-
18
View file @
dedaecfc
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package
com.intellij.internal.statistic.persistence
;
import
com.intellij.ide.gdpr.ConsentOptions
;
...
...
@@ -12,9 +11,7 @@ import com.intellij.openapi.components.State;
import
com.intellij.openapi.components.Storage
;
import
com.intellij.openapi.util.text.StringUtil
;
import
org.jdom.Element
;
import
org.jetbrains.annotations.NonNls
;
import
org.jetbrains.annotations.NotNull
;
import
org.jetbrains.annotations.Nullable
;
@State
(
name
=
"UsagesStatistic"
,
...
...
@@ -23,12 +20,12 @@ import org.jetbrains.annotations.Nullable;
public
class
UsageStatisticsPersistenceComponent
extends
BasicSentUsagesPersistenceComponent
implements
PersistentStateComponent
<
Element
>
{
public
static
final
String
USAGE_STATISTICS_XML
=
"usage.statistics.xml"
;
@NonNls
private
boolean
isShowNotification
=
true
;
@NotNull
private
SendPeriod
myPeriod
=
SendPeriod
.
DAILY
;
private
boolean
isShowNotification
=
true
;
private
@NotNull
SendPeriod
myPeriod
=
SendPeriod
.
DAILY
;
@NonNls
private
static
final
String
LAST_TIME_ATTR
=
"time"
;
@NonNls
private
static
final
String
IS_ALLOWED_ATTR
=
"allowed"
;
@NonNls
private
static
final
String
SHOW_NOTIFICATION_ATTR
=
"show-notification"
;
private
static
final
String
LAST_TIME_ATTR
=
"time"
;
private
static
final
String
IS_ALLOWED_ATTR
=
"allowed"
;
private
static
final
String
SHOW_NOTIFICATION_ATTR
=
"show-notification"
;
public
static
UsageStatisticsPersistenceComponent
getInstance
()
{
return
ApplicationManager
.
getApplication
().
getComponent
(
UsageStatisticsPersistenceComponent
.
class
);
...
...
@@ -83,14 +80,6 @@ public class UsageStatisticsPersistenceComponent extends BasicSentUsagesPersiste
myPeriod
=
period
;
}
@NotNull
private
static
SendPeriod
parsePeriod
(
@Nullable
String
periodAttrValue
)
{
if
(
SendPeriod
.
DAILY
.
getName
().
equals
(
periodAttrValue
))
return
SendPeriod
.
DAILY
;
if
(
SendPeriod
.
MONTHLY
.
getName
().
equals
(
periodAttrValue
))
return
SendPeriod
.
MONTHLY
;
return
SendPeriod
.
WEEKLY
;
}
public
void
setAllowed
(
boolean
allowed
)
{
ConsentOptions
.
getInstance
().
setSendingUsageStatsAllowed
(
allowed
);
}
...
...
@@ -108,4 +97,4 @@ public class UsageStatisticsPersistenceComponent extends BasicSentUsagesPersiste
public
boolean
isShowNotification
()
{
return
isShowNotification
;
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
platform/platform-impl/src/com/intellij/openapi/application/ConfigImportHelper.java
+
1
-
1
View file @
dedaecfc
...
...
@@ -189,7 +189,7 @@ public class ConfigImportHelper {
if
(
new
File
(
selectedDir
,
SystemInfo
.
isMac
?
CONTENTS
:
BIN
).
isDirectory
())
{
File
configDir
=
getSettingsPath
(
selectedDir
,
PathManager
.
PROPERTY_CONFIG_PATH
,
PathManager:
:
getDefaultConfigPathFor
);
if
(
isConfigDirectory
(
configDir
))
{
if
(
configDir
!=
null
&&
isConfigDirectory
(
configDir
))
{
return
pair
(
configDir
,
selectedDir
);
}
}
...
...
This diff is collapsed.
Click to expand it.
platform/projectModel-api/src/com/intellij/openapi/components/Storage.java
+
0
-
2
View file @
dedaecfc
...
...
@@ -3,7 +3,6 @@ package com.intellij.openapi.components;
import
com.intellij.openapi.application.PathManager
;
import
com.intellij.util.ThreeState
;
import
org.jetbrains.annotations.NonNls
;
import
java.lang.annotation.Retention
;
import
java.lang.annotation.RetentionPolicy
;
...
...
@@ -29,7 +28,6 @@ public @interface Storage {
*
* @see StoragePathMacros
*/
@NonNls
String
value
()
default
""
;
/**
...
...
This diff is collapsed.
Click to expand it.
platform/util/src/com/intellij/openapi/application/PathManager.java
+
1
-
2
View file @
dedaecfc
...
...
@@ -72,8 +72,7 @@ public class PathManager {
}
/**
* @param insideIde {@code true} if the calling code is working inside IDE and {@code false} if it isn't (e.g. if it's running in a build
* process or a script)
* @param insideIde {@code true} if the calling code works inside IDE; {@code false} otherwise (e.g. in a build process or a script)
*/
@Contract
(
"true -> !null"
)
public
static
String
getHomePath
(
boolean
insideIde
)
{
...
...
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