Skip to content

Commit

Permalink
Fix ForgeService.getForgeVersion() on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-wyluda committed Jul 5, 2015
1 parent 4b72b10 commit 7b50a42
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions src/main/java/org/jboss/forge/plugin/idea/service/ForgeService.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,16 @@
*/
package org.jboss.forge.plugin.idea.service;

import java.io.File;
import java.util.concurrent.Future;

import com.intellij.ide.plugins.IdeaPluginDescriptor;
import com.intellij.ide.plugins.PluginManager;
import com.intellij.openapi.application.PathManager;
import com.intellij.openapi.components.ApplicationComponent;
import com.intellij.openapi.components.PersistentStateComponent;
import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import com.intellij.openapi.components.StoragePathMacros;
import com.intellij.openapi.extensions.PluginId;
import org.jboss.forge.addon.convert.ConverterFactory;
import org.jboss.forge.addon.ui.command.CommandFactory;
import org.jboss.forge.addon.ui.controller.CommandControllerFactory;
Expand All @@ -23,16 +30,8 @@
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import com.intellij.ide.plugins.IdeaPluginDescriptor;
import com.intellij.ide.plugins.PluginManager;
import com.intellij.openapi.application.PathManager;
import com.intellij.openapi.components.ApplicationComponent;
import com.intellij.openapi.components.PersistentStateComponent;
import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import com.intellij.openapi.components.StoragePathMacros;
import com.intellij.openapi.extensions.PluginId;
import java.io.File;
import java.util.concurrent.Future;

/**
* This is a singleton for the {@link Furnace} class.
Expand Down Expand Up @@ -179,7 +178,8 @@ public static String getForgeVersion()
if (bundledIdx > -1)
{
version = description.substring(bundledIdx + str.length(),
description.indexOf(System.lineSeparator(), bundledIdx)).trim();
description.indexOf(OperatingSystemUtils.isWindows() ? "\n" : System.lineSeparator(), bundledIdx))
.trim();
}
return version;
}
Expand Down

0 comments on commit 7b50a42

Please sign in to comment.