/** * Returns the VM type names * @return an array of strings with the names of the applicable VMs */ private String[] getVMTypeNames() { String[] names = new String[fVMTypes.length]; for (int i = 0; i < fVMTypes.length; i++) { names[i]= fVMTypes[i].getName(); } return names; }
public int compare(Viewer viewer, Object e1, Object e2) { if ((e1 instanceof IVMInstall) && (e2 instanceof IVMInstall)) { IVMInstall left= (IVMInstall)e1; IVMInstall right= (IVMInstall)e2; String leftType= left.getVMInstallType().getName(); String rightType= right.getVMInstallType().getName(); int res= leftType.compareToIgnoreCase(rightType); if (res != 0) { return res; } return left.getName().compareToIgnoreCase(right.getName()); } return super.compare(viewer, e1, e2); }
/** * @see ITableLabelProvider#getColumnText(Object, int) */ public String getColumnText(Object element, int columnIndex) { if (element instanceof IVMInstall) { IVMInstall vm= (IVMInstall)element; switch(columnIndex) { case 0: if (isContributed(vm)) { return MessageFormat.format(JREMessages.InstalledJREsBlock_19, new String[]{vm.getName()}); } return vm.getName(); case 1: return vm.getInstallLocation().getAbsolutePath(); case 2: return vm.getVMInstallType().getName(); } } return element.toString(); }
if (installPath == null) { container.addStatus(new Status(IStatus.ERROR, LaunchingPlugin.ID_PLUGIN, NLS.bind(LaunchingMessages.VMDefinitionsContainer_3, new String[]{vmType.getName()}))); return; } else { container.addStatus(new Status(IStatus.ERROR, LaunchingPlugin.ID_PLUGIN, NLS.bind(LaunchingMessages.VMDefinitionsContainer_9, new String[]{vmType.getName()})));
if (installPath == null) { container.addStatus(new Status(IStatus.ERROR, LaunchingPlugin.ID_PLUGIN, NLS.bind(LaunchingMessages.VMDefinitionsContainer_3, new String[]{vmType.getName()}))); return; } else { container.addStatus(new Status(IStatus.ERROR, LaunchingPlugin.ID_PLUGIN, NLS.bind(LaunchingMessages.VMDefinitionsContainer_9, new String[]{vmType.getName()})));
if (vm == null) { abort(NLS.bind(LaunchingMessages.JavaRuntime_Specified_VM_install_not_found__type__0___name__1__2, new String[] {vt.getName(), name}), null); } else { return vm;
if (vm == null) { abort(NLS.bind(LaunchingMessages.JavaRuntime_Specified_VM_install_not_found__type__0___name__1__2, new String[] {vt.getName(), name}), null); } else { return vm;
createLabel(parent, fVM.getVMInstallType().getName());
String installName = JavaRuntime.getVMInstallName(containerPath); if (installName == null) { setError(MessageFormat.format(JREMessages.JREsComboBlock_10, new String[]{installType.getName()})); } else { setError(MessageFormat.format(JREMessages.JREsComboBlock_11, new String[]{installName, installType.getName()}));