Search in sources :

Example 1 with SCTDebugElement

use of org.yakindu.sct.simulation.core.debugmodel.SCTDebugElement in project statecharts by Yakindu.

the class SCTHotModelReplacementManager method getAffectedTargets.

private List<IDebugTarget> getAffectedTargets() {
    List<IDebugTarget> targets = new ArrayList<IDebugTarget>();
    synchronized (activeTargets) {
        for (IDebugTarget debugTarget : activeTargets) {
            if (debugTarget instanceof SCTDebugTarget) {
                String resourceString = ((SCTDebugElement) debugTarget).getResourceString();
                IResource resource = ResourcesPlugin.getWorkspace().getRoot().findMember(resourceString);
                if (changedFiles.contains(resource)) {
                    targets.add(debugTarget);
                }
            }
        }
    }
    return targets;
}
Also used : SCTDebugTarget(org.yakindu.sct.simulation.core.debugmodel.SCTDebugTarget) ArrayList(java.util.ArrayList) IDebugTarget(org.eclipse.debug.core.model.IDebugTarget) SCTDebugElement(org.yakindu.sct.simulation.core.debugmodel.SCTDebugElement) IResource(org.eclipse.core.resources.IResource)

Aggregations

ArrayList (java.util.ArrayList)1 IResource (org.eclipse.core.resources.IResource)1 IDebugTarget (org.eclipse.debug.core.model.IDebugTarget)1 SCTDebugElement (org.yakindu.sct.simulation.core.debugmodel.SCTDebugElement)1 SCTDebugTarget (org.yakindu.sct.simulation.core.debugmodel.SCTDebugTarget)1