Changeset 3637 for devel-tools


Ignore:
Timestamp:
Mar 31, 2008, 2:29:27 PM (13 years ago)
Author:
yura
Message:
  • At initialization setup step through filters.
Location:
devel-tools/trunk/eclipse/org.refal.rfpdt.ui/src/org/refal/rfpdt/ui
Files:
2 edited

Legend:

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

    r3520 r3637  
    66import org.eclipse.core.runtime.IStatus;
    77import org.eclipse.core.runtime.Status;
     8import org.eclipse.jdt.internal.debug.ui.IJDIPreferencesConstants;
     9import org.eclipse.jdt.internal.debug.ui.JDIDebugUIPlugin;
    810import org.eclipse.jface.preference.IPreferenceStore;
    911import org.eclipse.jface.resource.ImageDescriptor;
     
    2022 * The activator class controls the plug-in life cycle
    2123 */
     24@SuppressWarnings("restriction")
    2225public class RfpUI extends AbstractUIPlugin {
    2326
     
    2528    public static final String PLUGIN_ID = "org.refal.rfpdt.ui";
    2629    public static final String RFP_EDITING_KEYBINDING_SCOPE = "org.refal.rfpdt.editor.rfpEditorScope";
     30    public static final String RFP_DEFAULTS = "org.refal.rfpdt.ui.rfpDefaults";
    2731
    2832    // The shared instance
    2933    private static RfpUI plugin;
    3034    private static HashMap<IProject, ProjectPropertiesStore> stores;
     35
     36    private static String filters = "org.refal.plus.Expr,org.refal.plus.Native,org.refal.plus.RefalException"
     37            + ",org.refal.plus.Result";
     38    private static String formatters = "org.refal.plus.Expr,return formattedRepresentation();,1"
     39            + ",org.refal.plus.Result,return expr == null ? null : expr.formattedRepresentation();,1";
     40
     41    static {
     42        IPreferenceStore store = JDIDebugUIPlugin.getDefault().getPreferenceStore();
     43        if (!store.getBoolean(RfpUI.RFP_DEFAULTS)) {
     44            {
     45                String str = store.getString(IJDIPreferencesConstants.PREF_ACTIVE_FILTERS_LIST);
     46                if (str == null)
     47                    str = "";
     48                if (str.length() != 0)
     49                    str += ",";
     50                str += filters;
     51                store.setValue(IJDIPreferencesConstants.PREF_ACTIVE_FILTERS_LIST, str);
     52            }
     53            {
     54                String str = store.getString(IJDIPreferencesConstants.PREF_DETAIL_FORMATTERS_LIST);
     55                if (str == null)
     56                    str = "";
     57                if (str.length() != 0)
     58                    str += ",";
     59                str += formatters;
     60                store.setValue(IJDIPreferencesConstants.PREF_DETAIL_FORMATTERS_LIST, str);
     61            }
     62            store.setValue(RfpUI.RFP_DEFAULTS, true);
     63        }
     64    }
     65
    3166    private RfpPartitionScanner partitionScanner;
    3267
  • devel-tools/trunk/eclipse/org.refal.rfpdt.ui/src/org/refal/rfpdt/ui/launching/RfpRefalMainTab.java

    r3629 r3637  
    2121import org.eclipse.swt.widgets.Group;
    2222import org.eclipse.swt.widgets.Text;
    23 import org.refal.rfpdt.core.RfpCore;
    2423import org.refal.rfpdt.ui.RfpUI;
    2524
     
    2827    private Text fModuleText;
    2928    private Button fStopInMainCheckButton;
    30     private Button fRuntimeFilterButton;
    3129
    3230    public void createControl (Composite parent) {
     
    3735        createProjectEditor(comp);
    3836        createModuleEditor(comp);
    39         createRuntimeFilterEditor(comp);
    4037        // GridData gd;
    4138        //             
     
    131128    }
    132129
    133     private void createRuntimeFilterEditor (Composite parent) {
    134         Font font = parent.getFont();
    135         fRuntimeFilterButton = new Button(parent, SWT.CHECK);
    136         fRuntimeFilterButton.setText("Step filters throuth Refal Runtime");
    137         fRuntimeFilterButton.setFont(font);
    138         fRuntimeFilterButton.addSelectionListener(new SelectionListener() {
    139             public void widgetDefaultSelected (SelectionEvent e) {
    140                 updateLaunchConfigurationDialog();
    141             }
    142 
    143             public void widgetSelected (SelectionEvent e) {
    144                 updateLaunchConfigurationDialog();
    145             }
    146         });
    147         // fProjButton = createPushButton(group, LauncherMessages.AbstractJavaMainTab_1, null);
    148         // fProjButton.addSelectionListener(fListener);
    149     }
    150    
    151130    public void initializeFrom (ILaunchConfiguration config) {
    152131        String projectName = "";
    153132        String moduleName = "";
    154133        boolean stopInMain = false;
    155         boolean runtimeFilter = true;
    156134        try {
    157135            projectName = config.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, "");
    158136            moduleName = config.getAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, "");
    159137            stopInMain = config.getAttribute(IJavaLaunchConfigurationConstants.ATTR_STOP_IN_MAIN, false);
    160             runtimeFilter = config.getAttribute(RfpCore.RUNTIME_FILTER, true);
    161138        } catch (CoreException e) {
    162139            RfpUI.log(e);
     
    165142        fModuleText.setText(moduleName);
    166143        fStopInMainCheckButton.setSelection(stopInMain);
    167         fRuntimeFilterButton.setSelection(runtimeFilter);
    168144    }
    169145
     
    175151        else
    176152            config.setAttribute(IJavaLaunchConfigurationConstants.ATTR_STOP_IN_MAIN, (String) null);
    177         if (fRuntimeFilterButton.getSelection())
    178             config.setAttribute(RfpCore.RUNTIME_FILTER, (String) null);
    179         else
    180             config.setAttribute(RfpCore.RUNTIME_FILTER, false);
    181153    }
    182154
Note: See TracChangeset for help on using the changeset viewer.