Search in sources :

Example 11 with NLS

use of org.eclipse.osgi.util.NLS in project linuxtools by eclipse.

the class ValgrindExportWizardPage method createDestinationGroup.

private void createDestinationGroup(Composite top) {
    Group destGroup = new Group(top, SWT.SHADOW_OUT);
    // $NON-NLS-1$
    destGroup.setText(Messages.getString("ValgrindExportWizardPage.Destination_group"));
    destGroup.setLayout(new GridLayout(2, false));
    destGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    destText = new Text(destGroup, SWT.BORDER);
    destText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    destText.addModifyListener(e -> setPageComplete(isValid()));
    Button browseButton = new Button(destGroup, SWT.PUSH);
    // $NON-NLS-1$
    browseButton.setText(Messages.getString("ValgrindExportWizardPage.Browse"));
    browseButton.addSelectionListener(SelectionListener.widgetSelectedAdapter(e -> {
        // Prompt for output directory
        Shell parent = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
        DirectoryDialog dialog = new DirectoryDialog(parent);
        // $NON-NLS-1$
        dialog.setText(Messages.getString("ValgrindLaunchConfigurationDelegate.Select_Destination"));
        String strpath = dialog.open();
        if (strpath != null) {
            destText.setText(strpath);
        }
    }));
}
Also used : CheckboxTableViewer(org.eclipse.jface.viewers.CheckboxTableViewer) Image(org.eclipse.swt.graphics.Image) CoreException(org.eclipse.core.runtime.CoreException) ILaunchConfiguration(org.eclipse.debug.core.ILaunchConfiguration) IPath(org.eclipse.core.runtime.IPath) Composite(org.eclipse.swt.widgets.Composite) WizardPage(org.eclipse.jface.wizard.WizardPage) GridData(org.eclipse.swt.layout.GridData) Text(org.eclipse.swt.widgets.Text) Shell(org.eclipse.swt.widgets.Shell) Button(org.eclipse.swt.widgets.Button) NLS(org.eclipse.osgi.util.NLS) PlatformUI(org.eclipse.ui.PlatformUI) ArrayContentProvider(org.eclipse.jface.viewers.ArrayContentProvider) Group(org.eclipse.swt.widgets.Group) File(java.io.File) ImageDescriptor(org.eclipse.jface.resource.ImageDescriptor) ISharedImages(org.eclipse.ui.ISharedImages) FileFilter(java.io.FileFilter) Path(org.eclipse.core.runtime.Path) SWT(org.eclipse.swt.SWT) DirectoryDialog(org.eclipse.swt.widgets.DirectoryDialog) Label(org.eclipse.swt.widgets.Label) LabelProvider(org.eclipse.jface.viewers.LabelProvider) SelectionListener(org.eclipse.swt.events.SelectionListener) GridLayout(org.eclipse.swt.layout.GridLayout) Group(org.eclipse.swt.widgets.Group) GridLayout(org.eclipse.swt.layout.GridLayout) Shell(org.eclipse.swt.widgets.Shell) Button(org.eclipse.swt.widgets.Button) GridData(org.eclipse.swt.layout.GridData) Text(org.eclipse.swt.widgets.Text) DirectoryDialog(org.eclipse.swt.widgets.DirectoryDialog)

Example 12 with NLS

use of org.eclipse.osgi.util.NLS in project linuxtools by eclipse.

the class ValgrindOptionsTab method createSuppressionsOption.

private void createSuppressionsOption(Composite top) {
    Composite browseTop = new Composite(top, SWT.BORDER);
    browseTop.setLayout(new GridLayout(2, false));
    GridData browseData = new GridData(GridData.FILL_BOTH);
    browseTop.setLayoutData(browseData);
    Label suppFileLabel = new Label(browseTop, SWT.NONE);
    // $NON-NLS-1$
    suppFileLabel.setText(Messages.getString("ValgrindOptionsTab.suppressions_file"));
    createVerticalSpacer(browseTop, 1);
    suppFileList = new List(browseTop, SWT.BORDER);
    suppFileList.setLayoutData(new GridData(GridData.FILL_BOTH));
    Composite buttonTop = new Composite(browseTop, SWT.NONE);
    GridLayout buttonLayout = new GridLayout();
    buttonLayout.marginWidth = buttonLayout.marginHeight = 0;
    buttonTop.setLayout(buttonLayout);
    buttonTop.setLayoutData(new GridData(SWT.CENTER, SWT.BEGINNING, false, false));
    // $NON-NLS-1$
    Button workspaceBrowseButton = createPushButton(buttonTop, Messages.getString("ValgrindOptionsTab.Workspace"), null);
    workspaceBrowseButton.addSelectionListener(SelectionListener.widgetSelectedAdapter(e -> {
        ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(getShell(), new WorkbenchLabelProvider(), new WorkbenchContentProvider());
        // $NON-NLS-1$
        dialog.setTitle(Messages.getString("ValgrindOptionsTab.Select_a_Resource"));
        // $NON-NLS-1$
        dialog.setMessage(Messages.getString("ValgrindOptionsTab.Select_a_Suppressions_File"));
        dialog.setInput(ResourcesPlugin.getWorkspace().getRoot());
        dialog.setComparator(new ResourceComparator(ResourceComparator.NAME));
        if (dialog.open() == IDialogConstants.OK_ID) {
            IResource resource = (IResource) dialog.getFirstResult();
            String arg = resource.getFullPath().toString();
            String fileLoc = VariablesPlugin.getDefault().getStringVariableManager().generateVariableExpression("workspace_loc", // $NON-NLS-1$
            arg);
            suppFileList.add(fileLoc);
            updateLaunchConfigurationDialog();
        }
    }));
    // $NON-NLS-1$
    Button fileBrowseButton = createPushButton(buttonTop, Messages.getString("ValgrindOptionsTab.File_System"), null);
    fileBrowseButton.addSelectionListener(SelectionListener.widgetSelectedAdapter(e -> {
        String filePath = null;
        FileDialog dialog = new FileDialog(getShell(), SWT.SAVE);
        filePath = dialog.open();
        if (filePath != null) {
            suppFileList.add(filePath);
            updateLaunchConfigurationDialog();
        }
    }));
    // $NON-NLS-1$
    Button removeButton = createPushButton(buttonTop, Messages.getString("ValgrindOptionsTab.Supp_remove"), null);
    removeButton.addSelectionListener(SelectionListener.widgetSelectedAdapter(e -> {
        int[] selected = suppFileList.getSelectionIndices();
        if (selected.length > 0) {
            suppFileList.remove(selected);
            updateLaunchConfigurationDialog();
        }
    }));
}
Also used : WorkbenchContentProvider(org.eclipse.ui.model.WorkbenchContentProvider) Arrays(java.util.Arrays) TabFolder(org.eclipse.swt.widgets.TabFolder) ResourcesPlugin(org.eclipse.core.resources.ResourcesPlugin) ConfigUtils(org.eclipse.linuxtools.profiling.launch.ConfigUtils) Image(org.eclipse.swt.graphics.Image) CoreException(org.eclipse.core.runtime.CoreException) Spinner(org.eclipse.swt.widgets.Spinner) IDialogConstants(org.eclipse.jface.dialogs.IDialogConstants) Point(org.eclipse.swt.graphics.Point) ILaunchConfiguration(org.eclipse.debug.core.ILaunchConfiguration) IStatus(org.eclipse.core.runtime.IStatus) IProject(org.eclipse.core.resources.IProject) IPath(org.eclipse.core.runtime.IPath) AbstractLaunchConfigurationTab(org.eclipse.debug.ui.AbstractLaunchConfigurationTab) VariablesPlugin(org.eclipse.core.variables.VariablesPlugin) Composite(org.eclipse.swt.widgets.Composite) AbstractUIPlugin(org.eclipse.ui.plugin.AbstractUIPlugin) GridData(org.eclipse.swt.layout.GridData) WorkbenchLabelProvider(org.eclipse.ui.model.WorkbenchLabelProvider) TabItem(org.eclipse.swt.widgets.TabItem) Text(org.eclipse.swt.widgets.Text) Combo(org.eclipse.swt.widgets.Combo) Button(org.eclipse.swt.widgets.Button) NLS(org.eclipse.osgi.util.NLS) FileDialog(org.eclipse.swt.widgets.FileDialog) GridDataFactory(org.eclipse.jface.layout.GridDataFactory) ResourceComparator(org.eclipse.ui.views.navigator.ResourceComparator) Status(org.eclipse.core.runtime.Status) ILaunchConfigurationWorkingCopy(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy) Version(org.osgi.framework.Version) Group(org.eclipse.swt.widgets.Group) ModifyListener(org.eclipse.swt.events.ModifyListener) IResource(org.eclipse.core.resources.IResource) SWT(org.eclipse.swt.SWT) List(org.eclipse.swt.widgets.List) IValgrindToolPage(org.eclipse.linuxtools.valgrind.launch.IValgrindToolPage) ScrolledComposite(org.eclipse.swt.custom.ScrolledComposite) Label(org.eclipse.swt.widgets.Label) Control(org.eclipse.swt.widgets.Control) ElementTreeSelectionDialog(org.eclipse.ui.dialogs.ElementTreeSelectionDialog) SelectionListener(org.eclipse.swt.events.SelectionListener) GridLayout(org.eclipse.swt.layout.GridLayout) ResourceComparator(org.eclipse.ui.views.navigator.ResourceComparator) WorkbenchLabelProvider(org.eclipse.ui.model.WorkbenchLabelProvider) Composite(org.eclipse.swt.widgets.Composite) ScrolledComposite(org.eclipse.swt.custom.ScrolledComposite) Label(org.eclipse.swt.widgets.Label) WorkbenchContentProvider(org.eclipse.ui.model.WorkbenchContentProvider) ElementTreeSelectionDialog(org.eclipse.ui.dialogs.ElementTreeSelectionDialog) GridLayout(org.eclipse.swt.layout.GridLayout) Button(org.eclipse.swt.widgets.Button) GridData(org.eclipse.swt.layout.GridData) List(org.eclipse.swt.widgets.List) FileDialog(org.eclipse.swt.widgets.FileDialog) IResource(org.eclipse.core.resources.IResource)

Example 13 with NLS

use of org.eclipse.osgi.util.NLS in project linuxtools by eclipse.

the class MemcheckToolPage method createControl.

@Override
public void createControl(Composite parent) {
    Composite top = new Composite(parent, SWT.NONE);
    GridLayout memcheckLayout = new GridLayout(2, true);
    top.setLayout(memcheckLayout);
    top.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    leakCheckButton = new Button(top, SWT.CHECK);
    leakCheckButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    // $NON-NLS-1$
    leakCheckButton.setText(Messages.getString("MemcheckToolPage.leak_check"));
    leakCheckButton.addSelectionListener(selectListener);
    Composite leakResTop = new Composite(top, SWT.NONE);
    leakResTop.setLayout(new GridLayout(2, false));
    leakResTop.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    Label leakResLabel = new Label(leakResTop, SWT.NONE);
    // $NON-NLS-1$
    leakResLabel.setText(Messages.getString("MemcheckToolPage.leak_resolution"));
    leakResCombo = new Combo(leakResTop, SWT.READ_ONLY);
    String[] leakResOpts = { MemcheckLaunchConstants.LEAK_RES_LOW, MemcheckLaunchConstants.LEAK_RES_MED, MemcheckLaunchConstants.LEAK_RES_HIGH };
    leakResCombo.setItems(leakResOpts);
    leakResCombo.addSelectionListener(selectListener);
    Composite freelistTop = new Composite(top, SWT.NONE);
    freelistTop.setLayout(new GridLayout(2, false));
    freelistTop.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    Label freelistLabel = new Label(freelistTop, SWT.NONE);
    // $NON-NLS-1$
    freelistLabel.setText(Messages.getString("MemcheckToolPage.freelist_size"));
    freelistSpinner = new Spinner(freelistTop, SWT.BORDER);
    freelistSpinner.setMaximum(Integer.MAX_VALUE);
    freelistSpinner.addModifyListener(modifyListener);
    showReachableButton = new Button(top, SWT.CHECK);
    showReachableButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    // $NON-NLS-1$
    showReachableButton.setText(Messages.getString("MemcheckToolPage.show_reachable"));
    showReachableButton.addSelectionListener(selectListener);
    partialLoadsButton = new Button(top, SWT.CHECK);
    partialLoadsButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    // $NON-NLS-1$
    partialLoadsButton.setText(Messages.getString("MemcheckToolPage.allow_partial"));
    partialLoadsButton.addSelectionListener(selectListener);
    undefValueButton = new Button(top, SWT.CHECK);
    undefValueButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    // $NON-NLS-1$
    undefValueButton.setText(Messages.getString("MemcheckToolPage.undef_value_errors"));
    undefValueButton.addSelectionListener(selectListener);
    // VG >= 3.4.0
    if (valgrindVersion == null || valgrindVersion.compareTo(VER_3_4_0) >= 0) {
        trackOriginsButton = new Button(top, SWT.CHECK);
        trackOriginsButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
        // $NON-NLS-1$
        trackOriginsButton.setText(Messages.getString("MemcheckToolPage.Track_origins"));
        trackOriginsButton.addSelectionListener(selectListener);
    }
    gccWorkaroundButton = new Button(top, SWT.CHECK);
    gccWorkaroundButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    // $NON-NLS-1$
    gccWorkaroundButton.setText(Messages.getString("MemcheckToolPage.gcc_296_workarounds"));
    gccWorkaroundButton.addSelectionListener(selectListener);
    Composite alignmentTop = new Composite(top, SWT.NONE);
    GridLayout alignmentLayout = new GridLayout(2, false);
    alignmentLayout.marginWidth = alignmentLayout.marginHeight = 0;
    alignmentTop.setLayout(alignmentLayout);
    alignmentTop.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    alignmentButton = new Button(alignmentTop, SWT.CHECK);
    // $NON-NLS-1$
    alignmentButton.setText(Messages.getString("MemcheckToolPage.minimum_heap_block"));
    alignmentButton.addSelectionListener(SelectionListener.widgetSelectedAdapter(e -> {
        checkAlignmentEnablement();
        updateLaunchConfigurationDialog();
    }));
    alignmentSpinner = new Spinner(alignmentTop, SWT.BORDER);
    alignmentSpinner.setMinimum(0);
    alignmentSpinner.setMaximum(4096);
    alignmentSpinner.addModifyListener(modifyListener);
    // VG >= 3.6.0
    if (valgrindVersion == null || valgrindVersion.compareTo(VER_3_6_0) >= 0) {
        showPossiblyLostButton = new Button(top, SWT.CHECK);
        showPossiblyLostButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
        // $NON-NLS-1$
        showPossiblyLostButton.setText(Messages.getString("MemcheckToolPage.Show_Possibly_Lost"));
        showPossiblyLostButton.addSelectionListener(selectListener);
    }
    Composite mallocFillTop = new Composite(top, SWT.NONE);
    GridLayout mallocFillLayout = new GridLayout(2, false);
    mallocFillLayout.marginWidth = mallocFillLayout.marginHeight = 0;
    mallocFillTop.setLayout(mallocFillLayout);
    mallocFillTop.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    mallocFillButton = new Button(mallocFillTop, SWT.CHECK);
    // $NON-NLS-1$
    mallocFillButton.setText(Messages.getString("MemcheckToolPage.Malloc_Fill"));
    mallocFillButton.addSelectionListener(SelectionListener.widgetSelectedAdapter(e -> {
        checkMallocFillEnablement();
        updateLaunchConfigurationDialog();
    }));
    mallocFillText = new Text(mallocFillTop, SWT.BORDER);
    mallocFillText.setTextLimit(8);
    mallocFillText.addModifyListener(modifyListener);
    Composite freeFillTop = new Composite(top, SWT.NONE);
    GridLayout freeFillLayout = new GridLayout(2, false);
    freeFillLayout.marginWidth = freeFillLayout.marginHeight = 0;
    freeFillTop.setLayout(freeFillLayout);
    freeFillTop.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    freeFillButton = new Button(freeFillTop, SWT.CHECK);
    // $NON-NLS-1$
    freeFillButton.setText(Messages.getString("MemcheckToolPage.Free_Fill"));
    freeFillButton.addSelectionListener(SelectionListener.widgetSelectedAdapter(e -> {
        checkFreeFillEnablement();
        updateLaunchConfigurationDialog();
    }));
    freeFillText = new Text(freeFillTop, SWT.BORDER);
    mallocFillText.setTextLimit(8);
    freeFillText.addModifyListener(modifyListener);
    Composite ignoreRangesTop = new Composite(top, SWT.NONE);
    ignoreRangesTop.setLayout(new GridLayout(3, false));
    ignoreRangesTop.setLayoutData(new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false, 2, 1));
    Label ignoreRangesLabel = new Label(ignoreRangesTop, SWT.NONE);
    // $NON-NLS-1$
    ignoreRangesLabel.setText(Messages.getString("MemcheckToolPage.Ignore_Ranges"));
    ignoreRangesLabel.setLayoutData(new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false));
    createIgnoreRangesControls(ignoreRangesTop);
}
Also used : InputDialog(org.eclipse.jface.dialogs.InputDialog) Arrays(java.util.Arrays) LaunchConfigurationConstants(org.eclipse.linuxtools.internal.valgrind.launch.LaunchConfigurationConstants) FontMetrics(org.eclipse.swt.graphics.FontMetrics) CoreException(org.eclipse.core.runtime.CoreException) Spinner(org.eclipse.swt.widgets.Spinner) ILaunchConfiguration(org.eclipse.debug.core.ILaunchConfiguration) AbstractLaunchConfigurationTab(org.eclipse.debug.ui.AbstractLaunchConfigurationTab) Composite(org.eclipse.swt.widgets.Composite) GridData(org.eclipse.swt.layout.GridData) Text(org.eclipse.swt.widgets.Text) Combo(org.eclipse.swt.widgets.Combo) Button(org.eclipse.swt.widgets.Button) NLS(org.eclipse.osgi.util.NLS) ILaunchConfigurationWorkingCopy(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy) Version(org.osgi.framework.Version) Window(org.eclipse.jface.window.Window) Dialog(org.eclipse.jface.dialogs.Dialog) ModifyListener(org.eclipse.swt.events.ModifyListener) SWT(org.eclipse.swt.SWT) List(org.eclipse.swt.widgets.List) IValgrindToolPage(org.eclipse.linuxtools.valgrind.launch.IValgrindToolPage) 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) Button(org.eclipse.swt.widgets.Button) Spinner(org.eclipse.swt.widgets.Spinner) GridData(org.eclipse.swt.layout.GridData) Label(org.eclipse.swt.widgets.Label) Combo(org.eclipse.swt.widgets.Combo) Text(org.eclipse.swt.widgets.Text)

Example 14 with NLS

use of org.eclipse.osgi.util.NLS in project linuxtools by eclipse.

the class MemcheckToolPage method createIgnoreRangesControls.

private void createIgnoreRangesControls(Composite top) {
    ignoreRangesList = new List(top, SWT.BORDER | SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
    FontMetrics fm = MemcheckPlugin.getFontMetrics(ignoreRangesList);
    ignoreRangesList.setLayoutData(new GridData(Dialog.convertWidthInCharsToPixels(fm, 50), Dialog.convertHeightInCharsToPixels(fm, 5)));
    Composite ignoreButtons = new Composite(top, SWT.NONE);
    GridLayout ignoreButtonsLayout = new GridLayout();
    ignoreButtonsLayout.marginWidth = ignoreButtonsLayout.marginHeight = 0;
    ignoreButtons.setLayout(ignoreButtonsLayout);
    ignoreButtons.setLayoutData(new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false));
    Button newButton = new Button(ignoreButtons, SWT.PUSH);
    // $NON-NLS-1$
    newButton.setText(Messages.getString("MemcheckToolPage.New"));
    newButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    newButton.addSelectionListener(SelectionListener.widgetSelectedAdapter(e -> {
        handleIgnoreNewButtonPressed();
        updateLaunchConfigurationDialog();
    }));
    Button removeButton = new Button(ignoreButtons, SWT.PUSH);
    // $NON-NLS-1$
    removeButton.setText(Messages.getString("MemcheckToolPage.Remove"));
    removeButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    removeButton.addSelectionListener(SelectionListener.widgetSelectedAdapter(e -> {
        handleIgnoreRemoveButtonPressed();
        updateLaunchConfigurationDialog();
    }));
}
Also used : InputDialog(org.eclipse.jface.dialogs.InputDialog) Arrays(java.util.Arrays) LaunchConfigurationConstants(org.eclipse.linuxtools.internal.valgrind.launch.LaunchConfigurationConstants) FontMetrics(org.eclipse.swt.graphics.FontMetrics) CoreException(org.eclipse.core.runtime.CoreException) Spinner(org.eclipse.swt.widgets.Spinner) ILaunchConfiguration(org.eclipse.debug.core.ILaunchConfiguration) AbstractLaunchConfigurationTab(org.eclipse.debug.ui.AbstractLaunchConfigurationTab) Composite(org.eclipse.swt.widgets.Composite) GridData(org.eclipse.swt.layout.GridData) Text(org.eclipse.swt.widgets.Text) Combo(org.eclipse.swt.widgets.Combo) Button(org.eclipse.swt.widgets.Button) NLS(org.eclipse.osgi.util.NLS) ILaunchConfigurationWorkingCopy(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy) Version(org.osgi.framework.Version) Window(org.eclipse.jface.window.Window) Dialog(org.eclipse.jface.dialogs.Dialog) ModifyListener(org.eclipse.swt.events.ModifyListener) SWT(org.eclipse.swt.SWT) List(org.eclipse.swt.widgets.List) IValgrindToolPage(org.eclipse.linuxtools.valgrind.launch.IValgrindToolPage) 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) Button(org.eclipse.swt.widgets.Button) FontMetrics(org.eclipse.swt.graphics.FontMetrics) GridData(org.eclipse.swt.layout.GridData) List(org.eclipse.swt.widgets.List)

Example 15 with NLS

use of org.eclipse.osgi.util.NLS in project linuxtools by eclipse.

the class NewSuppressionWizard method performFinish.

/**
 * This method is called when 'Finish' button is pressed in
 * the wizard. We will create an operation and run it
 * using wizard as execution context.
 */
@Override
public boolean performFinish() {
    final String containerName = page.getContainerFullPath().toOSString();
    final String fileName = page.getFileName();
    IRunnableWithProgress op = monitor -> {
        try {
            doFinish(containerName, fileName, monitor);
        } catch (CoreException e) {
            throw new InvocationTargetException(e);
        } finally {
            monitor.done();
        }
    };
    try {
        getContainer().run(true, false, op);
    } catch (InterruptedException e) {
        return false;
    } catch (InvocationTargetException e) {
        Throwable realException = e.getTargetException();
        // $NON-NLS-1$
        MessageDialog.openError(getShell(), Messages.getString("NewSuppressionWizard.performFinish_error"), realException.getMessage());
        return false;
    }
    return true;
}
Also used : ResourcesPlugin(org.eclipse.core.resources.ResourcesPlugin) IDE(org.eclipse.ui.ide.IDE) CoreException(org.eclipse.core.runtime.CoreException) IWorkspaceRoot(org.eclipse.core.resources.IWorkspaceRoot) IContainer(org.eclipse.core.resources.IContainer) IStatus(org.eclipse.core.runtime.IStatus) ByteArrayInputStream(java.io.ByteArrayInputStream) PartInitException(org.eclipse.ui.PartInitException) AbstractUIPlugin(org.eclipse.ui.plugin.AbstractUIPlugin) IFile(org.eclipse.core.resources.IFile) MessageDialog(org.eclipse.jface.dialogs.MessageDialog) NLS(org.eclipse.osgi.util.NLS) PlatformUI(org.eclipse.ui.PlatformUI) Status(org.eclipse.core.runtime.Status) IOException(java.io.IOException) Wizard(org.eclipse.jface.wizard.Wizard) IWorkbenchPage(org.eclipse.ui.IWorkbenchPage) InvocationTargetException(java.lang.reflect.InvocationTargetException) IProgressMonitor(org.eclipse.core.runtime.IProgressMonitor) ValgrindEditorPlugin(org.eclipse.linuxtools.internal.valgrind.ui.editor.ValgrindEditorPlugin) WizardNewFileCreationPage(org.eclipse.ui.dialogs.WizardNewFileCreationPage) IResource(org.eclipse.core.resources.IResource) Path(org.eclipse.core.runtime.Path) IRunnableWithProgress(org.eclipse.jface.operation.IRunnableWithProgress) INewWizard(org.eclipse.ui.INewWizard) IWorkbench(org.eclipse.ui.IWorkbench) IStructuredSelection(org.eclipse.jface.viewers.IStructuredSelection) InputStream(java.io.InputStream) CoreException(org.eclipse.core.runtime.CoreException) InvocationTargetException(java.lang.reflect.InvocationTargetException) IRunnableWithProgress(org.eclipse.jface.operation.IRunnableWithProgress)

Aggregations

NLS (org.eclipse.osgi.util.NLS)17 CoreException (org.eclipse.core.runtime.CoreException)10 ILaunchConfiguration (org.eclipse.debug.core.ILaunchConfiguration)8 IPath (org.eclipse.core.runtime.IPath)7 SWT (org.eclipse.swt.SWT)7 SelectionListener (org.eclipse.swt.events.SelectionListener)7 GridData (org.eclipse.swt.layout.GridData)7 GridLayout (org.eclipse.swt.layout.GridLayout)7 Button (org.eclipse.swt.widgets.Button)7 Composite (org.eclipse.swt.widgets.Composite)7 Label (org.eclipse.swt.widgets.Label)7 Text (org.eclipse.swt.widgets.Text)7 IResource (org.eclipse.core.resources.IResource)6 ResourcesPlugin (org.eclipse.core.resources.ResourcesPlugin)6 ILaunchConfigurationWorkingCopy (org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)6 IStatus (org.eclipse.core.runtime.IStatus)5 Path (org.eclipse.core.runtime.Path)5 Status (org.eclipse.core.runtime.Status)5 File (java.io.File)4 IProject (org.eclipse.core.resources.IProject)4