summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault (JBoss)2013-04-27 23:32:47 (EDT)
committerPascal Rapicault2013-04-27 23:32:47 (EDT)
commit5cff3990a07387effa11f97594609aa758398198 (patch)
tree9a150173b66b0ccba0faadc795066abbed260cda
parenta9611fe47e66820ea7f3ba9bd412ab332c682574 (diff)
downloadrt.equinox.p2-5cff3990a07387effa11f97594609aa758398198.zip
rt.equinox.p2-5cff3990a07387effa11f97594609aa758398198.tar.gz
rt.equinox.p2-5cff3990a07387effa11f97594609aa758398198.tar.bz2
Reintroduce error details and various cleanups
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RemediationComposite.java30
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RemediationPage.java16
2 files changed, 26 insertions, 20 deletions
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RemediationComposite.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RemediationComposite.java
index bd928fb..2d9f205 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RemediationComposite.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RemediationComposite.java
@@ -28,27 +28,29 @@ import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.*;
public class RemediationComposite {
+ final int ALLOWPARTIALINSTALL_INDEX = 0;
+ final int ALLOWDIFFERENTVERSION_INDEX = 1;
+ final int ALLOWINSTALLEDUPDATE_INDEX = 2;
+ final int ALLOWINSTALLEDREMOVAL_INDEX = 3;
private RemediationOperation remediationOperation;
private Composite remediationComposite;
private Button bestBeingInstalledRelaxedButton;
private Button bestInstalledRelaxedButton;
- private Button buildMyOwnSolution;
+ Button buildMyOwnSolution;
final ArrayList<Button> checkboxes;
private Composite resultFoundComposite;
private Composite resultComposite;
private Composite resultNotFoundComposite;
private Composite resultErrorComposite;
- final int ALLOWPARTIALINSTALL_INDEX = 0;
- final int ALLOWDIFFERENTVERSION_INDEX = 1;
- final int ALLOWINSTALLEDUPDATE_INDEX = 2;
- final int ALLOWINSTALLEDREMOVAL_INDEX = 3;
+
private TreeViewer treeViewer;
protected IUElementListRoot input;
private StackLayout switchRemediationLayout;
Group detailsControl;
Text detailStatusText;
- private static Composite checkBoxesComposite;
+ Composite checkBoxesComposite;
+ private IUDetailsGroup iuDetailsGroup;
public RemediationComposite() {
checkboxes = new ArrayList<Button>();
@@ -156,12 +158,17 @@ public class RemediationComposite {
resultNotFoundLabel.setText(ProvUIMessages.RemediationPage_NoSolutionFound);
resultFoundComposite = new Composite(resultComposite, SWT.NONE);
+ resultFoundComposite.setLayout(new GridLayout());
+
+ Group insideFoundComposite = new Group(resultFoundComposite, SWT.NONE);
+ insideFoundComposite.setText("Solution details");
GridLayout gridLayout = new GridLayout();
gridLayout.marginWidth = 0;
gridLayout.marginHeight = 0;
- resultFoundComposite.setLayout(gridLayout);
+ insideFoundComposite.setLayout(gridLayout);
+ insideFoundComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- treeViewer = new TreeViewer(resultFoundComposite, SWT.BORDER | SWT.MULTI | SWT.FULL_SELECTION);
+ treeViewer = new TreeViewer(insideFoundComposite, SWT.BORDER | SWT.MULTI | SWT.FULL_SELECTION);
data = new GridData(GridData.FILL_BOTH);
Tree tree = treeViewer.getTree();
tree.setLayoutData(data);
@@ -177,6 +184,13 @@ public class RemediationComposite {
treeViewer.setContentProvider(contentProvider);
IUDetailsLabelProvider labelProvider = new IUDetailsLabelProvider(null, columns, null);
treeViewer.setLabelProvider(labelProvider); // columnLayout.setColumnData(column.getColumn(), new ColumnWeightData(100, 100, true));
+
+ iuDetailsGroup = new IUDetailsGroup(resultErrorComposite, treeViewer, 500, true);
+
+ }
+
+ protected IUDetailsGroup getDetailsGroup() {
+ return iuDetailsGroup;
}
public void update(RemediationOperation operation) {
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RemediationPage.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RemediationPage.java
index cccb99c..0e9ea97 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RemediationPage.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RemediationPage.java
@@ -56,7 +56,6 @@ public class RemediationPage extends ResolutionStatusPage {
setPageComplete(false);
Dialog.applyDialogFont(mainComposite);
-
}
public ArrayList<AvailableIUElement> transformIUstoIUElements() {
@@ -69,59 +68,52 @@ public class RemediationPage extends ResolutionStatusPage {
public void updateStatus(IUElementListRoot newRoot, ProfileChangeOperation operation, Object[] planSelections) {
remediationComposite.update(((ProvisioningOperationWizard) getWizard()).getRemediationOperation());
+ setDetailText(operation);
}
@Override
protected void updateCaches(IUElementListRoot root, ProfileChangeOperation resolvedOperation) {
// TODO Auto-generated method stub
-
}
@Override
protected boolean isCreated() {
- // TODO Auto-generated method stub
return false;
}
@Override
protected IUDetailsGroup getDetailsGroup() {
- // TODO Auto-generated method stub
- return null;
+ return remediationComposite.getDetailsGroup();
}
@Override
protected IInstallableUnit getSelectedIU() {
- // TODO Auto-generated method stub
+ // Not applicable
return null;
}
@Override
protected Object[] getSelectedElements() {
- // TODO Auto-generated method stub
- return null;
+ return new Object[] {};
}
@Override
protected String getDialogSettingsName() {
- // TODO Auto-generated method stub
return null;
}
@Override
protected SashForm getSashForm() {
- // TODO Auto-generated method stub
return null;
}
@Override
protected int getColumnWidth(int index) {
- // TODO Auto-generated method stub
return 0;
}
@Override
protected String getClipboardText(Control control) {
- // TODO Auto-generated method stub
return null;
}
} \ No newline at end of file