Project (ConfigurationContext context) { final Location<?> contextLocation = context.getLocation(); if (!(contextLocation instanceof ExternalSystemTaskLocation)) { return null; } return contextLocation.getProject(); }