Skip to content

Commit

Permalink
- F support for linux intellij comunity edition
Browse files Browse the repository at this point in the history
Co-Authored-By: Llewellyn Falco <llewellyn.falco@gmail.com>
Co-Authored-By: ssilverx <46622297+ssilverx@users.noreply.github.com>
Co-Authored-By: ollin <oliver.nautsch@gmail.com>
  • Loading branch information
4 people committed Oct 16, 2023
1 parent 6da991e commit e185feb
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,22 @@ void testFindItOnMac()
{
String userHome = "Users/lars";
Queryable<String> validPaths = Queryable.as("/Applications/IntelliJ IDEA.app/Contents/MacOS/idea",
"Users/lars/Applications/IntelliJ IDEA Ultimate.app/Contents/MacOS/idea",
"Users/lars/Applications/IntelliJ IDEA Community.app/Contents/MacOS/idea",
"Users/lars/Applications/IntelliJ IDEA Community Edition.app/Contents/MacOS/idea");
"Users/lars/Applications/IntelliJ IDEA Ultimate.app/Contents/MacOS/idea",
"Users/lars/Applications/IntelliJ IDEA Community.app/Contents/MacOS/idea",
"Users/lars/Applications/IntelliJ IDEA Community Edition.app/Contents/MacOS/idea");
for (String path : validPaths)
{
DiffInfo diffInfo = IntelliJToolboxResolver.getDiffInfoMac(userHome, f -> f.equals(path));
assertNotEquals("", diffInfo.diffProgram, path);
}
}

@Test
void testFindItOnLinux()
{
String userHome = "/home/lars";
Queryable<String> validPaths = Queryable.as(
"/home/lars/.local/share/JetBrains/Toolbox/apps/intellij-idea-ultimate/bin/idea.sh");
"/home/lars/.local/share/JetBrains/Toolbox/apps/intellij-idea-ultimate/bin/idea.sh",
"/home/lars/.local/share/JetBrains/Toolbox/apps/intellij-idea-community-edition/bin/idea.sh");
for (String path : validPaths)
{
DiffInfo diffInfo = IntelliJToolboxResolver.getDiffInfoLinux(userHome, f -> f.equals(path));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public static class All
"diff %s %s", TEXT);
public static DiffInfo INTELLIJ_U = new DiffInfo(new IntelliJPathResolver(Ultimate).findIt(),
"diff %s %s", TEXT);
public static DiffInfo INTELLIJ = IntelliJToolboxResolver.findIt();
public static DiffInfo INTELLIJ = IntelliJToolboxResolver.findIt();
}
public static class Linux
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public static DiffInfo getDiffInfoMac(String userHome, Function1<String, Boolean
}
public static DiffInfo getDiffInfoLinux(String userHome, Function1<String, Boolean> fileExists)
{
Queryable<String> locations = as("intellij-idea-ultimate"); // TODO community
Queryable<String> locations = as("intellij-idea-ultimate", "intellij-idea-community-edition");
Queryable<String> applications = as(userHome + "/.local/share/JetBrains/Toolbox/apps");
String postfix = "/bin/idea.sh";
return getDiffInfo(fileExists, applications, locations, postfix);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ public class IntelliJReporter extends FirstWorkingReporter
public static final IntelliJReporter INSTANCE = new IntelliJReporter();
public IntelliJReporter()
{
super(IntelliJMacReporter.INSTANCE, IntelliJMacSiliconReporter.INSTANCE, IntelliJUltimateReporter.INSTANCE,
super(IntelliJToolboxReporter.INSTANCE, IntelliJMacSiliconReporter.INSTANCE, IntelliJUltimateReporter.INSTANCE,
IntelliJCommunityReporter.INSTANCE);
}
private static class IntelliJMacReporter extends GenericDiffReporter
private static class IntelliJToolboxReporter extends GenericDiffReporter
{
public static final IntelliJMacReporter INSTANCE = new IntelliJMacReporter();
public IntelliJMacReporter()
public static final IntelliJToolboxReporter INSTANCE = new IntelliJToolboxReporter();
public IntelliJToolboxReporter()
{
super(DiffPrograms.All.INTELLIJ);
}
Expand Down

0 comments on commit e185feb

Please sign in to comment.