Changeset 3628 for devel-tools


Ignore:
Timestamp:
Mar 30, 2008, 9:48:18 PM (13 years ago)
Author:
yura
Message:
  • Step filters throuth Refal Runtime.
Location:
devel-tools/trunk/eclipse/org.refal.rfpdt.core/src/org/refal/rfpdt
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • devel-tools/trunk/eclipse/org.refal.rfpdt.core/src/org/refal/rfpdt/core/RfpCore.java

    r3569 r3628  
    2626    public static final String MARKER_ID = "org.refal.rfpdt.core.rfpProblemMarker";
    2727    public static final String RFP_CONTAINER = "org.refal.rfpdt.launching.rfpContainer";
     28    public static final String RUNTIME_FILTER = "org.refal.rfpdt.launching.runtimeFilter";
    2829
    2930    /**
  • devel-tools/trunk/eclipse/org.refal.rfpdt.core/src/org/refal/rfpdt/launching/RfpLaunchConfigurationDelegate.java

    r3626 r3628  
    1616
    1717public class RfpLaunchConfigurationDelegate extends JavaLaunchDelegate {
     18    private static String[] filter = { "org.refal.plus.*" };
     19
     20    private static boolean isRuntimeFilter (ILaunchConfiguration configuration) throws CoreException {
     21        return configuration.getAttribute(RfpCore.RUNTIME_FILTER, true);
     22    }
     23
     24    protected void prepareStopInMain (ILaunchConfiguration configuration) throws CoreException {
     25        if (isStopInMain(configuration) || isRuntimeFilter(configuration))
     26            DebugPlugin.getDefault().addDebugEventListener(this);
     27    }
     28
    1829    /**
    1930     * Handles the "stop-in-Main" option.
     
    2940                    if (configuration != null) {
    3041                        try {
     42                            if (configuration.getAttribute(RfpCore.RUNTIME_FILTER, true)) {
     43                                target.setStepFiltersEnabled(true);
     44                                String[] oldFilter = target.getStepFilters();
     45                                String[] newFilter = new String[oldFilter.length + filter.length];
     46                                System.arraycopy(oldFilter, 0, newFilter, 0, oldFilter.length);
     47                                System.arraycopy(filter, 0, newFilter, oldFilter.length, filter.length);
     48                                target.setStepFilters(newFilter);
     49                            }
    3150                            if (isStopInMain(configuration)) {
    3251                                String mainType = getMainTypeName(configuration);
     
    3756                                    bp.setPersisted(false);
    3857                                    target.breakpointAdded(bp);
    39                                     DebugPlugin.getDefault().removeDebugEventListener(this);
    4058                                }
    4159                            }
     60                            DebugPlugin.getDefault().removeDebugEventListener(this);
    4261                        } catch (CoreException e) {
    4362                            RfpCore.log(e);
Note: See TracChangeset for help on using the changeset viewer.