Package org.erlide.runtime.runtimeinfo

Examples of org.erlide.runtime.runtimeinfo.RuntimeInfo


        fRuntimeList.setSorter(new ViewerSorter() {

            @Override
            public int compare(final Viewer viewer, final Object e1, final Object e2) {
                if (e1 instanceof RuntimeInfo && e2 instanceof RuntimeInfo) {
                    final RuntimeInfo left = (RuntimeInfo) e1;
                    final RuntimeInfo right = (RuntimeInfo) e2;
                    return left.getName().compareToIgnoreCase(right.getName());
                }
                return super.compare(viewer, e1, e2);
            }

            @Override
View Full Code Here


        fRuntimeList.setSorter(new ViewerSorter() {

            @Override
            public int compare(final Viewer viewer, final Object e1, final Object e2) {
                if (e1 instanceof RuntimeInfo && e2 instanceof RuntimeInfo) {
                    final RuntimeInfo left = (RuntimeInfo) e1;
                    final RuntimeInfo right = (RuntimeInfo) e2;
                    return left.getOtpHome().compareToIgnoreCase(right.getOtpHome());
                }
                return super.compare(viewer, e1, e2);
            }

            @Override
View Full Code Here

        selectSingle();
    }

    private void selectSingle() {
        if (runtimes.size() == 1) {
            final RuntimeInfo vm = runtimes.iterator().next();
            fRuntimeList.setChecked(vm, true);
        }
        if (runtimes.size() > 1) {
            final RuntimeInfo vm = runtimes.iterator().next();
            if (fRuntimeList.getCheckedElements().length == 0) {
                fRuntimeList.setChecked(vm, true);
            }
        }
    }
View Full Code Here

    }

    protected void editRuntime() {
        final IStructuredSelection selection = (IStructuredSelection) fRuntimeList
                .getSelection();
        final RuntimeInfo vm = (RuntimeInfo) selection.getFirstElement();
        if (vm == null) {
            return;
        }
        final AddRuntimeDialog dialog = new AddRuntimeDialog(this, getShell(), vm);
        dialog.setTitle(RuntimePreferenceMessages.edit_title);
        if (dialog.open() != Window.OK) {
            return;
        }
        removeRuntimes(new RuntimeInfo[] { vm });
        catalog.removeRuntime(vm.getName());
        fRuntimeList.refresh();
    }
View Full Code Here

    }

    protected void duplicateRuntime() {
        final IStructuredSelection selection = (IStructuredSelection) fRuntimeList
                .getSelection();
        final RuntimeInfo vm = (RuntimeInfo) selection.getFirstElement();
        if (vm == null) {
            return;
        }
        final RuntimeInfo vm1 = new RuntimeInfo.Builder(vm).withName(
                vm.getName() + "_copy").build();
        final AddRuntimeDialog dialog = new AddRuntimeDialog(this, getShell(), vm1);
        dialog.setTitle(RuntimePreferenceMessages.edit_title);
        if (dialog.open() != Window.OK) {
            return;
View Full Code Here

                | SWT.FULL_SELECTION);
        table.addSelectionListener(new SelectionAdapter() {
            @Override
            public void widgetSelected(final SelectionEvent e) {
                if (e.detail == SWT.CHECK) {
                    final RuntimeInfo ri = (RuntimeInfo) e.item.getData();
                    defaultRuntime = ri;
                }
            }
        });
View Full Code Here

        if (erlideRuntime == null) {
            erlideRuntime = defaultRuntime;
        }

        boolean restart = false;
        final RuntimeInfo oldDefault = catalog.getDefaultRuntime();
        if (oldDefault != RuntimeInfo.NO_RUNTIME_INFO
                && !defaultRuntime.equals(oldDefault)) {
            restart = RestartDialog.openQuestion(getShell());
        }
View Full Code Here

        defaultRuntime = catalog.getDefaultRuntime();
        erlideRuntime = catalog.getErlideRuntime();
    }

    void checkValid() {
        final RuntimeInfo def = getCheckedRuntime();

        if (def == null && getRuntimes().size() > 0) {
            setValid(false);
            setErrorMessage("Please select a default runtime.");
        } else {
View Full Code Here

         * @see ITableLabelProvider#getColumnText(Object, int)
         */
        @Override
        public String getColumnText(final Object element, final int columnIndex) {
            if (element instanceof RuntimeInfo) {
                final RuntimeInfo vm = (RuntimeInfo) element;
                switch (columnIndex) {
                case 0:
                    return vm.getName();
                case 1:
                    return vm.getOtpHome();
                case 2:
                    return vm.getVersion().toString();
                }
            }
            return element.toString();
        }
View Full Code Here

            }
            return Status.OK_STATUS;
        }

        private IBackend createBackend() {
            final RuntimeInfo erlideRuntime = BackendCore.getRuntimeInfoCatalog()
                    .getErlideRuntime();
            if (erlideRuntime == null) {
                return null;
            }
            final RuntimeInfo info = new RuntimeInfo(erlideRuntime);
            final BackendData data = new BackendData(info);
            final String nodeName = BackendUtils.getErlideNodeNameTag() + "_dialyzer";
            data.setNodeName(nodeName);
            data.setDebug(false);
            data.setConsole(false);
View Full Code Here

TOP

Related Classes of org.erlide.runtime.runtimeinfo.RuntimeInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.