Skip to content

Commit

Permalink
refactor: migrate from deprecated API
Browse files Browse the repository at this point in the history
Project.getBaseDir() and IconLoader.getIcon(String) are both deprecated.
  • Loading branch information
darrachequesne committed Nov 3, 2020
1 parent 03eb512 commit 462a03c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 15 deletions.
2 changes: 1 addition & 1 deletion resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<action id="Commit.Button" class="com.leroymerlin.commit.CreateCommitAction"
text="Create commit message"
description="Create commit message"
icon="PluginIcons.LOAD">
icon="/icons/load.png">
<add-to-group group-id="Vcs.MessageActionGroup" anchor="first"/>
</action>
</actions>
Expand Down
3 changes: 1 addition & 2 deletions src/com/leroymerlin/commit/CommitPanel.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.leroymerlin.commit;

import com.intellij.openapi.project.Project;
import com.intellij.openapi.vfs.VfsUtil;

import javax.swing.*;
import java.io.File;
Expand Down Expand Up @@ -33,7 +32,7 @@ public class CommitPanel {
private ButtonGroup changeTypeGroup;

CommitPanel(Project project, CommitMessage commitMessage) {
File workingDirectory = VfsUtil.virtualToIoFile(project.getBaseDir());
File workingDirectory = new File(project.getBasePath());
GitLogQuery.Result result = new GitLogQuery(workingDirectory).execute();
if (result.isSuccess()) {
changeScope.addItem(""); // no value by default
Expand Down
12 changes: 0 additions & 12 deletions src/icons/PluginIcons.java

This file was deleted.

0 comments on commit 462a03c

Please sign in to comment.