Search in sources :

Example 6 with HostController

use of org.eclipse.titan.executor.HostController in project titan.EclipsePlug-ins by eclipse.

the class HostControllersTab method handleCopySelected.

private void handleCopySelected() {
    IStructuredSelection sel = (IStructuredSelection) hostViewer.getSelection();
    HostController controller = (HostController) sel.getFirstElement();
    if (null == controller) {
        return;
    }
    hostViewer.add(controller.clone());
    updateLaunchConfigurationDialog();
}
Also used : IStructuredSelection(org.eclipse.jface.viewers.IStructuredSelection) HostController(org.eclipse.titan.executor.HostController)

Example 7 with HostController

use of org.eclipse.titan.executor.HostController in project titan.EclipsePlug-ins by eclipse.

the class HostControllersTab method handleEditButtonSelected.

private void handleEditButtonSelected() {
    IStructuredSelection sel = (IStructuredSelection) hostViewer.getSelection();
    HostController controller = (HostController) sel.getFirstElement();
    if (null == controller) {
        return;
    }
    String host = controller.host();
    String workingDirectory = controller.workingdirectory();
    String executable = controller.executable();
    String command = controller.command();
    HostControllerDialog dialog = new HostControllerDialog(getShell(), getProject(), HOSTCONTROLLER);
    dialog.setHostName(host);
    dialog.setWorkingdirectory(workingDirectory);
    dialog.setExecutable(executable);
    dialog.setCommand(command);
    if (dialog.open() != Window.OK) {
        return;
    }
    controller.configure(dialog.getHostName(), dialog.getWorkingdirectory(), dialog.getExecutable(), dialog.getCommand());
    hostViewer.refresh(controller, true);
    updateLaunchConfigurationDialog();
}
Also used : IStructuredSelection(org.eclipse.jface.viewers.IStructuredSelection) HostController(org.eclipse.titan.executor.HostController)

Aggregations

HostController (org.eclipse.titan.executor.HostController)7 CoreException (org.eclipse.core.runtime.CoreException)3 ArrayList (java.util.ArrayList)2 IProject (org.eclipse.core.resources.IProject)2 IStructuredSelection (org.eclipse.jface.viewers.IStructuredSelection)2 TableItem (org.eclipse.swt.widgets.TableItem)2 MessageConsoleStream (org.eclipse.ui.console.MessageConsoleStream)2 File (java.io.File)1 IOException (java.io.IOException)1 URI (java.net.URI)1 Date (java.util.Date)1 Formatter (java.util.Formatter)1 IFile (org.eclipse.core.resources.IFile)1 QualifiedName (org.eclipse.core.runtime.QualifiedName)1 ILaunchConfiguration (org.eclipse.debug.core.ILaunchConfiguration)1 IProcess (org.eclipse.debug.core.model.IProcess)1 Notification (org.eclipse.titan.executor.views.notification.Notification)1