Skip to content

Commit 1dad0d1

Browse files
committed
Add preloading for application insights library
1 parent 85a441e commit 1dad0d1

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
1+
apply plugin: "io.freefair.aspectj.post-compile-weaving"
2+
3+
14
intellij {
25
}
36

47
dependencies {
58
compile project(':azure-intellij-plugin-lib')
69
compile project(':azure-intellij-resource-connector-lib')
10+
compile 'com.microsoft.azure:azure-toolkit-common-lib'
11+
aspect 'com.microsoft.azure:azure-toolkit-common-lib'
712
compile 'com.microsoft.azure:azure-toolkit-ide-common-lib'
813
compile 'com.microsoft.azure:azure-toolkit-ide-applicationinsights-lib:' + azureToolkitVersion
914
}

PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-applicationinsights/src/main/java/com/microsoft/azure/toolkit/intellij/applicationinsights/connection/ApplicationInsightsResourceDefinition.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import com.microsoft.azure.toolkit.lib.Azure;
2020
import com.microsoft.azure.toolkit.lib.applicationinsights.ApplicationInsight;
2121
import com.microsoft.azure.toolkit.lib.applicationinsights.AzureApplicationInsights;
22+
import com.microsoft.azure.toolkit.lib.common.cache.Preload;
2223
import com.microsoft.intellij.CommonConst;
2324
import lombok.Getter;
2425
import org.apache.commons.io.FileUtils;
@@ -74,6 +75,7 @@ static class ApplicationInsightsAgentHolder {
7475
private static final File applicationInsightsLibrary =
7576
new File(PluginManagerCore.getPlugin(PluginId.findId(CommonConst.PLUGIN_ID)).getPluginPath().toString(), "applicationinsights-agent.jar");
7677

78+
@Preload
7779
public static synchronized File getApplicationInsightsLibrary() {
7880
if (!applicationInsightsLibrary.exists()) {
7981
try {

0 commit comments

Comments
 (0)