* @author Dmitry Avdeev
*/
public class Struts2UrlConverter extends DeployedFileUrlConverter {
public Collection<String> getTargetPaths(@NotNull final PsiFile sourceFile, @NotNull final WebFacet webFacet) {
final StrutsModel combinedModel = StrutsManager.getInstance(sourceFile.getProject()).getCombinedModel(webFacet.getModule());
if (combinedModel == null) {
return Collections.emptyList();
}
final List<String> actionExtensions = StrutsConstantHelper.getActionExtensions(sourceFile);
if (actionExtensions.isEmpty()) {
return Collections.emptyList();
}
final String actionExtension = actionExtensions.get(0);
@NonNls final ArrayList<String> list = new ArrayList<String>();
combinedModel.processActions(new Processor<Action>() {
public boolean process(final Action action) {
for (final Result result : action.getResults()) {
final PathReference pathReference = result.getValue();
if (pathReference != null) {
final PsiElement psiElement = pathReference.resolve();