Skip to content

Commit

Permalink
Merge pull request #415 from aslakknutsen/addon_build_install_no_proj…
Browse files Browse the repository at this point in the history
…ect_selected

Allow building and installing an Addon from a non Project Selection
  • Loading branch information
gastaldi committed Mar 18, 2014
2 parents 0a05c55 + 190f3f8 commit ff7df77
Showing 1 changed file with 1 addition and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public Metadata getMetadata(UIContext context)
@Override
public boolean isEnabled(UIContext context)
{
return containsProject(context);
return true;
}

@Override
Expand Down Expand Up @@ -104,17 +104,6 @@ public Result execute(UIExecutionContext context)
}
}

protected boolean containsProject(UIContext context)
{
UISelection<FileResource<?>> initialSelection = context.getInitialSelection();
if (!initialSelection.isEmpty())
{
return projectFactory.containsProject(initialSelection.get());
}
return false;

}

/**
* Returns the selected project. null if no project is found
*/
Expand Down

0 comments on commit ff7df77

Please sign in to comment.