Skip to content

Commit 8f7ffb5

Browse files
committed
remove ide-based debug model action since we have gradle debug
1 parent 106ac90 commit 8f7ffb5

File tree

1 file changed

+10
-11
lines changed
  • PluginsAndFeatures/azure-toolkit-for-intellij/src/com/microsoft/intellij

1 file changed

+10
-11
lines changed

PluginsAndFeatures/azure-toolkit-for-intellij/src/com/microsoft/intellij/AzurePlugin.java

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -262,9 +262,10 @@ public String getComponentName() {
262262
return "MSOpenTechTools.AzurePlugin";
263263
}
264264

265-
// plugin will be installed into plugins-sandbox in debug model
265+
// currently we didn't have a better way to know if it is in debug model.
266+
// the code suppose we are under debug model if the plugin root path contains 'sandbox' for Gradle default debug path
266267
private boolean isDebugModel() {
267-
return PluginUtil.getPluginRootDirectory().contains("plugins-sandbox");
268+
return PluginUtil.getPluginRootDirectory().contains("sandbox");
268269
}
269270

270271
/**
@@ -273,20 +274,18 @@ private boolean isDebugModel() {
273274
*/
274275
private void copyPluginComponents() {
275276
try {
276-
if (!isDebugModel()) {
277-
for (AzureLibrary azureLibrary : AzureLibrary.LIBRARIES) {
278-
if (azureLibrary.getLocation() != null) {
279-
if (!new File(pluginFolder + File.separator + azureLibrary.getLocation()).exists()) {
280-
for (String entryName : Utils.getJarEntries(pluginFolder + File.separator + "lib" + File.separator + CommonConst.PLUGIN_NAME + ".jar", azureLibrary.getLocation())) {
281-
new File(pluginFolder + File.separator + entryName).getParentFile().mkdirs();
282-
copyResourceFile(entryName, pluginFolder + File.separator + entryName);
283-
}
277+
extractJobViewResource();
278+
for (AzureLibrary azureLibrary : AzureLibrary.LIBRARIES) {
279+
if (azureLibrary.getLocation() != null) {
280+
if (!new File(pluginFolder + File.separator + azureLibrary.getLocation()).exists()) {
281+
for (String entryName : Utils.getJarEntries(pluginFolder + File.separator + "lib" + File.separator + CommonConst.PLUGIN_NAME + ".jar", azureLibrary.getLocation())) {
282+
new File(pluginFolder + File.separator + entryName).getParentFile().mkdirs();
283+
copyResourceFile(entryName, pluginFolder + File.separator + entryName);
284284
}
285285
}
286286
}
287287
}
288288

289-
extractJobViewResource();
290289
} catch (Exception e) {
291290
LOG.error(e.getMessage(), e);
292291
}

0 commit comments

Comments
 (0)