Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ private void checkJunitVersion(ILaunchConfiguration configuration, Set<IPluginMo
}

private void addError(String message) {
fErrors.put(message.replaceAll("\\R", " "), null); //$NON-NLS-1$//$NON-NLS-2$
fErrors.put(message, null);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
package org.eclipse.pde.internal.ui.launcher;

import java.util.Map;
import java.util.Map.Entry;

import org.eclipse.core.runtime.MultiStatus;
import org.eclipse.debug.core.ILaunchConfiguration;
Expand Down Expand Up @@ -44,6 +45,7 @@
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Link;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.PlatformUI;

/**
Expand Down Expand Up @@ -185,14 +187,23 @@ protected Control createDialogArea(Composite parent) {

Label label = new Label(container, SWT.NONE);
label.setText(PDEUIMessages.PluginStatusDialog_label);

treeViewer = new TreeViewer(container);
treeViewer.setContentProvider(new ContentProvider());
treeViewer.setLabelProvider(PDEPlugin.getDefault().getLabelProvider());
treeViewer.setComparator(new ViewerComparator());
treeViewer.setInput(fInput);
treeViewer.getControl().setLayoutData(new GridData(GridData.FILL_BOTH));

GridData gridData = new GridData(GridData.FILL_BOTH);

Entry<?, ?> onlyEntry = fInput.size() == 1 ? fInput.entrySet().iterator().next() : null;
if (onlyEntry != null && onlyEntry.getKey() instanceof String errorMessage && errorMessage.contains("\n") //$NON-NLS-1$
&& onlyEntry.getValue() == null) {
Text message = new Text(container, SWT.MULTI | SWT.READ_ONLY | SWT.WRAP | SWT.BORDER | SWT.V_SCROLL);
message.setBackground(container.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
message.setText(errorMessage);
message.setLayoutData(gridData);
} else {
treeViewer = new TreeViewer(container);
treeViewer.setContentProvider(new ContentProvider());
treeViewer.setLabelProvider(PDEPlugin.getDefault().getLabelProvider());
treeViewer.setComparator(new ViewerComparator());
treeViewer.setInput(fInput);
treeViewer.getControl().setLayoutData(gridData);
}
getShell().setText(PDEUIMessages.PluginStatusDialog_pluginValidation);
Dialog.applyDialogFont(container);
return container;
Expand Down
Loading