*** empty log message ***
diff --git a/ui/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/logview/BasePreviewSection.java b/ui/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/logview/BasePreviewSection.java
index d9e5452..a9bcec7 100644
--- a/ui/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/logview/BasePreviewSection.java
+++ b/ui/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/logview/BasePreviewSection.java
@@ -19,11 +19,12 @@
private Text text;
private ScrollableSectionForm form;
- public BasePreviewSection(ScrollableSectionForm form, String title) {
+ public BasePreviewSection(ScrollableSectionForm form, String title, boolean collapsed) {
this.form = form;
setHeaderText(title);
setCollapsable(true);
setCompactMode(true);
+ setCollapsed(collapsed);
}
public LogEntry getEntry() {
diff --git a/ui/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/logview/DetailsForm.java b/ui/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/logview/DetailsForm.java
index 3573cfb..d2b0580 100644
--- a/ui/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/logview/DetailsForm.java
+++ b/ui/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/logview/DetailsForm.java
@@ -11,6 +11,7 @@
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.layout.*;
import org.eclipse.swt.widgets.*;
+import org.eclipse.ui.IMemento;
import org.eclipse.update.ui.forms.internal.*;
/**
@@ -25,9 +26,11 @@
private Label message;
private Composite parent;
private Label eventType;
+ private IMemento memento;
- public DetailsForm() {
+ public DetailsForm(IMemento memento) {
setVerticalFit(true);
+ this.memento = memento;
headingImage = PDERuntimePluginImages.DESC_FORM_BANNER_SHORT.createImage();
if (isWhiteBackground())
setHeadingImage(headingImage);
@@ -63,16 +66,16 @@
createTopSection(parent);
- sessionSection = new SessionDataSection(this);
- Control control = sessionSection.createControl(parent, factory);
- control.setLayoutData(
- new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_BEGINNING));
-
- stackSection = new StackSection(this);
- control = stackSection.createControl(parent, factory);
+ stackSection = new StackSection(this, memento.getString(LogView.P_COLLAPSE_STACK).equals("true"));
+ Control control = stackSection.createControl(parent, factory);
control.setLayoutData(
new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL));
-
+
+ sessionSection = new SessionDataSection(this, memento.getString(LogView.P_COLLAPSE_SESSION).equals("true"));
+ control = sessionSection.createControl(parent, factory);
+ control.setLayoutData(
+ new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_BEGINNING));
+
registerSection(sessionSection);
registerSection(stackSection);
}
@@ -136,4 +139,13 @@
unregisterSection(sessionSection);
unregisterSection(stackSection);
}
+
+ public void saveState() {
+ memento.putString(
+ LogView.P_COLLAPSE_SESSION,
+ sessionSection.isCollapsed() ? "true" : "false");
+ memento.putString(
+ LogView.P_COLLAPSE_STACK,
+ stackSection.isCollapsed() ? "true" : "false");
+ }
}
diff --git a/ui/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/logview/LogView.java b/ui/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/logview/LogView.java
index 4224b0f..f8abde2 100644
--- a/ui/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/logview/LogView.java
+++ b/ui/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/logview/LogView.java
@@ -48,9 +48,10 @@
private static final String P_COLUMN_3 = "column3";
private static final String P_COLUMN_4 = "column4";
- private static final String P_ACTIVATE = "activate";
-
-
+ public static final String P_ACTIVATE = "activate";
+ public static final String P_COLLAPSE_SESSION = "collapseSession";
+ public static final String P_COLLAPSE_STACK = "collapseStack";
+
private int MESSAGE_ORDER = -1;
private int PLUGIN_ORDER = -1;
private int DATE_ORDER = -1;
@@ -133,7 +134,7 @@
container.setLayoutData(new GridData(GridData.FILL_BOTH));
createVerticalLine(container);
- detailsForm = new DetailsForm();
+ detailsForm = new DetailsForm(memento);
Control formControl = detailsForm.createControl(container);
formControl.setLayoutData(new GridData(GridData.FILL_BOTH));
if (logs.size() > 0) {
@@ -672,6 +673,10 @@
memento.putInteger(P_COLUMN_4, 150);
if (memento.getString(P_ACTIVATE) == null)
memento.putString(P_ACTIVATE, "true");
+ if (memento.getString(P_COLLAPSE_SESSION) == null)
+ memento.putString(P_COLLAPSE_SESSION, "true");
+ if (memento.getString(P_COLLAPSE_STACK) == null)
+ memento.putString(P_COLLAPSE_STACK, "true");
}
public void saveState(IMemento memento) {
@@ -682,7 +687,7 @@
this.memento.putString(
P_ACTIVATE,
activateViewAction.isChecked() ? "true" : "false");
-
+ detailsForm.saveState();
memento.putMemento(this.memento);
}
diff --git a/ui/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/logview/SessionDataSection.java b/ui/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/logview/SessionDataSection.java
index 8f57478..e8d0b38 100644
--- a/ui/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/logview/SessionDataSection.java
+++ b/ui/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/logview/SessionDataSection.java
@@ -14,9 +14,8 @@
*/
public class SessionDataSection extends BasePreviewSection {
- public SessionDataSection(ScrollableSectionForm form) {
- super(form, PDERuntimePlugin.getResourceString("LogView.preview.sessionData"));
- setCollapsed(true);
+ public SessionDataSection(ScrollableSectionForm form, boolean collapsed) {
+ super(form, PDERuntimePlugin.getResourceString("LogView.preview.sessionData"), collapsed);
}
protected String getTextFromEntry() {
diff --git a/ui/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/logview/StackSection.java b/ui/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/logview/StackSection.java
index 3cf66ef..772ac30 100644
--- a/ui/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/logview/StackSection.java
+++ b/ui/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/logview/StackSection.java
@@ -14,9 +14,11 @@
*/
public class StackSection extends BasePreviewSection {
- public StackSection(ScrollableSectionForm form) {
- super(form, PDERuntimePlugin.getResourceString("LogView.preview.stackTrace"));
- setCollapsed(true);
+ public StackSection(ScrollableSectionForm form, boolean collapsed) {
+ super(
+ form,
+ PDERuntimePlugin.getResourceString("LogView.preview.stackTrace"),
+ collapsed);
}
protected String getTextFromEntry() {