Changeset 3765 for devel-tools/trunk


Ignore:
Timestamp:
Apr 20, 2008, 8:24:33 PM (13 years ago)
Author:
yura
Message:
  • Options to JBC compiler.
File:
1 edited

Legend:

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

    r3694 r3765  
    88import org.eclipse.jdt.internal.debug.ui.IJDIPreferencesConstants;
    99import org.eclipse.jdt.internal.debug.ui.JDIDebugUIPlugin;
     10import org.eclipse.jface.action.IAction;
    1011import org.eclipse.jface.preference.IPreferenceStore;
     12import org.eclipse.jface.util.IPropertyChangeListener;
     13import org.eclipse.jface.util.PropertyChangeEvent;
    1114import org.eclipse.swt.widgets.Shell;
    1215import org.eclipse.ui.IWorkbenchPage;
     
    1518import org.eclipse.ui.preferences.ScopedPreferenceStore;
    1619import org.osgi.framework.BundleContext;
     20import org.refal.rfpdt.core.RfpCore;
     21import org.refal.rfpdt.core.RfpProject;
    1722import org.refal.rfpdt.editor.RfpPartitionScanner;
     23import org.refal.rfpdt.editor.preferences.IPreferenceConstants;
    1824import org.refal.rfpdt.editor.preferences.ProjectPropertiesStore;
    1925
     
    125131    }
    126132
    127     public static ProjectPropertiesStore getProjectPropertiesStore (IProject project) {
     133    public static ProjectPropertiesStore getProjectPropertiesStore (final IProject project) {
    128134        if (stores == null)
    129135            return null;
     
    133139            stores.put(project, store);
    134140        }
     141        store.addPropertyChangeListener(new IPropertyChangeListener() {
     142            public void propertyChange (PropertyChangeEvent event) {
     143                if (IPreferenceConstants.COMPILER_ADD_LINE_NUMBERS.equals(event.getProperty()))
     144                    RfpCore.getRfpProject(project).setCompilerOptionAddLineNumber((Boolean) event.getNewValue());
     145                else if (IPreferenceConstants.COMPILER_ADD_VARIABLE_NAMES.equals(event.getProperty()))
     146                    RfpCore.getRfpProject(project).setCompilerOptionAddVariableNames((Boolean) event.getNewValue());
     147                else if (IPreferenceConstants.COMPILER_ADD_SOURCE.equals(event.getProperty()))
     148                    RfpCore.getRfpProject(project).setCompilerOptionAddSource((Boolean) event.getNewValue());
     149            }
     150
     151        });
     152        RfpCore.getRfpProject(project).setCompilerOptionAddLineNumber(store.getBoolean(IPreferenceConstants.COMPILER_ADD_LINE_NUMBERS));
     153        RfpCore.getRfpProject(project).setCompilerOptionAddVariableNames(store.getBoolean(IPreferenceConstants.COMPILER_ADD_VARIABLE_NAMES));
     154        RfpCore.getRfpProject(project).setCompilerOptionAddSource(store.getBoolean(IPreferenceConstants.COMPILER_ADD_SOURCE));
    135155        return store;
    136156    }
Note: See TracChangeset for help on using the changeset viewer.