Skip to content

Commit

Permalink
Using OperatingSystem class to default workspace location if empty
Browse files Browse the repository at this point in the history
  • Loading branch information
gastaldi committed Jun 27, 2013
1 parent c3b87aa commit 8e1ee6f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package org.jboss.forge.addon.projects.impl;

import java.io.File;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
Expand Down Expand Up @@ -32,6 +31,7 @@
import org.jboss.forge.addon.ui.util.Categories;
import org.jboss.forge.addon.ui.util.Metadata;
import org.jboss.forge.addon.ui.wizard.UIWizard;
import org.jboss.forge.furnace.util.OperatingSystemUtils;

public class NewProjectWizard implements UIWizard
{
Expand Down Expand Up @@ -94,7 +94,7 @@ public void initializeUI(final UIBuilder builder) throws Exception
}
else
{
targetLocation.setDefaultValue(resourceFactory.create(DirectoryResource.class, new File("")));
targetLocation.setDefaultValue(resourceFactory.create(DirectoryResource.class, OperatingSystemUtils.getUserHomeDir()));
}
overwrite.setDefaultValue(false).setEnabled(new Callable<Boolean>()
{
Expand Down

0 comments on commit 8e1ee6f

Please sign in to comment.