mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 18:26:01 +02:00
"CUpdateManager" extends "Observable" to support "Auto-Refresh" toggle actions.
This commit is contained in:
parent
8ce08923fe
commit
1539cf8919
5 changed files with 21 additions and 1 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2004-06-12 Mikhail Khodjaiants
|
||||||
|
"CUpdateManager" extends "Observable" to support "Auto-Refresh" toggle actions.
|
||||||
|
* CRegisterManager.java
|
||||||
|
* CSharedLibraryManager.java
|
||||||
|
* CSignalManager.java
|
||||||
|
* CUpdateManager.jave
|
||||||
|
|
||||||
2004-06-12 Mikhail Khodjaiants
|
2004-06-12 Mikhail Khodjaiants
|
||||||
Changed the comments and copyright text.
|
Changed the comments and copyright text.
|
||||||
* ICUpdateManager.java
|
* ICUpdateManager.java
|
||||||
|
|
|
@ -59,6 +59,7 @@ public class CRegisterManager extends CUpdateManager implements ICRegisterManage
|
||||||
public void dispose()
|
public void dispose()
|
||||||
{
|
{
|
||||||
removeAllRegisterGroups();
|
removeAllRegisterGroups();
|
||||||
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
|
|
@ -104,6 +104,7 @@ public class CSharedLibraryManager extends CUpdateManager implements ICSharedLib
|
||||||
((CSharedLibrary)it.next()).dispose();
|
((CSharedLibrary)it.next()).dispose();
|
||||||
}
|
}
|
||||||
fSharedLibraries.clear();
|
fSharedLibraries.clear();
|
||||||
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
|
|
@ -75,6 +75,7 @@ public class CSignalManager extends CUpdateManager implements ICSignalManager
|
||||||
}
|
}
|
||||||
fSignals = null;
|
fSignals = null;
|
||||||
fIsDisposed = true;
|
fIsDisposed = true;
|
||||||
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
package org.eclipse.cdt.debug.internal.core;
|
package org.eclipse.cdt.debug.internal.core;
|
||||||
|
|
||||||
|
import java.util.Observable;
|
||||||
import org.eclipse.cdt.debug.core.ICUpdateManager;
|
import org.eclipse.cdt.debug.core.ICUpdateManager;
|
||||||
import org.eclipse.cdt.debug.core.cdi.CDIException;
|
import org.eclipse.cdt.debug.core.cdi.CDIException;
|
||||||
import org.eclipse.cdt.debug.core.cdi.ICDIManager;
|
import org.eclipse.cdt.debug.core.cdi.ICDIManager;
|
||||||
|
@ -20,7 +21,7 @@ import org.eclipse.debug.core.model.IDebugTarget;
|
||||||
*
|
*
|
||||||
* @since Mar 31, 2003
|
* @since Mar 31, 2003
|
||||||
*/
|
*/
|
||||||
public abstract class CUpdateManager implements ICUpdateManager, IAdaptable
|
public abstract class CUpdateManager extends Observable implements ICUpdateManager, IAdaptable
|
||||||
{
|
{
|
||||||
private CDebugTarget fDebugTarget = null;
|
private CDebugTarget fDebugTarget = null;
|
||||||
|
|
||||||
|
@ -40,6 +41,9 @@ public abstract class CUpdateManager implements ICUpdateManager, IAdaptable
|
||||||
if ( getCDIManager() != null )
|
if ( getCDIManager() != null )
|
||||||
{
|
{
|
||||||
getCDIManager().setAutoUpdate( enable );
|
getCDIManager().setAutoUpdate( enable );
|
||||||
|
setChanged();
|
||||||
|
notifyObservers();
|
||||||
|
clearChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -96,6 +100,8 @@ public abstract class CUpdateManager implements ICUpdateManager, IAdaptable
|
||||||
return getDebugTarget();
|
return getDebugTarget();
|
||||||
if ( ICDebugTarget.class.equals( adapter ) )
|
if ( ICDebugTarget.class.equals( adapter ) )
|
||||||
return getDebugTarget();
|
return getDebugTarget();
|
||||||
|
if ( Observable.class.equals( adapter ) )
|
||||||
|
return this;
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,5 +110,9 @@ public abstract class CUpdateManager implements ICUpdateManager, IAdaptable
|
||||||
return fDebugTarget;
|
return fDebugTarget;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void dispose() {
|
||||||
|
deleteObservers();
|
||||||
|
}
|
||||||
|
|
||||||
abstract protected ICDIManager getCDIManager();
|
abstract protected ICDIManager getCDIManager();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue