-
-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
201 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
<id>MavenRunHelper</id> | ||
<name>Maven Helper</name> | ||
<version>4.4.183.4139.0</version> | ||
<version>4.5.183.4139.0</version> | ||
|
||
<vendor url="https://github.com/krasa/MavenHelper" email="[email protected]">Vojtech | ||
Krasa | ||
|
@@ -38,6 +38,8 @@ | |
]]></description> | ||
|
||
<change-notes><![CDATA[ | ||
<br>4.5 | ||
<br> - Fixed conflict false negative due to a <a href="https://youtrack.jetbrains.com/issue/IDEA-215596">bugged dependency resolution by IntelliJ</a> | ||
<br>4.4 | ||
<br> - Goals rearranging fixed | ||
<br>4.3 | ||
|
@@ -135,7 +137,7 @@ | |
description="Run New Maven Goal..." icon="/krasa/mavenhelper/icons/runMaven.png"> | ||
<add-to-group group-id="RunMenu" anchor="first"/> | ||
</action> | ||
</actions> | ||
</actions> | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,38 @@ | ||
package krasa.mavenhelper.analyzer; | ||
|
||
import com.intellij.ui.SimpleTextAttributes; | ||
import org.jetbrains.annotations.NotNull; | ||
import org.jetbrains.idea.maven.model.MavenArtifact; | ||
import org.jetbrains.idea.maven.model.MavenArtifactNode; | ||
import org.jetbrains.idea.maven.model.MavenArtifactState; | ||
|
||
/** | ||
* @author Vojtech Krasa | ||
*/ | ||
public class MyTreeUserObject { | ||
|
||
private MavenArtifactNode mavenArtifactNode; | ||
protected SimpleTextAttributes attributes; | ||
private MavenArtifactNode mavenArtifactNode; | ||
|
||
boolean showOnlyVersion = false; | ||
boolean highlight; | ||
boolean showOnlyVersion = false; | ||
boolean highlight; | ||
|
||
public MyTreeUserObject(MavenArtifactNode mavenArtifactNode) { | ||
this.mavenArtifactNode = mavenArtifactNode; | ||
this.attributes = SimpleTextAttributes.REGULAR_ATTRIBUTES; | ||
} | ||
public MyTreeUserObject(MavenArtifactNode mavenArtifactNode) { | ||
this.mavenArtifactNode = mavenArtifactNode; | ||
} | ||
|
||
public MyTreeUserObject(MavenArtifactNode mavenArtifactNode, final SimpleTextAttributes regularAttributes) { | ||
this.mavenArtifactNode = mavenArtifactNode; | ||
this.attributes = regularAttributes; | ||
} | ||
|
||
static MyTreeUserObject create(MavenArtifactNode mavenArtifactNode, @NotNull String rightVersion) { | ||
SimpleTextAttributes attributes = SimpleTextAttributes.ERROR_ATTRIBUTES; | ||
if (mavenArtifactNode.getState() == MavenArtifactState.ADDED | ||
|| (mavenArtifactNode.getRelatedArtifact() != null | ||
&& mavenArtifactNode.getRelatedArtifact().getVersion().equals(mavenArtifactNode.getArtifact().getVersion()))) { | ||
attributes = SimpleTextAttributes.REGULAR_ATTRIBUTES; | ||
} | ||
return new MyTreeUserObject(mavenArtifactNode, attributes); | ||
} | ||
|
||
public MavenArtifact getArtifact() { | ||
return mavenArtifactNode.getArtifact(); | ||
} | ||
return mavenArtifactNode.getArtifact(); | ||
} | ||
|
||
public MavenArtifactNode getMavenArtifactNode() { | ||
return mavenArtifactNode; | ||
} | ||
|
||
public MavenArtifactNode getMavenArtifactNode() { | ||
return mavenArtifactNode; | ||
} | ||
public boolean isHighlight() { | ||
return highlight; | ||
} | ||
|
||
public boolean isHighlight() { | ||
return highlight; | ||
} | ||
@Override | ||
public String toString() { | ||
return mavenArtifactNode.getArtifact().getArtifactId(); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return mavenArtifactNode.getArtifact().getArtifactId(); | ||
} | ||
} |
Oops, something went wrong.