1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-12 18:55:38 +02:00

Replaced deprecated methods.

This commit is contained in:
Mikhail Khodjaiants 2005-04-21 19:43:07 +00:00
parent af37524c7a
commit ef5e888d08
5 changed files with 25 additions and 7 deletions

View file

@ -1,3 +1,10 @@
2005-04-21 Mikhail Khodjaiants
Replaced deprecated methods.
* CBreakpointPropertiesAction.java
* CBreakpointPropertiesRulerAction.java
* ModulesPropertiesActionDelegate.java
* SignalPropertiesActionDelegate.java
2005-04-21 Mikhail Khodjaiants
Bug 80175: Replace the CDT source lookup by the source lookup provided by Eclipse platform.
* CDebugModelPresentation.java

View file

@ -11,7 +11,6 @@
package org.eclipse.cdt.debug.internal.ui.actions;
import org.eclipse.cdt.debug.core.model.ICBreakpoint;
import org.eclipse.cdt.debug.ui.CDebugUIPlugin;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
@ -49,7 +48,7 @@ public class CBreakpointPropertiesAction implements IObjectActionDelegate {
* @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
*/
public void run( IAction action ) {
PropertyDialogAction propertyAction = new PropertyDialogAction( CDebugUIPlugin.getActiveWorkbenchShell(), new ISelectionProvider() {
PropertyDialogAction propertyAction = new PropertyDialogAction( getActivePart().getSite(), new ISelectionProvider() {
public void addSelectionChangedListener( ISelectionChangedListener listener ) {
}

View file

@ -43,7 +43,7 @@ public class CBreakpointPropertiesRulerAction extends AbstractBreakpointRulerAct
*/
public void run() {
if ( getBreakpoint() != null ) {
PropertyDialogAction action = new PropertyDialogAction( getTargetPart().getSite().getShell(), new ISelectionProvider() {
PropertyDialogAction action = new PropertyDialogAction( getTargetPart().getSite(), new ISelectionProvider() {
public void addSelectionChangedListener( ISelectionChangedListener listener ) {
}

View file

@ -11,7 +11,6 @@
package org.eclipse.cdt.debug.internal.ui.actions;
import org.eclipse.cdt.debug.core.model.ICModule;
import org.eclipse.cdt.debug.ui.CDebugUIPlugin;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
@ -30,6 +29,8 @@ public class ModulesPropertiesActionDelegate extends ActionDelegate implements I
private ICModule fModule;
private IWorkbenchPart fTargetPart;
/**
* Constructor for ModulesPropertiesActionDelegate.
*/
@ -49,13 +50,14 @@ public class ModulesPropertiesActionDelegate extends ActionDelegate implements I
* @see org.eclipse.ui.IObjectActionDelegate#setActivePart(org.eclipse.jface.action.IAction, org.eclipse.ui.IWorkbenchPart)
*/
public void setActivePart( IAction action, IWorkbenchPart targetPart ) {
fTargetPart = targetPart;
}
/* (non-Javadoc)
* @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
*/
public void run( IAction action ) {
PropertyDialogAction propertyAction = new PropertyDialogAction( CDebugUIPlugin.getActiveWorkbenchShell(), new ISelectionProvider() {
PropertyDialogAction propertyAction = new PropertyDialogAction( getActivePart().getSite(), new ISelectionProvider() {
public void addSelectionChangedListener( ISelectionChangedListener listener ) {
}
@ -88,4 +90,8 @@ public class ModulesPropertiesActionDelegate extends ActionDelegate implements I
action.setEnabled( false );
setModule( null );
}
protected IWorkbenchPart getActivePart() {
return fTargetPart;
}
}

View file

@ -11,7 +11,6 @@
package org.eclipse.cdt.debug.internal.ui.actions;
import org.eclipse.cdt.debug.core.model.ICSignal;
import org.eclipse.cdt.debug.ui.CDebugUIPlugin;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
@ -30,6 +29,8 @@ public class SignalPropertiesActionDelegate extends ActionDelegate implements IO
private ICSignal fSignal;
private IWorkbenchPart fTargetPart;
/**
* Constructor for SignalPropertiesActionDelegate.
*
@ -43,6 +44,7 @@ public class SignalPropertiesActionDelegate extends ActionDelegate implements IO
* @see org.eclipse.ui.IObjectActionDelegate#setActivePart(org.eclipse.jface.action.IAction, org.eclipse.ui.IWorkbenchPart)
*/
public void setActivePart( IAction action, IWorkbenchPart targetPart ) {
fTargetPart = targetPart;
}
/* (non-Javadoc)
@ -73,7 +75,7 @@ public class SignalPropertiesActionDelegate extends ActionDelegate implements IO
* @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
*/
public void run( IAction action ) {
PropertyDialogAction propertyAction = new PropertyDialogAction( CDebugUIPlugin.getActiveWorkbenchShell(), new ISelectionProvider() {
PropertyDialogAction propertyAction = new PropertyDialogAction( getActivePart().getSite(), new ISelectionProvider() {
public void addSelectionChangedListener( ISelectionChangedListener listener ) {
}
@ -90,4 +92,8 @@ public class SignalPropertiesActionDelegate extends ActionDelegate implements IO
} );
propertyAction.run();
}
protected IWorkbenchPart getActivePart() {
return fTargetPart;
}
}