public void run() { temp[0] = fSelectedVMType.validateInstallLocation(tempFile); } };
/** * Add the specified VM to the VM definitions managed by this container. * <p> * If distinguishing valid from invalid VMs is important, the specified VM must * have already had its install location set. An invalid VM is one whose install * location doesn't exist. * </p> * * @param vm the VM to be added to this container */ public void addVM(IVMInstall vm) { if (!fVMList.contains(vm)) { IVMInstallType vmInstallType = vm.getVMInstallType(); List<IVMInstall> vmList = fVMTypeToVMMap.get(vmInstallType); if (vmList == null) { vmList = new ArrayList<IVMInstall>(3); fVMTypeToVMMap.put(vmInstallType, vmList); } vmList.add(vm); File installLocation = vm.getInstallLocation(); if (installLocation == null || vmInstallType.validateInstallLocation(installLocation).getSeverity() == IStatus.ERROR) { fInvalidVMList.add(vm); } fVMList.add(vm); } }
/** * Add the specified VM to the VM definitions managed by this container. * <p> * If distinguishing valid from invalid VMs is important, the specified VM must * have already had its install location set. An invalid VM is one whose install * location doesn't exist. * </p> * * @param vm the VM to be added to this container */ public void addVM(IVMInstall vm) { if (!fVMList.contains(vm)) { IVMInstallType vmInstallType = vm.getVMInstallType(); List<IVMInstall> vmList = fVMTypeToVMMap.get(vmInstallType); if (vmList == null) { vmList = new ArrayList<>(3); fVMTypeToVMMap.put(vmInstallType, vmList); } vmList.add(vm); File installLocation = vm.getInstallLocation(); if (installLocation == null || vmInstallType.validateInstallLocation(installLocation).getSeverity() == IStatus.ERROR) { fInvalidVMList.add(vm); } fVMList.add(vm); } }
IStatus status = type.validateInstallLocation(file); if (status.isOK()) { found.add(file);
standin = new VMStandin(installType, id); standin.setName(name); IStatus status = installType.validateInstallLocation(homeDir); if (!status.isOK()) { abort(NLS.bind("Illegal install location {0} for vmInstall {1} contributed by {2}: {3}", //$NON-NLS-1$
standin = new VMStandin(installType, id); standin.setName(name); IStatus status = installType.validateInstallLocation(homeDir); if (!status.isOK()) { abort(NLS.bind("Illegal install location {0} for vmInstall {1} contributed by {2}: {3}", //$NON-NLS-1$
protected IVMInstall addInstalledJre(IVMInstallType type, InstalledJre jreToAdd) throws Exception { IVMInstall retVal = findJre(jreToAdd.getVersion(), jreToAdd.getInstalledLocation()); if (retVal == null) { IStatus validationStatus = type.validateInstallLocation(jreToAdd.getInstalledLocation()); if (!validationStatus.isOK()) { throw new CoreException(validationStatus); } VMStandin vmStandin = new VMStandin(type, EcoreUtil.generateUUID()); vmStandin.setInstallLocation(jreToAdd.getInstalledLocation()); vmStandin.setName("JRE for " + jreToAdd.getVersion()); IVMInstall realVM = vmStandin.convertToRealVM(); retVal = realVM; } return retVal; }