Author: fbricon
Date: 2011-11-09 06:08:14 -0500 (Wed, 09 Nov 2011)
New Revision: 36245
Modified:
trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/internal/profiles/ProfileSelectionHandler.java
Log:
JBIDE-9862 : fix Maven project selection from the Package Explorer. Selected Projects are
IJavaProject instance, not IResource, so we need to use the IAdaptable plumbing
Modified:
trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/internal/profiles/ProfileSelectionHandler.java
===================================================================
---
trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/internal/profiles/ProfileSelectionHandler.java 2011-11-09
10:47:47 UTC (rev 36244)
+++
trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/internal/profiles/ProfileSelectionHandler.java 2011-11-09
11:08:14 UTC (rev 36245)
@@ -170,6 +170,11 @@
}
}
}
+ } else if (o instanceof IAdaptable) {
+ IProject p = (IProject)((IAdaptable) o).getAdapter(IProject.class);
+ if (p != null) {
+ projects.add(p);
+ }
}
}
}