mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-06 17:26:01 +02:00
Bug 367808: Cleanup new warnings for missing @Override for Java 6 in cdt.dsf and cdt.dsf.ui
This commit is contained in:
parent
c42d3a5587
commit
463d52d01b
170 changed files with 1321 additions and 330 deletions
|
@ -35,6 +35,7 @@ import com.ibm.icu.text.MessageFormat;
|
||||||
*/
|
*/
|
||||||
public class CSourceNotFoundDescriptionFactory implements IAdapterFactory {
|
public class CSourceNotFoundDescriptionFactory implements IAdapterFactory {
|
||||||
|
|
||||||
|
@Override
|
||||||
@SuppressWarnings("rawtypes")
|
@SuppressWarnings("rawtypes")
|
||||||
public Object getAdapter(Object adaptableObject, Class adapterType) {
|
public Object getAdapter(Object adaptableObject, Class adapterType) {
|
||||||
if (adapterType.equals(ICSourceNotFoundDescription.class) &&
|
if (adapterType.equals(ICSourceNotFoundDescription.class) &&
|
||||||
|
@ -43,6 +44,7 @@ public class CSourceNotFoundDescriptionFactory implements IAdapterFactory {
|
||||||
final IFrameDMContext frameDMC = (IFrameDMContext) adaptableObject;
|
final IFrameDMContext frameDMC = (IFrameDMContext) adaptableObject;
|
||||||
return new ICSourceNotFoundDescription() {
|
return new ICSourceNotFoundDescription() {
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getDescription() {
|
public String getDescription() {
|
||||||
Query<IStack.IFrameDMData> query = new Query<IStack.IFrameDMData>() {
|
Query<IStack.IFrameDMData> query = new Query<IStack.IFrameDMData>() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -77,6 +79,7 @@ public class CSourceNotFoundDescriptionFactory implements IAdapterFactory {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
@SuppressWarnings("rawtypes")
|
@SuppressWarnings("rawtypes")
|
||||||
public Class[] getAdapterList() {
|
public Class[] getAdapterList() {
|
||||||
return new Class[] { ICSourceNotFoundDescription.class };
|
return new Class[] { ICSourceNotFoundDescription.class };
|
||||||
|
|
|
@ -28,7 +28,8 @@ public class DebugTextHoverAdapterFactory implements IAdapterFactory {
|
||||||
private static final Class<?>[] TYPES = { ICEditorTextHover.class };
|
private static final Class<?>[] TYPES = { ICEditorTextHover.class };
|
||||||
private static final Object fDebugTextHover= new DsfDebugTextHover();
|
private static final Object fDebugTextHover= new DsfDebugTextHover();
|
||||||
|
|
||||||
@SuppressWarnings("rawtypes")
|
@Override
|
||||||
|
@SuppressWarnings("rawtypes")
|
||||||
public Object getAdapter(Object adaptableObject, Class adapterType) {
|
public Object getAdapter(Object adaptableObject, Class adapterType) {
|
||||||
if (adaptableObject instanceof IDMVMContext) {
|
if (adaptableObject instanceof IDMVMContext) {
|
||||||
IDMContext dmc = ((IDMVMContext) adaptableObject).getDMContext();
|
IDMContext dmc = ((IDMVMContext) adaptableObject).getDMContext();
|
||||||
|
@ -46,7 +47,8 @@ public class DebugTextHoverAdapterFactory implements IAdapterFactory {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("rawtypes")
|
@Override
|
||||||
|
@SuppressWarnings("rawtypes")
|
||||||
public Class[] getAdapterList() {
|
public Class[] getAdapterList() {
|
||||||
return TYPES;
|
return TYPES;
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,6 +59,7 @@ public class EvaluationContextManager implements IWindowListener, IPageListener,
|
||||||
public static void startup() {
|
public static void startup() {
|
||||||
Runnable r = new Runnable() {
|
Runnable r = new Runnable() {
|
||||||
|
|
||||||
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if ( fgManager == null ) {
|
if ( fgManager == null ) {
|
||||||
fgManager = new EvaluationContextManager();
|
fgManager = new EvaluationContextManager();
|
||||||
|
@ -80,6 +81,7 @@ public class EvaluationContextManager implements IWindowListener, IPageListener,
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.ui.IWindowListener#windowActivated(org.eclipse.ui.IWorkbenchWindow)
|
* @see org.eclipse.ui.IWindowListener#windowActivated(org.eclipse.ui.IWorkbenchWindow)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void windowActivated( IWorkbenchWindow window ) {
|
public void windowActivated( IWorkbenchWindow window ) {
|
||||||
windowOpened( window );
|
windowOpened( window );
|
||||||
}
|
}
|
||||||
|
@ -87,12 +89,14 @@ public class EvaluationContextManager implements IWindowListener, IPageListener,
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.ui.IWindowListener#windowDeactivated(org.eclipse.ui.IWorkbenchWindow)
|
* @see org.eclipse.ui.IWindowListener#windowDeactivated(org.eclipse.ui.IWorkbenchWindow)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void windowDeactivated( IWorkbenchWindow window ) {
|
public void windowDeactivated( IWorkbenchWindow window ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.ui.IWindowListener#windowClosed(org.eclipse.ui.IWorkbenchWindow)
|
* @see org.eclipse.ui.IWindowListener#windowClosed(org.eclipse.ui.IWorkbenchWindow)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void windowClosed( IWorkbenchWindow window ) {
|
public void windowClosed( IWorkbenchWindow window ) {
|
||||||
window.removePageListener( this );
|
window.removePageListener( this );
|
||||||
}
|
}
|
||||||
|
@ -100,6 +104,7 @@ public class EvaluationContextManager implements IWindowListener, IPageListener,
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.ui.IWindowListener#windowOpened(org.eclipse.ui.IWorkbenchWindow)
|
* @see org.eclipse.ui.IWindowListener#windowOpened(org.eclipse.ui.IWorkbenchWindow)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void windowOpened( IWorkbenchWindow window ) {
|
public void windowOpened( IWorkbenchWindow window ) {
|
||||||
IWorkbenchPage[] pages = window.getPages();
|
IWorkbenchPage[] pages = window.getPages();
|
||||||
for( int i = 0; i < pages.length; i++ ) {
|
for( int i = 0; i < pages.length; i++ ) {
|
||||||
|
@ -111,6 +116,7 @@ public class EvaluationContextManager implements IWindowListener, IPageListener,
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.ui.IPageListener#pageActivated(org.eclipse.ui.IWorkbenchPage)
|
* @see org.eclipse.ui.IPageListener#pageActivated(org.eclipse.ui.IWorkbenchPage)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void pageActivated( IWorkbenchPage page ) {
|
public void pageActivated( IWorkbenchPage page ) {
|
||||||
pageOpened( page );
|
pageOpened( page );
|
||||||
}
|
}
|
||||||
|
@ -118,6 +124,7 @@ public class EvaluationContextManager implements IWindowListener, IPageListener,
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.ui.IPageListener#pageClosed(org.eclipse.ui.IWorkbenchPage)
|
* @see org.eclipse.ui.IPageListener#pageClosed(org.eclipse.ui.IWorkbenchPage)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void pageClosed( IWorkbenchPage page ) {
|
public void pageClosed( IWorkbenchPage page ) {
|
||||||
page.removeSelectionListener( IDebugUIConstants.ID_DEBUG_VIEW, this );
|
page.removeSelectionListener( IDebugUIConstants.ID_DEBUG_VIEW, this );
|
||||||
page.removePartListener( this );
|
page.removePartListener( this );
|
||||||
|
@ -126,6 +133,7 @@ public class EvaluationContextManager implements IWindowListener, IPageListener,
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.ui.IPageListener#pageOpened(org.eclipse.ui.IWorkbenchPage)
|
* @see org.eclipse.ui.IPageListener#pageOpened(org.eclipse.ui.IWorkbenchPage)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void pageOpened( IWorkbenchPage page ) {
|
public void pageOpened( IWorkbenchPage page ) {
|
||||||
page.addSelectionListener( IDebugUIConstants.ID_DEBUG_VIEW, this );
|
page.addSelectionListener( IDebugUIConstants.ID_DEBUG_VIEW, this );
|
||||||
page.addPartListener( this );
|
page.addPartListener( this );
|
||||||
|
@ -138,6 +146,7 @@ public class EvaluationContextManager implements IWindowListener, IPageListener,
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.ui.ISelectionListener#selectionChanged(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
|
* @see org.eclipse.ui.ISelectionListener#selectionChanged(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void selectionChanged( IWorkbenchPart part, ISelection selection ) {
|
public void selectionChanged( IWorkbenchPart part, ISelection selection ) {
|
||||||
IWorkbenchPage page = part.getSite().getPage();
|
IWorkbenchPage page = part.getSite().getPage();
|
||||||
if ( selection instanceof IStructuredSelection ) {
|
if ( selection instanceof IStructuredSelection ) {
|
||||||
|
@ -157,18 +166,21 @@ public class EvaluationContextManager implements IWindowListener, IPageListener,
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.ui.IPartListener2#partActivated(org.eclipse.ui.IWorkbenchPartReference)
|
* @see org.eclipse.ui.IPartListener2#partActivated(org.eclipse.ui.IWorkbenchPartReference)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void partActivated( IWorkbenchPartReference partRef ) {
|
public void partActivated( IWorkbenchPartReference partRef ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.ui.IPartListener2#partBroughtToTop(org.eclipse.ui.IWorkbenchPartReference)
|
* @see org.eclipse.ui.IPartListener2#partBroughtToTop(org.eclipse.ui.IWorkbenchPartReference)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void partBroughtToTop( IWorkbenchPartReference partRef ) {
|
public void partBroughtToTop( IWorkbenchPartReference partRef ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.ui.IPartListener2#partClosed(org.eclipse.ui.IWorkbenchPartReference)
|
* @see org.eclipse.ui.IPartListener2#partClosed(org.eclipse.ui.IWorkbenchPartReference)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void partClosed( IWorkbenchPartReference partRef ) {
|
public void partClosed( IWorkbenchPartReference partRef ) {
|
||||||
if ( IDebugUIConstants.ID_DEBUG_VIEW.equals( partRef.getId() ) ) {
|
if ( IDebugUIConstants.ID_DEBUG_VIEW.equals( partRef.getId() ) ) {
|
||||||
removeContext( partRef.getPage() );
|
removeContext( partRef.getPage() );
|
||||||
|
@ -178,30 +190,35 @@ public class EvaluationContextManager implements IWindowListener, IPageListener,
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.ui.IPartListener2#partDeactivated(org.eclipse.ui.IWorkbenchPartReference)
|
* @see org.eclipse.ui.IPartListener2#partDeactivated(org.eclipse.ui.IWorkbenchPartReference)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void partDeactivated( IWorkbenchPartReference partRef ) {
|
public void partDeactivated( IWorkbenchPartReference partRef ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.ui.IPartListener2#partOpened(org.eclipse.ui.IWorkbenchPartReference)
|
* @see org.eclipse.ui.IPartListener2#partOpened(org.eclipse.ui.IWorkbenchPartReference)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void partOpened( IWorkbenchPartReference partRef ) {
|
public void partOpened( IWorkbenchPartReference partRef ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.ui.IPartListener2#partHidden(org.eclipse.ui.IWorkbenchPartReference)
|
* @see org.eclipse.ui.IPartListener2#partHidden(org.eclipse.ui.IWorkbenchPartReference)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void partHidden( IWorkbenchPartReference partRef ) {
|
public void partHidden( IWorkbenchPartReference partRef ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.ui.IPartListener2#partVisible(org.eclipse.ui.IWorkbenchPartReference)
|
* @see org.eclipse.ui.IPartListener2#partVisible(org.eclipse.ui.IWorkbenchPartReference)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void partVisible( IWorkbenchPartReference partRef ) {
|
public void partVisible( IWorkbenchPartReference partRef ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.ui.IPartListener2#partInputChanged(org.eclipse.ui.IWorkbenchPartReference)
|
* @see org.eclipse.ui.IPartListener2#partInputChanged(org.eclipse.ui.IWorkbenchPartReference)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void partInputChanged( IWorkbenchPartReference partRef ) {
|
public void partInputChanged( IWorkbenchPartReference partRef ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -138,6 +138,7 @@ public class ExpressionInformationControlCreator implements IInformationControlC
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.debug.internal.ui.views.variables.details.IDetailPaneContainer#getCurrentPaneID()
|
* @see org.eclipse.debug.internal.ui.views.variables.details.IDetailPaneContainer#getCurrentPaneID()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getCurrentPaneID() {
|
public String getCurrentPaneID() {
|
||||||
return fDetailPane.getCurrentPaneID();
|
return fDetailPane.getCurrentPaneID();
|
||||||
}
|
}
|
||||||
|
@ -145,6 +146,7 @@ public class ExpressionInformationControlCreator implements IInformationControlC
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.debug.internal.ui.views.variables.details.IDetailPaneContainer#getCurrentSelection()
|
* @see org.eclipse.debug.internal.ui.views.variables.details.IDetailPaneContainer#getCurrentSelection()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IStructuredSelection getCurrentSelection() {
|
public IStructuredSelection getCurrentSelection() {
|
||||||
return (IStructuredSelection)fViewer.getSelection();
|
return (IStructuredSelection)fViewer.getSelection();
|
||||||
}
|
}
|
||||||
|
@ -152,6 +154,7 @@ public class ExpressionInformationControlCreator implements IInformationControlC
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.debug.internal.ui.views.variables.details.IDetailPaneContainer#refreshDetailPaneContents()
|
* @see org.eclipse.debug.internal.ui.views.variables.details.IDetailPaneContainer#refreshDetailPaneContents()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void refreshDetailPaneContents() {
|
public void refreshDetailPaneContents() {
|
||||||
fDetailPane.display(getCurrentSelection());
|
fDetailPane.display(getCurrentSelection());
|
||||||
}
|
}
|
||||||
|
@ -159,6 +162,7 @@ public class ExpressionInformationControlCreator implements IInformationControlC
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.debug.internal.ui.views.variables.details.IDetailPaneContainer#getParentComposite()
|
* @see org.eclipse.debug.internal.ui.views.variables.details.IDetailPaneContainer#getParentComposite()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public Composite getParentComposite() {
|
public Composite getParentComposite() {
|
||||||
return fDetailPaneComposite;
|
return fDetailPaneComposite;
|
||||||
}
|
}
|
||||||
|
@ -166,6 +170,7 @@ public class ExpressionInformationControlCreator implements IInformationControlC
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.debug.internal.ui.views.variables.details.IDetailPaneContainer#getWorkbenchPartSite()
|
* @see org.eclipse.debug.internal.ui.views.variables.details.IDetailPaneContainer#getWorkbenchPartSite()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IWorkbenchPartSite getWorkbenchPartSite() {
|
public IWorkbenchPartSite getWorkbenchPartSite() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -173,6 +178,7 @@ public class ExpressionInformationControlCreator implements IInformationControlC
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.debug.internal.ui.views.variables.details.IDetailPaneContainer#paneChanged(java.lang.String)
|
* @see org.eclipse.debug.internal.ui.views.variables.details.IDetailPaneContainer#paneChanged(java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void paneChanged(String newPaneID) {
|
public void paneChanged(String newPaneID) {
|
||||||
if (DefaultDetailPane.ID.equals(newPaneID)){
|
if (DefaultDetailPane.ID.equals(newPaneID)){
|
||||||
fDetailPane.getCurrentControl().setBackground(getShell().getDisplay().getSystemColor(SWT.COLOR_INFO_BACKGROUND));
|
fDetailPane.getCurrentControl().setBackground(getShell().getDisplay().getSystemColor(SWT.COLOR_INFO_BACKGROUND));
|
||||||
|
@ -335,10 +341,12 @@ public class ExpressionInformationControlCreator implements IInformationControlC
|
||||||
fDetailPane.display(null); // Bring up the default pane so the user doesn't see an empty composite
|
fDetailPane.display(null); // Bring up the default pane so the user doesn't see an empty composite
|
||||||
|
|
||||||
fTree.addSelectionListener(new SelectionListener() {
|
fTree.addSelectionListener(new SelectionListener() {
|
||||||
public void widgetSelected(SelectionEvent e) {
|
@Override
|
||||||
|
public void widgetSelected(SelectionEvent e) {
|
||||||
fDetailPane.display((IStructuredSelection)fViewer.getSelection());
|
fDetailPane.display((IStructuredSelection)fViewer.getSelection());
|
||||||
}
|
}
|
||||||
public void widgetDefaultSelected(SelectionEvent e) {}
|
@Override
|
||||||
|
public void widgetDefaultSelected(SelectionEvent e) {}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -346,9 +354,11 @@ public class ExpressionInformationControlCreator implements IInformationControlC
|
||||||
|
|
||||||
// add update listener to auto-select and display details of root expression
|
// add update listener to auto-select and display details of root expression
|
||||||
fViewer.addViewerUpdateListener(new IViewerUpdateListener() {
|
fViewer.addViewerUpdateListener(new IViewerUpdateListener() {
|
||||||
|
@Override
|
||||||
public void viewerUpdatesComplete() {
|
public void viewerUpdatesComplete() {
|
||||||
fViewer.getDisplay().timerExec(100, new Runnable() {
|
fViewer.getDisplay().timerExec(100, new Runnable() {
|
||||||
public void run() {
|
@Override
|
||||||
|
public void run() {
|
||||||
TreeSelection selection = (TreeSelection) fViewer.getSelection();
|
TreeSelection selection = (TreeSelection) fViewer.getSelection();
|
||||||
if (selection.isEmpty()) {
|
if (selection.isEmpty()) {
|
||||||
selection = new TreeSelection(fViewer.getTopElementPath());
|
selection = new TreeSelection(fViewer.getTopElementPath());
|
||||||
|
@ -359,10 +369,13 @@ public class ExpressionInformationControlCreator implements IInformationControlC
|
||||||
}
|
}
|
||||||
}});
|
}});
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
public void viewerUpdatesBegin() {
|
public void viewerUpdatesBegin() {
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
public void updateStarted(IViewerUpdate update) {
|
public void updateStarted(IViewerUpdate update) {
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
public void updateComplete(IViewerUpdate update) {
|
public void updateComplete(IViewerUpdate update) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -433,6 +446,7 @@ public class ExpressionInformationControlCreator implements IInformationControlC
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.jface.text.IInformationControlExtension#hasContents()
|
* @see org.eclipse.jface.text.IInformationControlExtension#hasContents()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean hasContents() {
|
public boolean hasContents() {
|
||||||
return fVariable != null;
|
return fVariable != null;
|
||||||
}
|
}
|
||||||
|
@ -440,6 +454,7 @@ public class ExpressionInformationControlCreator implements IInformationControlC
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.jface.text.IInformationControlExtension2#setInput(java.lang.Object)
|
* @see org.eclipse.jface.text.IInformationControlExtension2#setInput(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setInput(Object input) {
|
public void setInput(Object input) {
|
||||||
if (input instanceof IExpressionDMContext) {
|
if (input instanceof IExpressionDMContext) {
|
||||||
fVariable = input;
|
fVariable = input;
|
||||||
|
@ -460,6 +475,7 @@ public class ExpressionInformationControlCreator implements IInformationControlC
|
||||||
return fInformationControlCreator;
|
return fInformationControlCreator;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void viewerInputComplete(IViewerInputUpdate update) {
|
public void viewerInputComplete(IViewerInputUpdate update) {
|
||||||
fViewer.setInput(fVariable = update.getInputElement());
|
fViewer.setInput(fVariable = update.getInputElement());
|
||||||
}
|
}
|
||||||
|
@ -493,6 +509,7 @@ public class ExpressionInformationControlCreator implements IInformationControlC
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.jface.text.IInformationControlCreator#createInformationControl(org.eclipse.swt.widgets.Shell)
|
* @see org.eclipse.jface.text.IInformationControlCreator#createInformationControl(org.eclipse.swt.widgets.Shell)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IInformationControl createInformationControl(Shell parent) {
|
public IInformationControl createInformationControl(Shell parent) {
|
||||||
return new ExpressionInformationControl(parent, false);
|
return new ExpressionInformationControl(parent, false);
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,8 @@ public class SuspendResumeAdapterFactory implements IAdapterFactory {
|
||||||
fResumeAtLine = new ResumeAtLine(execCtx);
|
fResumeAtLine = new ResumeAtLine(execCtx);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("rawtypes")
|
@Override
|
||||||
|
@SuppressWarnings("rawtypes")
|
||||||
public Object getAdapter(Class adapter) {
|
public Object getAdapter(Class adapter) {
|
||||||
if (adapter.isInstance(fRunToLine)) {
|
if (adapter.isInstance(fRunToLine)) {
|
||||||
return fRunToLine;
|
return fRunToLine;
|
||||||
|
@ -57,17 +58,23 @@ public class SuspendResumeAdapterFactory implements IAdapterFactory {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean canResume() { return false; }
|
@Override
|
||||||
public boolean canSuspend() { return false; }
|
public boolean canResume() { return false; }
|
||||||
|
@Override
|
||||||
|
public boolean canSuspend() { return false; }
|
||||||
// This must return true because the platform
|
// This must return true because the platform
|
||||||
// RunToLineActionDelegate will only enable the
|
// RunToLineActionDelegate will only enable the
|
||||||
// action if we are suspended
|
// action if we are suspended
|
||||||
public boolean isSuspended() { return true; }
|
@Override
|
||||||
public void resume() throws DebugException {}
|
public boolean isSuspended() { return true; }
|
||||||
public void suspend() throws DebugException {}
|
@Override
|
||||||
|
public void resume() throws DebugException {}
|
||||||
|
@Override
|
||||||
|
public void suspend() throws DebugException {}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("rawtypes")
|
@Override
|
||||||
|
@SuppressWarnings("rawtypes")
|
||||||
public Object getAdapter(Object adaptableObject, Class adapterType) {
|
public Object getAdapter(Object adaptableObject, Class adapterType) {
|
||||||
if (ISuspendResume.class.equals(adapterType)) {
|
if (ISuspendResume.class.equals(adapterType)) {
|
||||||
if (adaptableObject instanceof IDMVMContext) {
|
if (adaptableObject instanceof IDMVMContext) {
|
||||||
|
@ -84,7 +91,8 @@ public class SuspendResumeAdapterFactory implements IAdapterFactory {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("rawtypes")
|
@Override
|
||||||
|
@SuppressWarnings("rawtypes")
|
||||||
public Class[] getAdapterList() {
|
public Class[] getAdapterList() {
|
||||||
return new Class[] { ISuspendResume.class };
|
return new Class[] { ISuspendResume.class };
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,6 +60,7 @@ public class ToggleBreakpointsTargetFactory implements IToggleBreakpointsTargetF
|
||||||
public ToggleBreakpointsTargetFactory() {
|
public ToggleBreakpointsTargetFactory() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IToggleBreakpointsTarget createToggleTarget(String targetID) {
|
public IToggleBreakpointsTarget createToggleTarget(String targetID) {
|
||||||
if (TOGGLE_C_BREAKPOINT_TARGET_ID.equals(targetID)) {
|
if (TOGGLE_C_BREAKPOINT_TARGET_ID.equals(targetID)) {
|
||||||
return fgDisassemblyToggleBreakpointsTarget;
|
return fgDisassemblyToggleBreakpointsTarget;
|
||||||
|
@ -67,6 +68,7 @@ public class ToggleBreakpointsTargetFactory implements IToggleBreakpointsTargetF
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getDefaultToggleTarget(IWorkbenchPart part, ISelection selection) {
|
public String getDefaultToggleTarget(IWorkbenchPart part, ISelection selection) {
|
||||||
if (part instanceof IDisassemblyPart) {
|
if (part instanceof IDisassemblyPart) {
|
||||||
// Return the debug context as a default if the currently selected context
|
// Return the debug context as a default if the currently selected context
|
||||||
|
@ -94,14 +96,17 @@ public class ToggleBreakpointsTargetFactory implements IToggleBreakpointsTargetF
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getToggleTargetDescription(String targetID) {
|
public String getToggleTargetDescription(String targetID) {
|
||||||
return Messages.ToggleBreakpointsTargetFactory_description;
|
return Messages.ToggleBreakpointsTargetFactory_description;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getToggleTargetName(String targetID) {
|
public String getToggleTargetName(String targetID) {
|
||||||
return Messages.ToggleBreakpointsTargetFactory_name;
|
return Messages.ToggleBreakpointsTargetFactory_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public Set<String> getToggleTargets(IWorkbenchPart part, ISelection selection) {
|
public Set<String> getToggleTargets(IWorkbenchPart part, ISelection selection) {
|
||||||
if (part instanceof IDisassemblyPart) {
|
if (part instanceof IDisassemblyPart) {
|
||||||
return TOGGLE_TARGET_IDS;
|
return TOGGLE_TARGET_IDS;
|
||||||
|
|
|
@ -37,6 +37,7 @@ import org.eclipse.ui.IWorkbenchPart;
|
||||||
*/
|
*/
|
||||||
public class DisassemblyMoveToLineAdapter implements IMoveToLineTarget {
|
public class DisassemblyMoveToLineAdapter implements IMoveToLineTarget {
|
||||||
|
|
||||||
|
@Override
|
||||||
public void moveToLine(IWorkbenchPart part, ISelection selection, ISuspendResume target) throws CoreException {
|
public void moveToLine(IWorkbenchPart part, ISelection selection, ISuspendResume target) throws CoreException {
|
||||||
if (part instanceof IDisassemblyPart && selection instanceof ITextSelection) {
|
if (part instanceof IDisassemblyPart && selection instanceof ITextSelection) {
|
||||||
if (!(selection instanceof IDisassemblySelection)) {
|
if (!(selection instanceof IDisassemblySelection)) {
|
||||||
|
@ -59,6 +60,7 @@ public class DisassemblyMoveToLineAdapter implements IMoveToLineTarget {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean canMoveToLine(IWorkbenchPart part, ISelection selection, ISuspendResume target) {
|
public boolean canMoveToLine(IWorkbenchPart part, ISelection selection, ISuspendResume target) {
|
||||||
if (target instanceof IAdaptable && part instanceof IDisassemblyPart && selection instanceof ITextSelection) {
|
if (target instanceof IAdaptable && part instanceof IDisassemblyPart && selection instanceof ITextSelection) {
|
||||||
IMoveToAddress moveToAddress = (IMoveToAddress)((IAdaptable)target).getAdapter(IMoveToAddress.class);
|
IMoveToAddress moveToAddress = (IMoveToAddress)((IAdaptable)target).getAdapter(IMoveToAddress.class);
|
||||||
|
|
|
@ -37,6 +37,7 @@ import org.eclipse.ui.IWorkbenchPart;
|
||||||
*/
|
*/
|
||||||
public class DisassemblyResumeAtLineAdapter implements IResumeAtLineTarget {
|
public class DisassemblyResumeAtLineAdapter implements IResumeAtLineTarget {
|
||||||
|
|
||||||
|
@Override
|
||||||
public void resumeAtLine(IWorkbenchPart part, ISelection selection, ISuspendResume target) throws CoreException {
|
public void resumeAtLine(IWorkbenchPart part, ISelection selection, ISuspendResume target) throws CoreException {
|
||||||
if (part instanceof IDisassemblyPart && selection instanceof ITextSelection) {
|
if (part instanceof IDisassemblyPart && selection instanceof ITextSelection) {
|
||||||
if (!(selection instanceof IDisassemblySelection)) {
|
if (!(selection instanceof IDisassemblySelection)) {
|
||||||
|
@ -59,6 +60,7 @@ public class DisassemblyResumeAtLineAdapter implements IResumeAtLineTarget {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean canResumeAtLine(IWorkbenchPart part, ISelection selection, ISuspendResume target) {
|
public boolean canResumeAtLine(IWorkbenchPart part, ISelection selection, ISuspendResume target) {
|
||||||
if (target instanceof IAdaptable && part instanceof IDisassemblyPart && selection instanceof ITextSelection) {
|
if (target instanceof IAdaptable && part instanceof IDisassemblyPart && selection instanceof ITextSelection) {
|
||||||
IResumeAtAddress resumeAtAddress = (IResumeAtAddress)((IAdaptable)target).getAdapter(IResumeAtAddress.class);
|
IResumeAtAddress resumeAtAddress = (IResumeAtAddress)((IAdaptable)target).getAdapter(IResumeAtAddress.class);
|
||||||
|
|
|
@ -42,6 +42,7 @@ public class DisassemblyRunToLineAdapter implements IRunToLineTarget {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.debug.ui.actions.IRunToLineTarget#runToLine(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection, org.eclipse.debug.core.model.ISuspendResume)
|
* @see org.eclipse.debug.ui.actions.IRunToLineTarget#runToLine(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection, org.eclipse.debug.core.model.ISuspendResume)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void runToLine(IWorkbenchPart part, ISelection selection, ISuspendResume target) throws CoreException {
|
public void runToLine(IWorkbenchPart part, ISelection selection, ISuspendResume target) throws CoreException {
|
||||||
if (part instanceof IDisassemblyPart && selection instanceof ITextSelection) {
|
if (part instanceof IDisassemblyPart && selection instanceof ITextSelection) {
|
||||||
if (!(selection instanceof IDisassemblySelection)) {
|
if (!(selection instanceof IDisassemblySelection)) {
|
||||||
|
@ -68,6 +69,7 @@ public class DisassemblyRunToLineAdapter implements IRunToLineTarget {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.debug.ui.actions.IRunToLineTarget#canRunToLine(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection, org.eclipse.debug.core.model.ISuspendResume)
|
* @see org.eclipse.debug.ui.actions.IRunToLineTarget#canRunToLine(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection, org.eclipse.debug.core.model.ISuspendResume)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean canRunToLine(IWorkbenchPart part, ISelection selection, ISuspendResume target) {
|
public boolean canRunToLine(IWorkbenchPart part, ISelection selection, ISuspendResume target) {
|
||||||
if (target instanceof IAdaptable && part instanceof IDisassemblyPart && selection instanceof ITextSelection) {
|
if (target instanceof IAdaptable && part instanceof IDisassemblyPart && selection instanceof ITextSelection) {
|
||||||
IRunToAddress runToAddress = (IRunToAddress)((IAdaptable)target).getAdapter(IRunToAddress.class);
|
IRunToAddress runToAddress = (IRunToAddress)((IAdaptable)target).getAdapter(IRunToAddress.class);
|
||||||
|
|
|
@ -41,6 +41,7 @@ public class MoveToLine implements IMoveToLine, IMoveToAddress {
|
||||||
fContext = context;
|
fContext = context;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean canMoveToLine(final String fileName, final int lineNumber) {
|
public boolean canMoveToLine(final String fileName, final int lineNumber) {
|
||||||
DsfSession session = DsfSession.getSession(fContext.getSessionId());
|
DsfSession session = DsfSession.getSession(fContext.getSessionId());
|
||||||
if (session != null && session.isActive()) {
|
if (session != null && session.isActive()) {
|
||||||
|
@ -71,6 +72,7 @@ public class MoveToLine implements IMoveToLine, IMoveToAddress {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void moveToLine(final String fileName, final int lineNumber) throws DebugException {
|
public void moveToLine(final String fileName, final int lineNumber) throws DebugException {
|
||||||
DsfSession session = DsfSession.getSession(fContext.getSessionId());
|
DsfSession session = DsfSession.getSession(fContext.getSessionId());
|
||||||
if (session != null && session.isActive()) {
|
if (session != null && session.isActive()) {
|
||||||
|
@ -110,6 +112,7 @@ public class MoveToLine implements IMoveToLine, IMoveToAddress {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean canMoveToAddress(final IAddress address) {
|
public boolean canMoveToAddress(final IAddress address) {
|
||||||
DsfSession session = DsfSession.getSession(fContext.getSessionId());
|
DsfSession session = DsfSession.getSession(fContext.getSessionId());
|
||||||
if (session != null && session.isActive()) {
|
if (session != null && session.isActive()) {
|
||||||
|
@ -140,6 +143,7 @@ public class MoveToLine implements IMoveToLine, IMoveToAddress {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void moveToAddress(final IAddress address) throws DebugException {
|
public void moveToAddress(final IAddress address) throws DebugException {
|
||||||
DsfSession session = DsfSession.getSession(fContext.getSessionId());
|
DsfSession session = DsfSession.getSession(fContext.getSessionId());
|
||||||
if (session != null && session.isActive()) {
|
if (session != null && session.isActive()) {
|
||||||
|
|
|
@ -42,10 +42,12 @@ public class ResumeAtLine implements IResumeAtLine, IResumeAtAddress {
|
||||||
fContext = context;
|
fContext = context;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean canResumeAtLine(IFile file, final int lineNumber) {
|
public boolean canResumeAtLine(IFile file, final int lineNumber) {
|
||||||
return canResumeAtLine(file.getLocation().makeAbsolute().toOSString(), lineNumber);
|
return canResumeAtLine(file.getLocation().makeAbsolute().toOSString(), lineNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean canResumeAtLine(final String fileName, final int lineNumber) {
|
public boolean canResumeAtLine(final String fileName, final int lineNumber) {
|
||||||
DsfSession session = DsfSession.getSession(fContext.getSessionId());
|
DsfSession session = DsfSession.getSession(fContext.getSessionId());
|
||||||
if (session != null && session.isActive()) {
|
if (session != null && session.isActive()) {
|
||||||
|
@ -76,10 +78,12 @@ public class ResumeAtLine implements IResumeAtLine, IResumeAtAddress {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void resumeAtLine(IFile file, int lineNumber) throws DebugException {
|
public void resumeAtLine(IFile file, int lineNumber) throws DebugException {
|
||||||
resumeAtLine(file.getLocation().makeAbsolute().toOSString(), lineNumber);
|
resumeAtLine(file.getLocation().makeAbsolute().toOSString(), lineNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void resumeAtLine(final String fileName, final int lineNumber) throws DebugException {
|
public void resumeAtLine(final String fileName, final int lineNumber) throws DebugException {
|
||||||
DsfSession session = DsfSession.getSession(fContext.getSessionId());
|
DsfSession session = DsfSession.getSession(fContext.getSessionId());
|
||||||
if (session != null && session.isActive()) {
|
if (session != null && session.isActive()) {
|
||||||
|
@ -119,6 +123,7 @@ public class ResumeAtLine implements IResumeAtLine, IResumeAtAddress {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean canResumeAtAddress(final IAddress address) {
|
public boolean canResumeAtAddress(final IAddress address) {
|
||||||
DsfSession session = DsfSession.getSession(fContext.getSessionId());
|
DsfSession session = DsfSession.getSession(fContext.getSessionId());
|
||||||
if (session != null && session.isActive()) {
|
if (session != null && session.isActive()) {
|
||||||
|
@ -149,6 +154,7 @@ public class ResumeAtLine implements IResumeAtLine, IResumeAtAddress {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void resumeAtAddress(final IAddress address) throws DebugException {
|
public void resumeAtAddress(final IAddress address) throws DebugException {
|
||||||
DsfSession session = DsfSession.getSession(fContext.getSessionId());
|
DsfSession session = DsfSession.getSession(fContext.getSessionId());
|
||||||
if (session != null && session.isActive()) {
|
if (session != null && session.isActive()) {
|
||||||
|
|
|
@ -25,6 +25,7 @@ public class RetargettableActionAdapterFactory implements IAdapterFactory {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
|
* @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
@SuppressWarnings("rawtypes")
|
@SuppressWarnings("rawtypes")
|
||||||
public Object getAdapter(Object adaptableObject, Class adapterType) {
|
public Object getAdapter(Object adaptableObject, Class adapterType) {
|
||||||
if (adapterType == IRunToLineTarget.class) {
|
if (adapterType == IRunToLineTarget.class) {
|
||||||
|
@ -42,6 +43,7 @@ public class RetargettableActionAdapterFactory implements IAdapterFactory {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.core.runtime.IAdapterFactory#getAdapterList()
|
* @see org.eclipse.core.runtime.IAdapterFactory#getAdapterList()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
@SuppressWarnings("rawtypes")
|
@SuppressWarnings("rawtypes")
|
||||||
public Class[] getAdapterList() {
|
public Class[] getAdapterList() {
|
||||||
return new Class[]{ IRunToLineTarget.class, IResumeAtLineTarget.class, IMoveToLineTarget.class };
|
return new Class[]{ IRunToLineTarget.class, IResumeAtLineTarget.class, IMoveToLineTarget.class };
|
||||||
|
|
|
@ -45,11 +45,13 @@ public class RunToLine implements IRunToLine, IRunToAddress {
|
||||||
fContext = context;
|
fContext = context;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean canRunToLine(final IFile file, final int lineNumber) {
|
@Override
|
||||||
|
public boolean canRunToLine(final IFile file, final int lineNumber) {
|
||||||
return canRunToLine(file.getLocation().makeAbsolute().toOSString(), lineNumber);
|
return canRunToLine(file.getLocation().makeAbsolute().toOSString(), lineNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean canRunToLine(final String fileName, final int lineNumber) {
|
@Override
|
||||||
|
public boolean canRunToLine(final String fileName, final int lineNumber) {
|
||||||
DsfSession session = DsfSession.getSession(fContext.getSessionId());
|
DsfSession session = DsfSession.getSession(fContext.getSessionId());
|
||||||
if (session != null && session.isActive()) {
|
if (session != null && session.isActive()) {
|
||||||
try {
|
try {
|
||||||
|
@ -79,11 +81,13 @@ public class RunToLine implements IRunToLine, IRunToAddress {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void runToLine(IFile file, int lineNumber, boolean skipBreakpoints) throws DebugException {
|
@Override
|
||||||
|
public void runToLine(IFile file, int lineNumber, boolean skipBreakpoints) throws DebugException {
|
||||||
runToLine(file.getLocation().makeAbsolute().toOSString(), lineNumber, skipBreakpoints);
|
runToLine(file.getLocation().makeAbsolute().toOSString(), lineNumber, skipBreakpoints);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void runToLine(final String fileName, final int lineNumber, final boolean skipBreakpoints) throws DebugException {
|
@Override
|
||||||
|
public void runToLine(final String fileName, final int lineNumber, final boolean skipBreakpoints) throws DebugException {
|
||||||
DsfSession session = DsfSession.getSession(fContext.getSessionId());
|
DsfSession session = DsfSession.getSession(fContext.getSessionId());
|
||||||
if (session != null && session.isActive()) {
|
if (session != null && session.isActive()) {
|
||||||
Throwable exception = null;
|
Throwable exception = null;
|
||||||
|
@ -122,6 +126,7 @@ public class RunToLine implements IRunToLine, IRunToAddress {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean canRunToAddress(final IAddress address) {
|
public boolean canRunToAddress(final IAddress address) {
|
||||||
DsfSession session = DsfSession.getSession(fContext.getSessionId());
|
DsfSession session = DsfSession.getSession(fContext.getSessionId());
|
||||||
if (session != null && session.isActive()) {
|
if (session != null && session.isActive()) {
|
||||||
|
@ -152,6 +157,7 @@ public class RunToLine implements IRunToLine, IRunToAddress {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void runToAddress(final IAddress address, final boolean skipBreakpoints) throws DebugException {
|
public void runToAddress(final IAddress address, final boolean skipBreakpoints) throws DebugException {
|
||||||
DsfSession session = DsfSession.getSession(fContext.getSessionId());
|
DsfSession session = DsfSession.getSession(fContext.getSessionId());
|
||||||
if (session != null && session.isActive()) {
|
if (session != null && session.isActive()) {
|
||||||
|
|
|
@ -28,6 +28,7 @@ public class DebugViewLayoutTester extends PropertyTester{
|
||||||
protected static final String IS_GROUP_VISIBLE = "isGroupDebugContextsVisible"; //$NON-NLS-1$
|
protected static final String IS_GROUP_VISIBLE = "isGroupDebugContextsVisible"; //$NON-NLS-1$
|
||||||
protected static final String IS_UNGROUP_VISIBLE = "isUngroupDebugContextsVisible"; //$NON-NLS-1$
|
protected static final String IS_UNGROUP_VISIBLE = "isUngroupDebugContextsVisible"; //$NON-NLS-1$
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
|
public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
|
||||||
|
|
||||||
if( IS_GROUP_VISIBLE.equals(property) || IS_UNGROUP_VISIBLE.equals(property)) {
|
if( IS_GROUP_VISIBLE.equals(property) || IS_UNGROUP_VISIBLE.equals(property)) {
|
||||||
|
|
|
@ -84,10 +84,12 @@ public abstract class DsfDebugViewLayoutCommand implements IDebugCommandHandler{
|
||||||
return ret.toArray(new IExecutionDMContext[0]);
|
return ret.toArray(new IExecutionDMContext[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void canExecute(final IEnabledStateRequest request) {
|
public void canExecute(final IEnabledStateRequest request) {
|
||||||
final IExecutionDMContext[] executionContexts = getDMContexts( request);
|
final IExecutionDMContext[] executionContexts = getDMContexts( request);
|
||||||
if( executionContexts.length > 0 && !fExecutor.isTerminated()) {
|
if( executionContexts.length > 0 && !fExecutor.isTerminated()) {
|
||||||
fExecutor.submit(new DsfRunnable() {
|
fExecutor.submit(new DsfRunnable() {
|
||||||
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
IExecutionContextTranslator translator = fTracker.getService(IExecutionContextTranslator.class);
|
IExecutionContextTranslator translator = fTracker.getService(IExecutionContextTranslator.class);
|
||||||
if( translator != null) {
|
if( translator != null) {
|
||||||
|
@ -114,10 +116,12 @@ public abstract class DsfDebugViewLayoutCommand implements IDebugCommandHandler{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean execute(final IDebugCommandRequest request) {
|
public boolean execute(final IDebugCommandRequest request) {
|
||||||
final IExecutionDMContext[] executionContexts = getDMContexts( request);
|
final IExecutionDMContext[] executionContexts = getDMContexts( request);
|
||||||
if( executionContexts.length > 0 && !fExecutor.isTerminated()) {
|
if( executionContexts.length > 0 && !fExecutor.isTerminated()) {
|
||||||
fExecutor.submit(new DsfRunnable() {
|
fExecutor.submit(new DsfRunnable() {
|
||||||
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
IExecutionContextTranslator translator = fTracker.getService(IExecutionContextTranslator.class);
|
IExecutionContextTranslator translator = fTracker.getService(IExecutionContextTranslator.class);
|
||||||
if( translator != null) {
|
if( translator != null) {
|
||||||
|
|
|
@ -98,6 +98,7 @@ public class DisassemblyBackendDsf extends AbstractDisassemblyBackend implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.debug.internal.ui.disassembly.dsf.IDisassemblyBackend#dispose()
|
* @see org.eclipse.cdt.debug.internal.ui.disassembly.dsf.IDisassemblyBackend#dispose()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void dispose() {
|
public void dispose() {
|
||||||
DsfSession.removeSessionEndedListener(this);
|
DsfSession.removeSessionEndedListener(this);
|
||||||
}
|
}
|
||||||
|
@ -141,6 +142,7 @@ public class DisassemblyBackendDsf extends AbstractDisassemblyBackend implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.debug.internal.ui.disassembly.dsf.IDisassemblyBackend#supportsDebugContext(org.eclipse.core.runtime.IAdaptable)
|
* @see org.eclipse.cdt.debug.internal.ui.disassembly.dsf.IDisassemblyBackend#supportsDebugContext(org.eclipse.core.runtime.IAdaptable)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean supportsDebugContext(IAdaptable context) {
|
public boolean supportsDebugContext(IAdaptable context) {
|
||||||
return supportsDebugContext_(context);
|
return supportsDebugContext_(context);
|
||||||
}
|
}
|
||||||
|
@ -148,6 +150,7 @@ public class DisassemblyBackendDsf extends AbstractDisassemblyBackend implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.debug.internal.ui.disassembly.dsf.IDisassemblyBackend#hasDebugContext()
|
* @see org.eclipse.cdt.debug.internal.ui.disassembly.dsf.IDisassemblyBackend#hasDebugContext()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean hasDebugContext() {
|
public boolean hasDebugContext() {
|
||||||
return fTargetContext != null;
|
return fTargetContext != null;
|
||||||
}
|
}
|
||||||
|
@ -155,6 +158,7 @@ public class DisassemblyBackendDsf extends AbstractDisassemblyBackend implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.debug.internal.ui.disassembly.dsf.IDisassemblyBackend#setDebugContext(org.eclipse.core.runtime.IAdaptable)
|
* @see org.eclipse.cdt.debug.internal.ui.disassembly.dsf.IDisassemblyBackend#setDebugContext(org.eclipse.core.runtime.IAdaptable)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public SetDebugContextResult setDebugContext(IAdaptable context) {
|
public SetDebugContextResult setDebugContext(IAdaptable context) {
|
||||||
assert supportsDebugContext(context) : "caller should not have invoked us"; //$NON-NLS-1$
|
assert supportsDebugContext(context) : "caller should not have invoked us"; //$NON-NLS-1$
|
||||||
IDMVMContext vmContext = (IDMVMContext) context.getAdapter(IDMVMContext.class);
|
IDMVMContext vmContext = (IDMVMContext) context.getAdapter(IDMVMContext.class);
|
||||||
|
@ -187,7 +191,8 @@ public class DisassemblyBackendDsf extends AbstractDisassemblyBackend implements
|
||||||
if (prevSession != null) {
|
if (prevSession != null) {
|
||||||
try {
|
try {
|
||||||
prevSession.getExecutor().execute(new DsfRunnable() {
|
prevSession.getExecutor().execute(new DsfRunnable() {
|
||||||
public void run() {
|
@Override
|
||||||
|
public void run() {
|
||||||
prevSession.removeServiceEventListener(DisassemblyBackendDsf.this);
|
prevSession.removeServiceEventListener(DisassemblyBackendDsf.this);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -208,7 +213,8 @@ public class DisassemblyBackendDsf extends AbstractDisassemblyBackend implements
|
||||||
if (newSession != null) {
|
if (newSession != null) {
|
||||||
try {
|
try {
|
||||||
newSession.getExecutor().execute(new DsfRunnable() {
|
newSession.getExecutor().execute(new DsfRunnable() {
|
||||||
public void run() {
|
@Override
|
||||||
|
public void run() {
|
||||||
newSession.addServiceEventListener(DisassemblyBackendDsf.this, null);
|
newSession.addServiceEventListener(DisassemblyBackendDsf.this, null);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -248,11 +254,13 @@ public class DisassemblyBackendDsf extends AbstractDisassemblyBackend implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.debug.internal.ui.disassembly.dsf.IDisassemblyBackend#clearDebugContext()
|
* @see org.eclipse.cdt.debug.internal.ui.disassembly.dsf.IDisassemblyBackend#clearDebugContext()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void clearDebugContext() {
|
public void clearDebugContext() {
|
||||||
final DsfSession session = DsfSession.getSession(fDsfSessionId);
|
final DsfSession session = DsfSession.getSession(fDsfSessionId);
|
||||||
if (session != null) {
|
if (session != null) {
|
||||||
try {
|
try {
|
||||||
session.getExecutor().execute(new DsfRunnable() {
|
session.getExecutor().execute(new DsfRunnable() {
|
||||||
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
session.removeServiceEventListener(DisassemblyBackendDsf.this);
|
session.removeServiceEventListener(DisassemblyBackendDsf.this);
|
||||||
}
|
}
|
||||||
|
@ -271,9 +279,11 @@ public class DisassemblyBackendDsf extends AbstractDisassemblyBackend implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.debug.internal.ui.disassembly.dsf.IDisassemblyBackend#retrieveFrameAddress(int)
|
* @see org.eclipse.cdt.debug.internal.ui.disassembly.dsf.IDisassemblyBackend#retrieveFrameAddress(int)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void retrieveFrameAddress(final int frame) {
|
public void retrieveFrameAddress(final int frame) {
|
||||||
final DsfExecutor executor= getSession().getExecutor();
|
final DsfExecutor executor= getSession().getExecutor();
|
||||||
executor.execute(new DsfRunnable() {
|
executor.execute(new DsfRunnable() {
|
||||||
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
retrieveFrameAddressInSessionThread(frame);
|
retrieveFrameAddressInSessionThread(frame);
|
||||||
}});
|
}});
|
||||||
|
@ -322,6 +332,7 @@ public class DisassemblyBackendDsf extends AbstractDisassemblyBackend implements
|
||||||
final BigInteger addressValue= address.getValue();
|
final BigInteger addressValue= address.getValue();
|
||||||
if (DEBUG) System.out.println("retrieveFrameAddress done "+ DisassemblyUtils.getAddressText(addressValue)); //$NON-NLS-1$
|
if (DEBUG) System.out.println("retrieveFrameAddress done "+ DisassemblyUtils.getAddressText(addressValue)); //$NON-NLS-1$
|
||||||
fCallback.asyncExec(new Runnable() {
|
fCallback.asyncExec(new Runnable() {
|
||||||
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (address.getSize() * 8 != fCallback.getAddressSize()) {
|
if (address.getSize() * 8 != fCallback.getAddressSize()) {
|
||||||
fCallback.addressSizeChanged(address.getSize() * 8);
|
fCallback.addressSizeChanged(address.getSize() * 8);
|
||||||
|
@ -346,6 +357,7 @@ public class DisassemblyBackendDsf extends AbstractDisassemblyBackend implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.debug.internal.ui.disassembly.dsf.IDisassemblyBackend#isSuspended()
|
* @see org.eclipse.cdt.debug.internal.ui.disassembly.dsf.IDisassemblyBackend#isSuspended()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isSuspended() {
|
public boolean isSuspended() {
|
||||||
DsfSession session = getSession();
|
DsfSession session = getSession();
|
||||||
if (session == null || !session.isActive()) {
|
if (session == null || !session.isActive()) {
|
||||||
|
@ -410,6 +422,7 @@ public class DisassemblyBackendDsf extends AbstractDisassemblyBackend implements
|
||||||
if (context.equals(fTargetContext)
|
if (context.equals(fTargetContext)
|
||||||
|| DMContexts.isAncestorOf(fTargetContext, context)) {
|
|| DMContexts.isAncestorOf(fTargetContext, context)) {
|
||||||
fCallback.asyncExec(new Runnable() {
|
fCallback.asyncExec(new Runnable() {
|
||||||
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
fCallback.handleTargetEnded();
|
fCallback.handleTargetEnded();
|
||||||
}});
|
}});
|
||||||
|
@ -443,6 +456,7 @@ public class DisassemblyBackendDsf extends AbstractDisassemblyBackend implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.dsf.service.DsfSession.SessionEndedListener#sessionEnded(org.eclipse.cdt.dsf.service.DsfSession)
|
* @see org.eclipse.cdt.dsf.service.DsfSession.SessionEndedListener#sessionEnded(org.eclipse.cdt.dsf.service.DsfSession)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void sessionEnded(DsfSession session) {
|
public void sessionEnded(DsfSession session) {
|
||||||
if (session.getId().equals(fDsfSessionId)) {
|
if (session.getId().equals(fDsfSessionId)) {
|
||||||
clearDebugContext();
|
clearDebugContext();
|
||||||
|
@ -453,6 +467,7 @@ public class DisassemblyBackendDsf extends AbstractDisassemblyBackend implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.debug.internal.ui.disassembly.dsf.IDisassemblyBackend#getFrameLevel()
|
* @see org.eclipse.cdt.debug.internal.ui.disassembly.dsf.IDisassemblyBackend#getFrameLevel()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public int getFrameLevel() {
|
public int getFrameLevel() {
|
||||||
if (fTargetFrameContext != null) {
|
if (fTargetFrameContext != null) {
|
||||||
return fTargetFrameContext.getLevel();
|
return fTargetFrameContext.getLevel();
|
||||||
|
@ -463,6 +478,7 @@ public class DisassemblyBackendDsf extends AbstractDisassemblyBackend implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.debug.internal.ui.disassembly.dsf.IDisassemblyBackend#hasFrameContext()
|
* @see org.eclipse.cdt.debug.internal.ui.disassembly.dsf.IDisassemblyBackend#hasFrameContext()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean hasFrameContext() {
|
public boolean hasFrameContext() {
|
||||||
return fTargetFrameContext != null;
|
return fTargetFrameContext != null;
|
||||||
}
|
}
|
||||||
|
@ -471,6 +487,7 @@ public class DisassemblyBackendDsf extends AbstractDisassemblyBackend implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.debug.internal.ui.disassembly.dsf.IDisassemblyBackend#getFrameFile()
|
* @see org.eclipse.cdt.debug.internal.ui.disassembly.dsf.IDisassemblyBackend#getFrameFile()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getFrameFile() {
|
public String getFrameFile() {
|
||||||
return fTargetFrameData.getFile();
|
return fTargetFrameData.getFile();
|
||||||
}
|
}
|
||||||
|
@ -478,6 +495,7 @@ public class DisassemblyBackendDsf extends AbstractDisassemblyBackend implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.debug.internal.ui.disassembly.dsf.IDisassemblyBackend#getFrameLine()
|
* @see org.eclipse.cdt.debug.internal.ui.disassembly.dsf.IDisassemblyBackend#getFrameLine()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public int getFrameLine() {
|
public int getFrameLine() {
|
||||||
return fTargetFrameData.getLine();
|
return fTargetFrameData.getLine();
|
||||||
}
|
}
|
||||||
|
@ -485,6 +503,7 @@ public class DisassemblyBackendDsf extends AbstractDisassemblyBackend implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.dsf.debug.internal.ui.disassembly.IDisassemblyBackend#retrieveDisassembly(java.math.BigInteger, java.math.BigInteger, java.lang.String, int, int, boolean, boolean, boolean, int)
|
* @see org.eclipse.cdt.dsf.debug.internal.ui.disassembly.IDisassemblyBackend#retrieveDisassembly(java.math.BigInteger, java.math.BigInteger, java.lang.String, int, int, boolean, boolean, boolean, int)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void retrieveDisassembly(final BigInteger startAddress, BigInteger endAddress, final String file, final int lineNumber, final int lines, final boolean mixed, final boolean showSymbols, final boolean showDisassembly, final int linesHint) {
|
public void retrieveDisassembly(final BigInteger startAddress, BigInteger endAddress, final String file, final int lineNumber, final int lines, final boolean mixed, final boolean showSymbols, final boolean showDisassembly, final int linesHint) {
|
||||||
// make sure address range is no less than 32 bytes
|
// make sure address range is no less than 32 bytes
|
||||||
// this is an attempt to get better a response from the backend (bug 302505)
|
// this is an attempt to get better a response from the backend (bug 302505)
|
||||||
|
@ -501,6 +520,7 @@ public class DisassemblyBackendDsf extends AbstractDisassemblyBackend implements
|
||||||
|
|
||||||
// align the start address first (bug 328168)
|
// align the start address first (bug 328168)
|
||||||
executor.execute(new Runnable() {
|
executor.execute(new Runnable() {
|
||||||
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
alignOpCodeAddress(startAddress, new DataRequestMonitor<BigInteger>(executor, null) {
|
alignOpCodeAddress(startAddress, new DataRequestMonitor<BigInteger>(executor, null) {
|
||||||
|
|
||||||
|
@ -514,6 +534,7 @@ public class DisassemblyBackendDsf extends AbstractDisassemblyBackend implements
|
||||||
final IMixedInstruction[] data= getData();
|
final IMixedInstruction[] data= getData();
|
||||||
if (!isCanceled() && data != null) {
|
if (!isCanceled() && data != null) {
|
||||||
fCallback.asyncExec(new Runnable() {
|
fCallback.asyncExec(new Runnable() {
|
||||||
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (!insertDisassembly(finalStartAddress, finalEndAddress, data, showSymbols, showDisassembly)) {
|
if (!insertDisassembly(finalStartAddress, finalEndAddress, data, showSymbols, showDisassembly)) {
|
||||||
// retry in non-mixed mode
|
// retry in non-mixed mode
|
||||||
|
@ -525,14 +546,17 @@ public class DisassemblyBackendDsf extends AbstractDisassemblyBackend implements
|
||||||
if (status != null && !status.isOK()) {
|
if (status != null && !status.isOK()) {
|
||||||
if( file != null ) {
|
if( file != null ) {
|
||||||
fCallback.asyncExec(new Runnable() {
|
fCallback.asyncExec(new Runnable() {
|
||||||
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
fCallback.retrieveDisassembly(finalStartAddress, finalEndAddress, linesHint, true, true);
|
fCallback.retrieveDisassembly(finalStartAddress, finalEndAddress, linesHint, true, true);
|
||||||
}});
|
}});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
fCallback.asyncExec(new Runnable() {
|
fCallback.asyncExec(new Runnable() {
|
||||||
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
fCallback.doScrollLocked(new Runnable() {
|
fCallback.doScrollLocked(new Runnable() {
|
||||||
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
fCallback.insertError(finalStartAddress, status.getMessage());
|
fCallback.insertError(finalStartAddress, status.getMessage());
|
||||||
}
|
}
|
||||||
|
@ -546,6 +570,7 @@ public class DisassemblyBackendDsf extends AbstractDisassemblyBackend implements
|
||||||
};
|
};
|
||||||
if (file != null) {
|
if (file != null) {
|
||||||
executor.execute(new Runnable() {
|
executor.execute(new Runnable() {
|
||||||
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
final IDisassembly disassembly= fServicesTracker.getService(IDisassembly.class);
|
final IDisassembly disassembly= fServicesTracker.getService(IDisassembly.class);
|
||||||
if (disassembly == null) {
|
if (disassembly == null) {
|
||||||
|
@ -557,6 +582,7 @@ public class DisassemblyBackendDsf extends AbstractDisassemblyBackend implements
|
||||||
}});
|
}});
|
||||||
} else {
|
} else {
|
||||||
executor.execute(new Runnable() {
|
executor.execute(new Runnable() {
|
||||||
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
final IDisassembly disassembly= fServicesTracker.getService(IDisassembly.class);
|
final IDisassembly disassembly= fServicesTracker.getService(IDisassembly.class);
|
||||||
if (disassembly == null) {
|
if (disassembly == null) {
|
||||||
|
@ -573,9 +599,11 @@ public class DisassemblyBackendDsf extends AbstractDisassemblyBackend implements
|
||||||
public void handleCompleted() {
|
public void handleCompleted() {
|
||||||
if (!isCanceled() && getData() != null) {
|
if (!isCanceled() && getData() != null) {
|
||||||
fCallback.asyncExec(new Runnable() {
|
fCallback.asyncExec(new Runnable() {
|
||||||
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (!insertDisassembly(finalStartAddress, finalEndAddress, getData(), showSymbols, showDisassembly)) {
|
if (!insertDisassembly(finalStartAddress, finalEndAddress, getData(), showSymbols, showDisassembly)) {
|
||||||
fCallback.doScrollLocked(new Runnable() {
|
fCallback.doScrollLocked(new Runnable() {
|
||||||
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
fCallback.insertError(finalStartAddress, DisassemblyMessages.DisassemblyBackendDsf_error_UnableToRetrieveData);
|
fCallback.insertError(finalStartAddress, DisassemblyMessages.DisassemblyBackendDsf_error_UnableToRetrieveData);
|
||||||
}
|
}
|
||||||
|
@ -586,8 +614,10 @@ public class DisassemblyBackendDsf extends AbstractDisassemblyBackend implements
|
||||||
final IStatus status= getStatus();
|
final IStatus status= getStatus();
|
||||||
if (status != null && !status.isOK()) {
|
if (status != null && !status.isOK()) {
|
||||||
fCallback.asyncExec(new Runnable() {
|
fCallback.asyncExec(new Runnable() {
|
||||||
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
fCallback.doScrollLocked(new Runnable() {
|
fCallback.doScrollLocked(new Runnable() {
|
||||||
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
fCallback.insertError(finalStartAddress, status.getMessage());
|
fCallback.insertError(finalStartAddress, status.getMessage());
|
||||||
}
|
}
|
||||||
|
@ -599,6 +629,7 @@ public class DisassemblyBackendDsf extends AbstractDisassemblyBackend implements
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
executor.execute(new Runnable() {
|
executor.execute(new Runnable() {
|
||||||
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
final IDisassembly disassembly= fServicesTracker.getService(IDisassembly.class);
|
final IDisassembly disassembly= fServicesTracker.getService(IDisassembly.class);
|
||||||
if (disassembly == null) {
|
if (disassembly == null) {
|
||||||
|
@ -850,6 +881,7 @@ public class DisassemblyBackendDsf extends AbstractDisassemblyBackend implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.debug.internal.ui.disassembly.dsf.IDisassemblyBackend#insertSource(org.eclipse.jface.text.Position, java.math.BigInteger, java.lang.String, int)
|
* @see org.eclipse.cdt.debug.internal.ui.disassembly.dsf.IDisassemblyBackend#insertSource(org.eclipse.jface.text.Position, java.math.BigInteger, java.lang.String, int)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public Object insertSource(Position pos, BigInteger address, final String file, int lineNumber) {
|
public Object insertSource(Position pos, BigInteger address, final String file, int lineNumber) {
|
||||||
Object sourceElement = null;
|
Object sourceElement = null;
|
||||||
final ISourceLookupDMContext ctx= DMContexts.getAncestorOfType(fTargetContext, ISourceLookupDMContext.class);
|
final ISourceLookupDMContext ctx= DMContexts.getAncestorOfType(fTargetContext, ISourceLookupDMContext.class);
|
||||||
|
@ -882,6 +914,7 @@ public class DisassemblyBackendDsf extends AbstractDisassemblyBackend implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.debug.internal.ui.disassembly.dsf.IDisassemblyBackend#gotoSymbol(java.lang.String)
|
* @see org.eclipse.cdt.debug.internal.ui.disassembly.dsf.IDisassemblyBackend#gotoSymbol(java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void gotoSymbol(final String symbol) {
|
public void gotoSymbol(final String symbol) {
|
||||||
evaluateAddressExpression(symbol, false, new DataRequestMonitor<BigInteger>(getSession().getExecutor(), null) {
|
evaluateAddressExpression(symbol, false, new DataRequestMonitor<BigInteger>(getSession().getExecutor(), null) {
|
||||||
@Override
|
@Override
|
||||||
|
@ -889,6 +922,7 @@ public class DisassemblyBackendDsf extends AbstractDisassemblyBackend implements
|
||||||
final BigInteger address = getData();
|
final BigInteger address = getData();
|
||||||
if (address != null) {
|
if (address != null) {
|
||||||
fCallback.asyncExec(new Runnable() {
|
fCallback.asyncExec(new Runnable() {
|
||||||
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
fCallback.gotoAddress(address);
|
fCallback.gotoAddress(address);
|
||||||
}});
|
}});
|
||||||
|
@ -935,7 +969,8 @@ public class DisassemblyBackendDsf extends AbstractDisassemblyBackend implements
|
||||||
if (address != null && address != IExpressionDMLocation.INVALID_ADDRESS) {
|
if (address != null && address != IExpressionDMLocation.INVALID_ADDRESS) {
|
||||||
final BigInteger addressValue = address.getValue();
|
final BigInteger addressValue = address.getValue();
|
||||||
fCallback.asyncExec(new Runnable() {
|
fCallback.asyncExec(new Runnable() {
|
||||||
public void run() {
|
@Override
|
||||||
|
public void run() {
|
||||||
fCallback.gotoAddress(addressValue);
|
fCallback.gotoAddress(addressValue);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -986,6 +1021,7 @@ public class DisassemblyBackendDsf extends AbstractDisassemblyBackend implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.debug.internal.ui.disassembly.dsf.IDisassemblyBackend#retrieveDisassembly(java.lang.String, int, java.math.BigInteger, boolean, boolean, boolean)
|
* @see org.eclipse.cdt.debug.internal.ui.disassembly.dsf.IDisassemblyBackend#retrieveDisassembly(java.lang.String, int, java.math.BigInteger, boolean, boolean, boolean)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void retrieveDisassembly(final String file, final int lines, final BigInteger endAddress, boolean mixed, final boolean showSymbols, final boolean showDisassembly) {
|
public void retrieveDisassembly(final String file, final int lines, final BigInteger endAddress, boolean mixed, final boolean showSymbols, final boolean showDisassembly) {
|
||||||
String debuggerPath= file;
|
String debuggerPath= file;
|
||||||
// try reverse lookup
|
// try reverse lookup
|
||||||
|
@ -1023,6 +1059,7 @@ public class DisassemblyBackendDsf extends AbstractDisassemblyBackend implements
|
||||||
final IMixedInstruction[] data= getData();
|
final IMixedInstruction[] data= getData();
|
||||||
if (!isCanceled() && data != null) {
|
if (!isCanceled() && data != null) {
|
||||||
fCallback.asyncExec(new Runnable() {
|
fCallback.asyncExec(new Runnable() {
|
||||||
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (!insertDisassembly(null, endAddress, data, showSymbols, showDisassembly)) {
|
if (!insertDisassembly(null, endAddress, data, showSymbols, showDisassembly)) {
|
||||||
// retry in non-mixed mode
|
// retry in non-mixed mode
|
||||||
|
@ -1041,6 +1078,7 @@ public class DisassemblyBackendDsf extends AbstractDisassemblyBackend implements
|
||||||
assert !fCallback.getUpdatePending();
|
assert !fCallback.getUpdatePending();
|
||||||
fCallback.setUpdatePending(true);
|
fCallback.setUpdatePending(true);
|
||||||
executor.execute(new Runnable() {
|
executor.execute(new Runnable() {
|
||||||
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
final IDisassembly disassembly= fServicesTracker.getService(IDisassembly.class);
|
final IDisassembly disassembly= fServicesTracker.getService(IDisassembly.class);
|
||||||
if (disassembly == null) {
|
if (disassembly == null) {
|
||||||
|
@ -1055,6 +1093,7 @@ public class DisassemblyBackendDsf extends AbstractDisassemblyBackend implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.debug.internal.ui.disassembly.dsf.IDisassemblyBackend#evaluateExpression(java.lang.String)
|
* @see org.eclipse.cdt.debug.internal.ui.disassembly.dsf.IDisassemblyBackend#evaluateExpression(java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String evaluateExpression(final String expression) {
|
public String evaluateExpression(final String expression) {
|
||||||
if (fTargetFrameContext == null) {
|
if (fTargetFrameContext == null) {
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -23,6 +23,7 @@ public class DisassemblyBackendDsfFactory implements IAdapterFactory {
|
||||||
|
|
||||||
private static final Class<?>[] ADAPTERS = { IDisassemblyBackend.class };
|
private static final Class<?>[] ADAPTERS = { IDisassemblyBackend.class };
|
||||||
|
|
||||||
|
@Override
|
||||||
@SuppressWarnings("rawtypes")
|
@SuppressWarnings("rawtypes")
|
||||||
public Object getAdapter(Object adaptableObject, Class adapterType) {
|
public Object getAdapter(Object adaptableObject, Class adapterType) {
|
||||||
if (IDisassemblyBackend.class.equals(adapterType)) {
|
if (IDisassemblyBackend.class.equals(adapterType)) {
|
||||||
|
@ -43,6 +44,7 @@ public class DisassemblyBackendDsfFactory implements IAdapterFactory {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
@SuppressWarnings("rawtypes")
|
@SuppressWarnings("rawtypes")
|
||||||
public Class[] getAdapterList() {
|
public Class[] getAdapterList() {
|
||||||
return ADAPTERS;
|
return ADAPTERS;
|
||||||
|
|
|
@ -92,6 +92,7 @@ public class DisassemblyEditor extends DisassemblyPart implements IEditorPart {
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.ui.IEditorPart#getEditorInput()
|
* @see org.eclipse.ui.IEditorPart#getEditorInput()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IEditorInput getEditorInput() {
|
public IEditorInput getEditorInput() {
|
||||||
return fInput;
|
return fInput;
|
||||||
}
|
}
|
||||||
|
@ -99,6 +100,7 @@ public class DisassemblyEditor extends DisassemblyPart implements IEditorPart {
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.ui.IEditorPart#getEditorSite()
|
* @see org.eclipse.ui.IEditorPart#getEditorSite()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IEditorSite getEditorSite() {
|
public IEditorSite getEditorSite() {
|
||||||
return (IEditorSite)getSite();
|
return (IEditorSite)getSite();
|
||||||
}
|
}
|
||||||
|
@ -106,6 +108,7 @@ public class DisassemblyEditor extends DisassemblyPart implements IEditorPart {
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.ui.IEditorPart#init(org.eclipse.ui.IEditorSite, org.eclipse.ui.IEditorInput)
|
* @see org.eclipse.ui.IEditorPart#init(org.eclipse.ui.IEditorSite, org.eclipse.ui.IEditorInput)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void init(IEditorSite site, IEditorInput input) throws PartInitException {
|
public void init(IEditorSite site, IEditorInput input) throws PartInitException {
|
||||||
setSite(site);
|
setSite(site);
|
||||||
setInput(input);
|
setInput(input);
|
||||||
|
@ -114,18 +117,21 @@ public class DisassemblyEditor extends DisassemblyPart implements IEditorPart {
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.ui.ISaveablePart#doSave(org.eclipse.core.runtime.IProgressMonitor)
|
* @see org.eclipse.ui.ISaveablePart#doSave(org.eclipse.core.runtime.IProgressMonitor)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void doSave(IProgressMonitor monitor) {
|
public void doSave(IProgressMonitor monitor) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.ui.ISaveablePart#doSaveAs()
|
* @see org.eclipse.ui.ISaveablePart#doSaveAs()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void doSaveAs() {
|
public void doSaveAs() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.ui.ISaveablePart#isDirty()
|
* @see org.eclipse.ui.ISaveablePart#isDirty()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isDirty() {
|
public boolean isDirty() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -133,6 +139,7 @@ public class DisassemblyEditor extends DisassemblyPart implements IEditorPart {
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.ui.ISaveablePart#isSaveAsAllowed()
|
* @see org.eclipse.ui.ISaveablePart#isSaveAsAllowed()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isSaveAsAllowed() {
|
public boolean isSaveAsAllowed() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -140,6 +147,7 @@ public class DisassemblyEditor extends DisassemblyPart implements IEditorPart {
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.ui.ISaveablePart#isSaveOnCloseNeeded()
|
* @see org.eclipse.ui.ISaveablePart#isSaveOnCloseNeeded()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isSaveOnCloseNeeded() {
|
public boolean isSaveOnCloseNeeded() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,6 +42,7 @@ class DisassemblyHyperlinkDetector extends AbstractHyperlinkDetector {
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.jface.text.hyperlink.IHyperlink#getHyperlinkRegion()
|
* @see org.eclipse.jface.text.hyperlink.IHyperlink#getHyperlinkRegion()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IRegion getHyperlinkRegion() {
|
public IRegion getHyperlinkRegion() {
|
||||||
return fRegion;
|
return fRegion;
|
||||||
}
|
}
|
||||||
|
@ -49,6 +50,7 @@ class DisassemblyHyperlinkDetector extends AbstractHyperlinkDetector {
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.jface.text.hyperlink.IHyperlink#getHyperlinkText()
|
* @see org.eclipse.jface.text.hyperlink.IHyperlink#getHyperlinkText()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getHyperlinkText() {
|
public String getHyperlinkText() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -56,6 +58,7 @@ class DisassemblyHyperlinkDetector extends AbstractHyperlinkDetector {
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.jface.text.hyperlink.IHyperlink#getTypeLabel()
|
* @see org.eclipse.jface.text.hyperlink.IHyperlink#getTypeLabel()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getTypeLabel() {
|
public String getTypeLabel() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -63,6 +66,7 @@ class DisassemblyHyperlinkDetector extends AbstractHyperlinkDetector {
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.jface.text.hyperlink.IHyperlink#open()
|
* @see org.eclipse.jface.text.hyperlink.IHyperlink#open()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void open() {
|
public void open() {
|
||||||
if (fPart != null) {
|
if (fPart != null) {
|
||||||
fPart.gotoSymbol(fSymbol);
|
fPart.gotoSymbol(fSymbol);
|
||||||
|
@ -80,6 +84,7 @@ class DisassemblyHyperlinkDetector extends AbstractHyperlinkDetector {
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.jface.text.hyperlink.IHyperlinkDetector#detectHyperlinks(org.eclipse.jface.text.ITextViewer, org.eclipse.jface.text.IRegion, boolean)
|
* @see org.eclipse.jface.text.hyperlink.IHyperlinkDetector#detectHyperlinks(org.eclipse.jface.text.ITextViewer, org.eclipse.jface.text.IRegion, boolean)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IHyperlink[] detectHyperlinks(ITextViewer textViewer,
|
public IHyperlink[] detectHyperlinks(ITextViewer textViewer,
|
||||||
IRegion region, boolean canShowMultipleHyperlinks) {
|
IRegion region, boolean canShowMultipleHyperlinks) {
|
||||||
IDocument document= textViewer.getDocument();
|
IDocument document= textViewer.getDocument();
|
||||||
|
|
|
@ -34,6 +34,7 @@ class DisassemblySelectionProvider implements ISelectionProvider {
|
||||||
|
|
||||||
private final ListenerList fListenerList = new ListenerList(ListenerList.IDENTITY);
|
private final ListenerList fListenerList = new ListenerList(ListenerList.IDENTITY);
|
||||||
private final ISelectionChangedListener fListener = new ISelectionChangedListener() {
|
private final ISelectionChangedListener fListener = new ISelectionChangedListener() {
|
||||||
|
@Override
|
||||||
public void selectionChanged(SelectionChangedEvent event) {
|
public void selectionChanged(SelectionChangedEvent event) {
|
||||||
fireSelectionChanged(event);
|
fireSelectionChanged(event);
|
||||||
}
|
}
|
||||||
|
@ -57,6 +58,7 @@ class DisassemblySelectionProvider implements ISelectionProvider {
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.jface.viewers.ISelectionProvider#addSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener)
|
* @see org.eclipse.jface.viewers.ISelectionProvider#addSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void addSelectionChangedListener(ISelectionChangedListener listener) {
|
public void addSelectionChangedListener(ISelectionChangedListener listener) {
|
||||||
fListenerList.add(listener);
|
fListenerList.add(listener);
|
||||||
}
|
}
|
||||||
|
@ -64,6 +66,7 @@ class DisassemblySelectionProvider implements ISelectionProvider {
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.jface.viewers.ISelectionProvider#getSelection()
|
* @see org.eclipse.jface.viewers.ISelectionProvider#getSelection()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ISelection getSelection() {
|
public ISelection getSelection() {
|
||||||
final ISourceViewer textViewer= fPart.getTextViewer();
|
final ISourceViewer textViewer= fPart.getTextViewer();
|
||||||
ISelectionProvider provider = textViewer.getSelectionProvider();
|
ISelectionProvider provider = textViewer.getSelectionProvider();
|
||||||
|
@ -76,6 +79,7 @@ class DisassemblySelectionProvider implements ISelectionProvider {
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.jface.viewers.ISelectionProvider#removeSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener)
|
* @see org.eclipse.jface.viewers.ISelectionProvider#removeSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void removeSelectionChangedListener(ISelectionChangedListener listener) {
|
public void removeSelectionChangedListener(ISelectionChangedListener listener) {
|
||||||
fListenerList.remove(listener);
|
fListenerList.remove(listener);
|
||||||
}
|
}
|
||||||
|
@ -83,6 +87,7 @@ class DisassemblySelectionProvider implements ISelectionProvider {
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.jface.viewers.ISelectionProvider#setSelection(org.eclipse.jface.viewers.ISelection)
|
* @see org.eclipse.jface.viewers.ISelectionProvider#setSelection(org.eclipse.jface.viewers.ISelection)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setSelection(ISelection selection) {
|
public void setSelection(ISelection selection) {
|
||||||
ISelectionProvider provider = fPart.getTextViewer().getSelectionProvider();
|
ISelectionProvider provider = fPart.getTextViewer().getSelectionProvider();
|
||||||
if (provider != null) {
|
if (provider != null) {
|
||||||
|
|
|
@ -42,7 +42,8 @@ public class DisassemblyTextHover implements ITextHover {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.jface.text.ITextHover#getHoverRegion(org.eclipse.jface.text.ITextViewer, int)
|
* @see org.eclipse.jface.text.ITextHover#getHoverRegion(org.eclipse.jface.text.ITextViewer, int)
|
||||||
*/
|
*/
|
||||||
public IRegion getHoverRegion(ITextViewer textViewer, int offset) {
|
@Override
|
||||||
|
public IRegion getHoverRegion(ITextViewer textViewer, int offset) {
|
||||||
IDocument doc = textViewer.getDocument();
|
IDocument doc = textViewer.getDocument();
|
||||||
return CWordFinder.findWord(doc, offset);
|
return CWordFinder.findWord(doc, offset);
|
||||||
}
|
}
|
||||||
|
@ -50,6 +51,7 @@ public class DisassemblyTextHover implements ITextHover {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.jface.text.ITextHover#getHoverInfo(org.eclipse.jface.text.ITextViewer, org.eclipse.jface.text.IRegion)
|
* @see org.eclipse.jface.text.ITextHover#getHoverInfo(org.eclipse.jface.text.ITextViewer, org.eclipse.jface.text.IRegion)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getHoverInfo(ITextViewer textViewer, IRegion hoverRegion) {
|
public String getHoverInfo(ITextViewer textViewer, IRegion hoverRegion) {
|
||||||
DisassemblyDocument doc = (DisassemblyDocument)textViewer.getDocument();
|
DisassemblyDocument doc = (DisassemblyDocument)textViewer.getDocument();
|
||||||
int offset = hoverRegion.getOffset();
|
int offset = hoverRegion.getOffset();
|
||||||
|
|
|
@ -32,6 +32,7 @@ public class DisassemblyToggleBreakpointTester extends PropertyTester {
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
* @see org.eclipse.core.expressions.IPropertyTester#test(java.lang.Object, java.lang.String, java.lang.Object[], java.lang.Object)
|
* @see org.eclipse.core.expressions.IPropertyTester#test(java.lang.Object, java.lang.String, java.lang.Object[], java.lang.Object)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
|
public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
|
||||||
if ("isDisassemblyViewSupportsCBreakpoint".equals(property) && (receiver instanceof IDisassemblyPart)) { //$NON-NLS-1$
|
if ("isDisassemblyViewSupportsCBreakpoint".equals(property) && (receiver instanceof IDisassemblyPart)) { //$NON-NLS-1$
|
||||||
IDisassemblyPart view = ((IDisassemblyPart) receiver);
|
IDisassemblyPart view = ((IDisassemblyPart) receiver);
|
||||||
|
|
|
@ -43,6 +43,7 @@ public class DisassemblyView extends DisassemblyPart implements IViewPart {
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.ui.IViewPart#getViewSite()
|
* @see org.eclipse.ui.IViewPart#getViewSite()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IViewSite getViewSite() {
|
public IViewSite getViewSite() {
|
||||||
return (IViewSite)getSite();
|
return (IViewSite)getSite();
|
||||||
}
|
}
|
||||||
|
@ -50,6 +51,7 @@ public class DisassemblyView extends DisassemblyPart implements IViewPart {
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.ui.IViewPart#init(org.eclipse.ui.IViewSite)
|
* @see org.eclipse.ui.IViewPart#init(org.eclipse.ui.IViewSite)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void init(IViewSite site) throws PartInitException {
|
public void init(IViewSite site) throws PartInitException {
|
||||||
setSite(site);
|
setSite(site);
|
||||||
}
|
}
|
||||||
|
@ -57,6 +59,7 @@ public class DisassemblyView extends DisassemblyPart implements IViewPart {
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.ui.IViewPart#init(org.eclipse.ui.IViewSite, org.eclipse.ui.IMemento)
|
* @see org.eclipse.ui.IViewPart#init(org.eclipse.ui.IViewSite, org.eclipse.ui.IMemento)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void init(IViewSite site, IMemento memento) throws PartInitException {
|
public void init(IViewSite site, IMemento memento) throws PartInitException {
|
||||||
setSite(site);
|
setSite(site);
|
||||||
if (memento != null) {
|
if (memento != null) {
|
||||||
|
@ -72,6 +75,7 @@ public class DisassemblyView extends DisassemblyPart implements IViewPart {
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.ui.IViewPart#saveState(org.eclipse.ui.IMemento)
|
* @see org.eclipse.ui.IViewPart#saveState(org.eclipse.ui.IMemento)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void saveState(IMemento memento) {
|
public void saveState(IMemento memento) {
|
||||||
memento.putBoolean(DisassemblyPreferenceConstants.TRACK_EXPRESSION, isTrackExpression());
|
memento.putBoolean(DisassemblyPreferenceConstants.TRACK_EXPRESSION, isTrackExpression());
|
||||||
memento.putBoolean(DisassemblyPreferenceConstants.SYNC_ACTIVE_CONTEXT, isSyncWithActiveDebugContext());
|
memento.putBoolean(DisassemblyPreferenceConstants.SYNC_ACTIVE_CONTEXT, isSyncWithActiveDebugContext());
|
||||||
|
|
|
@ -43,12 +43,14 @@ public class DisassemblyViewerConfiguration extends TextSourceViewerConfiguratio
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.jface.text.presentation.IPresentationDamager#setDocument(org.eclipse.jface.text.IDocument)
|
* @see org.eclipse.jface.text.presentation.IPresentationDamager#setDocument(org.eclipse.jface.text.IDocument)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setDocument(IDocument document) {
|
public void setDocument(IDocument document) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.jface.text.presentation.IPresentationDamager#getDamageRegion(org.eclipse.jface.text.ITypedRegion, org.eclipse.jface.text.DocumentEvent, boolean)
|
* @see org.eclipse.jface.text.presentation.IPresentationDamager#getDamageRegion(org.eclipse.jface.text.ITypedRegion, org.eclipse.jface.text.DocumentEvent, boolean)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IRegion getDamageRegion(ITypedRegion partition, DocumentEvent e, boolean documentPartitioningChanged) {
|
public IRegion getDamageRegion(ITypedRegion partition, DocumentEvent e, boolean documentPartitioningChanged) {
|
||||||
int start= e.fOffset;
|
int start= e.fOffset;
|
||||||
int end= e.getOffset() + (e.getText() == null ? 0 : e.getText().length());
|
int end= e.getOffset() + (e.getText() == null ? 0 : e.getText().length());
|
||||||
|
@ -58,6 +60,7 @@ public class DisassemblyViewerConfiguration extends TextSourceViewerConfiguratio
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.jface.text.presentation.IPresentationRepairer#createPresentation(org.eclipse.jface.text.TextPresentation, org.eclipse.jface.text.ITypedRegion)
|
* @see org.eclipse.jface.text.presentation.IPresentationRepairer#createPresentation(org.eclipse.jface.text.TextPresentation, org.eclipse.jface.text.ITypedRegion)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void createPresentation(TextPresentation presentation, ITypedRegion damage) {
|
public void createPresentation(TextPresentation presentation, ITypedRegion damage) {
|
||||||
// do nothing
|
// do nothing
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,6 +66,7 @@ class SourceColorerJob extends UIJob implements Runnable {
|
||||||
/*
|
/*
|
||||||
* @see java.lang.Runnable#run()
|
* @see java.lang.Runnable#run()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
IWorkbenchSiteProgressService progressService = (IWorkbenchSiteProgressService)fDisassemblyPart.getSite().getAdapter(IWorkbenchSiteProgressService.class);
|
IWorkbenchSiteProgressService progressService = (IWorkbenchSiteProgressService)fDisassemblyPart.getSite().getAdapter(IWorkbenchSiteProgressService.class);
|
||||||
if(progressService != null) {
|
if(progressService != null) {
|
||||||
|
|
|
@ -65,6 +65,7 @@ public abstract class AbstractDisassemblyAction extends Action implements IUpdat
|
||||||
@Override
|
@Override
|
||||||
public abstract void run();
|
public abstract void run();
|
||||||
|
|
||||||
|
@Override
|
||||||
public void update() {
|
public void update() {
|
||||||
boolean enabled= fDisassemblyPart == null || fDisassemblyPart.isConnected();
|
boolean enabled= fDisassemblyPart == null || fDisassemblyPart.isConnected();
|
||||||
setEnabled(enabled);
|
setEnabled(enabled);
|
||||||
|
@ -73,6 +74,7 @@ public abstract class AbstractDisassemblyAction extends Action implements IUpdat
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.ui.IPropertyListener#propertyChanged(java.lang.Object, int)
|
* @see org.eclipse.ui.IPropertyListener#propertyChanged(java.lang.Object, int)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void propertyChanged(Object source, int propId) {
|
public void propertyChanged(Object source, int propId) {
|
||||||
if (source == fDisassemblyPart && (propId & 0x500) != 0) {
|
if (source == fDisassemblyPart && (propId & 0x500) != 0) {
|
||||||
update();
|
update();
|
||||||
|
|
|
@ -60,6 +60,7 @@ public abstract class AbstractDisassemblyRulerActionDelegate extends ActionDeleg
|
||||||
/*
|
/*
|
||||||
* @see IEditorActionDelegate#setActiveEditor(org.eclipse.jface.action.IAction, org.eclipse.ui.IEditorPart)
|
* @see IEditorActionDelegate#setActiveEditor(org.eclipse.jface.action.IAction, org.eclipse.ui.IEditorPart)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setActiveEditor(IAction callerAction, IEditorPart targetEditor) {
|
public void setActiveEditor(IAction callerAction, IEditorPart targetEditor) {
|
||||||
setTargetPart(callerAction, targetEditor);
|
setTargetPart(callerAction, targetEditor);
|
||||||
}
|
}
|
||||||
|
@ -67,7 +68,8 @@ public abstract class AbstractDisassemblyRulerActionDelegate extends ActionDeleg
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.ui.IViewActionDelegate#init(org.eclipse.ui.IViewPart)
|
* @see org.eclipse.ui.IViewActionDelegate#init(org.eclipse.ui.IViewPart)
|
||||||
*/
|
*/
|
||||||
public void init(IViewPart view) {
|
@Override
|
||||||
|
public void init(IViewPart view) {
|
||||||
setTargetPart(fCallerAction, view);
|
setTargetPart(fCallerAction, view);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -142,6 +144,7 @@ public abstract class AbstractDisassemblyRulerActionDelegate extends ActionDeleg
|
||||||
/*
|
/*
|
||||||
* @see IMenuListener#menuAboutToShow(org.eclipse.jface.action.IMenuManager)
|
* @see IMenuListener#menuAboutToShow(org.eclipse.jface.action.IMenuManager)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void menuAboutToShow(IMenuManager manager) {
|
public void menuAboutToShow(IMenuManager manager) {
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
@ -149,12 +152,14 @@ public abstract class AbstractDisassemblyRulerActionDelegate extends ActionDeleg
|
||||||
/*
|
/*
|
||||||
* @see MouseListener#mouseDoubleClick(org.eclipse.swt.events.MouseEvent)
|
* @see MouseListener#mouseDoubleClick(org.eclipse.swt.events.MouseEvent)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void mouseDoubleClick(MouseEvent e) {
|
public void mouseDoubleClick(MouseEvent e) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @see MouseListener#mouseDown(org.eclipse.swt.events.MouseEvent)
|
* @see MouseListener#mouseDown(org.eclipse.swt.events.MouseEvent)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void mouseDown(MouseEvent e) {
|
public void mouseDown(MouseEvent e) {
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
@ -162,6 +167,7 @@ public abstract class AbstractDisassemblyRulerActionDelegate extends ActionDeleg
|
||||||
/*
|
/*
|
||||||
* @see MouseListener#mouseUp(org.eclipse.swt.events.MouseEvent)
|
* @see MouseListener#mouseUp(org.eclipse.swt.events.MouseEvent)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void mouseUp(MouseEvent e) {
|
public void mouseUp(MouseEvent e) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,6 +88,7 @@ public class AddressBarContributionItem extends ContributionItem {
|
||||||
|
|
||||||
parent.addDisposeListener(new DisposeListener() {
|
parent.addDisposeListener(new DisposeListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
public void widgetDisposed(DisposeEvent e) {
|
public void widgetDisposed(DisposeEvent e) {
|
||||||
if (warningImage != null)
|
if (warningImage != null)
|
||||||
warningImage.dispose();
|
warningImage.dispose();
|
||||||
|
@ -198,10 +199,12 @@ public class AddressBarContributionItem extends ContributionItem {
|
||||||
// [nmehregani]: Support Ctrl+C in address bar
|
// [nmehregani]: Support Ctrl+C in address bar
|
||||||
KeyListener keyListener = new KeyListener() {
|
KeyListener keyListener = new KeyListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
public void keyPressed(KeyEvent e) {
|
public void keyPressed(KeyEvent e) {
|
||||||
/* Not used */
|
/* Not used */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void keyReleased(KeyEvent e) {
|
public void keyReleased(KeyEvent e) {
|
||||||
if (e.stateMask == SWT.CTRL
|
if (e.stateMask == SWT.CTRL
|
||||||
&& (((char) e.keyCode) == 'c' || ((char) e.keyCode) == 'C')) {
|
&& (((char) e.keyCode) == 'c' || ((char) e.keyCode) == 'C')) {
|
||||||
|
@ -234,6 +237,7 @@ public class AddressBarContributionItem extends ContributionItem {
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@Override
|
||||||
public void focusGained(FocusEvent e) {
|
public void focusGained(FocusEvent e) {
|
||||||
// [nmehregani] bugzilla 297387: 'Home' shouldn't jump to PC address when focus is on location combo box
|
// [nmehregani] bugzilla 297387: 'Home' shouldn't jump to PC address when focus is on location combo box
|
||||||
if (action instanceof JumpToAddressAction)
|
if (action instanceof JumpToAddressAction)
|
||||||
|
@ -250,6 +254,7 @@ public class AddressBarContributionItem extends ContributionItem {
|
||||||
addressBox.addKeyListener(keyListener);
|
addressBox.addKeyListener(keyListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void focusLost(FocusEvent e) {
|
public void focusLost(FocusEvent e) {
|
||||||
// [nmehregani] bugzilla 297387: 'Home' shouldn't jump to PC address when focus is on location combo box
|
// [nmehregani] bugzilla 297387: 'Home' shouldn't jump to PC address when focus is on location combo box
|
||||||
if (action instanceof JumpToAddressAction)
|
if (action instanceof JumpToAddressAction)
|
||||||
|
@ -268,6 +273,7 @@ public class AddressBarContributionItem extends ContributionItem {
|
||||||
|
|
||||||
addressBox.addTraverseListener(new TraverseListener() {
|
addressBox.addTraverseListener(new TraverseListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
public void keyTraversed(TraverseEvent e) {
|
public void keyTraversed(TraverseEvent e) {
|
||||||
if (e.detail == SWT.TRAVERSE_RETURN) {
|
if (e.detail == SWT.TRAVERSE_RETURN) {
|
||||||
String addressBoxStr = addressBox.getText();
|
String addressBoxStr = addressBox.getText();
|
||||||
|
|
|
@ -44,16 +44,20 @@ public class BreakpointPropertiesRulerAction extends AbstractDisassemblyBreakpoi
|
||||||
if ( fContext != null ) {
|
if ( fContext != null ) {
|
||||||
PropertyDialogAction action = new PropertyDialogAction( getDisassemblyPart().getSite(), new ISelectionProvider() {
|
PropertyDialogAction action = new PropertyDialogAction( getDisassemblyPart().getSite(), new ISelectionProvider() {
|
||||||
|
|
||||||
|
@Override
|
||||||
public void addSelectionChangedListener( ISelectionChangedListener listener ) {
|
public void addSelectionChangedListener( ISelectionChangedListener listener ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public ISelection getSelection() {
|
public ISelection getSelection() {
|
||||||
return new StructuredSelection( fContext );
|
return new StructuredSelection( fContext );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void removeSelectionChangedListener( ISelectionChangedListener listener ) {
|
public void removeSelectionChangedListener( ISelectionChangedListener listener ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void setSelection( ISelection selection ) {
|
public void setSelection( ISelection selection ) {
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
|
|
@ -28,6 +28,7 @@ import org.eclipse.ui.handlers.HandlerUtil;
|
||||||
*/
|
*/
|
||||||
public class RulerToggleBreakpointHandler extends AbstractHandler {
|
public class RulerToggleBreakpointHandler extends AbstractHandler {
|
||||||
|
|
||||||
|
@Override
|
||||||
public Object execute(ExecutionEvent event) throws ExecutionException {
|
public Object execute(ExecutionEvent event) throws ExecutionException {
|
||||||
IWorkbenchPart part = HandlerUtil.getActivePartChecked(event);
|
IWorkbenchPart part = HandlerUtil.getActivePartChecked(event);
|
||||||
if (part instanceof IDisassemblyPart) {
|
if (part instanceof IDisassemblyPart) {
|
||||||
|
|
|
@ -35,6 +35,7 @@ public class TextOperationAction extends Action implements IUpdate {
|
||||||
*
|
*
|
||||||
* @see Action#firePropertyChange(String, Object, Object)
|
* @see Action#firePropertyChange(String, Object, Object)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void update() {
|
public void update() {
|
||||||
|
|
||||||
boolean wasEnabled= isEnabled();
|
boolean wasEnabled= isEnabled();
|
||||||
|
|
|
@ -28,6 +28,7 @@ public class SourceEditorInput extends StorageEditorInput {
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.ui.IEditorInput#exists()
|
* @see org.eclipse.ui.IEditorInput#exists()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean exists() {
|
public boolean exists() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -263,6 +263,7 @@ public class CSourcePresentationCreator extends PresentationReconciler implement
|
||||||
if (fSourceTagProvider != null) {
|
if (fSourceTagProvider != null) {
|
||||||
if (fSourceTagListener == null) {
|
if (fSourceTagListener == null) {
|
||||||
fSourceTagListener= new ISourceTagListener() {
|
fSourceTagListener= new ISourceTagListener() {
|
||||||
|
@Override
|
||||||
public void sourceTagsChanged(ISourceTagProvider provider) {
|
public void sourceTagsChanged(ISourceTagProvider provider) {
|
||||||
handleSourceTagsChanged();
|
handleSourceTagsChanged();
|
||||||
}};
|
}};
|
||||||
|
@ -280,6 +281,7 @@ public class CSourcePresentationCreator extends PresentationReconciler implement
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.cdt.dsf.debug.internal.ui.disassembly.presentation.ISourcePresentationCreator#dispose()
|
* @see org.eclipse.cdt.dsf.debug.internal.ui.disassembly.presentation.ISourcePresentationCreator#dispose()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void dispose() {
|
public void dispose() {
|
||||||
fViewer= null;
|
fViewer= null;
|
||||||
fPresentation= null;
|
fPresentation= null;
|
||||||
|
@ -303,6 +305,7 @@ public class CSourcePresentationCreator extends PresentationReconciler implement
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.cdt.dsf.debug.internal.ui.disassembly.presentation.ISourcePresentationCreator#getPresentation(org.eclipse.jface.text.IRegion, org.eclipse.jface.text.IDocument)
|
* @see org.eclipse.cdt.dsf.debug.internal.ui.disassembly.presentation.ISourcePresentationCreator#getPresentation(org.eclipse.jface.text.IRegion, org.eclipse.jface.text.IDocument)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public TextPresentation getPresentation(IRegion region, IDocument document) {
|
public TextPresentation getPresentation(IRegion region, IDocument document) {
|
||||||
assert fViewer != null;
|
assert fViewer != null;
|
||||||
if (fViewer == null) {
|
if (fViewer == null) {
|
||||||
|
@ -334,6 +337,7 @@ public class CSourcePresentationCreator extends PresentationReconciler implement
|
||||||
Display display= fViewer.getTextWidget().getDisplay();
|
Display display= fViewer.getTextWidget().getDisplay();
|
||||||
if (display.getThread() != Thread.currentThread()) {
|
if (display.getThread() != Thread.currentThread()) {
|
||||||
display.asyncExec(new Runnable() {
|
display.asyncExec(new Runnable() {
|
||||||
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (fViewer != null) {
|
if (fViewer != null) {
|
||||||
fViewer.invalidateTextPresentation();
|
fViewer.invalidateTextPresentation();
|
||||||
|
@ -375,6 +379,7 @@ public class CSourcePresentationCreator extends PresentationReconciler implement
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
|
* @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void propertyChange(PropertyChangeEvent event) {
|
public void propertyChange(PropertyChangeEvent event) {
|
||||||
if (fSourceViewerConfiguration.affectsBehavior(event)) {
|
if (fSourceViewerConfiguration.affectsBehavior(event)) {
|
||||||
fSourceViewerConfiguration.handlePropertyChangeEvent(event);
|
fSourceViewerConfiguration.handlePropertyChangeEvent(event);
|
||||||
|
|
|
@ -24,18 +24,22 @@ public class CSourceTag implements ISourceTag {
|
||||||
*/
|
*/
|
||||||
public class NullRange implements ISourceRange {
|
public class NullRange implements ISourceRange {
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean contains(int offset) {
|
public boolean contains(int offset) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int getBeginOffset() {
|
public int getBeginOffset() {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int getEndOffset() {
|
public int getEndOffset() {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int compareTo(ISourceRange other) {
|
public int compareTo(ISourceRange other) {
|
||||||
if (this == other) {
|
if (this == other) {
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -59,18 +63,22 @@ public class CSourceTag implements ISourceTag {
|
||||||
fRange= sourceRange;
|
fRange= sourceRange;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean contains(int offset) {
|
public boolean contains(int offset) {
|
||||||
return fRange.getStartPos() <= offset && offset - fRange.getStartPos() < fRange.getLength();
|
return fRange.getStartPos() <= offset && offset - fRange.getStartPos() < fRange.getLength();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int getBeginOffset() {
|
public int getBeginOffset() {
|
||||||
return fRange.getStartPos();
|
return fRange.getStartPos();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int getEndOffset() {
|
public int getEndOffset() {
|
||||||
return fRange.getStartPos() + fRange.getLength() - 1;
|
return fRange.getStartPos() + fRange.getLength() - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int compareTo(ISourceRange other) {
|
public int compareTo(ISourceRange other) {
|
||||||
int delta= this.getBeginOffset() - other.getBeginOffset();
|
int delta= this.getBeginOffset() - other.getBeginOffset();
|
||||||
if (delta == 0) {
|
if (delta == 0) {
|
||||||
|
@ -92,18 +100,22 @@ public class CSourceTag implements ISourceTag {
|
||||||
fRange= sourceRange;
|
fRange= sourceRange;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean contains(int offset) {
|
public boolean contains(int offset) {
|
||||||
return fRange.getIdStartPos() <= offset && offset - fRange.getIdStartPos() < fRange.getIdLength();
|
return fRange.getIdStartPos() <= offset && offset - fRange.getIdStartPos() < fRange.getIdLength();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int getBeginOffset() {
|
public int getBeginOffset() {
|
||||||
return fRange.getIdStartPos();
|
return fRange.getIdStartPos();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int getEndOffset() {
|
public int getEndOffset() {
|
||||||
return fRange.getIdStartPos() + fRange.getIdLength() - 1;
|
return fRange.getIdStartPos() + fRange.getIdLength() - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int compareTo(ISourceRange other) {
|
public int compareTo(ISourceRange other) {
|
||||||
int delta= this.getBeginOffset() - other.getBeginOffset();
|
int delta= this.getBeginOffset() - other.getBeginOffset();
|
||||||
if (delta == 0) {
|
if (delta == 0) {
|
||||||
|
@ -128,6 +140,7 @@ public class CSourceTag implements ISourceTag {
|
||||||
fType= elementType;
|
fType= elementType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public ISourceRange getFullRange() {
|
public ISourceRange getFullRange() {
|
||||||
try {
|
try {
|
||||||
return new CSourceRange(fReference.getSourceRange());
|
return new CSourceRange(fReference.getSourceRange());
|
||||||
|
@ -136,14 +149,17 @@ public class CSourceTag implements ISourceTag {
|
||||||
return new NullRange();
|
return new NullRange();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return ((ICElement)fReference).getElementName();
|
return ((ICElement)fReference).getElementName();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getQualifiedName() {
|
public String getQualifiedName() {
|
||||||
return getName();
|
return getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public ISourceRange getRangeOfIdentifier() {
|
public ISourceRange getRangeOfIdentifier() {
|
||||||
try {
|
try {
|
||||||
return new CIdentifierRange(fReference.getSourceRange());
|
return new CIdentifierRange(fReference.getSourceRange());
|
||||||
|
@ -152,10 +168,12 @@ public class CSourceTag implements ISourceTag {
|
||||||
return new NullRange();
|
return new NullRange();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public long getSnapshotTime() {
|
public long getSnapshotTime() {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int getStyleCode() {
|
public int getStyleCode() {
|
||||||
switch (fType) {
|
switch (fType) {
|
||||||
case ICElement.C_METHOD :
|
case ICElement.C_METHOD :
|
||||||
|
|
|
@ -36,19 +36,23 @@ public class CSourceTagProvider implements ISourceTagProvider {
|
||||||
fUnit= unit;
|
fUnit= unit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void addSourceTagListener(ISourceTagListener listener) {
|
public void addSourceTagListener(ISourceTagListener listener) {
|
||||||
fListenerList.add(listener);
|
fListenerList.add(listener);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int[] getActiveCodePositions() {
|
public int[] getActiveCodePositions() {
|
||||||
// unsupported
|
// unsupported
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public long getSnapshotTime() {
|
public long getSnapshotTime() {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void getSourceTags(Collection<ISourceTag> target) {
|
public void getSourceTags(Collection<ISourceTag> target) {
|
||||||
try {
|
try {
|
||||||
convertToSourceTags(fUnit.getChildren(), target);
|
convertToSourceTags(fUnit.getChildren(), target);
|
||||||
|
@ -88,6 +92,7 @@ public class CSourceTagProvider implements ISourceTagProvider {
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.cdt.dsf.debug.internal.ui.disassembly.presentation.ISourceTagProvider#removeSourceTagListener(org.eclipse.cdt.dsf.debug.internal.ui.disassembly.presentation.ISourceTagListener)
|
* @see org.eclipse.cdt.dsf.debug.internal.ui.disassembly.presentation.ISourceTagProvider#removeSourceTagListener(org.eclipse.cdt.dsf.debug.internal.ui.disassembly.presentation.ISourceTagListener)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void removeSourceTagListener(ISourceTagListener listener) {
|
public void removeSourceTagListener(ISourceTagListener listener) {
|
||||||
fListenerList.remove(listener);
|
fListenerList.remove(listener);
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,6 +64,7 @@ public class DisassemblyIPAnnotation extends Annotation implements IAnnotationPr
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.jface.text.source.IAnnotationPresentation#getLayer()
|
* @see org.eclipse.jface.text.source.IAnnotationPresentation#getLayer()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public int getLayer() {
|
public int getLayer() {
|
||||||
return 5;
|
return 5;
|
||||||
}
|
}
|
||||||
|
@ -71,6 +72,7 @@ public class DisassemblyIPAnnotation extends Annotation implements IAnnotationPr
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.jface.text.source.IAnnotationPresentation#paint(org.eclipse.swt.graphics.GC, org.eclipse.swt.widgets.Canvas, org.eclipse.swt.graphics.Rectangle)
|
* @see org.eclipse.jface.text.source.IAnnotationPresentation#paint(org.eclipse.swt.graphics.GC, org.eclipse.swt.widgets.Canvas, org.eclipse.swt.graphics.Rectangle)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void paint(GC gc, Canvas canvas, Rectangle bounds) {
|
public void paint(GC gc, Canvas canvas, Rectangle bounds) {
|
||||||
Rectangle imageBounds = fImage.getBounds();
|
Rectangle imageBounds = fImage.getBounds();
|
||||||
gc.drawImage(fImage, bounds.x + (bounds.width - imageBounds.width) / 2 , bounds.y + (bounds.height - imageBounds.height) / 2);
|
gc.drawImage(fImage, bounds.x + (bounds.width - imageBounds.width) / 2 , bounds.y + (bounds.height - imageBounds.height) / 2);
|
||||||
|
|
|
@ -325,11 +325,13 @@ public class SourceTagDamagerRepairer extends DefaultDamagerRepairer implements
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void sourceTagsChanged(ISourceTagProvider sourceTagProvider) {
|
public void sourceTagsChanged(ISourceTagProvider sourceTagProvider) {
|
||||||
fSourceTags.clear();
|
fSourceTags.clear();
|
||||||
if (sourceTagProvider != null) {
|
if (sourceTagProvider != null) {
|
||||||
sourceTagProvider.getSourceTags(fSourceTags);
|
sourceTagProvider.getSourceTags(fSourceTags);
|
||||||
Collections.sort(fSourceTags, new Comparator<Object>() {
|
Collections.sort(fSourceTags, new Comparator<Object>() {
|
||||||
|
@Override
|
||||||
public int compare(Object o1, Object o2) {
|
public int compare(Object o1, Object o2) {
|
||||||
ISourceRange sr1 = ((ISourceTag)o1).getRangeOfIdentifier();
|
ISourceRange sr1 = ((ISourceTag)o1).getRangeOfIdentifier();
|
||||||
ISourceRange sr2 = ((ISourceTag)o2).getRangeOfIdentifier();
|
ISourceRange sr2 = ((ISourceTag)o2).getRangeOfIdentifier();
|
||||||
|
|
|
@ -100,6 +100,7 @@ public class DisassemblySelection implements IDisassemblySelection {
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.jface.viewers.ISelection#isEmpty()
|
* @see org.eclipse.jface.viewers.ISelection#isEmpty()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isEmpty() {
|
public boolean isEmpty() {
|
||||||
return fTextSelection.isEmpty();
|
return fTextSelection.isEmpty();
|
||||||
}
|
}
|
||||||
|
@ -107,6 +108,7 @@ public class DisassemblySelection implements IDisassemblySelection {
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.jface.text.ITextSelection#getEndLine()
|
* @see org.eclipse.jface.text.ITextSelection#getEndLine()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public int getEndLine() {
|
public int getEndLine() {
|
||||||
return fTextSelection.getEndLine();
|
return fTextSelection.getEndLine();
|
||||||
}
|
}
|
||||||
|
@ -114,6 +116,7 @@ public class DisassemblySelection implements IDisassemblySelection {
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.jface.text.ITextSelection#getLength()
|
* @see org.eclipse.jface.text.ITextSelection#getLength()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public int getLength() {
|
public int getLength() {
|
||||||
return fTextSelection.getLength();
|
return fTextSelection.getLength();
|
||||||
}
|
}
|
||||||
|
@ -121,6 +124,7 @@ public class DisassemblySelection implements IDisassemblySelection {
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.jface.text.ITextSelection#getOffset()
|
* @see org.eclipse.jface.text.ITextSelection#getOffset()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public int getOffset() {
|
public int getOffset() {
|
||||||
return fTextSelection.getOffset();
|
return fTextSelection.getOffset();
|
||||||
}
|
}
|
||||||
|
@ -128,6 +132,7 @@ public class DisassemblySelection implements IDisassemblySelection {
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.jface.text.ITextSelection#getStartLine()
|
* @see org.eclipse.jface.text.ITextSelection#getStartLine()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public int getStartLine() {
|
public int getStartLine() {
|
||||||
return fTextSelection.getStartLine();
|
return fTextSelection.getStartLine();
|
||||||
}
|
}
|
||||||
|
@ -135,6 +140,7 @@ public class DisassemblySelection implements IDisassemblySelection {
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.jface.text.ITextSelection#getText()
|
* @see org.eclipse.jface.text.ITextSelection#getText()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getText() {
|
public String getText() {
|
||||||
return fTextSelection.getText();
|
return fTextSelection.getText();
|
||||||
}
|
}
|
||||||
|
@ -142,6 +148,7 @@ public class DisassemblySelection implements IDisassemblySelection {
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.cdt.dsf.debug.internal.ui.disassembly.provisional.IDisassemblySelection#getSourceFile()
|
* @see org.eclipse.cdt.dsf.debug.internal.ui.disassembly.provisional.IDisassemblySelection#getSourceFile()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IFile getSourceFile() {
|
public IFile getSourceFile() {
|
||||||
if (fSourceFile != null) {
|
if (fSourceFile != null) {
|
||||||
IResource resource = (IResource) fSourceFile.getAdapter(IResource.class);
|
IResource resource = (IResource) fSourceFile.getAdapter(IResource.class);
|
||||||
|
@ -155,6 +162,7 @@ public class DisassemblySelection implements IDisassemblySelection {
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.cdt.dsf.debug.internal.ui.disassembly.provisional.IDisassemblySelection#getSourceLine()
|
* @see org.eclipse.cdt.dsf.debug.internal.ui.disassembly.provisional.IDisassemblySelection#getSourceLine()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public int getSourceLine() {
|
public int getSourceLine() {
|
||||||
if (fSourceFile != null) {
|
if (fSourceFile != null) {
|
||||||
return fSourceLine;
|
return fSourceLine;
|
||||||
|
@ -165,6 +173,7 @@ public class DisassemblySelection implements IDisassemblySelection {
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.cdt.dsf.debug.internal.ui.disassembly.provisional.IDisassemblySelection#getSourceLocationURI()
|
* @see org.eclipse.cdt.dsf.debug.internal.ui.disassembly.provisional.IDisassemblySelection#getSourceLocationURI()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public URI getSourceLocationURI() {
|
public URI getSourceLocationURI() {
|
||||||
if (fSourceFile != null) {
|
if (fSourceFile != null) {
|
||||||
IResource resource = (IResource) fSourceFile.getAdapter(IResource.class);
|
IResource resource = (IResource) fSourceFile.getAdapter(IResource.class);
|
||||||
|
@ -183,6 +192,7 @@ public class DisassemblySelection implements IDisassemblySelection {
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.cdt.dsf.debug.internal.ui.disassembly.provisional.IDisassemblySelection#getStartAddress()
|
* @see org.eclipse.cdt.dsf.debug.internal.ui.disassembly.provisional.IDisassemblySelection#getStartAddress()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IAddress getStartAddress() {
|
public IAddress getStartAddress() {
|
||||||
return fStartAddress;
|
return fStartAddress;
|
||||||
}
|
}
|
||||||
|
@ -190,6 +200,7 @@ public class DisassemblySelection implements IDisassemblySelection {
|
||||||
/**
|
/**
|
||||||
* @since 2.2
|
* @since 2.2
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getLabel() {
|
public String getLabel() {
|
||||||
return fLabel;
|
return fLabel;
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,6 +35,7 @@ public final class REDFileRider implements IFileRider {
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.cdt.dsf.debug.internal.ui.disassembly.text.IFileRider#seek(int)
|
* @see org.eclipse.cdt.dsf.debug.internal.ui.disassembly.text.IFileRider#seek(int)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void seek(int pos) throws IOException {
|
public void seek(int pos) throws IOException {
|
||||||
fFile.seek(pos);
|
fFile.seek(pos);
|
||||||
fEof = false;
|
fEof = false;
|
||||||
|
@ -86,62 +87,75 @@ public final class REDFileRider implements IFileRider {
|
||||||
return fFile;
|
return fFile;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void writeChar(char c) throws IOException {
|
public void writeChar(char c) throws IOException {
|
||||||
fOneCharBuf[0] = c;
|
fOneCharBuf[0] = c;
|
||||||
writeChars(fOneCharBuf, 0, 1);
|
writeChars(fOneCharBuf, 0, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void writeChars(char[] buf) throws IOException {
|
public void writeChars(char[] buf) throws IOException {
|
||||||
writeChars(buf, 0, buf.length);
|
writeChars(buf, 0, buf.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void writeChars(char[] buf, int n) throws IOException {
|
public void writeChars(char[] buf, int n) throws IOException {
|
||||||
writeChars(buf, 0, n);
|
writeChars(buf, 0, n);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void writeChars(char[] buf, int off, int n) throws IOException {
|
public void writeChars(char[] buf, int off, int n) throws IOException {
|
||||||
fFile.writeBuffered(buf, off, n);
|
fFile.writeBuffered(buf, off, n);
|
||||||
fResult = 0;
|
fResult = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void writeChars(String buf, int off, int n) throws IOException {
|
public void writeChars(String buf, int off, int n) throws IOException {
|
||||||
fFile.writeBuffered(buf, off, n);
|
fFile.writeBuffered(buf, off, n);
|
||||||
fResult = 0;
|
fResult = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public char readChar() throws IOException {
|
public char readChar() throws IOException {
|
||||||
readChars(fOneCharBuf, 0, 1);
|
readChars(fOneCharBuf, 0, 1);
|
||||||
return fEof ? '\0' : fOneCharBuf[0];
|
return fEof ? '\0' : fOneCharBuf[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void readChars(char[] buf) throws IOException {
|
public void readChars(char[] buf) throws IOException {
|
||||||
readChars(buf, 0, buf.length);
|
readChars(buf, 0, buf.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void readChars(char[] buf, int n) throws IOException {
|
public void readChars(char[] buf, int n) throws IOException {
|
||||||
readChars(buf, 0, n);
|
readChars(buf, 0, n);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void readChars(char[] buf, int off, int n) throws IOException {
|
public void readChars(char[] buf, int off, int n) throws IOException {
|
||||||
int count = fFile.readBuffered(buf, off, n);
|
int count = fFile.readBuffered(buf, off, n);
|
||||||
fResult = n-count;
|
fResult = n-count;
|
||||||
fEof = fResult > 0;
|
fEof = fResult > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void readChars(StringBuffer buf, int n) throws IOException {
|
public void readChars(StringBuffer buf, int n) throws IOException {
|
||||||
int count = fFile.readBuffered(buf, n);
|
int count = fFile.readBuffered(buf, n);
|
||||||
fResult = n-count;
|
fResult = n-count;
|
||||||
fEof = fResult > 0;
|
fEof = fResult > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int length() {
|
public int length() {
|
||||||
return fFile.length();
|
return fFile.length();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int limit() {
|
public int limit() {
|
||||||
return fLimit;
|
return fLimit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isReadonly() {
|
public boolean isReadonly() {
|
||||||
return fFile.isReadonly();
|
return fFile.isReadonly();
|
||||||
}
|
}
|
||||||
|
|
|
@ -124,6 +124,7 @@ public class REDRun implements CharSequence {
|
||||||
/*
|
/*
|
||||||
* @see java.lang.CharSequence#charAt(int)
|
* @see java.lang.CharSequence#charAt(int)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public char charAt(int pos) {
|
public char charAt(int pos) {
|
||||||
try {
|
try {
|
||||||
fRider.seek(fOffset + pos);
|
fRider.seek(fOffset + pos);
|
||||||
|
@ -136,6 +137,7 @@ public class REDRun implements CharSequence {
|
||||||
/*
|
/*
|
||||||
* @see java.lang.CharSequence#subSequence(int, int)
|
* @see java.lang.CharSequence#subSequence(int, int)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public CharSequence subSequence(int start, int end) {
|
public CharSequence subSequence(int start, int end) {
|
||||||
return new REDRun(fRider, fOffset + start, end - start);
|
return new REDRun(fRider, fOffset + start, end - start);
|
||||||
}
|
}
|
||||||
|
@ -143,6 +145,7 @@ public class REDRun implements CharSequence {
|
||||||
/*
|
/*
|
||||||
* @see java.lang.CharSequence#length()
|
* @see java.lang.CharSequence#length()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public int length() {
|
public int length() {
|
||||||
return fLength;
|
return fLength;
|
||||||
}
|
}
|
||||||
|
|
|
@ -157,6 +157,7 @@ public final class REDTextStore implements ITextStore {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.jface.text.ITextStore#get(int)
|
* @see org.eclipse.jface.text.ITextStore#get(int)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public char get(int offset) {
|
public char get(int offset) {
|
||||||
synchronized (fRunSpec) {
|
synchronized (fRunSpec) {
|
||||||
RunSpec spec = findNextRun(offset, null);
|
RunSpec spec = findNextRun(offset, null);
|
||||||
|
@ -170,6 +171,7 @@ public final class REDTextStore implements ITextStore {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.jface.text.ITextStore#get(int, int)
|
* @see org.eclipse.jface.text.ITextStore#get(int, int)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String get(int offset, int length) {
|
public String get(int offset, int length) {
|
||||||
synchronized (fRunSpec) {
|
synchronized (fRunSpec) {
|
||||||
// special case: long in-memory text in full length (about to be swapped)
|
// special case: long in-memory text in full length (about to be swapped)
|
||||||
|
@ -184,6 +186,7 @@ public final class REDTextStore implements ITextStore {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.jface.text.ITextStore#getLength()
|
* @see org.eclipse.jface.text.ITextStore#getLength()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public int getLength() {
|
public int getLength() {
|
||||||
synchronized (fRunSpec) {
|
synchronized (fRunSpec) {
|
||||||
return fLength;
|
return fLength;
|
||||||
|
@ -193,6 +196,7 @@ public final class REDTextStore implements ITextStore {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.jface.text.ITextStore#set(java.lang.String)
|
* @see org.eclipse.jface.text.ITextStore#set(java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void set(String text) {
|
public void set(String text) {
|
||||||
synchronized (fRunSpec) {
|
synchronized (fRunSpec) {
|
||||||
dispose();
|
dispose();
|
||||||
|
@ -210,6 +214,7 @@ public final class REDTextStore implements ITextStore {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.jface.text.ITextStore#replace(int, int, java.lang.String)
|
* @see org.eclipse.jface.text.ITextStore#replace(int, int, java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void replace(int offset, int length, String text) {
|
public void replace(int offset, int length, String text) {
|
||||||
synchronized (fRunSpec) {
|
synchronized (fRunSpec) {
|
||||||
if (text == null || text.length() == 0) {
|
if (text == null || text.length() == 0) {
|
||||||
|
|
|
@ -31,46 +31,57 @@ public class StringRider implements IFileRider {
|
||||||
fBuffer = buffer;
|
fBuffer = buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void seek(int pos) throws IOException {
|
public void seek(int pos) throws IOException {
|
||||||
fBuffer.position(pos);
|
fBuffer.position(pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void writeChar(char c) throws IOException {
|
public void writeChar(char c) throws IOException {
|
||||||
fBuffer.put(c);
|
fBuffer.put(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void writeChars(char[] buf) throws IOException {
|
public void writeChars(char[] buf) throws IOException {
|
||||||
fBuffer.put(buf);
|
fBuffer.put(buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void writeChars(char[] buf, int n) throws IOException {
|
public void writeChars(char[] buf, int n) throws IOException {
|
||||||
fBuffer.put(buf, 0, n);
|
fBuffer.put(buf, 0, n);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void writeChars(char[] buf, int off, int n) throws IOException {
|
public void writeChars(char[] buf, int off, int n) throws IOException {
|
||||||
fBuffer.put(buf, off, n);
|
fBuffer.put(buf, off, n);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void writeChars(String buf, int off, int n) throws IOException {
|
public void writeChars(String buf, int off, int n) throws IOException {
|
||||||
fBuffer.put(buf, off, off+n);
|
fBuffer.put(buf, off, off+n);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public char readChar() throws IOException {
|
public char readChar() throws IOException {
|
||||||
return fBuffer.get();
|
return fBuffer.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void readChars(char[] buf) throws IOException {
|
public void readChars(char[] buf) throws IOException {
|
||||||
fBuffer.get(buf, 0, buf.length);
|
fBuffer.get(buf, 0, buf.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void readChars(char[] buf, int n) throws IOException {
|
public void readChars(char[] buf, int n) throws IOException {
|
||||||
fBuffer.get(buf, 0, n);
|
fBuffer.get(buf, 0, n);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void readChars(char[] buf, int off, int n) throws IOException {
|
public void readChars(char[] buf, int off, int n) throws IOException {
|
||||||
fBuffer.get(buf, off, n);
|
fBuffer.get(buf, off, n);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void readChars(StringBuffer buf, int n) throws IOException {
|
public void readChars(StringBuffer buf, int n) throws IOException {
|
||||||
int pos = fBuffer.position();
|
int pos = fBuffer.position();
|
||||||
if (fBuffer.hasArray()) {
|
if (fBuffer.hasArray()) {
|
||||||
|
@ -85,14 +96,17 @@ public class StringRider implements IFileRider {
|
||||||
fBuffer.position(pos + n);
|
fBuffer.position(pos + n);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int length() {
|
public int length() {
|
||||||
return fBuffer.length();
|
return fBuffer.length();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int limit() {
|
public int limit() {
|
||||||
return fBuffer.limit();
|
return fBuffer.limit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isReadonly() {
|
public boolean isReadonly() {
|
||||||
return fBuffer.isReadOnly();
|
return fBuffer.isReadOnly();
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,6 +31,7 @@ public class StringTextStore implements ITextStore {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.jface.text.ITextStore#get(int)
|
* @see org.eclipse.jface.text.ITextStore#get(int)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public char get(int offset) {
|
public char get(int offset) {
|
||||||
return fText.charAt(offset);
|
return fText.charAt(offset);
|
||||||
}
|
}
|
||||||
|
@ -38,6 +39,7 @@ public class StringTextStore implements ITextStore {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.jface.text.ITextStore#get(int, int)
|
* @see org.eclipse.jface.text.ITextStore#get(int, int)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String get(int offset, int length) {
|
public String get(int offset, int length) {
|
||||||
if (length == fText.length()) {
|
if (length == fText.length()) {
|
||||||
return fText;
|
return fText;
|
||||||
|
@ -48,6 +50,7 @@ public class StringTextStore implements ITextStore {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.jface.text.ITextStore#getLength()
|
* @see org.eclipse.jface.text.ITextStore#getLength()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public int getLength() {
|
public int getLength() {
|
||||||
return fText.length();
|
return fText.length();
|
||||||
}
|
}
|
||||||
|
@ -55,6 +58,7 @@ public class StringTextStore implements ITextStore {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.jface.text.ITextStore#replace(int, int, java.lang.String)
|
* @see org.eclipse.jface.text.ITextStore#replace(int, int, java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void replace(int offset, int length, String text) {
|
public void replace(int offset, int length, String text) {
|
||||||
// unmodifiable
|
// unmodifiable
|
||||||
throw new UnsupportedOperationException();
|
throw new UnsupportedOperationException();
|
||||||
|
@ -63,6 +67,7 @@ public class StringTextStore implements ITextStore {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.jface.text.ITextStore#set(java.lang.String)
|
* @see org.eclipse.jface.text.ITextStore#set(java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void set(String text) {
|
public void set(String text) {
|
||||||
fText = text != null ? text : ""; //$NON-NLS-1$
|
fText = text != null ? text : ""; //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,6 +37,7 @@ abstract public class StorageEditorInput implements IStorageEditorInput {
|
||||||
/**
|
/**
|
||||||
* @see IStorageEditorInput#getStorage()
|
* @see IStorageEditorInput#getStorage()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IStorage getStorage() {
|
public IStorage getStorage() {
|
||||||
return fStorage;
|
return fStorage;
|
||||||
}
|
}
|
||||||
|
@ -53,6 +54,7 @@ abstract public class StorageEditorInput implements IStorageEditorInput {
|
||||||
/**
|
/**
|
||||||
* @see IEditorInput#getImageDescriptor()
|
* @see IEditorInput#getImageDescriptor()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ImageDescriptor getImageDescriptor() {
|
public ImageDescriptor getImageDescriptor() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -60,6 +62,7 @@ abstract public class StorageEditorInput implements IStorageEditorInput {
|
||||||
/**
|
/**
|
||||||
* @see IEditorInput#getName()
|
* @see IEditorInput#getName()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return getStorage().getName();
|
return getStorage().getName();
|
||||||
}
|
}
|
||||||
|
@ -67,6 +70,7 @@ abstract public class StorageEditorInput implements IStorageEditorInput {
|
||||||
/**
|
/**
|
||||||
* @see IEditorInput#getPersistable()
|
* @see IEditorInput#getPersistable()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IPersistableElement getPersistable() {
|
public IPersistableElement getPersistable() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -74,6 +78,7 @@ abstract public class StorageEditorInput implements IStorageEditorInput {
|
||||||
/**
|
/**
|
||||||
* @see IEditorInput#getToolTipText()
|
* @see IEditorInput#getToolTipText()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getToolTipText() {
|
public String getToolTipText() {
|
||||||
return getStorage().getFullPath().toOSString();
|
return getStorage().getFullPath().toOSString();
|
||||||
}
|
}
|
||||||
|
@ -102,6 +107,7 @@ abstract public class StorageEditorInput implements IStorageEditorInput {
|
||||||
return getStorage().hashCode();
|
return getStorage().hashCode();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
@SuppressWarnings("rawtypes")
|
@SuppressWarnings("rawtypes")
|
||||||
public Object getAdapter(Class adapter) {
|
public Object getAdapter(Class adapter) {
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -44,6 +44,7 @@ public class DsfDebugPreferencePage extends FieldEditorPreferencePage implements
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
|
* @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void init(IWorkbench workbench) {
|
public void init(IWorkbench workbench) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -117,6 +117,7 @@ public class DsfCastToTypeSupport {
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.debug.core.model.ICastToType#canCast()
|
* @see org.eclipse.cdt.debug.core.model.ICastToType#canCast()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean canCast() {
|
public boolean canCast() {
|
||||||
return isValid();
|
return isValid();
|
||||||
}
|
}
|
||||||
|
@ -125,6 +126,7 @@ public class DsfCastToTypeSupport {
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.debug.core.model.ICastToType#getCurrentType()
|
* @see org.eclipse.cdt.debug.core.model.ICastToType#getCurrentType()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getCurrentType() {
|
public String getCurrentType() {
|
||||||
// get expected casted type first, if possible (if there's an error in the type,
|
// get expected casted type first, if possible (if there's an error in the type,
|
||||||
// the expression might not evaluate successfully)
|
// the expression might not evaluate successfully)
|
||||||
|
@ -144,6 +146,7 @@ public class DsfCastToTypeSupport {
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.debug.core.model.ICastToType#cast(java.lang.String)
|
* @see org.eclipse.cdt.debug.core.model.ICastToType#cast(java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void cast(String type) throws DebugException {
|
public void cast(String type) throws DebugException {
|
||||||
throwIfNotValid();
|
throwIfNotValid();
|
||||||
|
|
||||||
|
@ -159,6 +162,7 @@ public class DsfCastToTypeSupport {
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.debug.core.model.ICastToType#restoreOriginal()
|
* @see org.eclipse.cdt.debug.core.model.ICastToType#restoreOriginal()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void restoreOriginal() throws DebugException {
|
public void restoreOriginal() throws DebugException {
|
||||||
throwIfNotValid();
|
throwIfNotValid();
|
||||||
fCastedExpressionStorage.remove(memento);
|
fCastedExpressionStorage.remove(memento);
|
||||||
|
@ -169,6 +173,7 @@ public class DsfCastToTypeSupport {
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.debug.core.model.ICastToType#isCasted()
|
* @see org.eclipse.cdt.debug.core.model.ICastToType#isCasted()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isCasted() {
|
public boolean isCasted() {
|
||||||
if (isValid())
|
if (isValid())
|
||||||
return fCastedExpressionStorage.containsKey(memento);
|
return fCastedExpressionStorage.containsKey(memento);
|
||||||
|
@ -180,6 +185,7 @@ public class DsfCastToTypeSupport {
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.debug.core.model.ICastToArray#canCastToArray()
|
* @see org.eclipse.cdt.debug.core.model.ICastToArray#canCastToArray()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean canCastToArray() {
|
public boolean canCastToArray() {
|
||||||
return isValid();
|
return isValid();
|
||||||
}
|
}
|
||||||
|
@ -188,6 +194,7 @@ public class DsfCastToTypeSupport {
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.debug.core.model.ICastToArray#castToArray(int, int)
|
* @see org.eclipse.cdt.debug.core.model.ICastToArray#castToArray(int, int)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void castToArray(int startIndex, int length)
|
public void castToArray(int startIndex, int length)
|
||||||
throws DebugException {
|
throws DebugException {
|
||||||
throwIfNotValid();
|
throwIfNotValid();
|
||||||
|
|
|
@ -67,6 +67,7 @@ public class DsfViewMemoryHandler extends AbstractHandler {
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
* @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
|
* @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public Object execute(ExecutionEvent event) throws ExecutionException {
|
public Object execute(ExecutionEvent event) throws ExecutionException {
|
||||||
ISelection selection = HandlerUtil.getCurrentSelection(event);
|
ISelection selection = HandlerUtil.getCurrentSelection(event);
|
||||||
if (selection instanceof IStructuredSelection) {
|
if (selection instanceof IStructuredSelection) {
|
||||||
|
@ -184,6 +185,7 @@ public class DsfViewMemoryHandler extends AbstractHandler {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
executor.execute(new DsfRunnable() {
|
executor.execute(new DsfRunnable() {
|
||||||
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
DsfServicesTracker tracker = new DsfServicesTracker(DsfUIPlugin.getBundleContext(), session.getId());
|
DsfServicesTracker tracker = new DsfServicesTracker(DsfUIPlugin.getBundleContext(), session.getId());
|
||||||
IExpressions service = tracker.getService(IExpressions.class);
|
IExpressions service = tracker.getService(IExpressions.class);
|
||||||
|
|
|
@ -25,7 +25,8 @@ import org.eclipse.ui.IViewPart;
|
||||||
*/
|
*/
|
||||||
public class RefreshActionDelegate extends AbstractVMProviderActionDelegate {
|
public class RefreshActionDelegate extends AbstractVMProviderActionDelegate {
|
||||||
|
|
||||||
public void run(IAction action) {
|
@Override
|
||||||
|
public void run(IAction action) {
|
||||||
IVMProvider provider = VMHandlerUtils.getVMProviderForPart(getView());
|
IVMProvider provider = VMHandlerUtils.getVMProviderForPart(getView());
|
||||||
if (provider instanceof ICachingVMProvider) {
|
if (provider instanceof ICachingVMProvider) {
|
||||||
((ICachingVMProvider)provider).refresh();
|
((ICachingVMProvider)provider).refresh();
|
||||||
|
|
|
@ -19,7 +19,8 @@ import org.eclipse.core.commands.ExecutionException;
|
||||||
|
|
||||||
public class RefreshHandler extends AbstractHandler {
|
public class RefreshHandler extends AbstractHandler {
|
||||||
|
|
||||||
public Object execute(ExecutionEvent event) throws ExecutionException {
|
@Override
|
||||||
|
public Object execute(ExecutionEvent event) throws ExecutionException {
|
||||||
IVMProvider vmProvider = VMHandlerUtils.getActiveVMProvider(event);
|
IVMProvider vmProvider = VMHandlerUtils.getActiveVMProvider(event);
|
||||||
|
|
||||||
if (vmProvider instanceof ICachingVMProvider) {
|
if (vmProvider instanceof ICachingVMProvider) {
|
||||||
|
|
|
@ -44,7 +44,8 @@ abstract public class RetargetDebugContextAction implements IWorkbenchWindowActi
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.ui.IWorkbenchWindowActionDelegate#init(org.eclipse.ui.IWorkbenchWindow)
|
* @see org.eclipse.ui.IWorkbenchWindowActionDelegate#init(org.eclipse.ui.IWorkbenchWindow)
|
||||||
*/
|
*/
|
||||||
public void init(IWorkbenchWindow window) {
|
@Override
|
||||||
|
public void init(IWorkbenchWindow window) {
|
||||||
fWindow = window;
|
fWindow = window;
|
||||||
IDebugContextService debugContextService = DebugUITools.getDebugContextManager().getContextService(fWindow);
|
IDebugContextService debugContextService = DebugUITools.getDebugContextManager().getContextService(fWindow);
|
||||||
debugContextService.addPostDebugContextListener(this);
|
debugContextService.addPostDebugContextListener(this);
|
||||||
|
@ -53,18 +54,21 @@ abstract public class RetargetDebugContextAction implements IWorkbenchWindowActi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void selectionChanged(IAction action, ISelection selection) {
|
@Override
|
||||||
|
public void selectionChanged(IAction action, ISelection selection) {
|
||||||
if (fAction != action) {
|
if (fAction != action) {
|
||||||
fAction = action;
|
fAction = action;
|
||||||
}
|
}
|
||||||
// Update on debug context changed events
|
// Update on debug context changed events
|
||||||
}
|
}
|
||||||
|
|
||||||
public void runWithEvent(IAction action, Event event) {
|
@Override
|
||||||
|
public void runWithEvent(IAction action, Event event) {
|
||||||
run(action);
|
run(action);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void run(IAction action) {
|
@Override
|
||||||
|
public void run(IAction action) {
|
||||||
if (fTargetAdapter != null) {
|
if (fTargetAdapter != null) {
|
||||||
try {
|
try {
|
||||||
performAction(fTargetAdapter, fDebugContext);
|
performAction(fTargetAdapter, fDebugContext);
|
||||||
|
@ -100,7 +104,8 @@ abstract public class RetargetDebugContextAction implements IWorkbenchWindowActi
|
||||||
*/
|
*/
|
||||||
protected abstract Class<?> getAdapterClass();
|
protected abstract Class<?> getAdapterClass();
|
||||||
|
|
||||||
public void init(IAction action) {
|
@Override
|
||||||
|
public void init(IAction action) {
|
||||||
fAction = action;
|
fAction = action;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -128,12 +133,14 @@ abstract public class RetargetDebugContextAction implements IWorkbenchWindowActi
|
||||||
fAction.setEnabled(false);
|
fAction.setEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void dispose() {
|
@Override
|
||||||
|
public void dispose() {
|
||||||
DebugUITools.getDebugContextManager().getContextService(fWindow).removePostDebugContextListener(this);
|
DebugUITools.getDebugContextManager().getContextService(fWindow).removePostDebugContextListener(this);
|
||||||
fTargetAdapter = null;
|
fTargetAdapter = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void debugContextChanged(DebugContextEvent event) {
|
@Override
|
||||||
|
public void debugContextChanged(DebugContextEvent event) {
|
||||||
fDebugContext = event.getContext();
|
fDebugContext = event.getContext();
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,7 +104,8 @@ public class UpdatePoliciesContribution extends CompoundContributionItem impleme
|
||||||
return items;
|
return items;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void initialize(IServiceLocator serviceLocator) {
|
@Override
|
||||||
|
public void initialize(IServiceLocator serviceLocator) {
|
||||||
fServiceLocator = serviceLocator;
|
fServiceLocator = serviceLocator;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,8 @@ public class UpdatePoliciesPropertyTester extends PropertyTester {
|
||||||
private static final String AVAILABLE = "isUpdatePolicyAvailable"; //$NON-NLS-1$
|
private static final String AVAILABLE = "isUpdatePolicyAvailable"; //$NON-NLS-1$
|
||||||
private static final String ACTIVE = "isUpdatePolicyActive"; //$NON-NLS-1$
|
private static final String ACTIVE = "isUpdatePolicyActive"; //$NON-NLS-1$
|
||||||
|
|
||||||
public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
|
@Override
|
||||||
|
public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
|
||||||
if (receiver instanceof IVMContext) {
|
if (receiver instanceof IVMContext) {
|
||||||
IVMProvider provider = ((IVMContext)receiver).getVMNode().getVMProvider();
|
IVMProvider provider = ((IVMContext)receiver).getVMNode().getVMProvider();
|
||||||
if (provider instanceof ICachingVMProvider) {
|
if (provider instanceof ICachingVMProvider) {
|
||||||
|
|
|
@ -54,6 +54,7 @@ public class DetailPaneMaxLengthDialog extends TrayDialog {
|
||||||
setShellStyle(getShellStyle() | SWT.RESIZE);
|
setShellStyle(getShellStyle() | SWT.RESIZE);
|
||||||
fValue = Integer.toString(DsfUIPlugin.getDefault().getPreferenceStore().getInt(IDebugUIConstants.PREF_MAX_DETAIL_LENGTH));
|
fValue = Integer.toString(DsfUIPlugin.getDefault().getPreferenceStore().getInt(IDebugUIConstants.PREF_MAX_DETAIL_LENGTH));
|
||||||
fValidator = new IInputValidator() {
|
fValidator = new IInputValidator() {
|
||||||
|
@Override
|
||||||
public String isValid(String newText) {
|
public String isValid(String newText) {
|
||||||
try {
|
try {
|
||||||
int num = Integer.parseInt(newText);
|
int num = Integer.parseInt(newText);
|
||||||
|
@ -109,7 +110,8 @@ public class DetailPaneMaxLengthDialog extends TrayDialog {
|
||||||
fTextWidget.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL));
|
fTextWidget.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL));
|
||||||
fTextWidget.setText(fValue);
|
fTextWidget.setText(fValue);
|
||||||
fTextWidget.addModifyListener(new ModifyListener() {
|
fTextWidget.addModifyListener(new ModifyListener() {
|
||||||
public void modifyText(ModifyEvent e) {
|
@Override
|
||||||
|
public void modifyText(ModifyEvent e) {
|
||||||
validateInput();
|
validateInput();
|
||||||
fValue = fTextWidget.getText();
|
fValue = fTextWidget.getText();
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,7 +49,8 @@ public class TextViewerAction extends Action implements IUpdate {
|
||||||
*
|
*
|
||||||
* @see org.eclipse.jface.action.Action#firePropertyChange(String, Object, Object)
|
* @see org.eclipse.jface.action.Action#firePropertyChange(String, Object, Object)
|
||||||
*/
|
*/
|
||||||
public void update() {
|
@Override
|
||||||
|
public void update() {
|
||||||
|
|
||||||
boolean wasEnabled= isEnabled();
|
boolean wasEnabled= isEnabled();
|
||||||
boolean isEnabled= (fOperationTarget != null && fOperationTarget.canDoOperation(fOperationCode));
|
boolean isEnabled= (fOperationTarget != null && fOperationTarget.canDoOperation(fOperationCode));
|
||||||
|
|
|
@ -118,7 +118,8 @@ public class NumberFormatDetailPane implements IDetailPane2, IAdaptable, IProper
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.debug.ui.IDetailPane#init(org.eclipse.ui.IWorkbenchPartSite)
|
* @see org.eclipse.debug.ui.IDetailPane#init(org.eclipse.ui.IWorkbenchPartSite)
|
||||||
*/
|
*/
|
||||||
public void init(IWorkbenchPartSite workbench) {
|
@Override
|
||||||
|
public void init(IWorkbenchPartSite workbench) {
|
||||||
fWorkbenchPartSite = workbench;
|
fWorkbenchPartSite = workbench;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -379,7 +380,8 @@ public class NumberFormatDetailPane implements IDetailPane2, IAdaptable, IProper
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.debug.ui.IValueDetailListener#detailComputed(org.eclipse.debug.core.model.IValue, java.lang.String)
|
* @see org.eclipse.debug.ui.IValueDetailListener#detailComputed(org.eclipse.debug.core.model.IValue, java.lang.String)
|
||||||
*/
|
*/
|
||||||
public void detailComputed(IValue value, final String result) {
|
@Override
|
||||||
|
public void detailComputed(IValue value, final String result) {
|
||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
}
|
}
|
||||||
if (!fMonitor.isCanceled()) {
|
if (!fMonitor.isCanceled()) {
|
||||||
|
@ -448,7 +450,8 @@ public class NumberFormatDetailPane implements IDetailPane2, IAdaptable, IProper
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.debug.ui.IDetailPane#createControl(org.eclipse.swt.widgets.Composite)
|
* @see org.eclipse.debug.ui.IDetailPane#createControl(org.eclipse.swt.widgets.Composite)
|
||||||
*/
|
*/
|
||||||
public Control createControl(Composite parent) {
|
@Override
|
||||||
|
public Control createControl(Composite parent) {
|
||||||
|
|
||||||
createTextViewer(parent);
|
createTextViewer(parent);
|
||||||
|
|
||||||
|
@ -489,15 +492,18 @@ public class NumberFormatDetailPane implements IDetailPane2, IAdaptable, IProper
|
||||||
|
|
||||||
// Add a document listener so actions get updated when the document changes
|
// Add a document listener so actions get updated when the document changes
|
||||||
getDetailDocument().addDocumentListener(new IDocumentListener() {
|
getDetailDocument().addDocumentListener(new IDocumentListener() {
|
||||||
public void documentAboutToBeChanged(DocumentEvent event) {}
|
@Override
|
||||||
public void documentChanged(DocumentEvent event) {
|
public void documentAboutToBeChanged(DocumentEvent event) {}
|
||||||
|
@Override
|
||||||
|
public void documentChanged(DocumentEvent event) {
|
||||||
updateSelectionDependentActions();
|
updateSelectionDependentActions();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Add the selection listener so selection dependent actions get updated.
|
// Add the selection listener so selection dependent actions get updated.
|
||||||
fTextViewer.getSelectionProvider().addSelectionChangedListener(new ISelectionChangedListener() {
|
fTextViewer.getSelectionProvider().addSelectionChangedListener(new ISelectionChangedListener() {
|
||||||
public void selectionChanged(SelectionChangedEvent event) {
|
@Override
|
||||||
|
public void selectionChanged(SelectionChangedEvent event) {
|
||||||
updateSelectionDependentActions();
|
updateSelectionDependentActions();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -565,7 +571,8 @@ public class NumberFormatDetailPane implements IDetailPane2, IAdaptable, IProper
|
||||||
MenuManager menuMgr= new MenuManager();
|
MenuManager menuMgr= new MenuManager();
|
||||||
menuMgr.setRemoveAllWhenShown(true);
|
menuMgr.setRemoveAllWhenShown(true);
|
||||||
menuMgr.addMenuListener(new IMenuListener() {
|
menuMgr.addMenuListener(new IMenuListener() {
|
||||||
public void menuAboutToShow(IMenuManager mgr) {
|
@Override
|
||||||
|
public void menuAboutToShow(IMenuManager mgr) {
|
||||||
fillDetailContextMenu(mgr);
|
fillDetailContextMenu(mgr);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -596,7 +603,8 @@ public class NumberFormatDetailPane implements IDetailPane2, IAdaptable, IProper
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.debug.ui.IDetailPane#display(org.eclipse.jface.viewers.IStructuredSelection)
|
* @see org.eclipse.debug.ui.IDetailPane#display(org.eclipse.jface.viewers.IStructuredSelection)
|
||||||
*/
|
*/
|
||||||
public void display(IStructuredSelection selection) {
|
@Override
|
||||||
|
public void display(IStructuredSelection selection) {
|
||||||
|
|
||||||
if (selection == null){
|
if (selection == null){
|
||||||
clearTextViewer();
|
clearTextViewer();
|
||||||
|
@ -658,7 +666,8 @@ public class NumberFormatDetailPane implements IDetailPane2, IAdaptable, IProper
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.debug.ui.IDetailPane#setFocus()
|
* @see org.eclipse.debug.ui.IDetailPane#setFocus()
|
||||||
*/
|
*/
|
||||||
public boolean setFocus(){
|
@Override
|
||||||
|
public boolean setFocus(){
|
||||||
if (fTextViewer != null){
|
if (fTextViewer != null){
|
||||||
fTextViewer.getTextWidget().setFocus();
|
fTextViewer.getTextWidget().setFocus();
|
||||||
return true;
|
return true;
|
||||||
|
@ -669,7 +678,8 @@ public class NumberFormatDetailPane implements IDetailPane2, IAdaptable, IProper
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public void dispose(){
|
@Override
|
||||||
|
public void dispose(){
|
||||||
fActionMap.clear();
|
fActionMap.clear();
|
||||||
fSelectionActions.clear();
|
fSelectionActions.clear();
|
||||||
|
|
||||||
|
@ -689,28 +699,32 @@ public class NumberFormatDetailPane implements IDetailPane2, IAdaptable, IProper
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.debug.ui.IDetailPane#getDescription()
|
* @see org.eclipse.debug.ui.IDetailPane#getDescription()
|
||||||
*/
|
*/
|
||||||
public String getDescription() {
|
@Override
|
||||||
|
public String getDescription() {
|
||||||
return MessagesForDetailPane.NumberFormatDetailPane_Description;
|
return MessagesForDetailPane.NumberFormatDetailPane_Description;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.debug.ui.IDetailPane#getID()
|
* @see org.eclipse.debug.ui.IDetailPane#getID()
|
||||||
*/
|
*/
|
||||||
public String getID() {
|
@Override
|
||||||
|
public String getID() {
|
||||||
return ID;
|
return ID;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.debug.ui.IDetailPane#getName()
|
* @see org.eclipse.debug.ui.IDetailPane#getName()
|
||||||
*/
|
*/
|
||||||
public String getName() {
|
@Override
|
||||||
|
public String getName() {
|
||||||
return MessagesForDetailPane.NumberFormatDetailPane_Name;
|
return MessagesForDetailPane.NumberFormatDetailPane_Name;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
|
* @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("rawtypes")
|
@Override
|
||||||
|
@SuppressWarnings("rawtypes")
|
||||||
public Object getAdapter(Class required) {
|
public Object getAdapter(Class required) {
|
||||||
if (IFindReplaceTarget.class.equals(required)) {
|
if (IFindReplaceTarget.class.equals(required)) {
|
||||||
return fTextViewer.getFindReplaceTarget();
|
return fTextViewer.getFindReplaceTarget();
|
||||||
|
@ -783,7 +797,8 @@ public class NumberFormatDetailPane implements IDetailPane2, IAdaptable, IProper
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
|
* @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
|
||||||
*/
|
*/
|
||||||
public void propertyChange(PropertyChangeEvent event) {
|
@Override
|
||||||
|
public void propertyChange(PropertyChangeEvent event) {
|
||||||
String propertyName= event.getProperty();
|
String propertyName= event.getProperty();
|
||||||
if (propertyName.equals(IDebugUIConstants.PREF_DETAIL_PANE_FONT)) {
|
if (propertyName.equals(IDebugUIConstants.PREF_DETAIL_PANE_FONT)) {
|
||||||
fTextViewer.getTextWidget().setFont(JFaceResources.getFont(IDebugUIConstants.PREF_DETAIL_PANE_FONT));
|
fTextViewer.getTextWidget().setFont(JFaceResources.getFont(IDebugUIConstants.PREF_DETAIL_PANE_FONT));
|
||||||
|
@ -798,6 +813,7 @@ public class NumberFormatDetailPane implements IDetailPane2, IAdaptable, IProper
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.debug.ui.IDetailPane2#getSelectionProvider()
|
* @see org.eclipse.debug.ui.IDetailPane2#getSelectionProvider()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ISelectionProvider getSelectionProvider() {
|
public ISelectionProvider getSelectionProvider() {
|
||||||
if (fTextViewer != null) {
|
if (fTextViewer != null) {
|
||||||
return fTextViewer.getSelectionProvider();
|
return fTextViewer.getSelectionProvider();
|
||||||
|
|
|
@ -27,6 +27,7 @@ public class NumberFormatDetailPaneFactory implements IDetailPaneFactory {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.debug.internal.ui.views.variables.IDetailsFactory#createDetailsArea(java.lang.String)
|
* @see org.eclipse.debug.internal.ui.views.variables.IDetailsFactory#createDetailsArea(java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IDetailPane createDetailPane(String id) {
|
public IDetailPane createDetailPane(String id) {
|
||||||
return new NumberFormatDetailPane();
|
return new NumberFormatDetailPane();
|
||||||
}
|
}
|
||||||
|
@ -35,6 +36,7 @@ public class NumberFormatDetailPaneFactory implements IDetailPaneFactory {
|
||||||
* @see org.eclipse.debug.internal.ui.views.variables.IDetailsFactory#getDetailsTypes(org.eclipse.jface.viewers.IStructuredSelection)
|
* @see org.eclipse.debug.internal.ui.views.variables.IDetailsFactory#getDetailsTypes(org.eclipse.jface.viewers.IStructuredSelection)
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("rawtypes")
|
@SuppressWarnings("rawtypes")
|
||||||
|
@Override
|
||||||
public Set getDetailPaneTypes(IStructuredSelection selection) {
|
public Set getDetailPaneTypes(IStructuredSelection selection) {
|
||||||
Set<String> possibleIDs = new HashSet<String>(1);
|
Set<String> possibleIDs = new HashSet<String>(1);
|
||||||
possibleIDs.add(NumberFormatDetailPane.ID);
|
possibleIDs.add(NumberFormatDetailPane.ID);
|
||||||
|
@ -44,6 +46,7 @@ public class NumberFormatDetailPaneFactory implements IDetailPaneFactory {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.debug.ui.IDetailPaneFactory#getDefaultDetailPane(java.util.Set, org.eclipse.jface.viewers.IStructuredSelection)
|
* @see org.eclipse.debug.ui.IDetailPaneFactory#getDefaultDetailPane(java.util.Set, org.eclipse.jface.viewers.IStructuredSelection)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getDefaultDetailPane(IStructuredSelection selection) {
|
public String getDefaultDetailPane(IStructuredSelection selection) {
|
||||||
return null; // Allow competing detail pane factories to override this one
|
return null; // Allow competing detail pane factories to override this one
|
||||||
}
|
}
|
||||||
|
@ -51,6 +54,7 @@ public class NumberFormatDetailPaneFactory implements IDetailPaneFactory {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.debug.internal.ui.views.variables.IDetailsFactory#getName(java.lang.String)
|
* @see org.eclipse.debug.internal.ui.views.variables.IDetailsFactory#getName(java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getDetailPaneName(String id) {
|
public String getDetailPaneName(String id) {
|
||||||
if (id.equals(NumberFormatDetailPane.ID)){
|
if (id.equals(NumberFormatDetailPane.ID)){
|
||||||
return MessagesForDetailPane.NumberFormatDetailPane_Name;
|
return MessagesForDetailPane.NumberFormatDetailPane_Name;
|
||||||
|
@ -61,6 +65,7 @@ public class NumberFormatDetailPaneFactory implements IDetailPaneFactory {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.debug.internal.ui.views.variables.IDetailsFactory#getDescription(java.lang.String)
|
* @see org.eclipse.debug.internal.ui.views.variables.IDetailsFactory#getDescription(java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getDetailPaneDescription(String id) {
|
public String getDetailPaneDescription(String id) {
|
||||||
if (id.equals(NumberFormatDetailPane.ID)){
|
if (id.equals(NumberFormatDetailPane.ID)){
|
||||||
return MessagesForDetailPane.NumberFormatDetailPane_Description;
|
return MessagesForDetailPane.NumberFormatDetailPane_Description;
|
||||||
|
|
|
@ -198,6 +198,7 @@ abstract public class AbstractDsfDebugTextHover extends AbstractDebugTextHover i
|
||||||
}
|
}
|
||||||
|
|
||||||
return new IInformationControlCreator() {
|
return new IInformationControlCreator() {
|
||||||
|
@Override
|
||||||
public IInformationControl createInformationControl(Shell parent) {
|
public IInformationControl createInformationControl(Shell parent) {
|
||||||
return new DefaultInformationControl(parent, EditorsUI.getTooltipAffordanceString());
|
return new DefaultInformationControl(parent, EditorsUI.getTooltipAffordanceString());
|
||||||
}
|
}
|
||||||
|
@ -207,6 +208,7 @@ abstract public class AbstractDsfDebugTextHover extends AbstractDebugTextHover i
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.jface.text.ITextHoverExtension2#getHoverInfo2(org.eclipse.jface.text.ITextViewer, org.eclipse.jface.text.IRegion)
|
* @see org.eclipse.jface.text.ITextHoverExtension2#getHoverInfo2(org.eclipse.jface.text.ITextViewer, org.eclipse.jface.text.IRegion)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public Object getHoverInfo2(ITextViewer textViewer, IRegion hoverRegion) {
|
public Object getHoverInfo2(ITextViewer textViewer, IRegion hoverRegion) {
|
||||||
final String simpleInfo = getHoverInfo(textViewer, hoverRegion);
|
final String simpleInfo = getHoverInfo(textViewer, hoverRegion);
|
||||||
if (!useExpressionExplorer() || simpleInfo == null) {
|
if (!useExpressionExplorer() || simpleInfo == null) {
|
||||||
|
@ -222,6 +224,7 @@ abstract public class AbstractDsfDebugTextHover extends AbstractDebugTextHover i
|
||||||
final DsfSession dsfSession = DsfSession.getSession(frameDmc.getSessionId());
|
final DsfSession dsfSession = DsfSession.getSession(frameDmc.getSessionId());
|
||||||
if (dsfSession != null) {
|
if (dsfSession != null) {
|
||||||
Callable<IExpressionDMContext> callable = new Callable<IExpressionDMContext>() {
|
Callable<IExpressionDMContext> callable = new Callable<IExpressionDMContext>() {
|
||||||
|
@Override
|
||||||
public IExpressionDMContext call() throws Exception {
|
public IExpressionDMContext call() throws Exception {
|
||||||
DsfServicesTracker tracker = new DsfServicesTracker(DsfUIPlugin.getBundleContext(), frameDmc.getSessionId());
|
DsfServicesTracker tracker = new DsfServicesTracker(DsfUIPlugin.getBundleContext(), frameDmc.getSessionId());
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -37,6 +37,7 @@ public class DsfDebugUITools {
|
||||||
public static void enableActivity(final String activityID, final boolean enableit)
|
public static void enableActivity(final String activityID, final boolean enableit)
|
||||||
{
|
{
|
||||||
PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
|
PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
|
||||||
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
IWorkbenchActivitySupport workbenchActivitySupport = PlatformUI.getWorkbench().getActivitySupport();
|
IWorkbenchActivitySupport workbenchActivitySupport = PlatformUI.getWorkbench().getActivitySupport();
|
||||||
IActivityManager activityManager = workbenchActivitySupport.getActivityManager();
|
IActivityManager activityManager = workbenchActivitySupport.getActivityManager();
|
||||||
|
|
|
@ -47,6 +47,7 @@ public abstract class AbstractDisassemblyBreakpointsTarget implements IToggleBre
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.debug.ui.actions.IToggleBreakpointsTarget#toggleLineBreakpoints(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
|
* @see org.eclipse.debug.ui.actions.IToggleBreakpointsTarget#toggleLineBreakpoints(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void toggleLineBreakpoints( IWorkbenchPart part, ISelection selection ) throws CoreException {
|
public void toggleLineBreakpoints( IWorkbenchPart part, ISelection selection ) throws CoreException {
|
||||||
assert part instanceof IDisassemblyPart && selection instanceof ITextSelection;
|
assert part instanceof IDisassemblyPart && selection instanceof ITextSelection;
|
||||||
|
|
||||||
|
@ -69,6 +70,7 @@ public abstract class AbstractDisassemblyBreakpointsTarget implements IToggleBre
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.debug.ui.actions.IToggleBreakpointsTarget#canToggleLineBreakpoints(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
|
* @see org.eclipse.debug.ui.actions.IToggleBreakpointsTarget#canToggleLineBreakpoints(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean canToggleLineBreakpoints( IWorkbenchPart part, ISelection selection ) {
|
public boolean canToggleLineBreakpoints( IWorkbenchPart part, ISelection selection ) {
|
||||||
return part instanceof IDisassemblyPart && selection instanceof ITextSelection;
|
return part instanceof IDisassemblyPart && selection instanceof ITextSelection;
|
||||||
}
|
}
|
||||||
|
@ -76,12 +78,14 @@ public abstract class AbstractDisassemblyBreakpointsTarget implements IToggleBre
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.debug.ui.actions.IToggleBreakpointsTarget#toggleMethodBreakpoints(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
|
* @see org.eclipse.debug.ui.actions.IToggleBreakpointsTarget#toggleMethodBreakpoints(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void toggleMethodBreakpoints( IWorkbenchPart part, ISelection selection ) throws CoreException {
|
public void toggleMethodBreakpoints( IWorkbenchPart part, ISelection selection ) throws CoreException {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.debug.ui.actions.IToggleBreakpointsTarget#canToggleMethodBreakpoints(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
|
* @see org.eclipse.debug.ui.actions.IToggleBreakpointsTarget#canToggleMethodBreakpoints(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean canToggleMethodBreakpoints( IWorkbenchPart part, ISelection selection ) {
|
public boolean canToggleMethodBreakpoints( IWorkbenchPart part, ISelection selection ) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -89,12 +93,14 @@ public abstract class AbstractDisassemblyBreakpointsTarget implements IToggleBre
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.debug.ui.actions.IToggleBreakpointsTarget#toggleWatchpoints(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
|
* @see org.eclipse.debug.ui.actions.IToggleBreakpointsTarget#toggleWatchpoints(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void toggleWatchpoints( IWorkbenchPart part, ISelection selection ) throws CoreException {
|
public void toggleWatchpoints( IWorkbenchPart part, ISelection selection ) throws CoreException {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.debug.ui.actions.IToggleBreakpointsTarget#canToggleWatchpoints(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
|
* @see org.eclipse.debug.ui.actions.IToggleBreakpointsTarget#canToggleWatchpoints(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean canToggleWatchpoints( IWorkbenchPart part, ISelection selection ) {
|
public boolean canToggleWatchpoints( IWorkbenchPart part, ISelection selection ) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -102,6 +108,7 @@ public abstract class AbstractDisassemblyBreakpointsTarget implements IToggleBre
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.debug.ui.actions.IToggleBreakpointsTargetExtension#toggleBreakpoints(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
|
* @see org.eclipse.debug.ui.actions.IToggleBreakpointsTargetExtension#toggleBreakpoints(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void toggleBreakpoints( IWorkbenchPart part, ISelection selection ) throws CoreException {
|
public void toggleBreakpoints( IWorkbenchPart part, ISelection selection ) throws CoreException {
|
||||||
toggleLineBreakpoints( part, selection );
|
toggleLineBreakpoints( part, selection );
|
||||||
}
|
}
|
||||||
|
@ -109,6 +116,7 @@ public abstract class AbstractDisassemblyBreakpointsTarget implements IToggleBre
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.debug.ui.actions.IToggleBreakpointsTargetExtension#canToggleBreakpoints(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
|
* @see org.eclipse.debug.ui.actions.IToggleBreakpointsTargetExtension#canToggleBreakpoints(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean canToggleBreakpoints( IWorkbenchPart part, ISelection selection ) {
|
public boolean canToggleBreakpoints( IWorkbenchPart part, ISelection selection ) {
|
||||||
return canToggleLineBreakpoints( part, selection );
|
return canToggleLineBreakpoints( part, selection );
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,7 +67,8 @@ public abstract class DsfCommandRunnable extends DsfRunnable {
|
||||||
fRequest = request;
|
fRequest = request;
|
||||||
}
|
}
|
||||||
|
|
||||||
public final void run() {
|
@Override
|
||||||
|
public final void run() {
|
||||||
if (fRequest.isCanceled()) {
|
if (fRequest.isCanceled()) {
|
||||||
fRequest.done();
|
fRequest.done();
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -41,7 +41,8 @@ public class DsfResumeCommand implements IResumeHandler {
|
||||||
fTracker.dispose();
|
fTracker.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void canExecute(final IEnabledStateRequest request) {
|
@Override
|
||||||
|
public void canExecute(final IEnabledStateRequest request) {
|
||||||
if (request.getElements().length != 1) {
|
if (request.getElements().length != 1) {
|
||||||
request.setEnabled(false);
|
request.setEnabled(false);
|
||||||
request.done();
|
request.done();
|
||||||
|
@ -63,7 +64,8 @@ public class DsfResumeCommand implements IResumeHandler {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean execute(final IDebugCommandRequest request) {
|
@Override
|
||||||
|
public boolean execute(final IDebugCommandRequest request) {
|
||||||
if (request.getElements().length != 1) {
|
if (request.getElements().length != 1) {
|
||||||
request.done();
|
request.done();
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -44,7 +44,8 @@ public class DsfStepIntoCommand implements IStepIntoHandler {
|
||||||
fTracker.dispose();
|
fTracker.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void canExecute(final IEnabledStateRequest request) {
|
@Override
|
||||||
|
public void canExecute(final IEnabledStateRequest request) {
|
||||||
if (request.getElements().length != 1) {
|
if (request.getElements().length != 1) {
|
||||||
request.setEnabled(false);
|
request.setEnabled(false);
|
||||||
request.done();
|
request.done();
|
||||||
|
@ -73,7 +74,8 @@ public class DsfStepIntoCommand implements IStepIntoHandler {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean execute(final IDebugCommandRequest request) {
|
@Override
|
||||||
|
public boolean execute(final IDebugCommandRequest request) {
|
||||||
if (request.getElements().length != 1) {
|
if (request.getElements().length != 1) {
|
||||||
request.done();
|
request.done();
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -44,6 +44,7 @@ public class DsfStepOverCommand implements IStepOverHandler {
|
||||||
fTracker.dispose();
|
fTracker.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void canExecute(final IEnabledStateRequest request) {
|
public void canExecute(final IEnabledStateRequest request) {
|
||||||
if (request.getElements().length != 1) {
|
if (request.getElements().length != 1) {
|
||||||
request.setEnabled(false);
|
request.setEnabled(false);
|
||||||
|
@ -73,6 +74,7 @@ public class DsfStepOverCommand implements IStepOverHandler {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean execute(final IDebugCommandRequest request) {
|
public boolean execute(final IDebugCommandRequest request) {
|
||||||
if (request.getElements().length != 1) {
|
if (request.getElements().length != 1) {
|
||||||
request.done();
|
request.done();
|
||||||
|
|
|
@ -42,7 +42,8 @@ public class DsfStepReturnCommand implements IStepReturnHandler {
|
||||||
fTracker.dispose();
|
fTracker.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void canExecute(final IEnabledStateRequest request) {
|
@Override
|
||||||
|
public void canExecute(final IEnabledStateRequest request) {
|
||||||
if (request.getElements().length != 1) {
|
if (request.getElements().length != 1) {
|
||||||
request.setEnabled(false);
|
request.setEnabled(false);
|
||||||
request.done();
|
request.done();
|
||||||
|
@ -70,7 +71,8 @@ public class DsfStepReturnCommand implements IStepReturnHandler {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean execute(final IDebugCommandRequest request) {
|
@Override
|
||||||
|
public boolean execute(final IDebugCommandRequest request) {
|
||||||
if (request.getElements().length != 1) {
|
if (request.getElements().length != 1) {
|
||||||
request.done();
|
request.done();
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -37,6 +37,7 @@ public class DsfSteppingModeTarget implements ISteppingModeTarget, ITargetProper
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.cdt.debug.core.model.ISteppingModeTarget#enableInstructionStepping(boolean)
|
* @see org.eclipse.cdt.debug.core.model.ISteppingModeTarget#enableInstructionStepping(boolean)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void enableInstructionStepping(boolean enabled) {
|
public void enableInstructionStepping(boolean enabled) {
|
||||||
fPreferences.setValue(PREF_INSTRUCTION_STEPPING_MODE, enabled);
|
fPreferences.setValue(PREF_INSTRUCTION_STEPPING_MODE, enabled);
|
||||||
if (enabled) {
|
if (enabled) {
|
||||||
|
@ -54,6 +55,7 @@ public class DsfSteppingModeTarget implements ISteppingModeTarget, ITargetProper
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.cdt.debug.core.model.ISteppingModeTarget#isInstructionSteppingEnabled()
|
* @see org.eclipse.cdt.debug.core.model.ISteppingModeTarget#isInstructionSteppingEnabled()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isInstructionSteppingEnabled() {
|
public boolean isInstructionSteppingEnabled() {
|
||||||
return fPreferences.getBoolean(PREF_INSTRUCTION_STEPPING_MODE);
|
return fPreferences.getBoolean(PREF_INSTRUCTION_STEPPING_MODE);
|
||||||
}
|
}
|
||||||
|
@ -61,6 +63,7 @@ public class DsfSteppingModeTarget implements ISteppingModeTarget, ITargetProper
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.cdt.debug.core.model.ISteppingModeTarget#supportsInstructionStepping()
|
* @see org.eclipse.cdt.debug.core.model.ISteppingModeTarget#supportsInstructionStepping()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean supportsInstructionStepping() {
|
public boolean supportsInstructionStepping() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -68,6 +71,7 @@ public class DsfSteppingModeTarget implements ISteppingModeTarget, ITargetProper
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.cdt.debug.core.model.ITargetProperties#addPropertyChangeListener(org.eclipse.core.runtime.Preferences.IPropertyChangeListener)
|
* @see org.eclipse.cdt.debug.core.model.ITargetProperties#addPropertyChangeListener(org.eclipse.core.runtime.Preferences.IPropertyChangeListener)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void addPropertyChangeListener(IPropertyChangeListener listener) {
|
public void addPropertyChangeListener(IPropertyChangeListener listener) {
|
||||||
fPreferences.addPropertyChangeListener(listener);
|
fPreferences.addPropertyChangeListener(listener);
|
||||||
}
|
}
|
||||||
|
@ -75,6 +79,7 @@ public class DsfSteppingModeTarget implements ISteppingModeTarget, ITargetProper
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.cdt.debug.core.model.ITargetProperties#removePropertyChangeListener(org.eclipse.core.runtime.Preferences.IPropertyChangeListener)
|
* @see org.eclipse.cdt.debug.core.model.ITargetProperties#removePropertyChangeListener(org.eclipse.core.runtime.Preferences.IPropertyChangeListener)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void removePropertyChangeListener(IPropertyChangeListener listener) {
|
public void removePropertyChangeListener(IPropertyChangeListener listener) {
|
||||||
fPreferences.removePropertyChangeListener(listener);
|
fPreferences.removePropertyChangeListener(listener);
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,7 +40,8 @@ public class DsfSuspendCommand implements ISuspendHandler {
|
||||||
fTracker.dispose();
|
fTracker.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void canExecute(final IEnabledStateRequest request) {
|
@Override
|
||||||
|
public void canExecute(final IEnabledStateRequest request) {
|
||||||
if (request.getElements().length != 1) {
|
if (request.getElements().length != 1) {
|
||||||
request.setEnabled(false);
|
request.setEnabled(false);
|
||||||
request.done();
|
request.done();
|
||||||
|
@ -62,7 +63,8 @@ public class DsfSuspendCommand implements ISuspendHandler {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean execute(final IDebugCommandRequest request) {
|
@Override
|
||||||
|
public boolean execute(final IDebugCommandRequest request) {
|
||||||
if (request.getElements().length != 1) {
|
if (request.getElements().length != 1) {
|
||||||
request.done();
|
request.done();
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -67,6 +67,7 @@ public class DsfSuspendTrigger implements ISuspendTrigger {
|
||||||
fServicesTracker = new DsfServicesTracker(DsfUIPlugin.getBundleContext(), fSession.getId());
|
fServicesTracker = new DsfServicesTracker(DsfUIPlugin.getBundleContext(), fSession.getId());
|
||||||
try {
|
try {
|
||||||
fSession.getExecutor().execute(new DsfRunnable() {
|
fSession.getExecutor().execute(new DsfRunnable() {
|
||||||
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (!fDisposed) {
|
if (!fDisposed) {
|
||||||
fSession.addServiceEventListener(DsfSuspendTrigger.this, null);
|
fSession.addServiceEventListener(DsfSuspendTrigger.this, null);
|
||||||
|
@ -78,6 +79,7 @@ public class DsfSuspendTrigger implements ISuspendTrigger {
|
||||||
}
|
}
|
||||||
|
|
||||||
@ThreadSafe
|
@ThreadSafe
|
||||||
|
@Override
|
||||||
public void addSuspendTriggerListener(final ISuspendTriggerListener listener) {
|
public void addSuspendTriggerListener(final ISuspendTriggerListener listener) {
|
||||||
fListeners.add(listener);
|
fListeners.add(listener);
|
||||||
|
|
||||||
|
@ -102,6 +104,7 @@ public class DsfSuspendTrigger implements ISuspendTrigger {
|
||||||
}
|
}
|
||||||
|
|
||||||
@ThreadSafe
|
@ThreadSafe
|
||||||
|
@Override
|
||||||
public void removeSuspendTriggerListener(ISuspendTriggerListener listener) {
|
public void removeSuspendTriggerListener(ISuspendTriggerListener listener) {
|
||||||
fListeners.remove(listener);
|
fListeners.remove(listener);
|
||||||
}
|
}
|
||||||
|
@ -110,6 +113,7 @@ public class DsfSuspendTrigger implements ISuspendTrigger {
|
||||||
public void dispose() {
|
public void dispose() {
|
||||||
try {
|
try {
|
||||||
fSession.getExecutor().execute(new DsfRunnable() {
|
fSession.getExecutor().execute(new DsfRunnable() {
|
||||||
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (fEventListenerRegisterd) {
|
if (fEventListenerRegisterd) {
|
||||||
fSession.removeServiceEventListener(DsfSuspendTrigger.this);
|
fSession.removeServiceEventListener(DsfSuspendTrigger.this);
|
||||||
|
@ -201,10 +205,12 @@ public class DsfSuspendTrigger implements ISuspendTrigger {
|
||||||
for (int i = 0; i < listeners.length; i++) {
|
for (int i = 0; i < listeners.length; i++) {
|
||||||
final ISuspendTriggerListener listener = (ISuspendTriggerListener) listeners[i];
|
final ISuspendTriggerListener listener = (ISuspendTriggerListener) listeners[i];
|
||||||
SafeRunner.run(new ISafeRunnable() {
|
SafeRunner.run(new ISafeRunnable() {
|
||||||
public void run() throws Exception {
|
@Override
|
||||||
|
public void run() throws Exception {
|
||||||
listener.suspended(fLaunch, context);
|
listener.suspended(fLaunch, context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void handleException(Throwable exception) {
|
public void handleException(Throwable exception) {
|
||||||
status.add(new Status(
|
status.add(new Status(
|
||||||
IStatus.ERROR, DsfUIPlugin.PLUGIN_ID, "Exception while calling suspend trigger listeners", exception)); //$NON-NLS-1$
|
IStatus.ERROR, DsfUIPlugin.PLUGIN_ID, "Exception while calling suspend trigger listeners", exception)); //$NON-NLS-1$
|
||||||
|
|
|
@ -35,10 +35,12 @@ public class RefreshAction implements IViewActionDelegate {
|
||||||
|
|
||||||
private IMemoryRenderingSite fsite;
|
private IMemoryRenderingSite fsite;
|
||||||
|
|
||||||
|
@Override
|
||||||
public void init(IViewPart view) {
|
public void init(IViewPart view) {
|
||||||
fsite = (IMemoryRenderingSite) view;
|
fsite = (IMemoryRenderingSite) view;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void run(IAction action) {
|
public void run(IAction action) {
|
||||||
|
|
||||||
if(fMemoryBlock instanceof IMemoryBlockUpdatePolicyProvider)
|
if(fMemoryBlock instanceof IMemoryBlockUpdatePolicyProvider)
|
||||||
|
@ -60,6 +62,7 @@ public class RefreshAction implements IViewActionDelegate {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void selectionChanged(IAction action, ISelection selection) {
|
public void selectionChanged(IAction action, ISelection selection) {
|
||||||
fMemoryBlock = null;
|
fMemoryBlock = null;
|
||||||
action.setEnabled(false);
|
action.setEnabled(false);
|
||||||
|
|
|
@ -41,11 +41,13 @@ public class SelectUpdatePolicyAction implements IMenuCreator, IViewActionDelega
|
||||||
private IAction fAction = null;
|
private IAction fAction = null;
|
||||||
private IMemoryBlock fMemoryBlock = null;
|
private IMemoryBlock fMemoryBlock = null;
|
||||||
|
|
||||||
public void dispose() {
|
@Override
|
||||||
|
public void dispose() {
|
||||||
// do nothing
|
// do nothing
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void runWithEvent(IAction action, Event event) {
|
public void runWithEvent(IAction action, Event event) {
|
||||||
// do nothing
|
// do nothing
|
||||||
}
|
}
|
||||||
|
@ -73,26 +75,31 @@ public class SelectUpdatePolicyAction implements IMenuCreator, IViewActionDelega
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public Menu getMenu(Control parent) {
|
@Override
|
||||||
|
public Menu getMenu(Control parent) {
|
||||||
// Never called
|
// Never called
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected IAction getAction() { return fAction; }
|
protected IAction getAction() { return fAction; }
|
||||||
|
|
||||||
public void init(IViewPart view) {
|
@Override
|
||||||
|
public void init(IViewPart view) {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void init(IAction action) {
|
@Override
|
||||||
|
public void init(IAction action) {
|
||||||
fAction = action;
|
fAction = action;
|
||||||
action.setMenuCreator(this);
|
action.setMenuCreator(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void run(IAction action) {
|
@Override
|
||||||
|
public void run(IAction action) {
|
||||||
// Do nothing, this is a pull-down menu
|
// Do nothing, this is a pull-down menu
|
||||||
}
|
}
|
||||||
|
|
||||||
public void selectionChanged(IAction action, ISelection selection) {
|
@Override
|
||||||
|
public void selectionChanged(IAction action, ISelection selection) {
|
||||||
fMemoryBlock = null;
|
fMemoryBlock = null;
|
||||||
action.setEnabled(false);
|
action.setEnabled(false);
|
||||||
if(selection instanceof IStructuredSelection)
|
if(selection instanceof IStructuredSelection)
|
||||||
|
@ -112,10 +119,12 @@ public class SelectUpdatePolicyAction implements IMenuCreator, IViewActionDelega
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void debugContextChanged(DebugContextEvent event) {
|
@Override
|
||||||
|
public void debugContextChanged(DebugContextEvent event) {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Menu getMenu(Menu parent) {
|
@Override
|
||||||
|
public Menu getMenu(Menu parent) {
|
||||||
Menu menu = new Menu(parent);
|
Menu menu = new Menu(parent);
|
||||||
menu.addMenuListener(new MenuAdapter() {
|
menu.addMenuListener(new MenuAdapter() {
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -182,7 +182,8 @@ public class DsfSourceDisplayAdapter implements ISourceDisplay, ISteppingControl
|
||||||
}
|
}
|
||||||
|
|
||||||
final SourceLookupResult result = performLookup();
|
final SourceLookupResult result = performLookup();
|
||||||
executeFromJob(new DsfRunnable() { public void run() {
|
executeFromJob(new DsfRunnable() { @Override
|
||||||
|
public void run() {
|
||||||
if (!monitor.isCanceled()) {
|
if (!monitor.isCanceled()) {
|
||||||
fPrevResult = result;
|
fPrevResult = result;
|
||||||
fPrevFrameData = fFrameData;
|
fPrevFrameData = fFrameData;
|
||||||
|
@ -264,7 +265,8 @@ public class DsfSourceDisplayAdapter implements ISourceDisplay, ISteppingControl
|
||||||
private final FrameData fFrameData;
|
private final FrameData fFrameData;
|
||||||
|
|
||||||
private final DsfRunnable fDisplayJobFinishedRunnable = new DsfRunnable() {
|
private final DsfRunnable fDisplayJobFinishedRunnable = new DsfRunnable() {
|
||||||
public void run() {
|
@Override
|
||||||
|
public void run() {
|
||||||
// If the current display job does not match up with "this", it means that this job got canceled
|
// If the current display job does not match up with "this", it means that this job got canceled
|
||||||
// after it already completed and after this runnable was queued into the dispatch thread.
|
// after it already completed and after this runnable was queued into the dispatch thread.
|
||||||
if (fRunningDisplayJob == DisplayJob.this) {
|
if (fRunningDisplayJob == DisplayJob.this) {
|
||||||
|
@ -389,6 +391,7 @@ public class DsfSourceDisplayAdapter implements ISourceDisplay, ISteppingControl
|
||||||
private IEditorPart openEditor(final IWorkbenchPage page, final IEditorInput input, final String id) {
|
private IEditorPart openEditor(final IWorkbenchPage page, final IEditorInput input, final String id) {
|
||||||
final IEditorPart[] editor = new IEditorPart[] {null};
|
final IEditorPart[] editor = new IEditorPart[] {null};
|
||||||
Runnable r = new Runnable() {
|
Runnable r = new Runnable() {
|
||||||
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (!page.getWorkbenchWindow().getWorkbench().isClosing()) {
|
if (!page.getWorkbenchWindow().getWorkbench().isClosing()) {
|
||||||
try {
|
try {
|
||||||
|
@ -545,7 +548,8 @@ public class DsfSourceDisplayAdapter implements ISourceDisplay, ISteppingControl
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public IStatus runInUIThread(IProgressMonitor monitor) {
|
public IStatus runInUIThread(IProgressMonitor monitor) {
|
||||||
DsfRunnable clearingJobFinishedRunnable = new DsfRunnable() { public void run() {
|
DsfRunnable clearingJobFinishedRunnable = new DsfRunnable() { @Override
|
||||||
|
public void run() {
|
||||||
assert fRunningClearingJob == ClearingJob.this;
|
assert fRunningClearingJob == ClearingJob.this;
|
||||||
fRunningClearingJob = null;
|
fRunningClearingJob = null;
|
||||||
serviceDisplayAndClearingJobs();
|
serviceDisplayAndClearingJobs();
|
||||||
|
@ -612,7 +616,8 @@ public class DsfSourceDisplayAdapter implements ISourceDisplay, ISteppingControl
|
||||||
final IInstructionPointerPresentation ipPresentation = (IInstructionPointerPresentation) session.getModelAdapter(IInstructionPointerPresentation.class);
|
final IInstructionPointerPresentation ipPresentation = (IInstructionPointerPresentation) session.getModelAdapter(IInstructionPointerPresentation.class);
|
||||||
fIPManager = new InstructionPointerManager(ipPresentation);
|
fIPManager = new InstructionPointerManager(ipPresentation);
|
||||||
|
|
||||||
fExecutor.execute(new DsfRunnable() { public void run() {
|
fExecutor.execute(new DsfRunnable() { @Override
|
||||||
|
public void run() {
|
||||||
fSession.addServiceEventListener(DsfSourceDisplayAdapter.this, null);
|
fSession.addServiceEventListener(DsfSourceDisplayAdapter.this, null);
|
||||||
}});
|
}});
|
||||||
|
|
||||||
|
@ -641,7 +646,8 @@ public class DsfSourceDisplayAdapter implements ISourceDisplay, ISteppingControl
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
fExecutor.execute(new DsfRunnable() { public void run() {
|
fExecutor.execute(new DsfRunnable() { @Override
|
||||||
|
public void run() {
|
||||||
fSession.removeServiceEventListener(DsfSourceDisplayAdapter.this);
|
fSession.removeServiceEventListener(DsfSourceDisplayAdapter.this);
|
||||||
}});
|
}});
|
||||||
} catch (RejectedExecutionException e) {
|
} catch (RejectedExecutionException e) {
|
||||||
|
@ -657,6 +663,7 @@ public class DsfSourceDisplayAdapter implements ISourceDisplay, ISteppingControl
|
||||||
Display display = Display.getDefault();
|
Display display = Display.getDefault();
|
||||||
if (!display.isDisposed()) {
|
if (!display.isDisposed()) {
|
||||||
display.asyncExec(new Runnable() {
|
display.asyncExec(new Runnable() {
|
||||||
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
enableLineBackgroundPainter();
|
enableLineBackgroundPainter();
|
||||||
fIPManager.removeAllAnnotations();
|
fIPManager.removeAllAnnotations();
|
||||||
|
@ -667,6 +674,7 @@ public class DsfSourceDisplayAdapter implements ISourceDisplay, ISteppingControl
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.debug.ui.contexts.ISourceDisplayAdapter#displaySource(java.lang.Object, org.eclipse.ui.IWorkbenchPage, boolean)
|
* @see org.eclipse.debug.ui.contexts.ISourceDisplayAdapter#displaySource(java.lang.Object, org.eclipse.ui.IWorkbenchPage, boolean)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void displaySource(Object context, final IWorkbenchPage page,
|
public void displaySource(Object context, final IWorkbenchPage page,
|
||||||
final boolean force) {
|
final boolean force) {
|
||||||
fStepCount = 0;
|
fStepCount = 0;
|
||||||
|
@ -691,7 +699,8 @@ public class DsfSourceDisplayAdapter implements ISourceDisplay, ISteppingControl
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Re-dispatch to executor thread before accessing job lists.
|
// Re-dispatch to executor thread before accessing job lists.
|
||||||
fExecutor.execute(new DsfRunnable() { public void run() {
|
fExecutor.execute(new DsfRunnable() { @Override
|
||||||
|
public void run() {
|
||||||
// We need to retrieve the frame level and line number from the service.
|
// We need to retrieve the frame level and line number from the service.
|
||||||
IStack stackService = fServicesTracker.getService(IStack.class);
|
IStack stackService = fServicesTracker.getService(IStack.class);
|
||||||
if (stackService == null) {
|
if (stackService == null) {
|
||||||
|
@ -799,7 +808,8 @@ public class DsfSourceDisplayAdapter implements ISourceDisplay, ISteppingControl
|
||||||
if (dmc != null) {
|
if (dmc != null) {
|
||||||
try {
|
try {
|
||||||
fController.getExecutor().execute(new DsfRunnable() {
|
fController.getExecutor().execute(new DsfRunnable() {
|
||||||
public void run() {
|
@Override
|
||||||
|
public void run() {
|
||||||
fController.doneStepping(dmc, DsfSourceDisplayAdapter.this);
|
fController.doneStepping(dmc, DsfSourceDisplayAdapter.this);
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
@ -879,6 +889,7 @@ public class DsfSourceDisplayAdapter implements ISourceDisplay, ISteppingControl
|
||||||
if (DEBUG) System.out.println("[DsfSourceDisplayAdapter] eventDispatched e="+e); //$NON-NLS-1$
|
if (DEBUG) System.out.println("[DsfSourceDisplayAdapter] eventDispatched e="+e); //$NON-NLS-1$
|
||||||
// trigger source display immediately (should be optional?)
|
// trigger source display immediately (should be optional?)
|
||||||
Display.getDefault().asyncExec(new Runnable() {
|
Display.getDefault().asyncExec(new Runnable() {
|
||||||
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
Object context = DebugUITools.getDebugContext();
|
Object context = DebugUITools.getDebugContext();
|
||||||
if (context instanceof IDMVMContext) {
|
if (context instanceof IDMVMContext) {
|
||||||
|
|
|
@ -31,6 +31,7 @@ public class InstructionPointerImageProvider implements IAnnotationImageProvider
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.ui.texteditor.IAnnotationImageProvider#getManagedImage(org.eclipse.jface.text.source.Annotation)
|
* @see org.eclipse.ui.texteditor.IAnnotationImageProvider#getManagedImage(org.eclipse.jface.text.source.Annotation)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public Image getManagedImage(Annotation annotation) {
|
public Image getManagedImage(Annotation annotation) {
|
||||||
return ((IPAnnotation)annotation).getImage();
|
return ((IPAnnotation)annotation).getImage();
|
||||||
}
|
}
|
||||||
|
@ -38,6 +39,7 @@ public class InstructionPointerImageProvider implements IAnnotationImageProvider
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.ui.texteditor.IAnnotationImageProvider#getImageDescriptorId(org.eclipse.jface.text.source.Annotation)
|
* @see org.eclipse.ui.texteditor.IAnnotationImageProvider#getImageDescriptorId(org.eclipse.jface.text.source.Annotation)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getImageDescriptorId(Annotation annotation) {
|
public String getImageDescriptorId(Annotation annotation) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -45,6 +47,7 @@ public class InstructionPointerImageProvider implements IAnnotationImageProvider
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.ui.texteditor.IAnnotationImageProvider#getImageDescriptor(java.lang.String)
|
* @see org.eclipse.ui.texteditor.IAnnotationImageProvider#getImageDescriptor(java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ImageDescriptor getImageDescriptor(String imageDescritporId) {
|
public ImageDescriptor getImageDescriptor(String imageDescritporId) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -108,7 +108,8 @@ class InstructionPointerManager {
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.jface.text.source.IAnnotationPresentation#paint(org.eclipse.swt.graphics.GC, org.eclipse.swt.widgets.Canvas, org.eclipse.swt.graphics.Rectangle)
|
* @see org.eclipse.jface.text.source.IAnnotationPresentation#paint(org.eclipse.swt.graphics.GC, org.eclipse.swt.widgets.Canvas, org.eclipse.swt.graphics.Rectangle)
|
||||||
*/
|
*/
|
||||||
public void paint(GC gc, Canvas canvas, Rectangle bounds) {
|
@Override
|
||||||
|
public void paint(GC gc, Canvas canvas, Rectangle bounds) {
|
||||||
Rectangle imageBounds = fImage.getBounds();
|
Rectangle imageBounds = fImage.getBounds();
|
||||||
gc.drawImage(fImage, bounds.x + (bounds.width - imageBounds.width) / 2 , bounds.y + (bounds.height - imageBounds.height) / 2);
|
gc.drawImage(fImage, bounds.x + (bounds.width - imageBounds.width) / 2 , bounds.y + (bounds.height - imageBounds.height) / 2);
|
||||||
}
|
}
|
||||||
|
@ -116,7 +117,8 @@ class InstructionPointerManager {
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.jface.text.source.IAnnotationPresentation#getLayer()
|
* @see org.eclipse.jface.text.source.IAnnotationPresentation#getLayer()
|
||||||
*/
|
*/
|
||||||
public int getLayer() {
|
@Override
|
||||||
|
public int getLayer() {
|
||||||
return 5;
|
return 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,8 @@ public class AbstractDebugVMAdapter extends AbstractDMVMAdapter
|
||||||
fController = controller;
|
fController = controller;
|
||||||
try {
|
try {
|
||||||
fController.getExecutor().execute(new DsfRunnable() {
|
fController.getExecutor().execute(new DsfRunnable() {
|
||||||
public void run() {
|
@Override
|
||||||
|
public void run() {
|
||||||
fController.addSteppingControlParticipant(AbstractDebugVMAdapter.this);
|
fController.addSteppingControlParticipant(AbstractDebugVMAdapter.this);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -54,7 +55,8 @@ public class AbstractDebugVMAdapter extends AbstractDMVMAdapter
|
||||||
if (event instanceof IRunControl.ISuspendedDMEvent) {
|
if (event instanceof IRunControl.ISuspendedDMEvent) {
|
||||||
final ISuspendedDMEvent suspendedEvent= (IRunControl.ISuspendedDMEvent) event;
|
final ISuspendedDMEvent suspendedEvent= (IRunControl.ISuspendedDMEvent) event;
|
||||||
fController.getExecutor().execute(new DsfRunnable() {
|
fController.getExecutor().execute(new DsfRunnable() {
|
||||||
public void run() {
|
@Override
|
||||||
|
public void run() {
|
||||||
fController.doneStepping(suspendedEvent.getDMContext(), AbstractDebugVMAdapter.this);
|
fController.doneStepping(suspendedEvent.getDMContext(), AbstractDebugVMAdapter.this);
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
@ -65,7 +67,8 @@ public class AbstractDebugVMAdapter extends AbstractDMVMAdapter
|
||||||
public void dispose() {
|
public void dispose() {
|
||||||
try {
|
try {
|
||||||
fController.getExecutor().execute(new DsfRunnable() {
|
fController.getExecutor().execute(new DsfRunnable() {
|
||||||
public void run() {
|
@Override
|
||||||
|
public void run() {
|
||||||
fController.removeSteppingControlParticipant(AbstractDebugVMAdapter.this);
|
fController.removeSteppingControlParticipant(AbstractDebugVMAdapter.this);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -126,6 +126,7 @@ public final class SteppingController {
|
||||||
|
|
||||||
private final IExecutionDMContext fDmc;
|
private final IExecutionDMContext fDmc;
|
||||||
|
|
||||||
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
fTimedOutFutures.remove(fDmc);
|
fTimedOutFutures.remove(fDmc);
|
||||||
|
|
||||||
|
@ -187,7 +188,8 @@ public final class SteppingController {
|
||||||
final IPreferenceStore store= DsfUIPlugin.getDefault().getPreferenceStore();
|
final IPreferenceStore store= DsfUIPlugin.getDefault().getPreferenceStore();
|
||||||
|
|
||||||
fPreferencesListener = new IPropertyChangeListener() {
|
fPreferencesListener = new IPropertyChangeListener() {
|
||||||
public void propertyChange(final PropertyChangeEvent event) {
|
@Override
|
||||||
|
public void propertyChange(final PropertyChangeEvent event) {
|
||||||
handlePropertyChanged(store, event);
|
handlePropertyChanged(store, event);
|
||||||
}};
|
}};
|
||||||
store.addPropertyChangeListener(fPreferencesListener);
|
store.addPropertyChangeListener(fPreferencesListener);
|
||||||
|
@ -199,7 +201,8 @@ public final class SteppingController {
|
||||||
public void dispose() {
|
public void dispose() {
|
||||||
try {
|
try {
|
||||||
fSession.getExecutor().execute(new DsfRunnable() {
|
fSession.getExecutor().execute(new DsfRunnable() {
|
||||||
public void run() {
|
@Override
|
||||||
|
public void run() {
|
||||||
if (fRunControl != null) {
|
if (fRunControl != null) {
|
||||||
getSession().removeServiceEventListener(SteppingController.this);
|
getSession().removeServiceEventListener(SteppingController.this);
|
||||||
}
|
}
|
||||||
|
@ -492,6 +495,7 @@ public final class SteppingController {
|
||||||
final int stepDelay = getStepDelay(execCtx);
|
final int stepDelay = getStepDelay(execCtx);
|
||||||
if (stepDelay > 0) {
|
if (stepDelay > 0) {
|
||||||
getExecutor().schedule(new DsfRunnable() {
|
getExecutor().schedule(new DsfRunnable() {
|
||||||
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
processStepQueue(execCtx);
|
processStepQueue(execCtx);
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,6 +38,7 @@ abstract public class AbstractVMProviderActionDelegate implements IViewActionDel
|
||||||
private IAction fAction = null;
|
private IAction fAction = null;
|
||||||
private ISelection fDebugContext;
|
private ISelection fDebugContext;
|
||||||
|
|
||||||
|
@Override
|
||||||
public void init(IViewPart view) {
|
public void init(IViewPart view) {
|
||||||
fView = view;
|
fView = view;
|
||||||
|
|
||||||
|
@ -47,24 +48,29 @@ abstract public class AbstractVMProviderActionDelegate implements IViewActionDel
|
||||||
fDebugContext = debugContextService.getActiveContext();
|
fDebugContext = debugContextService.getActiveContext();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void selectionChanged(IAction action, ISelection selection) {
|
public void selectionChanged(IAction action, ISelection selection) {
|
||||||
if (fAction != action) {
|
if (fAction != action) {
|
||||||
fAction = action;
|
fAction = action;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void runWithEvent(IAction action, Event event) {
|
public void runWithEvent(IAction action, Event event) {
|
||||||
run(action);
|
run(action);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void init(IAction action) {
|
public void init(IAction action) {
|
||||||
fAction = action;
|
fAction = action;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void dispose() {
|
public void dispose() {
|
||||||
DebugUITools.getDebugContextManager().getContextService(getView().getSite().getWorkbenchWindow()).removePostDebugContextListener(this);
|
DebugUITools.getDebugContextManager().getContextService(getView().getSite().getWorkbenchWindow()).removePostDebugContextListener(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void debugContextChanged(DebugContextEvent event) {
|
public void debugContextChanged(DebugContextEvent event) {
|
||||||
fDebugContext = event.getContext();
|
fDebugContext = event.getContext();
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,8 @@ import org.eclipse.jface.viewers.IStructuredSelection;
|
||||||
*/
|
*/
|
||||||
public class DefaultRefreshAllTarget implements IRefreshAllTarget {
|
public class DefaultRefreshAllTarget implements IRefreshAllTarget {
|
||||||
|
|
||||||
public void refresh(ISelection debugContext) throws CoreException {
|
@Override
|
||||||
|
public void refresh(ISelection debugContext) throws CoreException {
|
||||||
IVMAdapter adapter = getActiveVMAdapter( debugContext );
|
IVMAdapter adapter = getActiveVMAdapter( debugContext );
|
||||||
|
|
||||||
if (adapter != null) {
|
if (adapter != null) {
|
||||||
|
|
|
@ -55,7 +55,8 @@ public abstract class AbstractBreakpointVMNode extends AbstractVMNode {
|
||||||
*/
|
*/
|
||||||
abstract protected Object createBreakpiontElement(IBreakpoint bp);
|
abstract protected Object createBreakpiontElement(IBreakpoint bp);
|
||||||
|
|
||||||
public void update(final IHasChildrenUpdate[] updates) {
|
@Override
|
||||||
|
public void update(final IHasChildrenUpdate[] updates) {
|
||||||
for (final IHasChildrenUpdate update : updates) {
|
for (final IHasChildrenUpdate update : updates) {
|
||||||
if (!checkUpdate(update)) continue;
|
if (!checkUpdate(update)) continue;
|
||||||
((BreakpointVMProvider)getVMProvider()).getNestingCategoryBreakpoints(
|
((BreakpointVMProvider)getVMProvider()).getNestingCategoryBreakpoints(
|
||||||
|
@ -74,7 +75,8 @@ public abstract class AbstractBreakpointVMNode extends AbstractVMNode {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void update(final IChildrenCountUpdate[] updates) {
|
@Override
|
||||||
|
public void update(final IChildrenCountUpdate[] updates) {
|
||||||
for (final IChildrenCountUpdate update : updates) {
|
for (final IChildrenCountUpdate update : updates) {
|
||||||
if (!checkUpdate(update)) continue;
|
if (!checkUpdate(update)) continue;
|
||||||
((BreakpointVMProvider)getVMProvider()).getNestingCategoryBreakpoints(
|
((BreakpointVMProvider)getVMProvider()).getNestingCategoryBreakpoints(
|
||||||
|
@ -93,7 +95,8 @@ public abstract class AbstractBreakpointVMNode extends AbstractVMNode {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void update(IChildrenUpdate[] updates) {
|
@Override
|
||||||
|
public void update(IChildrenUpdate[] updates) {
|
||||||
for (final IChildrenUpdate update : updates) {
|
for (final IChildrenUpdate update : updates) {
|
||||||
if (!checkUpdate(update)) continue;
|
if (!checkUpdate(update)) continue;
|
||||||
((BreakpointVMProvider)getVMProvider()).getNestingCategoryBreakpoints(
|
((BreakpointVMProvider)getVMProvider()).getNestingCategoryBreakpoints(
|
||||||
|
@ -126,7 +129,8 @@ public abstract class AbstractBreakpointVMNode extends AbstractVMNode {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getDeltaFlags(Object event) {
|
@Override
|
||||||
|
public int getDeltaFlags(Object event) {
|
||||||
if (event instanceof BreakpointsChangedEvent) {
|
if (event instanceof BreakpointsChangedEvent) {
|
||||||
BreakpointsChangedEvent bpChangedEvent = ((BreakpointsChangedEvent)event);
|
BreakpointsChangedEvent bpChangedEvent = ((BreakpointsChangedEvent)event);
|
||||||
if (BreakpointsChangedEvent.Type.ADDED.equals(bpChangedEvent.getType())) {
|
if (BreakpointsChangedEvent.Type.ADDED.equals(bpChangedEvent.getType())) {
|
||||||
|
@ -167,7 +171,8 @@ public abstract class AbstractBreakpointVMNode extends AbstractVMNode {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void buildDelta(Object event, VMDelta parent, int nodeOffset, RequestMonitor rm) {
|
@Override
|
||||||
|
public void buildDelta(Object event, VMDelta parent, int nodeOffset, RequestMonitor rm) {
|
||||||
if (event instanceof BreakpointsChangedEvent) {
|
if (event instanceof BreakpointsChangedEvent) {
|
||||||
BreakpointsChangedEvent bpChangedEvent = ((BreakpointsChangedEvent)event);
|
BreakpointsChangedEvent bpChangedEvent = ((BreakpointsChangedEvent)event);
|
||||||
if (BreakpointsChangedEvent.Type.ADDED.equals(bpChangedEvent.getType())) {
|
if (BreakpointsChangedEvent.Type.ADDED.equals(bpChangedEvent.getType())) {
|
||||||
|
|
|
@ -45,15 +45,18 @@ public class BreakpointOrganizerVMContext extends AbstractVMContext implements I
|
||||||
return getOrganizer().hashCode() + getVMNode().hashCode() + fCategory.hashCode();
|
return getOrganizer().hashCode() + getVMNode().hashCode() + fCategory.hashCode();
|
||||||
}
|
}
|
||||||
|
|
||||||
public IBreakpointOrganizer getOrganizer() {
|
@Override
|
||||||
|
public IBreakpointOrganizer getOrganizer() {
|
||||||
return ((BreakpointOrganizerVMNode)getVMNode()).getOrganizer();
|
return ((BreakpointOrganizerVMNode)getVMNode()).getOrganizer();
|
||||||
}
|
}
|
||||||
|
|
||||||
public IAdaptable getCategory() {
|
@Override
|
||||||
|
public IAdaptable getCategory() {
|
||||||
return fCategory;
|
return fCategory;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean contains(IBreakpoint breakpoint) {
|
@Override
|
||||||
|
public boolean contains(IBreakpoint breakpoint) {
|
||||||
for (IBreakpoint bp : fBreakpoints) {
|
for (IBreakpoint bp : fBreakpoints) {
|
||||||
if (bp.equals(breakpoint)) {
|
if (bp.equals(breakpoint)) {
|
||||||
return true;
|
return true;
|
||||||
|
@ -62,7 +65,8 @@ public class BreakpointOrganizerVMContext extends AbstractVMContext implements I
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IBreakpoint[] getBreakpoints() {
|
@Override
|
||||||
|
public IBreakpoint[] getBreakpoints() {
|
||||||
return fBreakpoints;
|
return fBreakpoints;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,7 @@ public class BreakpointOrganizerVMNode extends AbstractVMNode {
|
||||||
private final IBreakpointOrganizer fOrganizer;
|
private final IBreakpointOrganizer fOrganizer;
|
||||||
|
|
||||||
private final IPropertyChangeListener fOrganizerListener = new IPropertyChangeListener() {
|
private final IPropertyChangeListener fOrganizerListener = new IPropertyChangeListener() {
|
||||||
|
@Override
|
||||||
public void propertyChange(PropertyChangeEvent event) {
|
public void propertyChange(PropertyChangeEvent event) {
|
||||||
((BreakpointVMProvider)getVMProvider()).handleEventInExecThread(event);
|
((BreakpointVMProvider)getVMProvider()).handleEventInExecThread(event);
|
||||||
}
|
}
|
||||||
|
@ -58,6 +59,7 @@ public class BreakpointOrganizerVMNode extends AbstractVMNode {
|
||||||
return fOrganizer;
|
return fOrganizer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void update(final IHasChildrenUpdate[] updates) {
|
public void update(final IHasChildrenUpdate[] updates) {
|
||||||
for (final IHasChildrenUpdate update : updates) {
|
for (final IHasChildrenUpdate update : updates) {
|
||||||
if (!checkUpdate(update)) continue;
|
if (!checkUpdate(update)) continue;
|
||||||
|
@ -73,6 +75,7 @@ public class BreakpointOrganizerVMNode extends AbstractVMNode {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void update(final IChildrenCountUpdate[] updates) {
|
public void update(final IChildrenCountUpdate[] updates) {
|
||||||
for (final IChildrenCountUpdate update : updates) {
|
for (final IChildrenCountUpdate update : updates) {
|
||||||
if (!checkUpdate(update)) continue;
|
if (!checkUpdate(update)) continue;
|
||||||
|
@ -88,6 +91,7 @@ public class BreakpointOrganizerVMNode extends AbstractVMNode {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void update(IChildrenUpdate[] updates) {
|
public void update(IChildrenUpdate[] updates) {
|
||||||
for (final IChildrenUpdate update : updates) {
|
for (final IChildrenUpdate update : updates) {
|
||||||
if (!checkUpdate(update)) continue;
|
if (!checkUpdate(update)) continue;
|
||||||
|
@ -114,6 +118,7 @@ public class BreakpointOrganizerVMNode extends AbstractVMNode {
|
||||||
return new BreakpointOrganizerVMContext(this, category, breakpoints);
|
return new BreakpointOrganizerVMContext(this, category, breakpoints);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int getDeltaFlags(Object event) {
|
public int getDeltaFlags(Object event) {
|
||||||
if (event instanceof BreakpointsChangedEvent) {
|
if (event instanceof BreakpointsChangedEvent) {
|
||||||
return IModelDelta.CONTENT;
|
return IModelDelta.CONTENT;
|
||||||
|
@ -132,6 +137,7 @@ public class BreakpointOrganizerVMNode extends AbstractVMNode {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void buildDelta(Object event, VMDelta parent, int nodeOffset, RequestMonitor requestMonitor) {
|
public void buildDelta(Object event, VMDelta parent, int nodeOffset, RequestMonitor requestMonitor) {
|
||||||
if (event instanceof BreakpointsChangedEvent) {
|
if (event instanceof BreakpointsChangedEvent) {
|
||||||
parent.setFlags(parent.getFlags() | IModelDelta.CONTENT);
|
parent.setFlags(parent.getFlags() | IModelDelta.CONTENT);
|
||||||
|
|
|
@ -30,18 +30,21 @@ public class BreakpointVMInput extends AbstractVMContext implements IElementMeme
|
||||||
fDMContext = dmc;
|
fDMContext = dmc;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IDMContext getDMContext() {
|
@Override
|
||||||
|
public IDMContext getDMContext() {
|
||||||
return fDMContext;
|
return fDMContext;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void encodeElements(IElementMementoRequest[] requests) {
|
@Override
|
||||||
|
public void encodeElements(IElementMementoRequest[] requests) {
|
||||||
for (IElementMementoRequest request : requests) {
|
for (IElementMementoRequest request : requests) {
|
||||||
request.getMemento().putString("ELEMENT_NAME", "BreakpointInputMemento"); //$NON-NLS-1$//$NON-NLS-2$
|
request.getMemento().putString("ELEMENT_NAME", "BreakpointInputMemento"); //$NON-NLS-1$//$NON-NLS-2$
|
||||||
request.done();
|
request.done();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void compareElements(IElementCompareRequest[] requests) {
|
@Override
|
||||||
|
public void compareElements(IElementCompareRequest[] requests) {
|
||||||
for (IElementCompareRequest request : requests) {
|
for (IElementCompareRequest request : requests) {
|
||||||
request.setEqual( "BreakpointInputMemento".equals(request.getMemento().getString("ELEMENT_NAME")) ); //$NON-NLS-1$//$NON-NLS-2$
|
request.setEqual( "BreakpointInputMemento".equals(request.getMemento().getString("ELEMENT_NAME")) ); //$NON-NLS-1$//$NON-NLS-2$
|
||||||
request.done();
|
request.done();
|
||||||
|
|
|
@ -31,7 +31,8 @@ public class BreakpointVMModelProxyStrategy extends DefaultVMModelProxyStrategy
|
||||||
super(provider, rootElement);
|
super(provider, rootElement);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean setChecked(IPresentationContext context, Object viewerInput, TreePath path, boolean checked) {
|
@Override
|
||||||
|
public boolean setChecked(IPresentationContext context, Object viewerInput, TreePath path, boolean checked) {
|
||||||
Object lastSegment = path.getLastSegment();
|
Object lastSegment = path.getLastSegment();
|
||||||
if (lastSegment instanceof IBreakpointContainer) {
|
if (lastSegment instanceof IBreakpointContainer) {
|
||||||
IBreakpoint[] breakpoints = ((IBreakpointContainer) lastSegment).getBreakpoints();
|
IBreakpoint[] breakpoints = ((IBreakpointContainer) lastSegment).getBreakpoints();
|
||||||
|
|
|
@ -49,6 +49,7 @@ public class BreakpointVMNode extends AbstractBreakpointVMNode implements IEleme
|
||||||
return new BreakpointVMContext(this, bp);
|
return new BreakpointVMContext(this, bp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void update(ILabelUpdate[] updates) {
|
public void update(ILabelUpdate[] updates) {
|
||||||
Map<IElementLabelProvider, List<ILabelUpdate>> delegatesMap = new HashMap<IElementLabelProvider, List<ILabelUpdate>>(1,1);
|
Map<IElementLabelProvider, List<ILabelUpdate>> delegatesMap = new HashMap<IElementLabelProvider, List<ILabelUpdate>>(1,1);
|
||||||
|
|
||||||
|
@ -66,27 +67,43 @@ public class BreakpointVMNode extends AbstractBreakpointVMNode implements IEleme
|
||||||
delegatesMap.put(provider, delegatesList);
|
delegatesMap.put(provider, delegatesList);
|
||||||
}
|
}
|
||||||
delegatesList.add(new ICheckUpdate() {
|
delegatesList.add(new ICheckUpdate() {
|
||||||
|
@Override
|
||||||
public void setChecked(boolean checked, boolean grayed) {
|
public void setChecked(boolean checked, boolean grayed) {
|
||||||
if (update instanceof ICheckUpdate) {
|
if (update instanceof ICheckUpdate) {
|
||||||
((ICheckUpdate)update).setChecked(checked, grayed);
|
((ICheckUpdate)update).setChecked(checked, grayed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
public String[] getColumnIds() { return update.getColumnIds(); }
|
public String[] getColumnIds() { return update.getColumnIds(); }
|
||||||
|
@Override
|
||||||
public void setLabel(String text, int columnIndex) {
|
public void setLabel(String text, int columnIndex) {
|
||||||
update.setLabel(text, columnIndex);
|
update.setLabel(text, columnIndex);
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
public void setFontData(FontData fontData, int columnIndex) { update.setFontData(fontData, columnIndex); }
|
public void setFontData(FontData fontData, int columnIndex) { update.setFontData(fontData, columnIndex); }
|
||||||
|
@Override
|
||||||
public void setImageDescriptor(ImageDescriptor image, int columnIndex) { update.setImageDescriptor(image, columnIndex); }
|
public void setImageDescriptor(ImageDescriptor image, int columnIndex) { update.setImageDescriptor(image, columnIndex); }
|
||||||
|
@Override
|
||||||
public void setForeground(RGB foreground, int columnIndex) { update.setForeground(foreground, columnIndex); }
|
public void setForeground(RGB foreground, int columnIndex) { update.setForeground(foreground, columnIndex); }
|
||||||
|
@Override
|
||||||
public void setBackground(RGB background, int columnIndex) { update.setBackground(background, columnIndex); }
|
public void setBackground(RGB background, int columnIndex) { update.setBackground(background, columnIndex); }
|
||||||
|
@Override
|
||||||
public IPresentationContext getPresentationContext() { return update.getPresentationContext(); }
|
public IPresentationContext getPresentationContext() { return update.getPresentationContext(); }
|
||||||
|
@Override
|
||||||
public Object getElement() { return bp; }
|
public Object getElement() { return bp; }
|
||||||
|
@Override
|
||||||
public TreePath getElementPath() { return update.getElementPath().getParentPath().createChildPath(bp); }
|
public TreePath getElementPath() { return update.getElementPath().getParentPath().createChildPath(bp); }
|
||||||
|
@Override
|
||||||
public Object getViewerInput() { return update.getViewerInput(); }
|
public Object getViewerInput() { return update.getViewerInput(); }
|
||||||
|
@Override
|
||||||
public void setStatus(IStatus status) { update.setStatus(status); }
|
public void setStatus(IStatus status) { update.setStatus(status); }
|
||||||
|
@Override
|
||||||
public IStatus getStatus() { return update.getStatus(); }
|
public IStatus getStatus() { return update.getStatus(); }
|
||||||
|
@Override
|
||||||
public void done() { update.done(); }
|
public void done() { update.done(); }
|
||||||
|
@Override
|
||||||
public void cancel() { update.cancel(); }
|
public void cancel() { update.cancel(); }
|
||||||
|
@Override
|
||||||
public boolean isCanceled() { return update.isCanceled(); }
|
public boolean isCanceled() { return update.isCanceled(); }
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -97,6 +114,7 @@ public class BreakpointVMNode extends AbstractBreakpointVMNode implements IEleme
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void encodeElements(IElementMementoRequest[] updates) {
|
public void encodeElements(IElementMementoRequest[] updates) {
|
||||||
Map<IElementMementoProvider, List<IElementMementoRequest>> delegatesMap = new HashMap<IElementMementoProvider, List<IElementMementoRequest>>(1,1);
|
Map<IElementMementoProvider, List<IElementMementoRequest>> delegatesMap = new HashMap<IElementMementoProvider, List<IElementMementoRequest>>(1,1);
|
||||||
|
|
||||||
|
@ -114,15 +132,25 @@ public class BreakpointVMNode extends AbstractBreakpointVMNode implements IEleme
|
||||||
delegatesMap.put(provider, delegatesList);
|
delegatesMap.put(provider, delegatesList);
|
||||||
}
|
}
|
||||||
delegatesList.add(new IElementMementoRequest() {
|
delegatesList.add(new IElementMementoRequest() {
|
||||||
|
@Override
|
||||||
public IMemento getMemento() { return update.getMemento(); }
|
public IMemento getMemento() { return update.getMemento(); }
|
||||||
|
@Override
|
||||||
public IPresentationContext getPresentationContext() { return update.getPresentationContext(); }
|
public IPresentationContext getPresentationContext() { return update.getPresentationContext(); }
|
||||||
|
@Override
|
||||||
public Object getElement() { return bp; }
|
public Object getElement() { return bp; }
|
||||||
|
@Override
|
||||||
public TreePath getElementPath() { return update.getElementPath().getParentPath().createChildPath(bp); }
|
public TreePath getElementPath() { return update.getElementPath().getParentPath().createChildPath(bp); }
|
||||||
|
@Override
|
||||||
public Object getViewerInput() { return update.getViewerInput(); }
|
public Object getViewerInput() { return update.getViewerInput(); }
|
||||||
|
@Override
|
||||||
public void setStatus(IStatus status) { update.setStatus(status); }
|
public void setStatus(IStatus status) { update.setStatus(status); }
|
||||||
|
@Override
|
||||||
public IStatus getStatus() { return update.getStatus(); }
|
public IStatus getStatus() { return update.getStatus(); }
|
||||||
|
@Override
|
||||||
public void done() { update.done(); }
|
public void done() { update.done(); }
|
||||||
|
@Override
|
||||||
public void cancel() { update.cancel(); }
|
public void cancel() { update.cancel(); }
|
||||||
|
@Override
|
||||||
public boolean isCanceled() { return update.isCanceled(); }
|
public boolean isCanceled() { return update.isCanceled(); }
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -133,6 +161,7 @@ public class BreakpointVMNode extends AbstractBreakpointVMNode implements IEleme
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void compareElements(IElementCompareRequest[] updates) {
|
public void compareElements(IElementCompareRequest[] updates) {
|
||||||
Map<IElementMementoProvider, List<IElementCompareRequest>> delegatesMap = new HashMap<IElementMementoProvider, List<IElementCompareRequest>>(1,1);
|
Map<IElementMementoProvider, List<IElementCompareRequest>> delegatesMap = new HashMap<IElementMementoProvider, List<IElementCompareRequest>>(1,1);
|
||||||
|
|
||||||
|
@ -150,16 +179,27 @@ public class BreakpointVMNode extends AbstractBreakpointVMNode implements IEleme
|
||||||
delegatesMap.put(provider, delegatesList);
|
delegatesMap.put(provider, delegatesList);
|
||||||
}
|
}
|
||||||
delegatesList.add(new IElementCompareRequest() {
|
delegatesList.add(new IElementCompareRequest() {
|
||||||
|
@Override
|
||||||
public IMemento getMemento() { return update.getMemento(); }
|
public IMemento getMemento() { return update.getMemento(); }
|
||||||
|
@Override
|
||||||
public void setEqual(boolean equal) { update.setEqual(equal);}
|
public void setEqual(boolean equal) { update.setEqual(equal);}
|
||||||
|
@Override
|
||||||
public IPresentationContext getPresentationContext() { return update.getPresentationContext(); }
|
public IPresentationContext getPresentationContext() { return update.getPresentationContext(); }
|
||||||
|
@Override
|
||||||
public Object getElement() { return bp; }
|
public Object getElement() { return bp; }
|
||||||
|
@Override
|
||||||
public TreePath getElementPath() { return update.getElementPath().getParentPath().createChildPath(bp); }
|
public TreePath getElementPath() { return update.getElementPath().getParentPath().createChildPath(bp); }
|
||||||
|
@Override
|
||||||
public Object getViewerInput() { return update.getViewerInput(); }
|
public Object getViewerInput() { return update.getViewerInput(); }
|
||||||
|
@Override
|
||||||
public void setStatus(IStatus status) { update.setStatus(status); }
|
public void setStatus(IStatus status) { update.setStatus(status); }
|
||||||
|
@Override
|
||||||
public IStatus getStatus() { return update.getStatus(); }
|
public IStatus getStatus() { return update.getStatus(); }
|
||||||
|
@Override
|
||||||
public void done() { update.done(); }
|
public void done() { update.done(); }
|
||||||
|
@Override
|
||||||
public void cancel() { update.cancel(); }
|
public void cancel() { update.cancel(); }
|
||||||
|
@Override
|
||||||
public boolean isCanceled() { return update.isCanceled(); }
|
public boolean isCanceled() { return update.isCanceled(); }
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,20 +73,24 @@ import org.eclipse.ui.IWorkbenchWindow;
|
||||||
public class BreakpointVMProvider extends AbstractVMProvider
|
public class BreakpointVMProvider extends AbstractVMProvider
|
||||||
{
|
{
|
||||||
private IPropertyChangeListener fPresentationContextListener = new IPropertyChangeListener() {
|
private IPropertyChangeListener fPresentationContextListener = new IPropertyChangeListener() {
|
||||||
|
@Override
|
||||||
public void propertyChange(PropertyChangeEvent event) {
|
public void propertyChange(PropertyChangeEvent event) {
|
||||||
handleEventInExecThread(event);
|
handleEventInExecThread(event);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
private IBreakpointsListener fBreakpointsListener = new IBreakpointsListener() {
|
private IBreakpointsListener fBreakpointsListener = new IBreakpointsListener() {
|
||||||
|
@Override
|
||||||
public void breakpointsRemoved(IBreakpoint[] breakpoints, IMarkerDelta[] deltas) {
|
public void breakpointsRemoved(IBreakpoint[] breakpoints, IMarkerDelta[] deltas) {
|
||||||
handleEventInExecThread(new BreakpointsChangedEvent(BreakpointsChangedEvent.Type.REMOVED, breakpoints));
|
handleEventInExecThread(new BreakpointsChangedEvent(BreakpointsChangedEvent.Type.REMOVED, breakpoints));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void breakpointsChanged(IBreakpoint[] breakpoints, IMarkerDelta[] deltas) {
|
public void breakpointsChanged(IBreakpoint[] breakpoints, IMarkerDelta[] deltas) {
|
||||||
handleEventInExecThread(new BreakpointsChangedEvent(BreakpointsChangedEvent.Type.CHANGED, breakpoints));
|
handleEventInExecThread(new BreakpointsChangedEvent(BreakpointsChangedEvent.Type.CHANGED, breakpoints));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void breakpointsAdded(IBreakpoint[] breakpoints) {
|
public void breakpointsAdded(IBreakpoint[] breakpoints) {
|
||||||
handleEventInExecThread(new BreakpointsChangedEvent(BreakpointsChangedEvent.Type.ADDED, breakpoints));
|
handleEventInExecThread(new BreakpointsChangedEvent(BreakpointsChangedEvent.Type.ADDED, breakpoints));
|
||||||
}
|
}
|
||||||
|
@ -94,6 +98,7 @@ public class BreakpointVMProvider extends AbstractVMProvider
|
||||||
};
|
};
|
||||||
|
|
||||||
private IDebugContextListener fDebugContextListener = new IDebugContextListener() {
|
private IDebugContextListener fDebugContextListener = new IDebugContextListener() {
|
||||||
|
@Override
|
||||||
public void debugContextChanged(final DebugContextEvent event) {
|
public void debugContextChanged(final DebugContextEvent event) {
|
||||||
handleEventInExecThread(event);
|
handleEventInExecThread(event);
|
||||||
}
|
}
|
||||||
|
@ -332,6 +337,7 @@ public class BreakpointVMProvider extends AbstractVMProvider
|
||||||
|
|
||||||
public void handleEventInExecThread(final Object event) {
|
public void handleEventInExecThread(final Object event) {
|
||||||
getExecutor().execute(new DsfRunnable() {
|
getExecutor().execute(new DsfRunnable() {
|
||||||
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
handleEvent(event);
|
handleEvent(event);
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,7 +52,8 @@ public abstract class AbstractExpressionVMNode extends AbstractDMVMNode
|
||||||
super(provider, session, dmcClassType);
|
super(provider, session, dmcClassType);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void update(final IExpressionUpdate update) {
|
@Override
|
||||||
|
public void update(final IExpressionUpdate update) {
|
||||||
if (!canParseExpression(update.getExpression())) {
|
if (!canParseExpression(update.getExpression())) {
|
||||||
// This method should not be called if canParseExpression() returns false.
|
// This method should not be called if canParseExpression() returns false.
|
||||||
// Return an internal error status.
|
// Return an internal error status.
|
||||||
|
|
|
@ -96,22 +96,27 @@ public class DisabledExpressionVMNode extends AbstractVMNode
|
||||||
super(provider);
|
super(provider);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean canParseExpression(IExpression expression) {
|
public boolean canParseExpression(IExpression expression) {
|
||||||
return expression instanceof IWatchExpression && !((IWatchExpression)expression).isEnabled();
|
return expression instanceof IWatchExpression && !((IWatchExpression)expression).isEnabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int getDeltaFlagsForExpression(IExpression expression, Object event) {
|
public int getDeltaFlagsForExpression(IExpression expression, Object event) {
|
||||||
return IModelDelta.NO_CHANGE;
|
return IModelDelta.NO_CHANGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int getDeltaFlags(Object event) {
|
public int getDeltaFlags(Object event) {
|
||||||
return IModelDelta.NO_CHANGE;
|
return IModelDelta.NO_CHANGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void buildDelta(Object event, VMDelta parent, int nodeOffset, RequestMonitor requestMonitor) {
|
public void buildDelta(Object event, VMDelta parent, int nodeOffset, RequestMonitor requestMonitor) {
|
||||||
requestMonitor.done();
|
requestMonitor.done();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void update(IChildrenCountUpdate[] updates) {
|
public void update(IChildrenCountUpdate[] updates) {
|
||||||
for (IViewerUpdate update : updates) {
|
for (IViewerUpdate update : updates) {
|
||||||
update.setStatus(new Status(IStatus.ERROR, DsfUIPlugin.PLUGIN_ID, IDsfStatusConstants.NOT_SUPPORTED, "Not supported", null)); //$NON-NLS-1$
|
update.setStatus(new Status(IStatus.ERROR, DsfUIPlugin.PLUGIN_ID, IDsfStatusConstants.NOT_SUPPORTED, "Not supported", null)); //$NON-NLS-1$
|
||||||
|
@ -119,6 +124,7 @@ public class DisabledExpressionVMNode extends AbstractVMNode
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void update(IChildrenUpdate[] updates) {
|
public void update(IChildrenUpdate[] updates) {
|
||||||
for (IViewerUpdate update : updates) {
|
for (IViewerUpdate update : updates) {
|
||||||
update.setStatus(new Status(IStatus.ERROR, DsfUIPlugin.PLUGIN_ID, IDsfStatusConstants.NOT_SUPPORTED, "Not supported", null)); //$NON-NLS-1$
|
update.setStatus(new Status(IStatus.ERROR, DsfUIPlugin.PLUGIN_ID, IDsfStatusConstants.NOT_SUPPORTED, "Not supported", null)); //$NON-NLS-1$
|
||||||
|
@ -126,6 +132,7 @@ public class DisabledExpressionVMNode extends AbstractVMNode
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void update(IHasChildrenUpdate[] updates) {
|
public void update(IHasChildrenUpdate[] updates) {
|
||||||
for (IViewerUpdate update : updates) {
|
for (IViewerUpdate update : updates) {
|
||||||
update.setStatus(new Status(IStatus.ERROR, DsfUIPlugin.PLUGIN_ID, IDsfStatusConstants.NOT_SUPPORTED, "Not supported", null)); //$NON-NLS-1$
|
update.setStatus(new Status(IStatus.ERROR, DsfUIPlugin.PLUGIN_ID, IDsfStatusConstants.NOT_SUPPORTED, "Not supported", null)); //$NON-NLS-1$
|
||||||
|
@ -133,22 +140,26 @@ public class DisabledExpressionVMNode extends AbstractVMNode
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void update(IExpressionUpdate update) {
|
public void update(IExpressionUpdate update) {
|
||||||
update.setExpressionElement(new DisabledExpressionVMContext(this, update.getExpression()));
|
update.setExpressionElement(new DisabledExpressionVMContext(this, update.getExpression()));
|
||||||
update.done();
|
update.done();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void buildDeltaForExpression(IExpression expression, int elementIdx, Object event, VMDelta parentDelta,
|
public void buildDeltaForExpression(IExpression expression, int elementIdx, Object event, VMDelta parentDelta,
|
||||||
TreePath path, RequestMonitor rm)
|
TreePath path, RequestMonitor rm)
|
||||||
{
|
{
|
||||||
rm.done();
|
rm.done();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void buildDeltaForExpressionElement(Object element, int elementIdx, Object event, VMDelta parentDelta,
|
public void buildDeltaForExpressionElement(Object element, int elementIdx, Object event, VMDelta parentDelta,
|
||||||
RequestMonitor rm) {
|
RequestMonitor rm) {
|
||||||
rm.done();
|
rm.done();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public CellEditor getCellEditor(IPresentationContext context, String columnId, Object element, Composite parent) {
|
public CellEditor getCellEditor(IPresentationContext context, String columnId, Object element, Composite parent) {
|
||||||
if (IDebugVMConstants.COLUMN_ID__EXPRESSION.equals(columnId)) {
|
if (IDebugVMConstants.COLUMN_ID__EXPRESSION.equals(columnId)) {
|
||||||
return new TextCellEditor(parent);
|
return new TextCellEditor(parent);
|
||||||
|
@ -156,6 +167,7 @@ public class DisabledExpressionVMNode extends AbstractVMNode
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public ICellModifier getCellModifier(IPresentationContext context, Object element) {
|
public ICellModifier getCellModifier(IPresentationContext context, Object element) {
|
||||||
return fWatchExpressionCellModifier;
|
return fWatchExpressionCellModifier;
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,19 +23,23 @@ public class ExpressionColumnPresentation implements IColumnPresentation {
|
||||||
|
|
||||||
public static final String ID = DsfUIPlugin.PLUGIN_ID + ".EXPRESSION_COLUMN_PRESENTATION_ID"; //$NON-NLS-1$
|
public static final String ID = DsfUIPlugin.PLUGIN_ID + ".EXPRESSION_COLUMN_PRESENTATION_ID"; //$NON-NLS-1$
|
||||||
|
|
||||||
public void init(IPresentationContext context) {
|
@Override
|
||||||
|
public void init(IPresentationContext context) {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void dispose() {
|
@Override
|
||||||
|
public void dispose() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// @see org.eclipse.debug.internal.ui.viewers.provisional.IColumnPresentation#getAvailableColumns()
|
// @see org.eclipse.debug.internal.ui.viewers.provisional.IColumnPresentation#getAvailableColumns()
|
||||||
public String[] getAvailableColumns() {
|
@Override
|
||||||
|
public String[] getAvailableColumns() {
|
||||||
return new String[] { IDebugVMConstants.COLUMN_ID__EXPRESSION, IDebugVMConstants.COLUMN_ID__NAME, IDebugVMConstants.COLUMN_ID__TYPE, IDebugVMConstants.COLUMN_ID__VALUE, IDebugVMConstants.COLUMN_ID__DESCRIPTION, IDebugVMConstants.COLUMN_ID__ADDRESS };
|
return new String[] { IDebugVMConstants.COLUMN_ID__EXPRESSION, IDebugVMConstants.COLUMN_ID__NAME, IDebugVMConstants.COLUMN_ID__TYPE, IDebugVMConstants.COLUMN_ID__VALUE, IDebugVMConstants.COLUMN_ID__DESCRIPTION, IDebugVMConstants.COLUMN_ID__ADDRESS };
|
||||||
}
|
}
|
||||||
|
|
||||||
// @see org.eclipse.debug.internal.ui.viewers.provisional.IColumnPresentation#getHeader(java.lang.String)
|
// @see org.eclipse.debug.internal.ui.viewers.provisional.IColumnPresentation#getHeader(java.lang.String)
|
||||||
public String getHeader(String id) {
|
@Override
|
||||||
|
public String getHeader(String id) {
|
||||||
if (IDebugVMConstants.COLUMN_ID__EXPRESSION.equals(id)) {
|
if (IDebugVMConstants.COLUMN_ID__EXPRESSION.equals(id)) {
|
||||||
return MessagesForExpressionVM.ExpressionColumnPresentation_expression;
|
return MessagesForExpressionVM.ExpressionColumnPresentation_expression;
|
||||||
} else if (IDebugVMConstants.COLUMN_ID__NAME.equals(id)) {
|
} else if (IDebugVMConstants.COLUMN_ID__NAME.equals(id)) {
|
||||||
|
@ -53,21 +57,25 @@ public class ExpressionColumnPresentation implements IColumnPresentation {
|
||||||
}
|
}
|
||||||
|
|
||||||
// @see org.eclipse.debug.internal.ui.viewers.provisional.IColumnPresentation#getId()
|
// @see org.eclipse.debug.internal.ui.viewers.provisional.IColumnPresentation#getId()
|
||||||
public String getId() {
|
@Override
|
||||||
|
public String getId() {
|
||||||
return ID;
|
return ID;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ImageDescriptor getImageDescriptor(String id) {
|
@Override
|
||||||
|
public ImageDescriptor getImageDescriptor(String id) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// @see org.eclipse.debug.internal.ui.viewers.provisional.IColumnPresentation#getInitialColumns()
|
// @see org.eclipse.debug.internal.ui.viewers.provisional.IColumnPresentation#getInitialColumns()
|
||||||
public String[] getInitialColumns() {
|
@Override
|
||||||
|
public String[] getInitialColumns() {
|
||||||
return new String[] { IDebugVMConstants.COLUMN_ID__EXPRESSION, IDebugVMConstants.COLUMN_ID__TYPE, IDebugVMConstants.COLUMN_ID__VALUE };
|
return new String[] { IDebugVMConstants.COLUMN_ID__EXPRESSION, IDebugVMConstants.COLUMN_ID__TYPE, IDebugVMConstants.COLUMN_ID__VALUE };
|
||||||
}
|
}
|
||||||
|
|
||||||
// @see org.eclipse.debug.internal.ui.viewers.provisional.IColumnPresentation#isOptional()
|
// @see org.eclipse.debug.internal.ui.viewers.provisional.IColumnPresentation#isOptional()
|
||||||
public boolean isOptional() {
|
@Override
|
||||||
|
public boolean isOptional() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -117,6 +117,7 @@ public class ExpressionManagerVMNode extends AbstractVMNode
|
||||||
return (ExpressionVMProvider)getVMProvider();
|
return (ExpressionVMProvider)getVMProvider();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void update(IHasChildrenUpdate[] updates) {
|
public void update(IHasChildrenUpdate[] updates) {
|
||||||
// Test availability of children based on whether there are any expressions
|
// Test availability of children based on whether there are any expressions
|
||||||
// in the manager. We assume that the getExpressions() will just read
|
// in the manager. We assume that the getExpressions() will just read
|
||||||
|
@ -128,6 +129,7 @@ public class ExpressionManagerVMNode extends AbstractVMNode
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void update(IChildrenCountUpdate[] updates) {
|
public void update(IChildrenCountUpdate[] updates) {
|
||||||
for (IChildrenCountUpdate update : updates) {
|
for (IChildrenCountUpdate update : updates) {
|
||||||
if (!checkUpdate(update)) continue;
|
if (!checkUpdate(update)) continue;
|
||||||
|
@ -139,6 +141,7 @@ public class ExpressionManagerVMNode extends AbstractVMNode
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void update(final IChildrenUpdate[] updates) {
|
public void update(final IChildrenUpdate[] updates) {
|
||||||
for (IChildrenUpdate update : updates) {
|
for (IChildrenUpdate update : updates) {
|
||||||
doUpdateChildren(update);
|
doUpdateChildren(update);
|
||||||
|
@ -203,7 +206,8 @@ public class ExpressionManagerVMNode extends AbstractVMNode
|
||||||
multiRm.setDoneCount(multiRmCount);
|
multiRm.setDoneCount(multiRmCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void update(ILabelUpdate[] updates) {
|
@Override
|
||||||
|
public void update(ILabelUpdate[] updates) {
|
||||||
// The label update handler only handles labels for the invalid expression VMCs.
|
// The label update handler only handles labels for the invalid expression VMCs.
|
||||||
// The expression layout nodes are responsible for supplying label providers
|
// The expression layout nodes are responsible for supplying label providers
|
||||||
// for their VMCs.
|
// for their VMCs.
|
||||||
|
@ -240,7 +244,8 @@ public class ExpressionManagerVMNode extends AbstractVMNode
|
||||||
update.done();
|
update.done();
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getDeltaFlags(Object event) {
|
@Override
|
||||||
|
public int getDeltaFlags(Object event) {
|
||||||
int retVal = 0;
|
int retVal = 0;
|
||||||
|
|
||||||
// Add a flag if the list of expressions in the global expression manager has changed.
|
// Add a flag if the list of expressions in the global expression manager has changed.
|
||||||
|
@ -255,7 +260,8 @@ public class ExpressionManagerVMNode extends AbstractVMNode
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void buildDelta(final Object event, final VMDelta parentDelta, final int nodeOffset, final RequestMonitor requestMonitor) {
|
@Override
|
||||||
|
public void buildDelta(final Object event, final VMDelta parentDelta, final int nodeOffset, final RequestMonitor requestMonitor) {
|
||||||
if (event instanceof ExpressionsChangedEvent) {
|
if (event instanceof ExpressionsChangedEvent) {
|
||||||
buildDeltaForExpressionsChangedEvent((ExpressionsChangedEvent)event, parentDelta, nodeOffset, requestMonitor);
|
buildDeltaForExpressionsChangedEvent((ExpressionsChangedEvent)event, parentDelta, nodeOffset, requestMonitor);
|
||||||
} else {
|
} else {
|
||||||
|
@ -314,7 +320,8 @@ public class ExpressionManagerVMNode extends AbstractVMNode
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IElementEditor#getCellEditor(org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, java.lang.String, java.lang.Object, org.eclipse.swt.widgets.Composite)
|
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IElementEditor#getCellEditor(org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, java.lang.String, java.lang.Object, org.eclipse.swt.widgets.Composite)
|
||||||
*/
|
*/
|
||||||
public CellEditor getCellEditor(IPresentationContext context, String columnId, Object element, Composite parent) {
|
@Override
|
||||||
|
public CellEditor getCellEditor(IPresentationContext context, String columnId, Object element, Composite parent) {
|
||||||
if (IDebugVMConstants.COLUMN_ID__EXPRESSION.equals(columnId)) {
|
if (IDebugVMConstants.COLUMN_ID__EXPRESSION.equals(columnId)) {
|
||||||
return new TextCellEditor(parent);
|
return new TextCellEditor(parent);
|
||||||
}
|
}
|
||||||
|
@ -325,7 +332,8 @@ public class ExpressionManagerVMNode extends AbstractVMNode
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IElementEditor#getCellModifier(org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, java.lang.Object)
|
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IElementEditor#getCellModifier(org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, java.lang.Object)
|
||||||
*/
|
*/
|
||||||
public ICellModifier getCellModifier(IPresentationContext context, Object element) {
|
@Override
|
||||||
|
public ICellModifier getCellModifier(IPresentationContext context, Object element) {
|
||||||
if ( fWatchExpressionCellModifier == null ) {
|
if ( fWatchExpressionCellModifier == null ) {
|
||||||
fWatchExpressionCellModifier = createCellModifier();
|
fWatchExpressionCellModifier = createCellModifier();
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,7 +76,8 @@ public class ExpressionVMProvider extends AbstractDMVMProvider
|
||||||
private IExpressionVMNode[] fExpressionNodes;
|
private IExpressionVMNode[] fExpressionNodes;
|
||||||
|
|
||||||
private IPropertyChangeListener fPreferencesListener = new IPropertyChangeListener() {
|
private IPropertyChangeListener fPreferencesListener = new IPropertyChangeListener() {
|
||||||
public void propertyChange(PropertyChangeEvent event) {
|
@Override
|
||||||
|
public void propertyChange(PropertyChangeEvent event) {
|
||||||
String property = event.getProperty();
|
String property = event.getProperty();
|
||||||
if (property.equals(IDsfDebugUIConstants.PREF_WAIT_FOR_VIEW_UPDATE_AFTER_STEP_ENABLE)) {
|
if (property.equals(IDsfDebugUIConstants.PREF_WAIT_FOR_VIEW_UPDATE_AFTER_STEP_ENABLE)) {
|
||||||
IPreferenceStore store = DsfDebugUITools.getPreferenceStore();
|
IPreferenceStore store = DsfDebugUITools.getPreferenceStore();
|
||||||
|
@ -86,7 +87,8 @@ public class ExpressionVMProvider extends AbstractDMVMProvider
|
||||||
};
|
};
|
||||||
|
|
||||||
private IPropertyChangeListener fPresentationContextListener = new IPropertyChangeListener() {
|
private IPropertyChangeListener fPresentationContextListener = new IPropertyChangeListener() {
|
||||||
public void propertyChange(PropertyChangeEvent event) {
|
@Override
|
||||||
|
public void propertyChange(PropertyChangeEvent event) {
|
||||||
handleEvent(event);
|
handleEvent(event);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -280,7 +282,8 @@ public class ExpressionVMProvider extends AbstractDMVMProvider
|
||||||
final VariableVMNode variableNode) {
|
final VariableVMNode variableNode) {
|
||||||
try {
|
try {
|
||||||
getSession().getExecutor().execute(new DsfRunnable() {
|
getSession().getExecutor().execute(new DsfRunnable() {
|
||||||
public void run() {
|
@Override
|
||||||
|
public void run() {
|
||||||
DsfServicesTracker tracker = new DsfServicesTracker(DsfUIPlugin.getBundleContext(), getSession().getId());
|
DsfServicesTracker tracker = new DsfServicesTracker(DsfUIPlugin.getBundleContext(), getSession().getId());
|
||||||
IExpressions2 expressions2 = tracker.getService(IExpressions2.class);
|
IExpressions2 expressions2 = tracker.getService(IExpressions2.class);
|
||||||
if (expressions2 != null) {
|
if (expressions2 != null) {
|
||||||
|
@ -355,23 +358,28 @@ public class ExpressionVMProvider extends AbstractDMVMProvider
|
||||||
new ExpressionsBreakpointHitUpdatePolicy() };
|
new ExpressionsBreakpointHitUpdatePolicy() };
|
||||||
}
|
}
|
||||||
|
|
||||||
public void expressionsAdded(IExpression[] expressions) {
|
@Override
|
||||||
|
public void expressionsAdded(IExpression[] expressions) {
|
||||||
expressionsListChanged(ExpressionsChangedEvent.Type.ADDED, expressions, -1);
|
expressionsListChanged(ExpressionsChangedEvent.Type.ADDED, expressions, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void expressionsRemoved(IExpression[] expressions) {
|
@Override
|
||||||
|
public void expressionsRemoved(IExpression[] expressions) {
|
||||||
expressionsListChanged(ExpressionsChangedEvent.Type.REMOVED, expressions, -1);
|
expressionsListChanged(ExpressionsChangedEvent.Type.REMOVED, expressions, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void expressionsInserted(IExpression[] expressions, int index) {
|
@Override
|
||||||
|
public void expressionsInserted(IExpression[] expressions, int index) {
|
||||||
expressionsListChanged(ExpressionsChangedEvent.Type.INSERTED, expressions, index);
|
expressionsListChanged(ExpressionsChangedEvent.Type.INSERTED, expressions, index);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void expressionsMoved(IExpression[] expressions, int index) {
|
@Override
|
||||||
|
public void expressionsMoved(IExpression[] expressions, int index) {
|
||||||
expressionsListChanged(ExpressionsChangedEvent.Type.MOVED, expressions, index);
|
expressionsListChanged(ExpressionsChangedEvent.Type.MOVED, expressions, index);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void expressionsChanged(IExpression[] expressions) {
|
@Override
|
||||||
|
public void expressionsChanged(IExpression[] expressions) {
|
||||||
expressionsListChanged(ExpressionsChangedEvent.Type.CHANGED, expressions, -1);
|
expressionsListChanged(ExpressionsChangedEvent.Type.CHANGED, expressions, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -396,7 +404,8 @@ public class ExpressionVMProvider extends AbstractDMVMProvider
|
||||||
super.refresh();
|
super.refresh();
|
||||||
try {
|
try {
|
||||||
getSession().getExecutor().execute(new DsfRunnable() {
|
getSession().getExecutor().execute(new DsfRunnable() {
|
||||||
public void run() {
|
@Override
|
||||||
|
public void run() {
|
||||||
DsfServicesTracker tracker = new DsfServicesTracker(DsfUIPlugin.getBundleContext(), getSession().getId());
|
DsfServicesTracker tracker = new DsfServicesTracker(DsfUIPlugin.getBundleContext(), getSession().getId());
|
||||||
IExpressions expressionsService = tracker.getService(IExpressions.class);
|
IExpressions expressionsService = tracker.getService(IExpressions.class);
|
||||||
if (expressionsService instanceof ICachingService) {
|
if (expressionsService instanceof ICachingService) {
|
||||||
|
|
|
@ -23,7 +23,8 @@ class ExpressionsChangedUpdateTester implements IElementUpdateTester {
|
||||||
fEvent = event;
|
fEvent = event;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getUpdateFlags(Object viewerInput, TreePath path) {
|
@Override
|
||||||
|
public int getUpdateFlags(Object viewerInput, TreePath path) {
|
||||||
// Check whether the element in the cache matches the expression manager element.
|
// Check whether the element in the cache matches the expression manager element.
|
||||||
Object element = path.getSegmentCount() == 0 ? viewerInput : path.getLastSegment();
|
Object element = path.getSegmentCount() == 0 ? viewerInput : path.getLastSegment();
|
||||||
if (fEvent.getExpressionManagerElements().contains(element)) {
|
if (fEvent.getExpressionManagerElements().contains(element)) {
|
||||||
|
@ -57,7 +58,8 @@ class ExpressionsChangedUpdateTester implements IElementUpdateTester {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean includes(IElementUpdateTester tester) {
|
@Override
|
||||||
|
public boolean includes(IElementUpdateTester tester) {
|
||||||
return tester instanceof ExpressionsChangedUpdateTester;
|
return tester instanceof ExpressionsChangedUpdateTester;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -69,7 +69,8 @@ public class InvalidExpressionVMContext extends AbstractVMContext implements IEl
|
||||||
/**
|
/**
|
||||||
* Updates the label for the InvalidExpressionVMC.
|
* Updates the label for the InvalidExpressionVMC.
|
||||||
*/
|
*/
|
||||||
public void update(ILabelUpdate[] updates) {
|
@Override
|
||||||
|
public void update(ILabelUpdate[] updates) {
|
||||||
for (ILabelUpdate update : updates) {
|
for (ILabelUpdate update : updates) {
|
||||||
String[] columnIds = update.getColumnIds() != null ?
|
String[] columnIds = update.getColumnIds() != null ?
|
||||||
update.getColumnIds() : new String[] { IDebugVMConstants.COLUMN_ID__NAME };
|
update.getColumnIds() : new String[] { IDebugVMConstants.COLUMN_ID__NAME };
|
||||||
|
|
|
@ -53,6 +53,7 @@ public class SingleExpressionVMNode extends AbstractVMNode implements IElementLa
|
||||||
super(node);
|
super(node);
|
||||||
fDmc = dmc;
|
fDmc = dmc;
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
public IDMContext getDMContext() {
|
public IDMContext getDMContext() {
|
||||||
return fDmc;
|
return fDmc;
|
||||||
}
|
}
|
||||||
|
@ -96,24 +97,31 @@ public class SingleExpressionVMNode extends AbstractVMNode implements IElementLa
|
||||||
SimpleExpression(String text) {
|
SimpleExpression(String text) {
|
||||||
fExpressionText = text;
|
fExpressionText = text;
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
public void dispose() {
|
public void dispose() {
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
public IDebugTarget getDebugTarget() {
|
public IDebugTarget getDebugTarget() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
public String getExpressionText() {
|
public String getExpressionText() {
|
||||||
return fExpressionText;
|
return fExpressionText;
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
public IValue getValue() {
|
public IValue getValue() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
public ILaunch getLaunch() {
|
public ILaunch getLaunch() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
public String getModelIdentifier() {
|
public String getModelIdentifier() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@SuppressWarnings("rawtypes")
|
@SuppressWarnings("rawtypes")
|
||||||
|
@Override
|
||||||
public Object getAdapter(Class adapter) {
|
public Object getAdapter(Class adapter) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -165,6 +173,7 @@ public class SingleExpressionVMNode extends AbstractVMNode implements IElementLa
|
||||||
return (ExpressionVMProvider)getVMProvider();
|
return (ExpressionVMProvider)getVMProvider();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void update(IHasChildrenUpdate[] updates) {
|
public void update(IHasChildrenUpdate[] updates) {
|
||||||
// Test availability of children based on whether there are any expressions
|
// Test availability of children based on whether there are any expressions
|
||||||
// in the manager. We assume that the getExpressions() will just read
|
// in the manager. We assume that the getExpressions() will just read
|
||||||
|
@ -176,6 +185,7 @@ public class SingleExpressionVMNode extends AbstractVMNode implements IElementLa
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void update(IChildrenCountUpdate[] updates) {
|
public void update(IChildrenCountUpdate[] updates) {
|
||||||
for (IChildrenCountUpdate update : updates) {
|
for (IChildrenCountUpdate update : updates) {
|
||||||
if (!checkUpdate(update)) continue;
|
if (!checkUpdate(update)) continue;
|
||||||
|
@ -187,6 +197,7 @@ public class SingleExpressionVMNode extends AbstractVMNode implements IElementLa
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void update(final IChildrenUpdate[] updates) {
|
public void update(final IChildrenUpdate[] updates) {
|
||||||
for (IChildrenUpdate update : updates) {
|
for (IChildrenUpdate update : updates) {
|
||||||
doUpdateChildren(update);
|
doUpdateChildren(update);
|
||||||
|
@ -247,6 +258,7 @@ public class SingleExpressionVMNode extends AbstractVMNode implements IElementLa
|
||||||
multiRm.setDoneCount(multiRmCount);
|
multiRm.setDoneCount(multiRmCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void update(ILabelUpdate[] updates) {
|
public void update(ILabelUpdate[] updates) {
|
||||||
// The label update handler only handles labels for the invalid expression VMCs.
|
// The label update handler only handles labels for the invalid expression VMCs.
|
||||||
// The expression layout nodes are responsible for supplying label providers
|
// The expression layout nodes are responsible for supplying label providers
|
||||||
|
@ -256,6 +268,7 @@ public class SingleExpressionVMNode extends AbstractVMNode implements IElementLa
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int getDeltaFlags(Object event) {
|
public int getDeltaFlags(Object event) {
|
||||||
int retVal = 0;
|
int retVal = 0;
|
||||||
|
|
||||||
|
@ -271,6 +284,7 @@ public class SingleExpressionVMNode extends AbstractVMNode implements IElementLa
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void buildDelta(final Object event, final VMDelta parentDelta, final int nodeOffset, final RequestMonitor requestMonitor) {
|
public void buildDelta(final Object event, final VMDelta parentDelta, final int nodeOffset, final RequestMonitor requestMonitor) {
|
||||||
if (event instanceof ExpressionsChangedEvent) {
|
if (event instanceof ExpressionsChangedEvent) {
|
||||||
buildDeltaForExpressionsChangedEvent((ExpressionsChangedEvent)event, parentDelta, nodeOffset, requestMonitor);
|
buildDeltaForExpressionsChangedEvent((ExpressionsChangedEvent)event, parentDelta, nodeOffset, requestMonitor);
|
||||||
|
|
|
@ -52,12 +52,14 @@ class VMExpressionUpdate extends VMViewerUpdate implements IExpressionUpdate {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public IExpression getExpression() {
|
@Override
|
||||||
|
public IExpression getExpression() {
|
||||||
return fExpression;
|
return fExpression;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void setExpressionElement(Object element) {
|
@Override
|
||||||
|
public void setExpressionElement(Object element) {
|
||||||
fExpressionElement = element;
|
fExpressionElement = element;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,12 +53,14 @@ public class WatchExpressionCellModifier implements ICellModifier {
|
||||||
public WatchExpressionCellModifier() {
|
public WatchExpressionCellModifier() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean canModify(Object element, String property) {
|
@Override
|
||||||
|
public boolean canModify(Object element, String property) {
|
||||||
return IDebugVMConstants.COLUMN_ID__EXPRESSION.equals(property) &&
|
return IDebugVMConstants.COLUMN_ID__EXPRESSION.equals(property) &&
|
||||||
(getWatchExpression(element) != null || element instanceof NewExpressionVMC);
|
(getWatchExpression(element) != null || element instanceof NewExpressionVMC);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object getValue(Object element, String property) {
|
@Override
|
||||||
|
public Object getValue(Object element, String property) {
|
||||||
if (!IDebugVMConstants.COLUMN_ID__EXPRESSION.equals(property)) return ""; //$NON-NLS-1$
|
if (!IDebugVMConstants.COLUMN_ID__EXPRESSION.equals(property)) return ""; //$NON-NLS-1$
|
||||||
|
|
||||||
IWatchExpression expression = getWatchExpression(element);
|
IWatchExpression expression = getWatchExpression(element);
|
||||||
|
@ -69,7 +71,8 @@ public class WatchExpressionCellModifier implements ICellModifier {
|
||||||
return ""; //$NON-NLS-1$
|
return ""; //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
public void modify(Object element, String property, Object value) {
|
@Override
|
||||||
|
public void modify(Object element, String property, Object value) {
|
||||||
if (!IDebugVMConstants.COLUMN_ID__EXPRESSION.equals(property)) return;
|
if (!IDebugVMConstants.COLUMN_ID__EXPRESSION.equals(property)) return;
|
||||||
if (!(value instanceof String)) return;
|
if (!(value instanceof String)) return;
|
||||||
|
|
||||||
|
|
|
@ -21,13 +21,19 @@ import org.eclipse.debug.core.model.IWatchExpressionResult;
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class WatchExpressionDelegate implements IWatchExpressionDelegate {
|
public class WatchExpressionDelegate implements IWatchExpressionDelegate {
|
||||||
public void evaluateExpression(final String expression, IDebugElement context, IWatchExpressionListener listener) {
|
@Override
|
||||||
|
public void evaluateExpression(final String expression, IDebugElement context, IWatchExpressionListener listener) {
|
||||||
listener.watchEvaluationFinished(new IWatchExpressionResult() {
|
listener.watchEvaluationFinished(new IWatchExpressionResult() {
|
||||||
public String[] getErrorMessages() { return new String[0]; }
|
@Override
|
||||||
public DebugException getException() { return null; }
|
public String[] getErrorMessages() { return new String[0]; }
|
||||||
public String getExpressionText() { return expression; }
|
@Override
|
||||||
public IValue getValue() { return null; }
|
public DebugException getException() { return null; }
|
||||||
public boolean hasErrors() { return false; }
|
@Override
|
||||||
|
public String getExpressionText() { return expression; }
|
||||||
|
@Override
|
||||||
|
public IValue getValue() { return null; }
|
||||||
|
@Override
|
||||||
|
public boolean hasErrors() { return false; }
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -118,6 +118,7 @@ public abstract class AbstractContainerVMNode extends AbstractExecutionContextVM
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
public void update(final ILabelUpdate[] updates) {
|
public void update(final ILabelUpdate[] updates) {
|
||||||
fLabelProvider.update(updates);
|
fLabelProvider.update(updates);
|
||||||
}
|
}
|
||||||
|
@ -127,10 +128,12 @@ public abstract class AbstractContainerVMNode extends AbstractExecutionContextVM
|
||||||
*
|
*
|
||||||
* @since 2.0
|
* @since 2.0
|
||||||
*/
|
*/
|
||||||
public void update(final IPropertiesUpdate[] updates) {
|
@Override
|
||||||
|
public void update(final IPropertiesUpdate[] updates) {
|
||||||
try {
|
try {
|
||||||
getSession().getExecutor().execute(new DsfRunnable() {
|
getSession().getExecutor().execute(new DsfRunnable() {
|
||||||
public void run() {
|
@Override
|
||||||
|
public void run() {
|
||||||
updatePropertiesInSessionThread(updates);
|
updatePropertiesInSessionThread(updates);
|
||||||
}});
|
}});
|
||||||
} catch (RejectedExecutionException e) {
|
} catch (RejectedExecutionException e) {
|
||||||
|
@ -228,7 +231,8 @@ public abstract class AbstractContainerVMNode extends AbstractExecutionContextVM
|
||||||
protected void handleSuccess() {
|
protected void handleSuccess() {
|
||||||
try {
|
try {
|
||||||
getSession().getExecutor().execute(new DsfRunnable() {
|
getSession().getExecutor().execute(new DsfRunnable() {
|
||||||
public void run() {
|
@Override
|
||||||
|
public void run() {
|
||||||
final IRunControl runControl = getServicesTracker().getService(IRunControl.class);
|
final IRunControl runControl = getServicesTracker().getService(IRunControl.class);
|
||||||
if (runControl != null) {
|
if (runControl != null) {
|
||||||
int vmcIdx = -1;
|
int vmcIdx = -1;
|
||||||
|
@ -270,7 +274,8 @@ public abstract class AbstractContainerVMNode extends AbstractExecutionContextVM
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getDeltaFlags(Object e) {
|
@Override
|
||||||
|
public int getDeltaFlags(Object e) {
|
||||||
IDMContext dmc = e instanceof IDMEvent<?> ? ((IDMEvent<?>)e).getDMContext() : null;
|
IDMContext dmc = e instanceof IDMEvent<?> ? ((IDMEvent<?>)e).getDMContext() : null;
|
||||||
|
|
||||||
if (e instanceof IContainerResumedDMEvent) {
|
if (e instanceof IContainerResumedDMEvent) {
|
||||||
|
@ -301,6 +306,7 @@ public abstract class AbstractContainerVMNode extends AbstractExecutionContextVM
|
||||||
return IModelDelta.NO_CHANGE;
|
return IModelDelta.NO_CHANGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void buildDelta(Object e, final VMDelta parentDelta, final int nodeOffset, final RequestMonitor requestMonitor) {
|
public void buildDelta(Object e, final VMDelta parentDelta, final int nodeOffset, final RequestMonitor requestMonitor) {
|
||||||
IDMContext dmc = e instanceof IDMEvent<?> ? ((IDMEvent<?>)e).getDMContext() : null;
|
IDMContext dmc = e instanceof IDMEvent<?> ? ((IDMEvent<?>)e).getDMContext() : null;
|
||||||
|
|
||||||
|
|
|
@ -82,6 +82,7 @@ public class AbstractLaunchVMProvider extends AbstractDMVMProvider
|
||||||
}
|
}
|
||||||
|
|
||||||
fPreferencesListener = new IPropertyChangeListener() {
|
fPreferencesListener = new IPropertyChangeListener() {
|
||||||
|
@Override
|
||||||
public void propertyChange(final PropertyChangeEvent event) {
|
public void propertyChange(final PropertyChangeEvent event) {
|
||||||
handlePropertyChanged(store, event);
|
handlePropertyChanged(store, event);
|
||||||
}};
|
}};
|
||||||
|
@ -105,14 +106,16 @@ public class AbstractLaunchVMProvider extends AbstractDMVMProvider
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public void handleDebugEvents(final DebugEvent[] events) {
|
@Override
|
||||||
|
public void handleDebugEvents(final DebugEvent[] events) {
|
||||||
if (isDisposed()) return;
|
if (isDisposed()) return;
|
||||||
|
|
||||||
// We're in session's executor thread. Re-dispatch to our executor thread
|
// We're in session's executor thread. Re-dispatch to our executor thread
|
||||||
// and then call root layout node.
|
// and then call root layout node.
|
||||||
try {
|
try {
|
||||||
getExecutor().execute(new Runnable() {
|
getExecutor().execute(new Runnable() {
|
||||||
public void run() {
|
@Override
|
||||||
|
public void run() {
|
||||||
if (isDisposed()) return;
|
if (isDisposed()) return;
|
||||||
|
|
||||||
for (final DebugEvent event : events) {
|
for (final DebugEvent event : events) {
|
||||||
|
@ -140,7 +143,8 @@ public class AbstractLaunchVMProvider extends AbstractDMVMProvider
|
||||||
// replace double click event with expand stack event
|
// replace double click event with expand stack event
|
||||||
final ExpandStackEvent expandStackEvent = new ExpandStackEvent(exeCtx);
|
final ExpandStackEvent expandStackEvent = new ExpandStackEvent(exeCtx);
|
||||||
getExecutor().execute(new DsfRunnable() {
|
getExecutor().execute(new DsfRunnable() {
|
||||||
public void run() {
|
@Override
|
||||||
|
public void run() {
|
||||||
handleEvent(expandStackEvent, null);
|
handleEvent(expandStackEvent, null);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -163,10 +167,12 @@ public class AbstractLaunchVMProvider extends AbstractDMVMProvider
|
||||||
try {
|
try {
|
||||||
refreshStackFramesFuture = getSession().getExecutor().schedule(
|
refreshStackFramesFuture = getSession().getExecutor().schedule(
|
||||||
new DsfRunnable() {
|
new DsfRunnable() {
|
||||||
public void run() {
|
@Override
|
||||||
|
public void run() {
|
||||||
if (getSession().isActive()) {
|
if (getSession().isActive()) {
|
||||||
getExecutor().execute(new Runnable() {
|
getExecutor().execute(new Runnable() {
|
||||||
public void run() {
|
@Override
|
||||||
|
public void run() {
|
||||||
// trigger full stack frame update
|
// trigger full stack frame update
|
||||||
ScheduledFuture<?> future= fRefreshStackFramesFutures.get(exeContext);
|
ScheduledFuture<?> future= fRefreshStackFramesFutures.get(exeContext);
|
||||||
if (future != null && !isDisposed()) {
|
if (future != null && !isDisposed()) {
|
||||||
|
@ -220,19 +226,23 @@ public class AbstractLaunchVMProvider extends AbstractDMVMProvider
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void launchesAdded(ILaunch[] launches) {
|
@Override
|
||||||
|
public void launchesAdded(ILaunch[] launches) {
|
||||||
handleLaunchesEvent(new LaunchesEvent(launches, LaunchesEvent.Type.ADDED));
|
handleLaunchesEvent(new LaunchesEvent(launches, LaunchesEvent.Type.ADDED));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void launchesRemoved(ILaunch[] launches) {
|
@Override
|
||||||
|
public void launchesRemoved(ILaunch[] launches) {
|
||||||
handleLaunchesEvent(new LaunchesEvent(launches, LaunchesEvent.Type.REMOVED));
|
handleLaunchesEvent(new LaunchesEvent(launches, LaunchesEvent.Type.REMOVED));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void launchesChanged(ILaunch[] launches) {
|
@Override
|
||||||
|
public void launchesChanged(ILaunch[] launches) {
|
||||||
handleLaunchesEvent(new LaunchesEvent(launches, LaunchesEvent.Type.CHANGED));
|
handleLaunchesEvent(new LaunchesEvent(launches, LaunchesEvent.Type.CHANGED));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void launchesTerminated(ILaunch[] launches) {
|
@Override
|
||||||
|
public void launchesTerminated(ILaunch[] launches) {
|
||||||
handleLaunchesEvent(new LaunchesEvent(launches, LaunchesEvent.Type.TERMINATED));
|
handleLaunchesEvent(new LaunchesEvent(launches, LaunchesEvent.Type.TERMINATED));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -243,7 +253,8 @@ public class AbstractLaunchVMProvider extends AbstractDMVMProvider
|
||||||
// and then call root layout node.
|
// and then call root layout node.
|
||||||
try {
|
try {
|
||||||
getExecutor().execute(new Runnable() {
|
getExecutor().execute(new Runnable() {
|
||||||
public void run() {
|
@Override
|
||||||
|
public void run() {
|
||||||
if (isDisposed()) return;
|
if (isDisposed()) return;
|
||||||
|
|
||||||
IRootVMNode rootLayoutNode = getRootVMNode();
|
IRootVMNode rootLayoutNode = getRootVMNode();
|
||||||
|
@ -300,7 +311,8 @@ public class AbstractLaunchVMProvider extends AbstractDMVMProvider
|
||||||
|
|
||||||
if (processEvent) {
|
if (processEvent) {
|
||||||
getExecutor().execute(new DsfRunnable() {
|
getExecutor().execute(new DsfRunnable() {
|
||||||
public void run() {
|
@Override
|
||||||
|
public void run() {
|
||||||
handleEvent(event);
|
handleEvent(event);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -151,7 +151,8 @@ public abstract class AbstractThreadVMNode extends AbstractExecutionContextVMNod
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void update(final ILabelUpdate[] updates) {
|
@Override
|
||||||
|
public void update(final ILabelUpdate[] updates) {
|
||||||
fLabelProvider.update(updates);
|
fLabelProvider.update(updates);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -160,10 +161,12 @@ public abstract class AbstractThreadVMNode extends AbstractExecutionContextVMNod
|
||||||
*
|
*
|
||||||
* @since 2.0
|
* @since 2.0
|
||||||
*/
|
*/
|
||||||
public void update(final IPropertiesUpdate[] updates) {
|
@Override
|
||||||
|
public void update(final IPropertiesUpdate[] updates) {
|
||||||
try {
|
try {
|
||||||
getSession().getExecutor().execute(new DsfRunnable() {
|
getSession().getExecutor().execute(new DsfRunnable() {
|
||||||
public void run() {
|
@Override
|
||||||
|
public void run() {
|
||||||
updatePropertiesInSessionThread(updates);
|
updatePropertiesInSessionThread(updates);
|
||||||
}});
|
}});
|
||||||
} catch (RejectedExecutionException e) {
|
} catch (RejectedExecutionException e) {
|
||||||
|
@ -293,7 +296,8 @@ public abstract class AbstractThreadVMNode extends AbstractExecutionContextVMNod
|
||||||
protected void handleSuccess() {
|
protected void handleSuccess() {
|
||||||
try {
|
try {
|
||||||
getSession().getExecutor().execute(new DsfRunnable() {
|
getSession().getExecutor().execute(new DsfRunnable() {
|
||||||
public void run() {
|
@Override
|
||||||
|
public void run() {
|
||||||
final IRunControl runControl = getServicesTracker().getService(IRunControl.class);
|
final IRunControl runControl = getServicesTracker().getService(IRunControl.class);
|
||||||
if (runControl != null) {
|
if (runControl != null) {
|
||||||
int vmcIdx = -1;
|
int vmcIdx = -1;
|
||||||
|
@ -336,7 +340,8 @@ public abstract class AbstractThreadVMNode extends AbstractExecutionContextVMNod
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public int getDeltaFlags(Object e) {
|
@Override
|
||||||
|
public int getDeltaFlags(Object e) {
|
||||||
IDMContext dmc = e instanceof IDMEvent<?> ? ((IDMEvent<?>)e).getDMContext() : null;
|
IDMContext dmc = e instanceof IDMEvent<?> ? ((IDMEvent<?>)e).getDMContext() : null;
|
||||||
|
|
||||||
if (dmc instanceof IContainerDMContext) {
|
if (dmc instanceof IContainerDMContext) {
|
||||||
|
@ -357,7 +362,8 @@ public abstract class AbstractThreadVMNode extends AbstractExecutionContextVMNod
|
||||||
return IModelDelta.NO_CHANGE;
|
return IModelDelta.NO_CHANGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void buildDelta(Object e, final VMDelta parentDelta, final int nodeOffset, final RequestMonitor rm) {
|
@Override
|
||||||
|
public void buildDelta(Object e, final VMDelta parentDelta, final int nodeOffset, final RequestMonitor rm) {
|
||||||
IDMContext dmc = e instanceof IDMEvent<?> ? ((IDMEvent<?>)e).getDMContext() : null;
|
IDMContext dmc = e instanceof IDMEvent<?> ? ((IDMEvent<?>)e).getDMContext() : null;
|
||||||
|
|
||||||
if(dmc instanceof IContainerDMContext) {
|
if(dmc instanceof IContainerDMContext) {
|
||||||
|
|
|
@ -27,6 +27,7 @@ public class DefaultDsfModelSelectionPolicyFactory implements IModelSelectionPol
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IModelSelectionPolicyFactory#createModelSelectionPolicyAdapter(java.lang.Object, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext)
|
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IModelSelectionPolicyFactory#createModelSelectionPolicyAdapter(java.lang.Object, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IModelSelectionPolicy createModelSelectionPolicyAdapter(Object element, IPresentationContext context) {
|
public IModelSelectionPolicy createModelSelectionPolicyAdapter(Object element, IPresentationContext context) {
|
||||||
if (IDebugUIConstants.ID_DEBUG_VIEW.equals(context.getId())) {
|
if (IDebugUIConstants.ID_DEBUG_VIEW.equals(context.getId())) {
|
||||||
if (element instanceof IDMVMContext) {
|
if (element instanceof IDMVMContext) {
|
||||||
|
|
|
@ -56,6 +56,7 @@ public class DefaultDsfSelectionPolicy implements IModelSelectionPolicy {
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IModelSelectionPolicy#contains(org.eclipse.jface.viewers.ISelection, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext)
|
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IModelSelectionPolicy#contains(org.eclipse.jface.viewers.ISelection, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean contains(ISelection selection, IPresentationContext context) {
|
public boolean contains(ISelection selection, IPresentationContext context) {
|
||||||
if (IDebugUIConstants.ID_DEBUG_VIEW.equals(context.getId())) {
|
if (IDebugUIConstants.ID_DEBUG_VIEW.equals(context.getId())) {
|
||||||
if (selection instanceof IStructuredSelection) {
|
if (selection instanceof IStructuredSelection) {
|
||||||
|
@ -76,6 +77,7 @@ public class DefaultDsfSelectionPolicy implements IModelSelectionPolicy {
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IModelSelectionPolicy#isSticky(org.eclipse.jface.viewers.ISelection, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext)
|
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IModelSelectionPolicy#isSticky(org.eclipse.jface.viewers.ISelection, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isSticky(ISelection selection, IPresentationContext context) {
|
public boolean isSticky(ISelection selection, IPresentationContext context) {
|
||||||
if (IDebugUIConstants.ID_DEBUG_VIEW.equals(context.getId())) {
|
if (IDebugUIConstants.ID_DEBUG_VIEW.equals(context.getId())) {
|
||||||
if (selection instanceof IStructuredSelection) {
|
if (selection instanceof IStructuredSelection) {
|
||||||
|
@ -136,6 +138,7 @@ public class DefaultDsfSelectionPolicy implements IModelSelectionPolicy {
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IModelSelectionPolicy#overrides(org.eclipse.jface.viewers.ISelection, org.eclipse.jface.viewers.ISelection, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext)
|
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IModelSelectionPolicy#overrides(org.eclipse.jface.viewers.ISelection, org.eclipse.jface.viewers.ISelection, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean overrides(ISelection existing, ISelection candidate, IPresentationContext context) {
|
public boolean overrides(ISelection existing, ISelection candidate, IPresentationContext context) {
|
||||||
if (IDebugUIConstants.ID_DEBUG_VIEW.equals(context.getId())) {
|
if (IDebugUIConstants.ID_DEBUG_VIEW.equals(context.getId())) {
|
||||||
if (existing instanceof IStructuredSelection && candidate instanceof IStructuredSelection) {
|
if (existing instanceof IStructuredSelection && candidate instanceof IStructuredSelection) {
|
||||||
|
@ -243,6 +246,7 @@ public class DefaultDsfSelectionPolicy implements IModelSelectionPolicy {
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IModelSelectionPolicy#replaceInvalidSelection(org.eclipse.jface.viewers.ISelection, org.eclipse.jface.viewers.ISelection)
|
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IModelSelectionPolicy#replaceInvalidSelection(org.eclipse.jface.viewers.ISelection, org.eclipse.jface.viewers.ISelection)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ISelection replaceInvalidSelection(ISelection invalidSelection, ISelection newSelection) {
|
public ISelection replaceInvalidSelection(ISelection invalidSelection, ISelection newSelection) {
|
||||||
if (invalidSelection instanceof ITreeSelection) {
|
if (invalidSelection instanceof ITreeSelection) {
|
||||||
ITreeSelection treeSelection = (ITreeSelection)invalidSelection;
|
ITreeSelection treeSelection = (ITreeSelection)invalidSelection;
|
||||||
|
|
|
@ -49,6 +49,7 @@ public class DelayedStackRefreshUpdatePolicy extends UpdatePolicyDecorator {
|
||||||
fBaseTester = baseTester;
|
fBaseTester = baseTester;
|
||||||
fLazyStackFrameMode = lazyStackFrameMode;
|
fLazyStackFrameMode = lazyStackFrameMode;
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
public int getUpdateFlags(Object viewerInput, TreePath path) {
|
public int getUpdateFlags(Object viewerInput, TreePath path) {
|
||||||
Object element = path.getSegmentCount() != 0 ? path.getLastSegment() : viewerInput;
|
Object element = path.getSegmentCount() != 0 ? path.getLastSegment() : viewerInput;
|
||||||
if (element instanceof IDMVMContext) {
|
if (element instanceof IDMVMContext) {
|
||||||
|
@ -69,6 +70,7 @@ public class DelayedStackRefreshUpdatePolicy extends UpdatePolicyDecorator {
|
||||||
return FLUSH;
|
return FLUSH;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean includes(IElementUpdateTester tester) {
|
public boolean includes(IElementUpdateTester tester) {
|
||||||
// A non-lazy tester includes a lazy tester, but not vice versa.
|
// A non-lazy tester includes a lazy tester, but not vice versa.
|
||||||
// This allows entries that were marked as dirty by a flush with
|
// This allows entries that were marked as dirty by a flush with
|
||||||
|
@ -109,7 +111,8 @@ public class DelayedStackRefreshUpdatePolicy extends UpdatePolicyDecorator {
|
||||||
fRefreshAll = refreshAll;
|
fRefreshAll = refreshAll;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getUpdateFlags(Object viewerInput, TreePath path) {
|
@Override
|
||||||
|
public int getUpdateFlags(Object viewerInput, TreePath path) {
|
||||||
Object element = path.getSegmentCount() != 0 ? path.getLastSegment() : viewerInput;
|
Object element = path.getSegmentCount() != 0 ? path.getLastSegment() : viewerInput;
|
||||||
|
|
||||||
if (!fRefreshAll && element instanceof IDMVMContext) {
|
if (!fRefreshAll && element instanceof IDMVMContext) {
|
||||||
|
@ -124,7 +127,8 @@ public class DelayedStackRefreshUpdatePolicy extends UpdatePolicyDecorator {
|
||||||
return FLUSH;
|
return FLUSH;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean includes(IElementUpdateTester tester) {
|
@Override
|
||||||
|
public boolean includes(IElementUpdateTester tester) {
|
||||||
// A refresh-all tester includes a non-refresh-all tester, but not
|
// A refresh-all tester includes a non-refresh-all tester, but not
|
||||||
// vice versa. This allows entries that were marked as dirty by
|
// vice versa. This allows entries that were marked as dirty by
|
||||||
// a flush with
|
// a flush with
|
||||||
|
@ -174,11 +178,13 @@ public class DelayedStackRefreshUpdatePolicy extends UpdatePolicyDecorator {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public Object[] getInitialRootElementChildren(Object rootElement) {
|
public Object[] getInitialRootElementChildren(Object rootElement) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Map<String, Object> getInitialRootElementProperties(Object rootElement) {
|
@Override
|
||||||
|
public Map<String, Object> getInitialRootElementProperties(Object rootElement) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue