/** * Returns whether the VM install with the specified id was contributed via * the vmInstalls extension point. * * @param id VM id * @return whether the VM install was contributed via extension point * @since 3.2 */ public static boolean isContributedVMInstall(String id) { getVMInstallTypes(); // ensure VMs are initialized return fgContributedVMs.contains(id); }
/** * Returns whether the VM install with the specified id was contributed via * the vmInstalls extension point. * * @param id VM id * @return whether the VM install was contributed via extension point * @since 3.2 */ public static boolean isContributedVMInstall(String id) { getVMInstallTypes(); // ensure VMs are initialized return fgContributedVMs.contains(id); }
public TypeInfoLabelProvider(ITypeInfoImageProvider extension) { fProviderExtension= extension; List locations= new ArrayList(); List labels= new ArrayList(); IVMInstallType[] installs= JavaRuntime.getVMInstallTypes(); for (int i= 0; i < installs.length; i++) { processVMInstallType(installs[i], locations, labels); } fInstallLocations= (String[])locations.toArray(new String[locations.size()]); fVMNames= (String[])labels.toArray(new String[labels.size()]); } public void setFullyQualifyDuplicates(boolean value) {
public static IVMInstall[] getAllVMInstances() { ArrayList<IVMInstall> res = new ArrayList<>(); IVMInstallType[] types = JavaRuntime.getVMInstallTypes(); for (int i = 0; i < types.length; i++) { IVMInstall[] installs = types[i].getVMInstalls(); for (int k = 0; k < installs.length; k++) { res.add(installs[k]); } } return res.toArray(new IVMInstall[res.size()]); }
public TypeInfoLabelProvider(ITypeInfoImageProvider extension) { fProviderExtension= extension; List locations= new ArrayList(); List labels= new ArrayList(); IVMInstallType[] installs= JavaRuntime.getVMInstallTypes(); for (int i= 0; i < installs.length; i++) { processVMInstallType(installs[i], locations, labels); } fInstallLocations= (String[])locations.toArray(new String[locations.size()]); fVMNames= (String[])labels.toArray(new String[labels.size()]); } public void setFullyQualifyDuplicates(boolean value) {
/** * Creates new instance of TypeItemsComparator */ public TypeItemsComparator() { List<String> locations= new ArrayList<>(); List<String> labels= new ArrayList<>(); IVMInstallType[] installs= JavaRuntime.getVMInstallTypes(); for (int i= 0; i < installs.length; i++) { processVMInstallType(installs[i], locations, labels); } fInstallLocations= locations.toArray(new String[locations.size()]); fVMNames= labels.toArray(new String[labels.size()]); }
public TypeInfoUtil(ITypeInfoImageProvider extension) { fProviderExtension= extension; List locations= new ArrayList(); List labels= new ArrayList(); IVMInstallType[] installs= JavaRuntime.getVMInstallTypes(); for (int i= 0; i < installs.length; i++) { processVMInstallType(installs[i], locations, labels); } fInstallLocations= (String[]) locations.toArray(new String[locations.size()]); fVMNames= (String[]) labels.toArray(new String[labels.size()]); }
public TypeInfoLabelProvider(ITypeInfoImageProvider extension) { fProviderExtension= extension; List locations= new ArrayList(); List labels= new ArrayList(); IVMInstallType[] installs= JavaRuntime.getVMInstallTypes(); for (int i= 0; i < installs.length; i++) { processVMInstallType(installs[i], locations, labels); } fInstallLocations= (String[])locations.toArray(new String[locations.size()]); fVMNames= (String[])labels.toArray(new String[labels.size()]); } public void setFullyQualifyDuplicates(boolean value) {
public TypeInfoUtil() { List locations= new ArrayList(); List labels= new ArrayList(); IVMInstallType[] installs= JavaRuntime.getVMInstallTypes(); for (int i= 0; i < installs.length; i++) { processVMInstallType(installs[i], locations, labels); } fInstallLocations= (String[]) locations.toArray(new String[locations.size()]); fVMNames= (String[]) labels.toArray(new String[labels.size()]); } private void processVMInstallType(IVMInstallType installType, List locations, List labels) {
public TypeInfoLabelProvider(ITypeInfoImageProvider extension) { fProviderExtension= extension; List locations= new ArrayList(); List labels= new ArrayList(); IVMInstallType[] installs= JavaRuntime.getVMInstallTypes(); for (int i= 0; i < installs.length; i++) { processVMInstallType(installs[i], locations, labels); } fInstallLocations= (String[])locations.toArray(new String[locations.size()]); fVMNames= (String[])labels.toArray(new String[labels.size()]); } public void setFullyQualifyDuplicates(boolean value) {
public TypeInfoUtil(ITypeInfoImageProvider extension) { fProviderExtension= extension; List<IPath> locations= new ArrayList<>(); List<String> labels= new ArrayList<>(); IVMInstallType[] installs= JavaRuntime.getVMInstallTypes(); for (int i= 0; i < installs.length; i++) { processVMInstallType(installs[i], locations, labels); } fInstallLocations= CollectionsUtil.toArray(locations, IPath.class); fVMNames= labels.toArray(new String[labels.size()]); }
public TypeInfoUtil(ITypeInfoImageProvider extension) { fProviderExtension= extension; List<IPath> locations= new ArrayList<>(); List<String> labels= new ArrayList<>(); IVMInstallType[] installs= JavaRuntime.getVMInstallTypes(); for (int i= 0; i < installs.length; i++) { processVMInstallType(installs[i], locations, labels); } fInstallLocations= CollectionsUtil.toArray(locations, IPath.class); fVMNames= labels.toArray(new String[labels.size()]); }
private IVMInstall[] getWorkspaceJREs() { List<VMStandin> standins = new ArrayList<>(); IVMInstallType[] types = JavaRuntime.getVMInstallTypes(); for (int i = 0; i < types.length; i++) { IVMInstallType type = types[i]; IVMInstall[] installs = type.getVMInstalls(); for (int j = 0; j < installs.length; j++) { IVMInstall install = installs[j]; standins.add(new VMStandin(install)); } } return standins.toArray(new IVMInstall[standins.size()]); }
private IVMInstall findVM(File jvmHome) { IVMInstallType[] types = JavaRuntime.getVMInstallTypes(); for (IVMInstallType type : types) { IVMInstall[] installs = type.getVMInstalls(); for (IVMInstall install : installs) { if (jvmHome.equals(install.getInstallLocation())) { return install; } } } return null; }
private IVMInstall findJre(String version, File location) throws Exception { for (IVMInstallType vmInstallType : JavaRuntime.getVMInstallTypes()) { for (IVMInstall vmInstall : vmInstallType.getVMInstalls()) { File installLocation = vmInstall.getInstallLocation(); if (location.equals(installLocation)) { return vmInstall; } } } return null; } }
private IVMInstall find50OrGreaterVMInstall() { IVMInstallType[] installTypes= JavaRuntime.getVMInstallTypes(); for (int i= 0; i < installTypes.length; i++) { IVMInstall[] installs= installTypes[i].getVMInstalls(); for (int k= 0; k < installs.length; k++) { if (is50orGreaterVMInstall(installs[k])) { return installs[k]; } } } return null; }
private IVMInstall getVMInstall(String name) { IVMInstallType[] types = JavaRuntime.getVMInstallTypes(); for (int i = 0; i < types.length; i++) { IVMInstall[] installs = types[i].getVMInstalls(); for (int k = 0; k < installs.length; k++) { if (installs[i].getName().equals(name)) return installs[i]; } } return JavaRuntime.getDefaultVMInstall(); }
@Override public IEclipsePreferences preApply(IEclipsePreferences node) { try { // force VMs to be initialized before we import the new VMs JavaRuntime.getVMInstallTypes(); node.accept(new Visitor()); } catch (BackingStoreException e) { LaunchingPlugin.log(e); } return node; }
@Override public IEclipsePreferences preApply(IEclipsePreferences node) { try { // force VMs to be initialized before we import the new VMs JavaRuntime.getVMInstallTypes(); node.accept(new Visitor()); } catch (BackingStoreException e) { LaunchingPlugin.log(e); } return node; }
/** * Bring up a dialog that lets the user create a new VM definition. */ private void addVM() { AddVMDialog dialog= new AddVMDialog(this, getShell(), JavaRuntime.getVMInstallTypes(), null); dialog.setTitle(JREMessages.InstalledJREsBlock_7); if (dialog.open() != Window.OK) { return; } fVMList.refresh(); }