Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 158518 Details for
Bug 301123
[breakpoints] Breakpoints view's detail pane must not resize automatically
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
patch for "no details" pane
no-details.patch (text/plain), 15.23 KB, created by
Darin Wright
on 2010-02-08 14:52:19 EST
(
hide
)
Description:
patch for "no details" pane
Filename:
MIME Type:
Creator:
Darin Wright
Created:
2010-02-08 14:52:19 EST
Size:
15.23 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.debug.ui >Index: ui/org/eclipse/debug/internal/ui/views/variables/details/DefaultDetailPaneFactory.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DefaultDetailPaneFactory.java,v >retrieving revision 1.2 >diff -u -r1.2 DefaultDetailPaneFactory.java >--- ui/org/eclipse/debug/internal/ui/views/variables/details/DefaultDetailPaneFactory.java 7 Dec 2006 19:33:20 -0000 1.2 >+++ ui/org/eclipse/debug/internal/ui/views/variables/details/DefaultDetailPaneFactory.java 8 Feb 2010 19:51:17 -0000 >@@ -33,7 +33,11 @@ > * @see org.eclipse.debug.internal.ui.views.variables.IDetailsFactory#createDetailsArea(java.lang.String) > */ > public IDetailPane createDetailPane(String id) { >- return new DefaultDetailPane(); >+ if (MessageDetailPane.ID.equals(id)) { >+ return new MessageDetailPane(); >+ } else { >+ return new DefaultDetailPane(); >+ } > } > > /* (non-Javadoc) >@@ -60,6 +64,9 @@ > if (id.equals(DefaultDetailPane.ID)){ > return DefaultDetailPane.NAME; > } >+ if (id.equals(MessageDetailPane.ID)) { >+ return MessageDetailPane.NAME; >+ } > return null; > } > >@@ -71,6 +78,9 @@ > if (id.equals(DefaultDetailPane.ID)){ > return DefaultDetailPane.DESCRIPTION; > } >+ if (id.equals(MessageDetailPane.ID)) { >+ return MessageDetailPane.DESCRIPTION; >+ } > return null; > } > >Index: ui/org/eclipse/debug/internal/ui/views/variables/details/DetailMessages.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DetailMessages.java,v >retrieving revision 1.5 >diff -u -r1.5 DetailMessages.java >--- ui/org/eclipse/debug/internal/ui/views/variables/details/DetailMessages.java 24 Sep 2008 19:07:00 -0000 1.5 >+++ ui/org/eclipse/debug/internal/ui/views/variables/details/DetailMessages.java 8 Feb 2010 19:51:17 -0000 >@@ -31,6 +31,8 @@ > public static String DetailPaneProxy_1; > public static String DetailPaneProxy_2; > public static String DetailPaneProxy_3; >+ public static String MessageDetailPane_0; >+ public static String MessageDetailPane_1; > static { > // initialize resource bundle > NLS.initializeMessages(BUNDLE_NAME, DetailMessages.class); >Index: ui/org/eclipse/debug/internal/ui/views/variables/details/DetailMessages.properties >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DetailMessages.properties,v >retrieving revision 1.6 >diff -u -r1.6 DetailMessages.properties >--- ui/org/eclipse/debug/internal/ui/views/variables/details/DetailMessages.properties 24 Sep 2008 19:07:01 -0000 1.6 >+++ ui/org/eclipse/debug/internal/ui/views/variables/details/DetailMessages.properties 8 Feb 2010 19:51:17 -0000 >@@ -26,3 +26,5 @@ > DetailPaneProxy_1=No details to display for the current selection. > DetailPaneProxy_2=The detail pane with ID {0} did not create and return a control. > DetailPaneProxy_3=Could not create the detail pane with ID {0} >+MessageDetailPane_0=Message Detail Pane >+MessageDetailPane_1=Displays a message >Index: ui/org/eclipse/debug/internal/ui/views/variables/details/DetailPaneManager.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DetailPaneManager.java,v >retrieving revision 1.6 >diff -u -r1.6 DetailPaneManager.java >--- ui/org/eclipse/debug/internal/ui/views/variables/details/DetailPaneManager.java 27 Mar 2007 02:08:31 -0000 1.6 >+++ ui/org/eclipse/debug/internal/ui/views/variables/details/DetailPaneManager.java 8 Feb 2010 19:51:17 -0000 >@@ -243,6 +243,7 @@ > > private DetailPaneManager(){ > fFactoriesByPaneID = new HashMap(); >+ fFactoriesByPaneID.put(MessageDetailPane.ID, new DefaultDetailPaneFactory()); > } > > public static DetailPaneManager getDefault(){ >Index: ui/org/eclipse/debug/internal/ui/views/variables/details/DetailPaneProxy.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DetailPaneProxy.java,v >retrieving revision 1.8 >diff -u -r1.8 DetailPaneProxy.java >--- ui/org/eclipse/debug/internal/ui/views/variables/details/DetailPaneProxy.java 1 Feb 2010 22:02:40 -0000 1.8 >+++ ui/org/eclipse/debug/internal/ui/views/variables/details/DetailPaneProxy.java 8 Feb 2010 19:51:18 -0000 >@@ -24,6 +24,7 @@ > import org.eclipse.debug.ui.IDetailPane3; > import org.eclipse.jface.viewers.ISelectionProvider; > import org.eclipse.jface.viewers.IStructuredSelection; >+import org.eclipse.jface.viewers.StructuredSelection; > import org.eclipse.swt.events.FocusAdapter; > import org.eclipse.swt.events.FocusEvent; > import org.eclipse.swt.layout.GridData; >@@ -106,9 +107,13 @@ > } > > 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 != null && preferredPaneID.equals(fCurrentPane.getID())){ >+ if (fCurrentPane != null && preferredPaneID.equals(fCurrentPane.getID())){ > fCurrentPane.display(selection); > if (clean) { > fireDirty(); >@@ -193,42 +198,38 @@ > if (fCurrentPane != null) fCurrentPane.dispose(); > if (fCurrentControl != null && !fCurrentControl.isDisposed()) fCurrentControl.dispose(); > fCurrentPane = null; >- if (paneID != null){ >- fCurrentPane = DetailPaneManager.getDefault().getDetailPaneFromID(paneID); >- if (fCurrentPane != null){ >- final IWorkbenchPartSite workbenchPartSite = fParentContainer.getWorkbenchPartSite(); >- fCurrentPane.init(workbenchPartSite); >- IDetailPane3 saveable = getSaveable(); >- if (saveable != null) { >- Object[] listeners = fListeners.getListeners(); >- for (int i = 0; i < listeners.length; i++) { >- saveable.addPropertyListener((IPropertyListener) listeners[i]); >- } >- } >- fCurrentControl = fCurrentPane.createControl(fParentContainer.getParentComposite()); >- if (fCurrentControl != null){ >- fParentContainer.getParentComposite().layout(true); >- fCurrentPane.display(selection); >- if (fParentContainer instanceof IDetailPaneContainer2) { >- fCurrentControl.addFocusListener(new FocusAdapter() { >- public void focusGained(FocusEvent e) { >- updateSelectionProvider(true); >- } >- public void focusLost(FocusEvent e) { >- updateSelectionProvider(false); >- } >- }); >- } >- } else{ >- createErrorLabel(DetailMessages.DetailPaneProxy_0); >- DebugUIPlugin.log(new CoreException(new Status(IStatus.ERROR, DebugUIPlugin.getUniqueIdentifier(), MessageFormat.format(DetailMessages.DetailPaneProxy_2, new String[]{fCurrentPane.getID()})))); >+ fCurrentPane = DetailPaneManager.getDefault().getDetailPaneFromID(paneID); >+ if (fCurrentPane != null){ >+ final IWorkbenchPartSite workbenchPartSite = fParentContainer.getWorkbenchPartSite(); >+ fCurrentPane.init(workbenchPartSite); >+ IDetailPane3 saveable = getSaveable(); >+ if (saveable != null) { >+ Object[] listeners = fListeners.getListeners(); >+ for (int i = 0; i < listeners.length; i++) { >+ saveable.addPropertyListener((IPropertyListener) listeners[i]); > } >- } else { >+ } >+ fCurrentControl = fCurrentPane.createControl(fParentContainer.getParentComposite()); >+ if (fCurrentControl != null){ >+ fParentContainer.getParentComposite().layout(true); >+ fCurrentPane.display(selection); >+ if (fParentContainer instanceof IDetailPaneContainer2) { >+ fCurrentControl.addFocusListener(new FocusAdapter() { >+ public void focusGained(FocusEvent e) { >+ updateSelectionProvider(true); >+ } >+ public void focusLost(FocusEvent e) { >+ updateSelectionProvider(false); >+ } >+ }); >+ } >+ } else{ > createErrorLabel(DetailMessages.DetailPaneProxy_0); >- DebugUIPlugin.log(new CoreException(new Status(IStatus.ERROR, DebugUIPlugin.getUniqueIdentifier(), MessageFormat.format(DetailMessages.DetailPaneProxy_3, new String[]{paneID})))); >+ DebugUIPlugin.log(new CoreException(new Status(IStatus.ERROR, DebugUIPlugin.getUniqueIdentifier(), MessageFormat.format(DetailMessages.DetailPaneProxy_2, new String[]{fCurrentPane.getID()})))); > } > } else { >- createErrorLabel(DetailMessages.DetailPaneProxy_1); >+ createErrorLabel(DetailMessages.DetailPaneProxy_0); >+ DebugUIPlugin.log(new CoreException(new Status(IStatus.ERROR, DebugUIPlugin.getUniqueIdentifier(), MessageFormat.format(DetailMessages.DetailPaneProxy_3, new String[]{paneID})))); > } > } > >Index: ui/org/eclipse/debug/internal/ui/views/variables/details/MessageDetailPane.java >=================================================================== >RCS file: ui/org/eclipse/debug/internal/ui/views/variables/details/MessageDetailPane.java >diff -N ui/org/eclipse/debug/internal/ui/views/variables/details/MessageDetailPane.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ ui/org/eclipse/debug/internal/ui/views/variables/details/MessageDetailPane.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,173 @@ >+/******************************************************************************* >+ * Copyright (c) 2010 IBM Corporation and others. >+ * All rights reserved. This program and the accompanying materials >+ * 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 >+ *******************************************************************************/ >+package org.eclipse.debug.internal.ui.views.variables.details; >+ >+import org.eclipse.debug.internal.ui.SWTFactory; >+import org.eclipse.debug.ui.IDebugUIConstants; >+import org.eclipse.debug.ui.IDetailPane; >+import org.eclipse.jface.viewers.IStructuredSelection; >+import org.eclipse.swt.SWT; >+import org.eclipse.swt.custom.SashForm; >+import org.eclipse.swt.layout.GridData; >+import org.eclipse.swt.layout.GridLayout; >+import org.eclipse.swt.widgets.Composite; >+import org.eclipse.swt.widgets.Control; >+import org.eclipse.swt.widgets.Label; >+import org.eclipse.ui.IWorkbenchPartSite; >+ >+/** >+ * A detail pane that displays a message in a wrapped label. Not contributed by an extension >+ * point - used internally to display messages. >+ * >+ * @since 3.6 >+ */ >+public class MessageDetailPane implements IDetailPane { >+ >+ public static final String ID = IDebugUIConstants.PLUGIN_ID + ".detailpanes.message"; //$NON-NLS-1$ >+ public static final String NAME = DetailMessages.MessageDetailPane_0; >+ public static final String DESCRIPTION = DetailMessages.MessageDetailPane_1; >+ >+ private SashForm fSash; >+ /** >+ * Top level composite that remains as orientation changes. >+ */ >+ private Composite fDetailsContainer; >+ /** >+ * Inner composite containing separator and editor composite that gets >+ * disposed/created as orientation changes with *no* margins (so separator >+ * spans entire width/height of the pane). >+ */ >+ private Composite fSeparatorContainer; >+ /** >+ * Cached orientation currently being displayed >+ */ >+ private int fOrientation = -1; >+ /** >+ * Composite that contains the editor that has margins. >+ */ >+ private Composite fControlParent; >+ >+ /** >+ * Label control >+ */ >+ private Label fLabel; >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.debug.ui.IDetailPane#init(org.eclipse.ui.IWorkbenchPartSite) >+ */ >+ public void init(IWorkbenchPartSite partSite) { >+ } >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.debug.ui.IDetailPane#dispose() >+ */ >+ public void dispose() { >+ fSash = null; >+ fDetailsContainer.dispose(); >+ } >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.debug.ui.IDetailPane#createControl(org.eclipse.swt.widgets.Composite) >+ */ >+ public Control createControl(Composite parent) { >+ fDetailsContainer = SWTFactory.createComposite(parent, parent.getFont(), 1, 1, GridData.FILL_BOTH, 0, 0); >+ if (parent instanceof SashForm) { >+ fSash = (SashForm) parent; >+ } >+ createDetails(); >+ return fDetailsContainer; >+ } >+ >+ /** >+ * Creates the details area with a separator based on orientation. >+ */ >+ protected void createDetails() { >+ int parentOrientation = SWT.HORIZONTAL; >+ if (fSash != null) { >+ parentOrientation = fSash.getOrientation(); >+ } >+ String message = ""; //$NON-NLS-1$ >+ if (fLabel != null) { >+ message = fLabel.getText(); >+ } >+ if (parentOrientation == fOrientation) { >+ return; >+ } >+ if (fSeparatorContainer != null) { >+ fSeparatorContainer.dispose(); >+ } >+ if (parentOrientation == SWT.VERTICAL) { >+ fSeparatorContainer = SWTFactory.createComposite(fDetailsContainer, fDetailsContainer.getFont(), 1, 1, GridData.FILL_BOTH, 0, 0); >+ Label sep = new Label(fSeparatorContainer, SWT.SEPARATOR | SWT.HORIZONTAL); >+ sep.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false)); >+ GridLayout layout= (GridLayout)fSeparatorContainer.getLayout(); >+ layout.marginHeight= 0; >+ layout.marginWidth= 0; >+ fControlParent = SWTFactory.createComposite(fSeparatorContainer, 1, 1, GridData.FILL_BOTH); >+ } else { >+ fSeparatorContainer = SWTFactory.createComposite(fDetailsContainer, fDetailsContainer.getFont(), 2, 1, GridData.FILL_BOTH, 0, 0); >+ Label sep= new Label(fSeparatorContainer, SWT.SEPARATOR | SWT.VERTICAL); >+ sep.setLayoutData(new GridData(SWT.TOP, SWT.FILL, false, true)); >+ GridLayout layout= (GridLayout)fSeparatorContainer.getLayout(); >+ layout.marginHeight= 0; >+ layout.marginWidth= 0; >+ fControlParent = SWTFactory.createComposite(fSeparatorContainer, 1, 1, GridData.FILL_BOTH); >+ } >+ fOrientation = parentOrientation; >+ fLabel = SWTFactory.createWrapLabel(fControlParent, message, 1); >+ fDetailsContainer.layout(true); >+ } >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.debug.ui.IDetailPane#setFocus() >+ */ >+ public boolean setFocus() { >+ return false; >+ } >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.debug.ui.IDetailPane#display(org.eclipse.jface.viewers.IStructuredSelection) >+ */ >+ public void display(IStructuredSelection selection) { >+ // re-create controls if the layout has changed >+ if (selection != null && selection.size() == 1) { >+ Object input = selection.getFirstElement(); >+ if (input instanceof String) { >+ createDetails(); >+ String message = (String) input; >+ fLabel.setText(message); >+ fDetailsContainer.layout(true); >+ } >+ } >+ } >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.debug.ui.IDetailPane#getID() >+ */ >+ public String getID() { >+ return ID; >+ } >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.debug.ui.IDetailPane#getName() >+ */ >+ public String getName() { >+ return NAME; >+ } >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.debug.ui.IDetailPane#getDescription() >+ */ >+ public String getDescription() { >+ return DESCRIPTION; >+ } >+ >+}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 301123
:
158361
| 158518