Search in sources :

Example 1 with ResourceSelectorWidget

use of org.eclipse.linuxtools.profiling.launch.ui.ResourceSelectorWidget in project linuxtools by eclipse.

the class RemoteProxyCMainTab method createExeFileGroup.

protected void createExeFileGroup(Composite parent, int colSpan) {
    Composite mainComp = new Composite(parent, SWT.NONE);
    GridLayout mainLayout = new GridLayout();
    mainLayout.numColumns = 1;
    mainLayout.marginHeight = 0;
    mainLayout.marginWidth = 0;
    mainComp.setLayout(mainLayout);
    GridData gd = new GridData(GridData.FILL_HORIZONTAL);
    gd.horizontalSpan = colSpan;
    mainComp.setLayoutData(gd);
    exeSelector = new ResourceSelectorWidget(mainComp, ResourceSelectorWidget.ResourceType.FILE, 2, "C/C++ executable", // $NON-NLS-1$
    null);
    fProgText = exeSelector.getURIText();
    fProgText.addModifyListener(evt -> updateLaunchConfigurationDialog());
}
Also used : ResourceSelectorWidget(org.eclipse.linuxtools.profiling.launch.ui.ResourceSelectorWidget) GridLayout(org.eclipse.swt.layout.GridLayout) Composite(org.eclipse.swt.widgets.Composite) GridData(org.eclipse.swt.layout.GridData)

Example 2 with ResourceSelectorWidget

use of org.eclipse.linuxtools.profiling.launch.ui.ResourceSelectorWidget in project linuxtools by eclipse.

the class RemoteProxyCMainTab method createCopyFromExeGroup.

protected void createCopyFromExeGroup(Composite parent, int colSpan) {
    Composite mainComp = new Composite(parent, SWT.NONE);
    GridLayout mainLayout = new GridLayout();
    mainLayout.numColumns = 1;
    mainLayout.marginHeight = 0;
    mainLayout.marginWidth = 0;
    mainComp.setLayout(mainLayout);
    GridData gd = new GridData(GridData.FILL_HORIZONTAL);
    gd.horizontalSpan = colSpan;
    mainComp.setLayoutData(gd);
    enableCopyFromExeButton = createCheckButton(mainComp, ProxyLaunchMessages.copy_cpp_executable);
    copyFromExeSelector = new ResourceSelectorWidget(mainComp, ResourceSelectorWidget.ResourceType.FILE, 2, ProxyLaunchMessages.executable_origin, null);
    toLabel = new Label(mainComp, SWT.NONE);
    toLabel.setText(ProxyLaunchMessages.to);
    // The "copy from" check box is initially off, the selector and "To:" label
    // are disabled.
    copyFromExeSelector.setEnabled(false);
    enableCopyFromExeButton.setSelection(false);
    toLabel.setEnabled(false);
    enableCopyFromExeButton.addSelectionListener(SelectionListener.widgetSelectedAdapter(e -> {
        boolean copyEnabled = enableCopyFromExeButton.getSelection();
        setEnableCopyFromSection(copyEnabled);
        updateLaunchConfigurationDialog();
    }));
    copyFromExeText = copyFromExeSelector.getURIText();
    copyFromExeText.addModifyListener(evt -> updateLaunchConfigurationDialog());
}
Also used : ResourceSelectorWidget(org.eclipse.linuxtools.profiling.launch.ui.ResourceSelectorWidget) ICDTLaunchHelpContextIds(org.eclipse.cdt.launch.ui.ICDTLaunchHelpContextIds) ResourcesPlugin(org.eclipse.core.resources.ResourcesPlugin) URISyntaxException(java.net.URISyntaxException) LaunchImages(org.eclipse.cdt.launch.internal.ui.LaunchImages) CAbstractMainTab(org.eclipse.cdt.launch.ui.CAbstractMainTab) Image(org.eclipse.swt.graphics.Image) CoreException(org.eclipse.core.runtime.CoreException) ICProjectDescription(org.eclipse.cdt.core.settings.model.ICProjectDescription) DebugUITools(org.eclipse.debug.ui.DebugUITools) IWorkspaceRoot(org.eclipse.core.resources.IWorkspaceRoot) ILaunchConfiguration(org.eclipse.debug.core.ILaunchConfiguration) TwoPaneElementSelector(org.eclipse.ui.dialogs.TwoPaneElementSelector) CCorePlugin(org.eclipse.cdt.core.CCorePlugin) IProject(org.eclipse.core.resources.IProject) IPath(org.eclipse.core.runtime.IPath) Composite(org.eclipse.swt.widgets.Composite) URI(java.net.URI) GridData(org.eclipse.swt.layout.GridData) ICProject(org.eclipse.cdt.core.model.ICProject) EFS(org.eclipse.core.filesystem.EFS) MessageDialog(org.eclipse.jface.dialogs.MessageDialog) IFileStore(org.eclipse.core.filesystem.IFileStore) Text(org.eclipse.swt.widgets.Text) Button(org.eclipse.swt.widgets.Button) ProfileLaunchPlugin(org.eclipse.linuxtools.internal.profiling.launch.ProfileLaunchPlugin) NLS(org.eclipse.osgi.util.NLS) ICElement(org.eclipse.cdt.core.model.ICElement) IFileInfo(org.eclipse.core.filesystem.IFileInfo) PTY(org.eclipse.cdt.utils.pty.PTY) ResourceSelectorWidget(org.eclipse.linuxtools.profiling.launch.ui.ResourceSelectorWidget) IBinary(org.eclipse.cdt.core.model.IBinary) ILaunchConfigurationWorkingCopy(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy) LaunchMessages(org.eclipse.cdt.launch.internal.ui.LaunchMessages) IDebugUIConstants(org.eclipse.debug.ui.IDebugUIConstants) CElementLabelProvider(org.eclipse.cdt.ui.CElementLabelProvider) ILabelProvider(org.eclipse.jface.viewers.ILabelProvider) Window(org.eclipse.jface.window.Window) ICDTLaunchConfigurationConstants(org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants) IResource(org.eclipse.core.resources.IResource) Path(org.eclipse.core.runtime.Path) SWT(org.eclipse.swt.SWT) Label(org.eclipse.swt.widgets.Label) SelectionListener(org.eclipse.swt.events.SelectionListener) GridLayout(org.eclipse.swt.layout.GridLayout) GridLayout(org.eclipse.swt.layout.GridLayout) Composite(org.eclipse.swt.widgets.Composite) GridData(org.eclipse.swt.layout.GridData) Label(org.eclipse.swt.widgets.Label)

Example 3 with ResourceSelectorWidget

use of org.eclipse.linuxtools.profiling.launch.ui.ResourceSelectorWidget in project linuxtools by eclipse.

the class RemoteProxyCMainTab method createWorkingDirGroup.

protected void createWorkingDirGroup(Composite parent, int colSpan) {
    Composite mainComp = new Composite(parent, SWT.NONE);
    GridLayout mainLayout = new GridLayout();
    mainLayout.numColumns = 1;
    mainLayout.marginHeight = 0;
    mainLayout.marginWidth = 0;
    mainComp.setLayout(mainLayout);
    GridData gd = new GridData(GridData.FILL_HORIZONTAL);
    gd.horizontalSpan = colSpan;
    mainComp.setLayoutData(gd);
    ResourceSelectorWidget workingDirSelector = new ResourceSelectorWidget(mainComp, ResourceSelectorWidget.ResourceType.DIRECTORY, 2, "Working directory", // $NON-NLS-1$
    null);
    workingDirText = workingDirSelector.getURIText();
    workingDirText.addModifyListener(evt -> updateLaunchConfigurationDialog());
}
Also used : ResourceSelectorWidget(org.eclipse.linuxtools.profiling.launch.ui.ResourceSelectorWidget) GridLayout(org.eclipse.swt.layout.GridLayout) Composite(org.eclipse.swt.widgets.Composite) GridData(org.eclipse.swt.layout.GridData)

Aggregations

ResourceSelectorWidget (org.eclipse.linuxtools.profiling.launch.ui.ResourceSelectorWidget)3 GridData (org.eclipse.swt.layout.GridData)3 GridLayout (org.eclipse.swt.layout.GridLayout)3 Composite (org.eclipse.swt.widgets.Composite)3 URI (java.net.URI)1 URISyntaxException (java.net.URISyntaxException)1 CCorePlugin (org.eclipse.cdt.core.CCorePlugin)1 IBinary (org.eclipse.cdt.core.model.IBinary)1 ICElement (org.eclipse.cdt.core.model.ICElement)1 ICProject (org.eclipse.cdt.core.model.ICProject)1 ICProjectDescription (org.eclipse.cdt.core.settings.model.ICProjectDescription)1 ICDTLaunchConfigurationConstants (org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants)1 LaunchImages (org.eclipse.cdt.launch.internal.ui.LaunchImages)1 LaunchMessages (org.eclipse.cdt.launch.internal.ui.LaunchMessages)1 CAbstractMainTab (org.eclipse.cdt.launch.ui.CAbstractMainTab)1 ICDTLaunchHelpContextIds (org.eclipse.cdt.launch.ui.ICDTLaunchHelpContextIds)1 CElementLabelProvider (org.eclipse.cdt.ui.CElementLabelProvider)1 PTY (org.eclipse.cdt.utils.pty.PTY)1 EFS (org.eclipse.core.filesystem.EFS)1 IFileInfo (org.eclipse.core.filesystem.IFileInfo)1