enable scala actions on Java projects in non-Java perspective
(cherry picked from commit 82e6b26a7262da7bc3eed045d96377740ab4942d)
Merge pull request #362 from skyluc/issue/java-project-actions-1001597

Put changes from pr #357 in the right branch