mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-06 17:26:01 +02:00
Cleanup imports
Change-Id: I314ed99ece9b42d6ed1bf06ed90094e665621d06
This commit is contained in:
parent
e28469e9b3
commit
31bedb1408
2 changed files with 15 additions and 14 deletions
|
@ -27,6 +27,8 @@ import org.eclipse.cdt.dsf.debug.service.IRunControl.ISuspendedDMEvent;
|
||||||
import org.eclipse.cdt.dsf.debug.service.command.ICommandControlService.ICommandControlDMContext;
|
import org.eclipse.cdt.dsf.debug.service.command.ICommandControlService.ICommandControlDMContext;
|
||||||
import org.eclipse.cdt.dsf.gdb.internal.ui.GdbUIPlugin;
|
import org.eclipse.cdt.dsf.gdb.internal.ui.GdbUIPlugin;
|
||||||
import org.eclipse.cdt.dsf.gdb.service.IGDBHardwareAndOS2;
|
import org.eclipse.cdt.dsf.gdb.service.IGDBHardwareAndOS2;
|
||||||
|
import org.eclipse.cdt.dsf.gdb.service.IGDBHardwareAndOS2.IResourceClass;
|
||||||
|
import org.eclipse.cdt.dsf.gdb.service.IGDBHardwareAndOS2.IResourcesInformation;
|
||||||
import org.eclipse.cdt.dsf.mi.service.IMIRunControl;
|
import org.eclipse.cdt.dsf.mi.service.IMIRunControl;
|
||||||
import org.eclipse.cdt.dsf.service.DsfServiceEventHandler;
|
import org.eclipse.cdt.dsf.service.DsfServiceEventHandler;
|
||||||
import org.eclipse.cdt.dsf.service.DsfServicesTracker;
|
import org.eclipse.cdt.dsf.service.DsfServicesTracker;
|
||||||
|
@ -48,7 +50,7 @@ public class SessionOSData {
|
||||||
private IGDBHardwareAndOS2 fHardwareOs;
|
private IGDBHardwareAndOS2 fHardwareOs;
|
||||||
private ICommandControlDMContext fContext;
|
private ICommandControlDMContext fContext;
|
||||||
|
|
||||||
private IGDBHardwareAndOS2.IResourceClass[] fResourceClasses = new IGDBHardwareAndOS2.IResourceClass[0];
|
private IResourceClass[] fResourceClasses = new IResourceClass[0];
|
||||||
private Map<String, OSData> fExistingData = new HashMap<String, OSData>();
|
private Map<String, OSData> fExistingData = new HashMap<String, OSData>();
|
||||||
private Map<String, Date> fTimestamp = new HashMap<String, Date>();
|
private Map<String, Date> fTimestamp = new HashMap<String, Date>();
|
||||||
|
|
||||||
|
@ -100,7 +102,7 @@ public class SessionOSData {
|
||||||
{
|
{
|
||||||
fWaitingForSession = false;
|
fWaitingForSession = false;
|
||||||
fFetchingClasses = true;
|
fFetchingClasses = true;
|
||||||
fHardwareOs.getResourceClasses(fContext, new DataRequestMonitor<IGDBHardwareAndOS2.IResourceClass[]>(fSession.getExecutor(), null) {
|
fHardwareOs.getResourceClasses(fContext, new DataRequestMonitor<IResourceClass[]>(fSession.getExecutor(), null) {
|
||||||
@Override
|
@Override
|
||||||
@ConfinedToDsfExecutor("fExecutor")
|
@ConfinedToDsfExecutor("fExecutor")
|
||||||
protected void handleCompleted() {
|
protected void handleCompleted() {
|
||||||
|
@ -145,7 +147,7 @@ public class SessionOSData {
|
||||||
fTracker.dispose();
|
fTracker.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
public IGDBHardwareAndOS2.IResourceClass[] getResourceClasses()
|
public IResourceClass[] getResourceClasses()
|
||||||
{
|
{
|
||||||
return fResourceClasses;
|
return fResourceClasses;
|
||||||
}
|
}
|
||||||
|
@ -202,7 +204,7 @@ public class SessionOSData {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
fHardwareOs.getResourcesInformation(fContext, resourceClass, new DataRequestMonitor<IGDBHardwareAndOS2.IResourcesInformation>(executor, null) {
|
fHardwareOs.getResourcesInformation(fContext, resourceClass, new DataRequestMonitor<IResourcesInformation>(executor, null) {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ConfinedToDsfExecutor("fExecutor")
|
@ConfinedToDsfExecutor("fExecutor")
|
||||||
|
|
|
@ -14,9 +14,8 @@ package org.eclipse.cdt.dsf.mi.service.command.output;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.eclipse.cdt.dsf.gdb.service.IGDBHardwareAndOS2;
|
import org.eclipse.cdt.dsf.gdb.service.IGDBHardwareAndOS2.IResourceClass;
|
||||||
import org.eclipse.cdt.dsf.mi.service.command.output.MIInfo;
|
import org.eclipse.cdt.dsf.gdb.service.IGDBHardwareAndOS2.IResourcesInformation;
|
||||||
import org.eclipse.cdt.dsf.mi.service.command.output.MIOutput;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Example output:
|
* Example output:
|
||||||
|
@ -63,7 +62,7 @@ import org.eclipse.cdt.dsf.mi.service.command.output.MIOutput;
|
||||||
public class MIInfoOsInfo extends MIInfo {
|
public class MIInfoOsInfo extends MIInfo {
|
||||||
|
|
||||||
// The fields below are used for response with list of classes.
|
// The fields below are used for response with list of classes.
|
||||||
private IGDBHardwareAndOS2.IResourceClass[] resourceClasses;
|
private IResourceClass[] resourceClasses;
|
||||||
|
|
||||||
// The below fields are used only for data with specific resource class
|
// The below fields are used only for data with specific resource class
|
||||||
private String[] columnNames;
|
private String[] columnNames;
|
||||||
|
@ -79,9 +78,9 @@ public class MIInfoOsInfo extends MIInfo {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public IGDBHardwareAndOS2.IResourcesInformation getResourcesInformation()
|
public IResourcesInformation getResourcesInformation()
|
||||||
{
|
{
|
||||||
return new IGDBHardwareAndOS2.IResourcesInformation() {
|
return new IResourcesInformation() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String[][] getContent() { return content; }
|
public String[][] getContent() { return content; }
|
||||||
|
@ -91,14 +90,14 @@ public class MIInfoOsInfo extends MIInfo {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public IGDBHardwareAndOS2.IResourceClass[] getResourceClasses()
|
public IResourceClass[] getResourceClasses()
|
||||||
{
|
{
|
||||||
return resourceClasses;
|
return resourceClasses;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void parseResourceClasses()
|
private void parseResourceClasses()
|
||||||
{
|
{
|
||||||
List<IGDBHardwareAndOS2.IResourceClass> classes = new ArrayList<IGDBHardwareAndOS2.IResourceClass>();
|
List<IResourceClass> classes = new ArrayList<IResourceClass>();
|
||||||
|
|
||||||
MITuple table = (MITuple)get(getMIOutput(), "OSDataTable"); //$NON-NLS-1$
|
MITuple table = (MITuple)get(getMIOutput(), "OSDataTable"); //$NON-NLS-1$
|
||||||
|
|
||||||
|
@ -109,7 +108,7 @@ public class MIInfoOsInfo extends MIInfo {
|
||||||
final String id = getString(row.getMIResults()[0]);
|
final String id = getString(row.getMIResults()[0]);
|
||||||
final String description = getString(row.getMIResults()[2]);
|
final String description = getString(row.getMIResults()[2]);
|
||||||
|
|
||||||
classes.add(new IGDBHardwareAndOS2.IResourceClass() {
|
classes.add(new IResourceClass() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getId() { return id; }
|
public String getId() { return id; }
|
||||||
|
@ -120,7 +119,7 @@ public class MIInfoOsInfo extends MIInfo {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
resourceClasses = classes.toArray(new IGDBHardwareAndOS2.IResourceClass[classes.size()]);
|
resourceClasses = classes.toArray(new IResourceClass[classes.size()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void parseResourcesInformation()
|
private void parseResourcesInformation()
|
||||||
|
|
Loading…
Add table
Reference in a new issue