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')
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/AbstractDetailPane.java48
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/AvailableDetailPanesAction.java48
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DefaultDetailPane.java214
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DefaultDetailPaneFactory.java8
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DetailPaneManager.java142
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DetailPaneProxy.java74
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/IDetailPaneContainer.java26
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/IDetailPaneContainer2.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/MessageDetailPane.java20
9 files changed, 292 insertions, 292 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/AbstractDetailPane.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/AbstractDetailPane.java
index 2ee374a79..fc454540a 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/AbstractDetailPane.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/AbstractDetailPane.java
@@ -24,29 +24,29 @@ import org.eclipse.ui.texteditor.IUpdate;
/**
* Abstract class that holds common methods used by implementors of IDetailPane.
- *
+ *
* @see DefaultDetailPane
* @since 3.3
*/
public abstract class AbstractDetailPane implements IDetailPane {
/**
- * The <code>IWorkbenchPartSite</code> that the details area (and the
+ * The <code>IWorkbenchPartSite</code> that the details area (and the
* variables view) belongs to.
*/
private IWorkbenchPartSite fWorkbenchPartSite;
-
+
/**
* Map of actions. Keys are strings, values
* are <code>IAction</code>.
*/
private Map<String, IAction> fActionMap = new HashMap<String, IAction>();
-
+
/**
* Collection to track actions that should be updated when selection occurs.
*/
private List<String> fSelectionActions = new ArrayList<String>();
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.ui.IDetailPane#init(org.eclipse.ui.IWorkbenchPartSite)
*/
@@ -55,7 +55,7 @@ public abstract class AbstractDetailPane implements IDetailPane {
fWorkbenchPartSite = workbench;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.ui.IDetailPane#dispose()
*/
@@ -67,7 +67,7 @@ public abstract class AbstractDetailPane implements IDetailPane {
/**
* Adds an action to the Map storing actions. Removes it if action is null.
- *
+ *
* @param actionID The ID of the action, used as the key in the Map
* @param action The action associated with the ID
*/
@@ -78,24 +78,24 @@ public abstract class AbstractDetailPane implements IDetailPane {
fActionMap.put(actionID, action);
}
}
-
+
/**
* Adds the given action to the global action handler for the ViewSite.
* A call to <code>updateActionBars()</code> must be called after changes
* to propagate changes through the workbench.
- *
+ *
* @param actionID The ID of the action
* @param action The action to be set globally
*/
protected void setGlobalAction(String actionID, IAction action){
getViewSite().getActionBars().setGlobalActionHandler(actionID, action);
}
-
+
/**
* Adds the given action to the list of actions that will be updated when
- * <code>updateSelectionDependentActions()</code> is called. If the string
+ * <code>updateSelectionDependentActions()</code> is called. If the string
* is null it will not be added to the list.
- *
+ *
* @param actionID The ID of the action which should be updated
*/
protected void setSelectionDependantAction(String actionID){
@@ -103,22 +103,22 @@ public abstract class AbstractDetailPane implements IDetailPane {
fSelectionActions.add(actionID);
}
}
-
+
/**
* Gets the action out of the map, casts it to an <code>IAction</code>
- *
+ *
* @param actionID The ID of the action to find
* @return The action associated with the ID or null if none is found.
*/
protected IAction getAction(String actionID) {
return fActionMap.get(actionID);
}
-
+
/**
* Calls the update method of the action with the given action ID.
* The action must exist in the action map and must be an instance of
* </code>IUpdate</code>
- *
+ *
* @param actionId The ID of the action to update
*/
protected void updateAction(String actionId) {
@@ -127,11 +127,11 @@ public abstract class AbstractDetailPane implements IDetailPane {
((IUpdate) action).update();
}
}
-
+
/**
- * Iterates through the list of selection dependent actions and
+ * Iterates through the list of selection dependent actions and
* updates them. Use <code>setSelectionDependentAction(String actionID)</code>
- * to add an action to the list. The action must have been added to the known
+ * to add an action to the list. The action must have been added to the known
* actions map by calling <code>setAction(String actionID, IAction action)</code>
* before it can be updated by this method.
*/
@@ -140,11 +140,11 @@ public abstract class AbstractDetailPane implements IDetailPane {
updateAction(string);
}
}
-
+
/**
* Gets the view site for this view. May be null if this detail pane
* is not part of a view.
- *
+ *
* @return The site for this view or <code>null</code>
*/
protected IViewSite getViewSite(){
@@ -158,16 +158,16 @@ public abstract class AbstractDetailPane implements IDetailPane {
/**
* Gets the workbench part site for this view. May be null if this detail pane
* is not part of a view.
- *
+ *
* @return The workbench part site or <code>null</code>
*/
protected IWorkbenchPartSite getWorkbenchPartSite() {
return fWorkbenchPartSite;
}
-
+
/**
* Returns whether this detail pane is being displayed in a view with a workbench part site.
- *
+ *
* @return whether this detail pane is being displayed in a view with a workbench part site.
*/
protected boolean isInView(){
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/AvailableDetailPanesAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/AvailableDetailPanesAction.java
index ca8e07c50..8445ad826 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/AvailableDetailPanesAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/AvailableDetailPanesAction.java
@@ -24,35 +24,35 @@ import org.eclipse.ui.PlatformUI;
/**
* Drop down action that displays the available detail panes for a selection.
- *
+ *
* @since 3.3
* @see IDetailPaneContainer
*/
public class AvailableDetailPanesAction extends Action implements IMenuCreator {
-
+
private Menu fMenu;
private Set<String> fAvailableIDs;
private IDetailPaneContainer fDetailPaneContainer;
-
+
/**
* Each entry in the menu will be of this type. It represents one possible detail pane
* that the user can select. If the user selects it, the display is changed to use that
* detail pane and the preferred detail pane map in the pane manager is updated.
- *
+ *
* @see DetailPaneManager
* @since 3.3
*/
private class SetDetailPaneAction extends Action {
-
+
private String fPaneID;
private Set<String> fPossiblePaneIDs;
-
+
public SetDetailPaneAction(String name, String paneID, Set<String> possiblePaneIDs) {
super(name,AS_RADIO_BUTTON);
fPaneID = paneID;
fPossiblePaneIDs = possiblePaneIDs;
}
-
+
@Override
public void run() {
// Don't change panes unless the user is selecting a different pane than the one currently displayed
@@ -61,26 +61,26 @@ public class AvailableDetailPanesAction extends Action implements IMenuCreator {
fDetailPaneContainer.refreshDetailPaneContents();
}
}
-
+
}
-
+
public AvailableDetailPanesAction(IDetailPaneContainer detailPaneContainer) {
fDetailPaneContainer = detailPaneContainer;
- setText(DetailMessages.AvailableDetailPanesAction_0);
+ setText(DetailMessages.AvailableDetailPanesAction_0);
PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IDebugHelpContextIds.VARIABLES_SELECT_DETAIL_PANE);
-
+
setEnabled(false);
setMenuCreator(this);
init();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.jface.action.IAction#run()
*/
@Override
public void run() {
}
-
+
/* (non-Javadoc)
* @see org.eclipse.jface.action.IMenuCreator#dispose()
*/
@@ -91,7 +91,7 @@ public class AvailableDetailPanesAction extends Action implements IMenuCreator {
}
fAvailableIDs.clear();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.jface.action.IMenuCreator#getMenu(org.eclipse.swt.widgets.Control)
*/
@@ -99,12 +99,12 @@ public class AvailableDetailPanesAction extends Action implements IMenuCreator {
public Menu getMenu(Control parent) {
return null;
}
-
+
protected void addActionToMenu(Menu parent, IAction action) {
ActionContributionItem item= new ActionContributionItem(action);
item.fill(parent, -1);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.jface.action.IMenuCreator#getMenu(org.eclipse.swt.widgets.Menu)
*/
@@ -124,26 +124,26 @@ public class AvailableDetailPanesAction extends Action implements IMenuCreator {
name.append(i);
name.append(' ');
}
-
+
String typeName = DetailPaneManager.getDefault().getNameFromID(currentID);
if (typeName != null && typeName.length() > 0){
name.append(typeName);
} else {
- name.append(currentID);
+ name.append(currentID);
}
-
+
IAction action = new SetDetailPaneAction(name.toString(),currentID,fAvailableIDs);
-
+
if (currentID.equals(fDetailPaneContainer.getCurrentPaneID())){
action.setChecked(true);
}
-
- addActionToMenu(fMenu, action);
+
+ addActionToMenu(fMenu, action);
}
-
+
return fMenu;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
*/
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DefaultDetailPane.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DefaultDetailPane.java
index 823db6fdd..d0c8f7b7f 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DefaultDetailPane.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DefaultDetailPane.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
* QNX Software Systems - Mikhail Khodjaiants - Registers View (Bug 53640)
@@ -123,7 +123,7 @@ import com.ibm.icu.text.MessageFormat;
* This detail pane uses a source viewer to display detailed information about the current
* selection. It incorporates a large number of actions into its context menu. It is the
* default detail pane.
- *
+ *
* @see DefaultDetailPaneFactory
* @since 3.3
*
@@ -137,14 +137,14 @@ public class DefaultDetailPane extends AbstractDetailPane implements IDetailPane
protected static final String DETAIL_SELECT_ALL_ACTION = IDebugView.SELECT_ALL_ACTION + ".SourceDetailPane"; //$NON-NLS-1$
protected static final String DETAIL_PASTE_ACTION = ActionFactory.PASTE.getId();
protected static final String DETAIL_CUT_ACTION = ActionFactory.CUT.getId();
-
+
protected static final String DETAIL_FIND_REPLACE_TEXT_ACTION = "FindReplaceText"; //$NON-NLS-1$
protected static final String DETAIL_CONTENT_ASSIST_ACTION = "ContentAssist"; //$NON-NLS-1$
protected static final String DETAIL_ASSIGN_VALUE_ACTION = "AssignValue"; //$NON-NLS-1$
-
+
protected static final String DETAIL_WORD_WRAP_ACTION = IDebugPreferenceConstants.PREF_DETAIL_PANE_WORD_WRAP;
protected static final String DETAIL_MAX_LENGTH_ACTION = "MaxLength"; //$NON-NLS-1$
-
+
/**
* The ID, name and description of this pane are stored in constants so that the class
* does not have to be instantiated to access them.
@@ -152,20 +152,20 @@ public class DefaultDetailPane extends AbstractDetailPane implements IDetailPane
public static final String ID = DetailMessages.DefaultDetailPane_0;
public static final String NAME = DetailMessages.DefaultDetailPane_1;
public static final String DESCRIPTION = DetailMessages.DefaultDetailPane_57;
-
+
/**
* Data structure for the position label value.
*/
private static class PositionLabelValue {
-
+
public int fValue;
-
+
@Override
public String toString() {
return String.valueOf(fValue);
}
}
-
+
/**
* Internal interface for a cursor listener. I.e. aggregation
* of mouse and key listener.
@@ -173,26 +173,26 @@ public class DefaultDetailPane extends AbstractDetailPane implements IDetailPane
*/
interface ICursorListener extends MouseListener, KeyListener {
}
-
+
/**
* Job to compute the details for a selection
*/
class DetailJob extends Job implements IValueDetailListener {
-
+
private IStructuredSelection fElements;
private IDebugModelPresentation fModel;
private boolean fFirst = true;
// whether a result was collected
private boolean fComputed = false;
private IProgressMonitor fMonitor;
-
+
public DetailJob(IStructuredSelection elements, IDebugModelPresentation model) {
super("compute variable details"); //$NON-NLS-1$
setSystem(true);
fElements = elements;
fModel = model;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
*/
@@ -228,7 +228,7 @@ public class DefaultDetailPane extends AbstractDetailPane implements IDetailPane
} else {
message = c.getOrganizer().getLabel();
}
- }
+ }
}
// When selecting a index partition, clear the pane
if (val instanceof IndexedValuePartition) {
@@ -264,7 +264,7 @@ public class DefaultDetailPane extends AbstractDetailPane implements IDetailPane
}
return Status.OK_STATUS;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.core.runtime.jobs.Job#canceling()
*/
@@ -330,18 +330,18 @@ public class DefaultDetailPane extends AbstractDetailPane implements IDetailPane
synchronized (this) {
notifyAll();
}
-
+
}
}
-
+
/**
* The model presentation used to produce the string details for a
* selected variable.
*/
private VariablesViewModelPresentation fModelPresentation;
private String fDebugModelIdentifier;
-
+
/**
* Controls the status line while the details area has focus.
* Displays the current cursor position in the text (line:character).
@@ -353,18 +353,18 @@ public class DefaultDetailPane extends AbstractDetailPane implements IDetailPane
* of selected variables will be displayed.
*/
private SourceViewer fSourceViewer;
-
+
/**
* The last selection displayed in the source viewer.
*/
private IStructuredSelection fLastDisplayed = null;
-
+
/**
* Flag used to track whether source viewer has focus. It helps avoid
* resetting global actions incorrectly.
*/
private boolean fHasFocus = false;
-
+
/**
* Variables used to create the detailed information for a selection
*/
@@ -376,40 +376,40 @@ public class DefaultDetailPane extends AbstractDetailPane implements IDetailPane
private final Object[] fPositionLabelPatternArguments = new Object[] {
fLineLabel, fColumnLabel };
private ICursorListener fCursorListener;
-
+
/**
* Handler activation object so that we can use the global content assist command
* and properly deactivate it later.
*/
private IHandlerActivation fContentAssistActivation;
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.ui.IDetailPane#createControl(org.eclipse.swt.widgets.Composite)
*/
@Override
public Control createControl(Composite parent) {
-
+
fModelPresentation = new VariablesViewModelPresentation();
-
+
createSourceViewer(parent);
-
+
if (isInView()){
createViewSpecificComponents();
createActions();
DebugUIPlugin.getDefault().getPreferenceStore().addPropertyChangeListener(this);
JFaceResources.getFontRegistry().addListener(this);
}
-
+
return fSourceViewer.getControl();
}
/**
* Creates the source viewer in the given parent composite
- *
+ *
* @param parent Parent composite to create the source viewer in
*/
private void createSourceViewer(Composite parent) {
-
+
// Create & configure a SourceViewer
fSourceViewer = new SourceViewer(parent, null, SWT.V_SCROLL | SWT.H_SCROLL);
fSourceViewer.setDocument(getDetailDocument());
@@ -427,7 +427,7 @@ public class DefaultDetailPane extends AbstractDetailPane implements IDetailPane
* source viewer when this detail pane is inside a view.
*/
private void createViewSpecificComponents(){
-
+
// Add a document listener so actions get updated when the document changes
getDetailDocument().addDocumentListener(new IDocumentListener() {
@Override
@@ -437,7 +437,7 @@ public class DefaultDetailPane extends AbstractDetailPane implements IDetailPane
updateSelectionDependentActions();
}
});
-
+
// Add the selection listener so selection dependent actions get updated.
fSourceViewer.getSelectionProvider().addSelectionChangedListener(new ISelectionChangedListener() {
@Override
@@ -445,7 +445,7 @@ public class DefaultDetailPane extends AbstractDetailPane implements IDetailPane
updateSelectionDependentActions();
}
});
-
+
// Add a focus listener to update actions when details area gains focus
fSourceViewer.getControl().addFocusListener(new FocusAdapter() {
@Override
@@ -459,13 +459,13 @@ public class DefaultDetailPane extends AbstractDetailPane implements IDetailPane
setGlobalAction(action.getActionDefinitionId(), action);
action = getAction(DETAIL_CONTENT_ASSIST_ACTION);
setGlobalAction(action.getActionDefinitionId(),action);
-
+
getViewSite().getActionBars().updateActionBars();
-
+
updateAction(DETAIL_FIND_REPLACE_TEXT_ACTION);
fHasFocus = true;
}
-
+
@Override
public void focusLost(FocusEvent e) {
setGlobalAction(IDebugView.SELECT_ALL_ACTION, null);
@@ -475,18 +475,18 @@ public class DefaultDetailPane extends AbstractDetailPane implements IDetailPane
setGlobalAction(IDebugView.FIND_ACTION, null);
setGlobalAction(getAction(DETAIL_ASSIGN_VALUE_ACTION).getActionDefinitionId(), null);
setGlobalAction(getAction(DETAIL_CONTENT_ASSIST_ACTION).getActionDefinitionId(), null);
-
+
getViewSite().getActionBars().updateActionBars();
fHasFocus = false;
}
});
-
+
// disposed controls don't get a FocusOut event, make sure all actions
// have been deactivated
fSourceViewer.getControl().addDisposeListener(new DisposeListener() {
@Override
public void widgetDisposed(DisposeEvent e) {
- if (fHasFocus) {
+ if (fHasFocus) {
setGlobalAction(IDebugView.SELECT_ALL_ACTION, null);
setGlobalAction(IDebugView.CUT_ACTION, null);
setGlobalAction(IDebugView.COPY_ACTION, null);
@@ -506,12 +506,12 @@ public class DefaultDetailPane extends AbstractDetailPane implements IDetailPane
manager.add(fStatusLineItem);
fSourceViewer.getTextWidget().addMouseListener(getCursorListener());
fSourceViewer.getTextWidget().addKeyListener(getCursorListener());
-
+
// Add a context menu to the detail area
createDetailContextMenu(fSourceViewer.getTextWidget());
-
+
}
-
+
/**
* Creates the actions to add to the context menu
*/
@@ -527,54 +527,54 @@ public class DefaultDetailPane extends AbstractDetailPane implements IDetailPane
IHandlerService handlerService = getViewSite().getService(IHandlerService.class);
fContentAssistActivation = handlerService.activateHandler(textAction.getActionDefinitionId(), actionHandler);
setAction(DETAIL_CONTENT_ASSIST_ACTION, textAction);
-
+
textAction= new TextViewerAction(fSourceViewer, ITextOperationTarget.SELECT_ALL);
textAction.configureAction(DetailMessages.DefaultDetailPane_Select__All_5, IInternalDebugCoreConstants.EMPTY_STRING,IInternalDebugCoreConstants.EMPTY_STRING);
textAction.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_SELECT_ALL);
PlatformUI.getWorkbench().getHelpSystem().setHelp(textAction, IDebugHelpContextIds.DETAIL_PANE_SELECT_ALL_ACTION);
setAction(DETAIL_SELECT_ALL_ACTION, textAction);
-
+
textAction= new TextViewerAction(fSourceViewer, ITextOperationTarget.COPY);
textAction.configureAction(DetailMessages.DefaultDetailPane__Copy_8, IInternalDebugCoreConstants.EMPTY_STRING,IInternalDebugCoreConstants.EMPTY_STRING);
textAction.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_COPY);
PlatformUI.getWorkbench().getHelpSystem().setHelp(textAction, IDebugHelpContextIds.DETAIL_PANE_COPY_ACTION);
setAction(DETAIL_COPY_ACTION, textAction);
-
+
textAction= new TextViewerAction(fSourceViewer, ITextOperationTarget.CUT);
textAction.configureAction(DetailMessages.DefaultDetailPane_Cu_t_11, IInternalDebugCoreConstants.EMPTY_STRING,IInternalDebugCoreConstants.EMPTY_STRING);
textAction.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_CUT);
PlatformUI.getWorkbench().getHelpSystem().setHelp(textAction, IDebugHelpContextIds.DETAIL_PANE_CUT_ACTION);
setAction(DETAIL_CUT_ACTION, textAction);
-
+
textAction= new TextViewerAction(fSourceViewer, ITextOperationTarget.PASTE);
textAction.configureAction(DetailMessages.DefaultDetailPane__Paste_14, IInternalDebugCoreConstants.EMPTY_STRING,IInternalDebugCoreConstants.EMPTY_STRING);
textAction.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_PASTE);
PlatformUI.getWorkbench().getHelpSystem().setHelp(textAction, IDebugHelpContextIds.DETAIL_PANE_PASTE_ACTION);
setAction(ActionFactory.PASTE.getId(), textAction);
-
+
setSelectionDependantAction(DETAIL_COPY_ACTION);
setSelectionDependantAction(DETAIL_CUT_ACTION);
setSelectionDependantAction(DETAIL_PASTE_ACTION);
-
+
// TODO: Still using "old" resource access, find/replace won't work in popup dialogs
ResourceBundle bundle= ResourceBundle.getBundle("org.eclipse.debug.internal.ui.views.variables.VariablesViewResourceBundleMessages"); //$NON-NLS-1$
IAction action = new FindReplaceAction(bundle, "find_replace_action_", getWorkbenchPartSite().getShell(), new FindReplaceTargetWrapper(fSourceViewer.getFindReplaceTarget())); //$NON-NLS-1$
action.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_FIND_AND_REPLACE);
PlatformUI.getWorkbench().getHelpSystem().setHelp(action, IDebugHelpContextIds.DETAIL_PANE_FIND_REPLACE_ACTION);
setAction(DETAIL_FIND_REPLACE_TEXT_ACTION, action);
-
+
updateSelectionDependentActions();
-
+
action = new DetailPaneWordWrapAction(fSourceViewer);
setAction(DETAIL_WORD_WRAP_ACTION, action);
-
+
action = new DetailPaneMaxLengthAction(fSourceViewer.getControl().getShell());
setAction(DETAIL_MAX_LENGTH_ACTION,action);
-
+
action = new DetailPaneAssignValueAction(fSourceViewer,getViewSite());
setAction(DETAIL_ASSIGN_VALUE_ACTION, action);
}
-
+
/**
* Create the context menu particular to the detail pane. Note that anyone
* wishing to contribute an action to this menu must use
@@ -597,15 +597,15 @@ public class DefaultDetailPane extends AbstractDetailPane implements IDetailPane
getViewSite().registerContextMenu(IDebugUIConstants.VARIABLE_VIEW_DETAIL_ID, menuMgr, fSourceViewer.getSelectionProvider());
}
-
+
/**
* Adds items to the detail pane's context menu including any extension defined
* actions.
- *
+ *
* @param menu The menu to add the item to.
*/
protected void fillDetailContextMenu(IMenuManager menu) {
-
+
menu.add(new Separator(IDebugUIConstants.VARIABLE_GROUP));
if (isInView()){
menu.add(getAction(DETAIL_ASSIGN_VALUE_ACTION));
@@ -624,43 +624,43 @@ public class DefaultDetailPane extends AbstractDetailPane implements IDetailPane
menu.add(getAction(DETAIL_WORD_WRAP_ACTION));
menu.add(getAction(DETAIL_MAX_LENGTH_ACTION));
menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
-
+
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.ui.IDetailPane#display(org.eclipse.jface.viewers.IStructuredSelection)
*/
@Override
public void display(IStructuredSelection selection) {
-
+
if (selection == null){
clearSourceViewer();
return;
}
-
+
fLastDisplayed = selection;
if (isInView()){
fSourceViewer.setEditable(true);
}
-
+
if (selection.isEmpty()){
clearSourceViewer();
return;
}
-
+
Object firstElement = selection.getFirstElement();
if (firstElement != null && firstElement instanceof IDebugElement) {
String modelID = ((IDebugElement)firstElement).getModelIdentifier();
setDebugModel(modelID);
}
-
+
if (isInView()){
IAction assignAction = getAction(DETAIL_ASSIGN_VALUE_ACTION);
if (assignAction instanceof DetailPaneAssignValueAction){
((DetailPaneAssignValueAction)assignAction).updateCurrentVariable(selection);
}
}
-
+
synchronized (this) {
if (fDetailJob != null) {
fDetailJob.cancel();
@@ -668,9 +668,9 @@ public class DefaultDetailPane extends AbstractDetailPane implements IDetailPane
fDetailJob = new DetailJob(selection,fModelPresentation);
fDetailJob.schedule();
}
-
+
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.ui.IDetailPane#setFocus()
*/
@@ -682,7 +682,7 @@ public class DefaultDetailPane extends AbstractDetailPane implements IDetailPane
}
return false;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.views.variables.details.AbstractDetailPane#dispose()
*/
@@ -698,7 +698,7 @@ public class DefaultDetailPane extends AbstractDetailPane implements IDetailPane
if (fSourceViewer != null && fSourceViewer.getControl() != null) {
fSourceViewer.getControl().dispose();
}
-
+
if (isInView()){
IAction action = getAction(DETAIL_ASSIGN_VALUE_ACTION);
if (action != null){
@@ -709,19 +709,19 @@ public class DefaultDetailPane extends AbstractDetailPane implements IDetailPane
service.deactivateHandler(fContentAssistActivation);
fContentAssistActivation = null;
}
-
+
disposeUndoRedoAction(ITextEditorActionConstants.UNDO);
disposeUndoRedoAction(ITextEditorActionConstants.REDO);
-
+
getViewSite().getActionBars().getStatusLineManager().remove(fStatusLineItem);
-
+
DebugUIPlugin.getDefault().getPreferenceStore().removePropertyChangeListener(this);
JFaceResources.getFontRegistry().removeListener(this);
}
-
+
super.dispose();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.ui.IDetailPane#getDescription()
*/
@@ -745,7 +745,7 @@ public class DefaultDetailPane extends AbstractDetailPane implements IDetailPane
public String getName() {
return NAME;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
*/
@@ -760,7 +760,7 @@ public class DefaultDetailPane extends AbstractDetailPane implements IDetailPane
}
return null;
}
-
+
/**
* Lazily instantiate and return a Document for the detail pane text viewer.
* @return the singleton {@link Document} for this detail pane
@@ -771,7 +771,7 @@ public class DefaultDetailPane extends AbstractDetailPane implements IDetailPane
}
return fDetailDocument;
}
-
+
/**
* Clears the source viewer, removes all text.
*/
@@ -798,7 +798,7 @@ public class DefaultDetailPane extends AbstractDetailPane implements IDetailPane
DebugUIPlugin.errorDialog(fSourceViewer.getControl().getShell(), DetailMessages.DefaultDetailPane_Error_1, DetailMessages.DefaultDetailPane_2, e);
}
}
-
+
if (svc == null) {
svc = new SourceViewerConfiguration();
fSourceViewer.setEditable(false);
@@ -806,12 +806,12 @@ public class DefaultDetailPane extends AbstractDetailPane implements IDetailPane
fSourceViewer.unconfigure();
fSourceViewer.configure(svc);
//update actions that depend on the configuration of the source viewer
-
+
if (isInView()){
updateAction(DETAIL_ASSIGN_VALUE_ACTION);
updateAction(DETAIL_CONTENT_ASSIST_ACTION);
}
-
+
if (isInView()){
createUndoRedoActions();
}
@@ -821,23 +821,23 @@ public class DefaultDetailPane extends AbstractDetailPane implements IDetailPane
* @return The formatted string describing cursor position
*/
protected String getCursorPosition() {
-
+
if (fSourceViewer == null) {
return IInternalDebugCoreConstants.EMPTY_STRING;
}
-
+
StyledText styledText= fSourceViewer.getTextWidget();
int caret= styledText.getCaretOffset();
IDocument document= fSourceViewer.getDocument();
-
+
if (document == null) {
return IInternalDebugCoreConstants.EMPTY_STRING;
}
-
+
try {
-
+
int line= document.getLineOfOffset(caret);
-
+
int lineOffset= document.getLineOffset(line);
int tabWidth= styledText.getTabs();
int column= 0;
@@ -848,11 +848,11 @@ public class DefaultDetailPane extends AbstractDetailPane implements IDetailPane
column++;
}
}
-
+
fLineLabel.fValue= line + 1;
fColumnLabel.fValue= column + 1;
return MessageFormat.format(fPositionLabelPattern, fPositionLabelPatternArguments);
-
+
} catch (BadLocationException x) {
return IInternalDebugCoreConstants.EMPTY_STRING;
}
@@ -862,30 +862,30 @@ public class DefaultDetailPane extends AbstractDetailPane implements IDetailPane
* Returns this view's "cursor" listener to be installed on the view's
* associated details viewer. This listener is listening to key and mouse button events.
* It triggers the updating of the status line.
- *
+ *
* @return the listener
*/
private ICursorListener getCursorListener() {
if (fCursorListener == null) {
fCursorListener= new ICursorListener() {
-
+
@Override
public void keyPressed(KeyEvent e) {
fStatusLineItem.setText(getCursorPosition());
}
-
+
@Override
public void keyReleased(KeyEvent e) {
}
-
+
@Override
public void mouseDoubleClick(MouseEvent e) {
}
-
+
@Override
public void mouseDown(MouseEvent e) {
}
-
+
@Override
public void mouseUp(MouseEvent e) {
fStatusLineItem.setText(getCursorPosition());
@@ -894,11 +894,11 @@ public class DefaultDetailPane extends AbstractDetailPane implements IDetailPane
}
return fCursorListener;
}
-
+
/**
* Returns the identifier of the debug model being displayed
* in this view, or <code>null</code> if none.
- *
+ *
* @return debug model identifier
*/
protected String getDebugModel() {
@@ -908,7 +908,7 @@ public class DefaultDetailPane extends AbstractDetailPane implements IDetailPane
/**
* Sets the identifier of the debug model being displayed
* in this view, or <code>null</code> if none.
- *
+ *
* @param id debug model identifier of the type of debug
* elements being displayed in this view
*/
@@ -918,7 +918,7 @@ public class DefaultDetailPane extends AbstractDetailPane implements IDetailPane
configureDetailsViewer();
}
}
-
+
/**
* Creates this editor's undo/re-do actions.
* <p>
@@ -932,28 +932,28 @@ public class DefaultDetailPane extends AbstractDetailPane implements IDetailPane
IUndoContext undoContext= getUndoContext();
if (undoContext != null) {
// Use actions provided by global undo/re-do
-
+
// Create the undo action
OperationHistoryActionHandler undoAction= new UndoActionHandler(getViewSite(), undoContext);
PlatformUI.getWorkbench().getHelpSystem().setHelp(undoAction, IAbstractTextEditorHelpContextIds.UNDO_ACTION);
undoAction.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_UNDO);
setAction(ITextEditorActionConstants.UNDO, undoAction);
setGlobalAction(ITextEditorActionConstants.UNDO, undoAction);
-
+
// Create the re-do action.
OperationHistoryActionHandler redoAction= new RedoActionHandler(getViewSite(), undoContext);
PlatformUI.getWorkbench().getHelpSystem().setHelp(redoAction, IAbstractTextEditorHelpContextIds.REDO_ACTION);
redoAction.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_REDO);
setAction(ITextEditorActionConstants.REDO, redoAction);
setGlobalAction(ITextEditorActionConstants.REDO, redoAction);
-
+
getViewSite().getActionBars().updateActionBars();
}
}
-
+
/**
* Disposes of the action with the specified ID
- *
+ *
* @param actionId the ID of the action to disposed
*/
protected void disposeUndoRedoAction(String actionId) {
@@ -963,7 +963,7 @@ public class DefaultDetailPane extends AbstractDetailPane implements IDetailPane
setAction(actionId, null);
}
}
-
+
/**
* Returns this editor's viewer's undo manager undo context.
*
@@ -992,7 +992,7 @@ public class DefaultDetailPane extends AbstractDetailPane implements IDetailPane
fSourceViewer.getTextWidget().setWordWrap(DebugUIPlugin.getDefault().getPreferenceStore().getBoolean(IDebugPreferenceConstants.PREF_DETAIL_PANE_WORD_WRAP));
getAction(DETAIL_WORD_WRAP_ACTION).setChecked(DebugUIPlugin.getDefault().getPreferenceStore().getBoolean(IDebugPreferenceConstants.PREF_DETAIL_PANE_WORD_WRAP));
}
-
+
}
/**
@@ -1002,12 +1002,12 @@ public class DefaultDetailPane extends AbstractDetailPane implements IDetailPane
* on it's own. See bug 178106.
*/
class FindReplaceTargetWrapper implements IFindReplaceTarget{
-
+
private IFindReplaceTarget fTarget;
-
+
/**
* Constructor
- *
+ *
* @param target find/replace target this class will wrap around.
*/
public FindReplaceTargetWrapper(IFindReplaceTarget target){
@@ -1070,7 +1070,7 @@ public class DefaultDetailPane extends AbstractDetailPane implements IDetailPane
fTarget.replaceSelection(text);
}
}
-
+
/*
* @see org.eclipse.debug.ui.IDetailPane2#getSelectionProvider()
*/
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DefaultDetailPaneFactory.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DefaultDetailPaneFactory.java
index cb4ee5c0b..3abc49ffc 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DefaultDetailPaneFactory.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DefaultDetailPaneFactory.java
@@ -21,13 +21,13 @@ import org.eclipse.jface.viewers.IStructuredSelection;
* The default detail pane factory is contributed to the <code>org.eclipse.debug.ui.detailPaneFactories</code>
* extension without an enablement expression so it is always loaded. For any given selection (even
* null or empty selections), the factory can produce a <code>SourceDetailsPane</code>
- *
+ *
* @since 3.3
*/
public class DefaultDetailPaneFactory implements IDetailPaneFactory {
public static final String DEFAULT_DETAIL_PANE_ID = DefaultDetailPane.ID;
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.views.variables.IDetailsFactory#createDetailsArea(java.lang.String)
*/
@@ -52,7 +52,7 @@ public class DefaultDetailPaneFactory implements IDetailPaneFactory {
possibleIDs.add(DefaultDetailPane.ID);
return possibleIDs;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.ui.IDetailPaneFactory#getDefaultDetailPane(java.util.Set, org.eclipse.jface.viewers.IStructuredSelection)
*/
@@ -75,7 +75,7 @@ public class DefaultDetailPaneFactory implements IDetailPaneFactory {
}
return null;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.views.variables.IDetailsFactory#getDescription(java.lang.String)
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DetailPaneManager.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DetailPaneManager.java
index 8089a2e0d..03e86262e 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DetailPaneManager.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DetailPaneManager.java
@@ -46,16 +46,16 @@ import org.osgi.service.prefs.BackingStoreException;
* Organizes the detail factories contributed through the extension point and keeps
* track of the detail panes the factories produce. Accessed as a singleton through
* the <code>getDefault()</code> method.
- *
+ *
* @see IDetailPaneFactory
* @see IDetailPane
* @since 3.3
*/
public class DetailPaneManager {
-
+
/**
* Acts as a proxy between the detail pane manager and the factories contributed
- * to the extension point. Only loads information from the plug-in xml and only
+ * to the extension point. Only loads information from the plug-in xml and only
* instantiates the specified factory if required (lazy loading).
*/
private class DetailPaneFactoryExtension implements IDetailPaneFactory{
@@ -63,12 +63,12 @@ public class DetailPaneManager {
private IConfigurationElement fConfigElement;
private IDetailPaneFactory fFactory;
private Expression fEnablementExpression;
-
+
public DetailPaneFactoryExtension(IConfigurationElement configElement){
- fConfigElement = configElement;
+ fConfigElement = configElement;
}
-
- /**
+
+ /**
* Instantiates the factory and asks it to produce the IDetailPane for
* the given ID
* @param paneID the identifier of the detail pane to create
@@ -82,7 +82,7 @@ public class DetailPaneManager {
return null;
}
- /**
+ /**
* Instantiates the factory and asks it for the set of detail pane
* IDs that the factory can produce for the given selection.
* @param selection the current view selection
@@ -95,8 +95,8 @@ public class DetailPaneManager {
}
return Collections.EMPTY_SET;
}
-
- /**
+
+ /**
* Instantiates the factory and asks it for the detail pane ID
* that the factory considers the default for the given selection.
* @param selection the current view selection
@@ -108,9 +108,9 @@ public class DetailPaneManager {
return getFactory().getDefaultDetailPane(selection);
}
return null;
- }
+ }
- /**
+ /**
* Instantiates the factory and asks it to produce the name of the detail pane
* for the given ID.
* @param paneID the detail pane identifier
@@ -123,9 +123,9 @@ public class DetailPaneManager {
}
return null;
}
-
- /**
- * Instantiates the factory and asks it to produce the description of the
+
+ /**
+ * Instantiates the factory and asks it to produce the description of the
* detail pane for the given ID.
* @param paneID the detail pane identifier
* @return the description of the detail pane or <code>null</code> if the backing {@link IDetailPaneFactory} is <code>null</code>
@@ -137,9 +137,9 @@ public class DetailPaneManager {
}
return null;
}
-
+
/**
- * Returns the instantiated factory specified by the class property.
+ * Returns the instantiated factory specified by the class property.
* @return the singleton {@link IDetailPaneFactory}
*/
private IDetailPaneFactory getFactory(){
@@ -152,14 +152,14 @@ public class DetailPaneManager {
fFactory = (IDetailPaneFactory)obj;
} else {
throw new CoreException(new Status(IStatus.ERROR, DebugUIPlugin.getUniqueIdentifier(), IDebugUIConstants.INTERNAL_ERROR, "org.eclipse.debug.ui.detailFactories extension failed to load a detail factory because the specified class does not implement org.eclipse.debug.ui.IDetailPaneFactory. Class specified was: " + obj, null)); //$NON-NLS-1$
- }
+ }
} catch (CoreException e){
DebugUIPlugin.log(e.getStatus());
fFactory = null;
}
return fFactory;
}
-
+
/**
* Checks if the enablement expression for the factory evaluates to true for the
* given selection.
@@ -183,13 +183,13 @@ public class DetailPaneManager {
}
return enabled;
}
-
+
/**
* Evaluate the given expression within the given context and return
* the result. Returns <code>true</code> iff result is either TRUE or NOT_LOADED.
* This allows optimistic inclusion of shortcuts before plug-ins are loaded.
* Returns <code>false</code> if expression is <code>null</code>.
- *
+ *
* @param exp the enablement expression to evaluate or <code>null</code>
* @param context the context of the evaluation. Usually, the
* user's selection.
@@ -208,11 +208,11 @@ public class DetailPaneManager {
}
return false;
}
-
+
/**
* Returns an expression that represents the enablement logic for the
* detail pane factory or <code>null</code> if none.
- *
+ *
* @return an evaluatable expression or <code>null</code>
*/
private Expression getEnablementExpression(){
@@ -220,7 +220,7 @@ public class DetailPaneManager {
if (fEnablementExpression == null) {
try{
IConfigurationElement[] elements = fConfigElement.getChildren(ExpressionTagNames.ENABLEMENT);
- IConfigurationElement enablement = elements.length > 0 ? elements[0] : null;
+ IConfigurationElement enablement = elements.length > 0 ? elements[0] : null;
if (enablement != null) {
fEnablementExpression = ExpressionConverter.getDefault().perform(enablement);
}
@@ -231,42 +231,42 @@ public class DetailPaneManager {
}
return fEnablementExpression;
}
-
+
}
-
+
/**
* There should only ever be once instance of this manager for the workbench.
*/
private static DetailPaneManager fgSingleton;
-
+
/**
* Maps the IDs of types of detail panes to the factory that can create them.
* There can currently only be one factory for a given type of details pane.
*/
private Map<String, IDetailPaneFactory> fFactoriesByPaneID;
-
+
/**
* Maps a Set of detail pane id's to the one detail pane id that is preferred.
*/
private Map<Set<String>, String> fPreferredDetailPanes;
-
+
/**
* The set of all factories that have been loaded from the extension point.
*/
private List<DetailPaneFactoryExtension> fKnownFactories;
-
+
/**
* Preference key for storing the preferred detail panes map.
* @see #storePreferredDetailsAreas()
* @see #loadPreferredDetailsAreas()
*/
public static final String PREF_DETAIL_AREAS = "preferredDetailPanes"; //$NON-NLS-1$
-
+
private DetailPaneManager(){
fFactoriesByPaneID = new HashMap<String, IDetailPaneFactory>();
fFactoriesByPaneID.put(MessageDetailPane.ID, new DefaultDetailPaneFactory());
}
-
+
public static DetailPaneManager getDefault(){
if (fgSingleton == null) {
fgSingleton = new DetailPaneManager();
@@ -276,7 +276,7 @@ public class DetailPaneManager {
/**
* Returns the ID of the preferred detail pane for the given selection.
- *
+ *
* @param selection The selection to display in the detail pane
* @return The ID of the preferred detail pane or null
*/
@@ -285,11 +285,11 @@ public class DetailPaneManager {
Set<String> possiblePaneIDs = getPossiblePaneIDs(possibleFactories, selection);
return chooseDetailsAreaIDInSet(possiblePaneIDs, possibleFactories, selection);
}
-
+
/**
* Returns the set of all possible detail panes the can display the given
* selection.
- *
+ *
* @param selection The selection to display in the detail pane
* @return The set of IDs of all possible detail panes for the given selection
*/
@@ -297,14 +297,14 @@ public class DetailPaneManager {
List<IDetailPaneFactory> possibleFactories = getEnabledFactories(selection);
return getPossiblePaneIDs(possibleFactories, selection);
}
-
+
/**
* Given the ID of a details pane, this method will try to find the factory
* that creates it and return an instantiation of that area.
* <p>
* This method will not call the init() method of the IDetailsPane.
* </p>
- *
+ *
* @param ID The ID of the requested pane
* @return The instantiated pane or null
*/
@@ -315,11 +315,11 @@ public class DetailPaneManager {
}
return null;
}
-
+
/**
* Given the ID of a details pane, this method will try to find the factory
* that creates it and ask it for the name of the details pane.
- *
+ *
* @param ID The ID of the requested pane
* @return The name of the details pane or null
*/
@@ -330,11 +330,11 @@ public class DetailPaneManager {
}
return null;
}
-
+
/**
* Given the ID of a details pane, this method will try to find the factory
* that creates it and ask it for the description of the details pane.
- *
+ *
* @param ID The ID of the requested pane
* @return The description of the details pane or null
*/
@@ -345,15 +345,15 @@ public class DetailPaneManager {
}
return null;
}
-
-
+
+
/**
* Returns the set of IDetailPaneFactories (they will be DetailPaneFactoryDelegates) that were
* contributed to the extension point and are enabled for the given selection
- * (enabled if the factory does not have an enablement expression or if the
+ * (enabled if the factory does not have an enablement expression or if the
* enablement expression evaluates to true).
* @param selection the current view selection
- *
+ *
* @return The factories enabled for the selection or an empty collection.
*/
private List<IDetailPaneFactory> getEnabledFactories(IStructuredSelection selection) {
@@ -366,15 +366,15 @@ public class DetailPaneManager {
if (((DetailPaneFactoryExtension)currentFactory).isEnabled(selection)){
factoriesForSelection.add(currentFactory);
}
- }
- }
+ }
+ }
return factoriesForSelection;
}
-
+
/**
* Produces the set of IDs for all possible detail panes that can be used to display
* the given selection.
- *
+ *
* @param factoriesToQuery The collection of factories to check
* @param selection The selection to be displayed
* @return Set of pane IDs or an empty set
@@ -384,8 +384,8 @@ public class DetailPaneManager {
for (IDetailPaneFactory currentFactory : factoriesToQuery) {
for (String currentAreaTypeID : currentFactory.getDetailPaneTypes(selection)) {
fFactoriesByPaneID.put(currentAreaTypeID, currentFactory);
- idsForSelection.add(currentAreaTypeID);
- }
+ idsForSelection.add(currentAreaTypeID);
+ }
}
return idsForSelection;
}
@@ -394,7 +394,7 @@ public class DetailPaneManager {
* Given a set of possible detail pane IDs, this method will determine which pane is
* preferred and should be used to display the selection. This method chooses a pane
* by storing previous choices and can be set using a context menu.
- *
+ *
* @param possiblePaneIDs The set of possible detail pane IDs
* @param enabledFactories the complete listing of enable {@link IDetailPaneFactory}s
* @param selection the current selection from the variables view
@@ -404,9 +404,9 @@ public class DetailPaneManager {
if (possiblePaneIDs == null || possiblePaneIDs.isEmpty()){
return null;
}
-
+
String preferredID = getUserPreferredDetailPane(possiblePaneIDs);
-
+
if (preferredID == null){
// If there is no preferred pane already set, check the factories to see there is a default pane
for (IDetailPaneFactory currentFactory : enabledFactories) {
@@ -416,7 +416,7 @@ public class DetailPaneManager {
}
}
// If the factories don't have a default, try to choose the DefaultDetailPane
- if (preferredID == null){
+ if (preferredID == null){
Iterator<String> paneIterator = possiblePaneIDs.iterator();
// If the DefaultDetailPane is not in the set, just use the first in the set
preferredID = paneIterator.next();
@@ -432,7 +432,7 @@ public class DetailPaneManager {
return preferredID;
}
-
+
/**
* Initializes the collection of known factories from extension point contributions.
*/
@@ -445,13 +445,13 @@ public class DetailPaneManager {
for(int i = 0; i < infos.length; i++) {
delegate = new DetailPaneFactoryExtension(infos[i]);
fKnownFactories.add(delegate);
- }
+ }
}
}
-
+
/**
* Returns the preferred pane ID from the given set if the mapping has been set.
- *
+ *
* @param possibleDetailsAreaIDs Set of possible pane IDs
* @return The preferred ID or null
*/
@@ -460,13 +460,13 @@ public class DetailPaneManager {
loadPreferredDetailsAreas();
}
return fPreferredDetailPanes.get(possibleDetailsAreaIDs);
-
+
}
-
+
/**
* Adds or updates the mapping to set which pane ID is preferred for a certain
* set of possible IDs.
- *
+ *
* @param possibleDetailsAreaIDs The set of possible IDs
* @param preferredDetailsAreaID The preferred ID in the set.
*/
@@ -482,15 +482,15 @@ public class DetailPaneManager {
fPreferredDetailPanes.put(possibleDetailsAreaIDs, preferredDetailsAreaID);
storePreferredDetailsAreas();
}
-
+
}
-
+
/**
* Stores the map of preferred detail pane IDs to the preference store in the format:
- *
- * Key1A,Key1B:Value1|Key2A,Key2B,Key2C:Value2|
- *
- * Where the sub keys (Key1A, Key1B, etc.) are the elements of the set used at the
+ *
+ * Key1A,Key1B:Value1|Key2A,Key2B,Key2C:Value2|
+ *
+ * Where the sub keys (Key1A, Key1B, etc.) are the elements of the set used at the
* key in the mapping and the values are the associated String value in the mapping.
*/
private void storePreferredDetailsAreas() {
@@ -515,15 +515,15 @@ public class DetailPaneManager {
}
}
}
-
+
/**
* Loads the map of preferred detail pane IDs from the preference store.
- *
+ *
* @see #storePreferredDetailsAreas()
*/
private void loadPreferredDetailsAreas() {
fPreferredDetailPanes = new HashMap<Set<String>, String>();
- String preferenceValue = Platform.getPreferencesService().getString(DebugUIPlugin.getUniqueIdentifier(),
+ String preferenceValue = Platform.getPreferencesService().getString(DebugUIPlugin.getUniqueIdentifier(),
PREF_DETAIL_AREAS,
"", //$NON-NLS-1$
null);
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();
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/IDetailPaneContainer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/IDetailPaneContainer.java
index 0c5f5cb49..59a6b3a4a 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/IDetailPaneContainer.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/IDetailPaneContainer.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
*******************************************************************************/
@@ -15,7 +15,7 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.IWorkbenchPartSite;
/**
- * Interface for UI elements that contain detail panes. Provides access to
+ * Interface for UI elements that contain detail panes. Provides access to
* information about the current detail pane and allows the container to be
* informed of changes.
*
@@ -27,43 +27,43 @@ public interface IDetailPaneContainer {
/**
* Returns the string ID of the detail pane currently being displayed.
- *
+ *
* @return the ID of the current detail pane
*/
public String getCurrentPaneID();
-
+
/**
* Returns the selection to be displayed in the detail pane.
- *
+ *
* @return the selection to be displayed in the detail pane.
*/
public IStructuredSelection getCurrentSelection();
-
+
/**
* Returns the composite that detail panes will be added to.
- *
+ *
* @return the composite that detail panes will be added to
*/
public Composite getParentComposite();
-
+
/**
* Returns the workbench part site that the detail pane is in or <code>null</code>
* if the detail pane is not in a workbench part site.
- *
+ *
* @return the workbench part site the detail pane is in or <code>null</code>
*/
public IWorkbenchPartSite getWorkbenchPartSite();
-
+
/**
* Refreshes the current detail pane with the current selection.
*/
public void refreshDetailPaneContents();
-
+
/**
* Informs the container that the type of detail pane being used has changed.
- *
+ *
* @param newPaneID ID of the new detail pane
*/
public void paneChanged(String newPaneID);
-
+
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/IDetailPaneContainer2.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/IDetailPaneContainer2.java
index 22177df57..7357961ea 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/IDetailPaneContainer2.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/IDetailPaneContainer2.java
@@ -20,9 +20,9 @@ import org.eclipse.jface.viewers.ISelectionProvider;
public interface IDetailPaneContainer2 extends IDetailPaneContainer {
/**
- * Set the selection provider of the detail pane. Allows the container to
+ * Set the selection provider of the detail pane. Allows the container to
* forward the selection provider events to the container's workbench site.
- *
+ *
* @param provider the selection provider or <code>null</code>
*/
public void setSelectionProvider(ISelectionProvider provider);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/MessageDetailPane.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/MessageDetailPane.java
index 609ec9afb..3ea3ba955 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/MessageDetailPane.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/MessageDetailPane.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
*******************************************************************************/
@@ -24,39 +24,39 @@ 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;
-
+
/**
* Composite that contains the label that has margins.
*/
private Composite fControlParent;
-
+
/**
* Label control
*/
private Label fLabel;
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.ui.IDetailPane#init(org.eclipse.ui.IWorkbenchPartSite)
*/
@Override
public void init(IWorkbenchPartSite partSite) {
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.ui.IDetailPane#dispose()
*/
@Override
public void dispose() {
fControlParent.dispose();
- }
+ }
/* (non-Javadoc)
* @see org.eclipse.debug.ui.IDetailPane#createControl(org.eclipse.swt.widgets.Composite)
@@ -68,7 +68,7 @@ public class MessageDetailPane implements IDetailPane {
fLabel = SWTFactory.createWrapLabel(fControlParent, "", 1); //$NON-NLS-1$
return fControlParent;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.ui.IDetailPane#setFocus()
*/
@@ -76,7 +76,7 @@ public class MessageDetailPane implements IDetailPane {
public boolean setFocus() {
return false;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.ui.IDetailPane#display(org.eclipse.jface.viewers.IStructuredSelection)
*/

Back to the top