Skip to content

Commit

Permalink
Removed dependency on furnace-proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
gastaldi committed Feb 13, 2014
1 parent 02a4a6d commit 9851418
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
5 changes: 0 additions & 5 deletions ui/impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@
<classifier>forge-addon</classifier>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.forge.furnace</groupId>
<artifactId>furnace-proxy</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.forge.furnace.test</groupId>
<artifactId>furnace-test-harness</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.LinkedList;
Expand Down Expand Up @@ -39,7 +39,6 @@
import org.jboss.forge.addon.ui.wizard.UIWizard;
import org.jboss.forge.addon.ui.wizard.WizardExecutionListener;
import org.jboss.forge.furnace.addons.AddonRegistry;
import org.jboss.forge.furnace.proxy.Proxies;

/**
*
Expand All @@ -60,7 +59,7 @@ class WizardCommandControllerImpl extends AbstractCommandController implements W
*/
private final LinkedList<WizardStepEntry> subflow = new LinkedList<>();

private final Map<Integer, WizardStepEntry> usedSubflows = new HashMap<>();
private final Set<Integer> usedSubflows = new HashSet<>();

/**
* The pointer that this flow is on. Starts with 0
Expand Down Expand Up @@ -280,7 +279,7 @@ public boolean canMoveToNextStep()
return false;
}
Class<? extends UICommand>[] next = getNextFrom(getCurrentController().getCommand());
return ((next != null || !subflow.isEmpty()) || usedSubflows.containsKey(flowPointer));
return ((next != null || !subflow.isEmpty()) || usedSubflows.contains(flowPointer));
}

@Override
Expand Down Expand Up @@ -321,6 +320,7 @@ public boolean canExecute()
return true;
}

@SuppressWarnings("unchecked")
@Override
public WizardCommandController next() throws Exception
{
Expand Down Expand Up @@ -357,8 +357,8 @@ public WizardCommandController next() throws Exception
}
else
{
UICommand command2 = Proxies.unwrap(subflow.peek().controller.getCommand());
command = createCommand(command2.getClass());
UICommandMetadata metadata = subflow.peek().controller.getCommand().getMetadata(context);
command = createCommand((Class<? extends UICommand>) metadata.getType());
}
}
else
Expand Down Expand Up @@ -417,7 +417,7 @@ private void addNextFlowStep(Class<? extends UICommand>[] result)
else
{
next = subflow.pop();
usedSubflows.put(flowPointer, next);
usedSubflows.add(flowPointer);
}
}
else
Expand Down

0 comments on commit 9851418

Please sign in to comment.