Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DetailPaneProxy.java')
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DetailPaneProxy.java74
1 files changed, 37 insertions, 37 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DetailPaneProxy.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DetailPaneProxy.java
index b7e01ae38..ab1406d07 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DetailPaneProxy.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DetailPaneProxy.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
* Wind River - Anton Leherbauer - Fix selection provider (Bug 254442)
@@ -37,44 +37,44 @@ import org.eclipse.ui.IWorkbenchPartSite;
import com.ibm.icu.text.MessageFormat;
/**
- * Acts as a proxy between a view and a detail pane. Controls how information is displayed
- * in the details pane in a view. Currently used by the variables, registers and expression
- * views as well as the inspect popup dialog. The different types of detail panes use the
- * detailPaneFactories extension and must implement <code>IDetailPane</code>. This class acts
- * as a proxy to the current detail pane, each time the detail pane type changes, this class
+ * Acts as a proxy between a view and a detail pane. Controls how information is displayed
+ * in the details pane in a view. Currently used by the variables, registers and expression
+ * views as well as the inspect popup dialog. The different types of detail panes use the
+ * detailPaneFactories extension and must implement <code>IDetailPane</code>. This class acts
+ * as a proxy to the current detail pane, each time the detail pane type changes, this class
* disposes of the old pane and creates the new one. Uses a <code>DetailPaneManager</code> to
* organize and find the panes to display.
- *
+ *
* @see IDetailPane
* @see DetailPaneManager
* @since 3.3
*/
public class DetailPaneProxy implements ISaveablePart {
-
+
/**
* The IDetailPane currently being used to display detailed information.
*/
private IDetailPane fCurrentPane;
-
+
/**
* The UI control that the current detail pane is using to display details.
*/
private Control fCurrentControl;
-
+
/**
* Detail pane container that the detail panes will be added to.
*/
private IDetailPaneContainer fParentContainer;
-
+
/**
* Property listeners
*/
private ListenerList<IPropertyListener> fListeners = new ListenerList<>();
-
+
/**
* Constructor that sets up the detail pane for a view. Note that no default pane
* is created, so a control will not be created until <code>display</code> is called.
- *
+ *
* @param parent the detail pane container that is holding this detail pane
*/
public DetailPaneProxy(IDetailPaneContainer parent) {
@@ -86,18 +86,18 @@ public class DetailPaneProxy implements ISaveablePart {
* Informs the parent container if the type of detail pane changes.
* If a null or empty selection is passed and a current pane exists, that view will be cleared.
* If a null or empty selection is passed and no pane exists, the default view is created.
- *
+ *
* @param selection The selection to display detailed information for
*/
public void display(IStructuredSelection selection){
-
+
IDetailPane3 saveable = getSaveable();
boolean clean = false;
if (saveable != null && saveable.isDirty() && saveable.isSaveOnCloseNeeded()) {
// save the contents before changing
saveable.doSave(null);
}
-
+
if ((selection == null || selection.isEmpty()) && fCurrentPane != null){
fCurrentPane.display(selection);
if (clean) {
@@ -105,13 +105,13 @@ public class DetailPaneProxy implements ISaveablePart {
}
return;
}
-
+
String preferredPaneID = DetailPaneManager.getDefault().getPreferredPaneFromSelection(selection);
if (preferredPaneID == null) {
preferredPaneID = MessageDetailPane.ID;
selection = new StructuredSelection(DetailMessages.DetailPaneProxy_1);
}
-
+
// Don't change anything if the preferred pane is the current pane
if (fCurrentPane != null && preferredPaneID.equals(fCurrentPane.getID())){
fCurrentPane.display(selection);
@@ -120,9 +120,9 @@ public class DetailPaneProxy implements ISaveablePart {
}
return;
}
-
+
setupPane(preferredPaneID, selection);
-
+
// Inform the container that a new detail pane is being used
fParentContainer.paneChanged(preferredPaneID);
if (clean) {
@@ -130,7 +130,7 @@ public class DetailPaneProxy implements ISaveablePart {
}
}
-
+
/**
* Fires dirty property change.
*/
@@ -139,10 +139,10 @@ public class DetailPaneProxy implements ISaveablePart {
iPropertyListener.propertyChanged(this, PROP_DIRTY);
}
}
-
+
/**
* Tells the current detail pane (if one exists) that it is gaining focus.
- *
+ *
* @return true if the current pane successfully set focus to a control, false otherwise
*/
public boolean setFocus(){
@@ -151,7 +151,7 @@ public class DetailPaneProxy implements ISaveablePart {
}
return false;
}
-
+
/**
* Disposes of the current pane.
*/
@@ -165,7 +165,7 @@ public class DetailPaneProxy implements ISaveablePart {
fCurrentControl = null;
}
}
-
+
/**
* Checks if the current pane supports the <code>IAdaptable</code> framework
* and if so, calls its <code>getAdapter()</code> method.
@@ -180,22 +180,22 @@ public class DetailPaneProxy implements ISaveablePart {
return null;
}
}
-
+
public Control getCurrentControl(){
return fCurrentControl;
}
-
+
public String getCurrentPaneID(){
if (fCurrentPane != null){
return fCurrentPane.getID();
}
return null;
}
-
+
/**
* Finds or creates an initialized detail pane with the given ID. Asks the detail
- * pane to create the control and display the selection.
- *
+ * pane to create the control and display the selection.
+ *
* @param paneID the ID of the pane to display in
* @param selection the selection to display
*/
@@ -234,7 +234,7 @@ public class DetailPaneProxy implements ISaveablePart {
updateSelectionProvider(false);
}
});
- }
+ }
} else{
createErrorLabel(DetailMessages.DetailPaneProxy_0);
DebugUIPlugin.log(new CoreException(new Status(IStatus.ERROR, DebugUIPlugin.getUniqueIdentifier(), MessageFormat.format(DetailMessages.DetailPaneProxy_2, new Object[] { fCurrentPane.getID() }))));
@@ -250,7 +250,7 @@ public class DetailPaneProxy implements ISaveablePart {
/**
* Update the selection provider of the current detail pane in the container.
- *
+ *
* @param hasFocus whether the detail pane control has the focus
*/
protected void updateSelectionProvider(boolean hasFocus) {
@@ -272,7 +272,7 @@ public class DetailPaneProxy implements ISaveablePart {
/**
* Creates a label in the detail pane area with the given message.
- *
+ *
* @param message The message to display
*/
private void createErrorLabel(String message){
@@ -344,10 +344,10 @@ public class DetailPaneProxy implements ISaveablePart {
}
return false;
}
-
+
/**
* Returns the active saveable part or <code>null</code> if none.
- *
+ *
* @return saveable part or <code>null</code>
*/
IDetailPane3 getSaveable() {
@@ -356,7 +356,7 @@ public class DetailPaneProxy implements ISaveablePart {
}
return null;
}
-
+
public void addProperyListener(IPropertyListener listener) {
fListeners.add(listener);
IDetailPane3 saveable = getSaveable();
@@ -364,7 +364,7 @@ public class DetailPaneProxy implements ISaveablePart {
saveable.addPropertyListener(listener);
}
}
-
+
public void removePropertyListener(IPropertyListener listener) {
fListeners.remove(listener);
IDetailPane3 saveable = getSaveable();

Back to the top