* @param monitor the monitor
* @return the runtime working copy or null if invalid
*/
public IRuntimeWorkingCopy getRuntimeFromDir(File dir, IProgressMonitor monitor) {
String absolutePath = dir.getAbsolutePath();
ServerBeanLoader l = new ServerBeanLoader(dir);
ServerBean sb = l.getServerBean();
if( sb != null ) {
ServerBeanType type = sb.getBeanType();
if( type != null ) {
if( type.equals(ServiceMixBeanProvider.SMX_4x) ||
type.equals(ServiceMixBeanProvider.SMX_5x) ) {
String serverType = l.getServerAdapterId();
if( serverType != null ) {
IServerType t = ServerCore.findServerType(serverType);
if( t != null ) {
IRuntimeType rtt = t.getRuntimeType();
try {