Skip to content

Commit

Permalink
Hardcoded demo model path to workaround gatekeeper issues on macos si…
Browse files Browse the repository at this point in the history
…erra.
  • Loading branch information
Nick Collier committed Sep 30, 2016
1 parent fb6aaa1 commit a6c5fc1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package repast.simphony.eclipse.ide;

import repast.simphony.eclipse.RepastSimphonyPlugin;

public interface Constants {

String OS_MODELS_PATH = "/Applications/Repast Simphony " + RepastSimphonyPlugin.REPAST_SIMPHONY_PLUGIN_VERSION + "/models";

}
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ public class ImportSampleModelsWizard extends Wizard implements IImportWizard, I
public ImportSampleModelsWizard() {
IPath eclipseHome = JavaCore.getClasspathVariable("ECLIPSE_HOME");
String eclipseHomeString = eclipseHome.toOSString();
String modelsPath = Platform.getOS().equals(Platform.OS_MACOSX) ? eclipseHomeString + File.separator + "../../.."
+ File.separator + "models" : eclipseHomeString + File.separator + ".." + File.separator + "models";
String modelsPath = Platform.getOS().equals(Platform.OS_MACOSX) ? Constants.OS_MODELS_PATH : eclipseHomeString + File.separator + ".." + File.separator + "models";
this.wizard = new ExternalProjectImportWizard(modelsPath);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ public class ImportSampleModelsWizard2 extends ExternalProjectImportWizard {
*
*/
public ImportSampleModelsWizard2() {
super(Platform.getOS().equals(Platform.OS_MACOSX) ? JavaCore.getClasspathVariable("ECLIPSE_HOME").toOSString() + File.separator + "../../.."
+ File.separator + "models" : JavaCore.getClasspathVariable("ECLIPSE_HOME").toOSString() + File.separator + ".."
super(Platform.getOS().equals(Platform.OS_MACOSX) ? Constants.OS_MODELS_PATH : JavaCore.getClasspathVariable("ECLIPSE_HOME").toOSString() + File.separator + ".."
+ File.separator + "models");
}

Expand Down

0 comments on commit a6c5fc1

Please sign in to comment.