Changeset 1512

Show
Ignore:
Timestamp:
03/06/07 14:48:37 (2 years ago)
Author:
dsugar
Message:

Move around preferences
Create new preference page for Graphic Editor
Work on wizard when creating control resource

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/framework-plugin/plugin.properties

    r1465 r1512  
    3939frameworkPrefs = CDS Framework 
    4040policyTextEditor = Text Editor 
     41policyGraphicEditor = Graphical Editor 
    4142 
    4243## wizards 
  • trunk/framework-plugin/plugin.xml

    r1502 r1512  
    7878            name="%frameworkPrefs"/> 
    7979      <page  
    80             id="org.eclipse.ui.editorPreferences" 
     80            id="com.tresys.framework.plugin.preferences.TextEditorPreferences" 
    8181            name="%policyTextEditor" 
    82             class="com.tresys.framework.plugin.preferences.SEFEditorPreferences" 
     82            class="com.tresys.framework.plugin.preferences.TextEditorPreferences" 
    8383            category="com.tresys.framework.plugin.preferences.SEFPreferencePage"/> 
     84      <page 
     85            category="com.tresys.framework.plugin.preferences.SEFPreferencePage" 
     86            class="com.tresys.framework.plugin.preferences.GraphicEditorPreferences" 
     87            id="com.tresys.framework.plugin.preferences.GraphicEditorPreferences" 
     88            name="%policyGraphicEditor"/> 
    8489   </extension> 
    8590    
  • trunk/framework-plugin/src/com/tresys/framework/compiler/PolicyGenerator.java

    r1468 r1512  
    351351        { 
    352352                StringBuffer buf = new StringBuffer(); 
     353                Rdef rdef = i_resource.getRdef(); 
     354                if (rdef == null) 
     355                        return; 
     356 
     357                Domain dom = i_resource.getDomain(); 
     358                if (dom == null) 
     359                        return; 
    353360 
    354361                buf.append("resource "); 
    355                 Rdef rdef = i_resource.getRdef(); 
    356                 Domain dom = i_resource.getDomain(); 
    357362 
    358363                buf.append(rdef.GetName()); 
  • trunk/framework-plugin/src/com/tresys/framework/compiler/policy/ControlResource.java

    r1506 r1512  
    116116                ClearAllRdef(); 
    117117                Add(i_rdef, i_tok); 
     118                 
     119                String sName = i_rdef.GetName(); 
     120                sName = sName.substring(0, sName.length()-1); 
     121                setSubName (sName); 
     122 
    118123        } 
    119124 
  • trunk/framework-plugin/src/com/tresys/framework/plugin/editor/dictionary/DictionaryDocumentProvider.java

    r1502 r1512  
    3535import com.tresys.framework.plugin.builder.FrameworkNature; 
    3636import com.tresys.framework.plugin.editor.FrameworkCommentPartitionScanner; 
    37 import com.tresys.framework.plugin.preferences.SEFPreferencePage
     37import com.tresys.framework.plugin.preferences.TextEditorPreferences
    3838 
    3939 
     
    9393                                                if (event.fText.equals("{") 
    9494                                                        && SEFramework_Plugin.getDefault().getPreferenceStore().getBoolean( 
    95                                                                         SEFPreferencePage.BRACE_COMPLETION)  
     95                                                                        TextEditorPreferences.BRACE_COMPLETION)  
    9696                                                        && !((IDocumentExtension3) currentDocument).getPartition("comment", event.fOffset, false).getType().equals(FrameworkCommentPartitionScanner.FRAMEWORK_COMMENT))  
    9797                                                { 
     
    126126                                        timer = new Timer(); 
    127127                                        if (SEFramework_Plugin.getDefault().getPreferenceStore().getBoolean( 
    128                                                         SEFPreferencePage.CONSTANT_COMPILE)) { 
     128                                                        TextEditorPreferences.CONSTANT_COMPILE)) { 
    129129                                                timer.schedule(new TimerTask() { 
    130130                                                        public void run() { 
  • trunk/framework-plugin/src/com/tresys/framework/plugin/editor/dictionary/DictionaryHighlightScanner.java

    r1111 r1512  
    2525import com.tresys.framework.plugin.editor.FrameworkColors; 
    2626import com.tresys.framework.plugin.editor.KeywordHighlightRule; 
    27 import com.tresys.framework.plugin.preferences.SEFEditorPreferences; 
     27import com.tresys.framework.plugin.preferences.TextEditorPreferences; 
    2828 
    2929 
     
    3838                IToken commentToken = new Token( 
    3939                                new TextAttribute( 
    40                                                 FrameworkColors.GetColor(SEFEditorPreferences.COLOR_COMMENT)));        
     40                                                FrameworkColors.GetColor(TextEditorPreferences.COLOR_COMMENT)));       
    4141                IToken keywordToken = new Token( 
    4242                                new TextAttribute( 
    43                                                 FrameworkColors.GetColor(SEFEditorPreferences.COLOR_KEYWORD), null, 
     43                                                FrameworkColors.GetColor(TextEditorPreferences.COLOR_KEYWORD), null, 
    4444                                                SWT.BOLD)); 
    4545                IToken verbToken = new Token( 
    4646                                new TextAttribute( 
    47                                                 FrameworkColors.GetColor(SEFEditorPreferences.COLOR_VERB), null, 
     47                                                FrameworkColors.GetColor(TextEditorPreferences.COLOR_VERB), null, 
    4848                                                SWT.BOLD)); 
    4949                IToken nameToken = new Token( 
    5050                                new TextAttribute( 
    51                                                 FrameworkColors.GetColor(SEFEditorPreferences.COLOR_NAME))); 
     51                                                FrameworkColors.GetColor(TextEditorPreferences.COLOR_NAME))); 
    5252                IToken valueToken = new Token( 
    5353                                new TextAttribute( 
    54                                                 FrameworkColors.GetColor(SEFEditorPreferences.COLOR_VALUE))); 
     54                                                FrameworkColors.GetColor(TextEditorPreferences.COLOR_VALUE))); 
    5555                IToken vectorToken = new Token( 
    5656                                new TextAttribute( 
    57                                                 FrameworkColors.GetColor(SEFEditorPreferences.COLOR_VECTOR))); 
     57                                                FrameworkColors.GetColor(TextEditorPreferences.COLOR_VECTOR))); 
    5858                IToken typeToken = new Token( 
    5959                                new TextAttribute( 
    60                                                 FrameworkColors.GetColor(SEFEditorPreferences.COLOR_TYPE))); 
     60                                                FrameworkColors.GetColor(TextEditorPreferences.COLOR_TYPE))); 
    6161                 
    6262                // If this is just normal text, use this set of rules 
     
    106106                                                                FrameworkColors.GetColor( 
    107107                                                                                SEFramework_Plugin.getDefault().getPreferenceStore().getString( 
    108                                                                                                 SEFEditorPreferences.COLOR_DEFAULT))))); 
     108                                                                                                TextEditorPreferences.COLOR_DEFAULT))))); 
    109109                setRules(rules); 
    110110        } 
  • trunk/framework-plugin/src/com/tresys/framework/plugin/editor/policy/graphic/commands/ControlResourceCreateCommand.java

    r1337 r1512  
    1414import org.eclipse.draw2d.geometry.Rectangle; 
    1515import org.eclipse.gef.commands.Command; 
     16import org.eclipse.jface.window.Window; 
     17import org.eclipse.jface.wizard.WizardDialog; 
     18import org.eclipse.swt.widgets.Display; 
    1619 
     20import com.tresys.framework.plugin.SEFramework_Plugin; 
    1721import com.tresys.framework.plugin.editor.policy.graphic.model.ControlResourceShape; 
    1822import com.tresys.framework.plugin.editor.policy.graphic.model.DomainShape; 
    1923import com.tresys.framework.plugin.editor.policy.graphic.model.PolicyDiagram; 
     24import com.tresys.framework.plugin.preferences.GraphicEditorPreferences; 
    2025 
    2126public class ControlResourceCreateCommand 
     
    2631        PolicyDiagram m_diagram; 
    2732        Rectangle m_bounds; 
     33        boolean m_bWasInserted = false; 
    2834         
    2935        public ControlResourceCreateCommand (ControlResourceShape i_newShape, PolicyDiagram i_parent, Rectangle i_bounds) 
     
    125131                 
    126132                redo(); 
     133                 
     134                boolean bShowWizard = SEFramework_Plugin.getDefault().getPreferenceStore(). 
     135                        getBoolean(GraphicEditorPreferences.SHOW_WIZARD);  
     136 
     137                if (bShowWizard) 
     138                { 
     139                        //Dialog block to get the initial information for the shape 
     140                        if (m_newShape.getWizard() != null) 
     141                        { 
     142                                WizardDialog dlg = new WizardDialog(Display.getCurrent().getActiveShell(),  
     143                                                m_newShape.getWizard()); 
     144                                dlg.setBlockOnOpen (true); 
     145                                m_bWasInserted = dlg.open() == Window.OK; 
     146                        } 
     147                } 
     148                else 
     149                        m_bWasInserted = true; 
     150         
     151                if (m_bWasInserted) 
     152                { 
     153                        setLabel (Messages.creation + " " + m_newShape.getName()); 
     154                } 
     155                else 
     156                { 
     157                        undo (); 
     158                } 
    127159        } 
    128160 
     
    132164                PolicyDiagram   parent = domain.getParent();  
    133165                 
    134 //            m_newShape.setDomain(domain); 
     166              m_newShape.setDomain(domain); 
    135167                parent.addChild(m_newShape); 
    136168        } 
     
    142174                PolicyDiagram   parent = domain.getParent(); 
    143175                 
     176                m_newShape.setDomain(null); 
    144177                parent.removeChild(m_newShape); 
    145178        } 
  • trunk/framework-plugin/src/com/tresys/framework/plugin/editor/policy/graphic/commands/ShapeCreateCommand.java

    r1456 r1512  
    3333import org.eclipse.ui.part.FileEditorInput; 
    3434 
     35import com.tresys.framework.plugin.SEFramework_Plugin; 
    3536import com.tresys.framework.plugin.builder.FrameworkNature; 
    3637import com.tresys.framework.plugin.builder.SELinuxSystem; 
     
    3839import com.tresys.framework.plugin.editor.policy.graphic.model.PolicyDiagram; 
    3940import com.tresys.framework.plugin.editor.policy.graphic.model.Shape; 
     41import com.tresys.framework.plugin.preferences.GraphicEditorPreferences; 
    4042 
    4143/** 
     
    104106                        redo(); 
    105107 
    106                         //Dialog block to get the initial information for the shape 
    107                         if (m_newShape.getWizard() != null) 
    108                         { 
    109                                 WizardDialog dlg = new WizardDialog(Display.getCurrent().getActiveShell(), m_newShape.getWizard()); 
    110                                 dlg.setBlockOnOpen (true); 
    111                                 m_bWasInserted = dlg.open() == Window.OK; 
    112                         } 
    113  
     108                        boolean bShowWizard = SEFramework_Plugin.getDefault().getPreferenceStore(). 
     109                                        getBoolean(GraphicEditorPreferences.SHOW_WIZARD);  
     110                         
     111                        if (bShowWizard) 
     112                        { 
     113                                //Dialog block to get the initial information for the shape 
     114                                if (m_newShape.getWizard() != null) 
     115                                { 
     116                                        WizardDialog dlg = new WizardDialog(Display.getCurrent().getActiveShell(),  
     117                                                        m_newShape.getWizard()); 
     118                                        dlg.setBlockOnOpen (true); 
     119                                        m_bWasInserted = dlg.open() == Window.OK; 
     120                                } 
     121                        } 
     122                        else 
     123                                m_bWasInserted = true; 
     124                         
    114125                        if (m_bWasInserted) 
    115126                        { 
  • trunk/framework-plugin/src/com/tresys/framework/plugin/editor/policy/graphic/model/ControlResourceShape.java

    r1426 r1512  
    3232import com.tresys.framework.plugin.builder.SELinuxSystem; 
    3333import com.tresys.framework.plugin.editor.policy.graphic.IShapeVisitor; 
     34import com.tresys.framework.plugin.wizards.ControlResourcePropertyWizard; 
    3435 
    3536public class ControlResourceShape 
     
    6364                if (m_domain != null) 
    6465                        m_domain.remove(this); 
     66                ControlResource res = (ControlResource) getComponent (); 
     67                if (res != null && m_domain != i_domain) 
     68                        res.setDomain(null); 
    6569                 
    6670                m_domain = i_domain; 
    67                 ControlResource res = null; 
    6871                String sName = "none"; //$NON-NLS-1$ 
    6972                 
    70                 if (getComponent() == null) 
     73                if (res == null) 
    7174                { 
    7275                        if (m_domain != null) 
     
    104107                                } 
    105108                        } 
    106          
     109 
    107110                        setComponent (res); 
    108111//                      setName (sName); 
     
    110113 
    111114                if (m_domain != null) 
     115                { 
    112116                        m_domain.add (this); 
    113         } 
    114  
     117                        res.setDomain((Domain) m_domain.getComponent()); 
     118                } 
     119                 
     120        } 
     121/* 
     122        public void setComponent (Component i_component) 
     123        { 
     124                ControlResource res = (ControlResource) getComponent (); 
     125//              Domain dom = res.getDomain(); 
     126                if (res != null) 
     127                        res.setDomain(null); 
     128         
     129                super.setComponent (i_component); 
     130                 
     131                 
     132        } 
     133*/       
    115134        public DomainShape getDomain () 
    116135        { 
     
    147166        public Wizard  getWizard() 
    148167        { 
     168                if (getComponent()  != null) 
     169                        return new ControlResourcePropertyWizard (this); 
     170                 
    149171                return null; 
    150172        } 
     
    230252 
    231253                        component.SetRdef(rdef, new Token (rdef.GetName (), getErrorHandler())); 
    232  
    233                         String sName = rdef.GetName(); 
    234                         sName = sName.substring(0, sName.length()-1); 
    235                         setName (sName); 
     254                        setName (component.getSubName ()); 
    236255                } 
    237256                else 
  • trunk/framework-plugin/src/com/tresys/framework/plugin/editor/policy/text/PolicyHighlightScanner.java

    r1175 r1512  
    2323import com.tresys.framework.plugin.editor.KeywordHighlightRule; 
    2424import com.tresys.framework.plugin.editor.policy.PolicyDocumentProvider; 
    25 import com.tresys.framework.plugin.preferences.SEFEditorPreferences; 
     25import com.tresys.framework.plugin.preferences.TextEditorPreferences; 
    2626 
    2727 
     
    3636                IToken commentToken = new Token( 
    3737                                new TextAttribute( 
    38                                                 FrameworkColors.GetColor(SEFEditorPreferences.COLOR_COMMENT)));        
     38                                                FrameworkColors.GetColor(TextEditorPreferences.COLOR_COMMENT)));       
    3939                IToken keywordToken = new Token( 
    4040                                new TextAttribute( 
    41                                                 FrameworkColors.GetColor(SEFEditorPreferences.COLOR_KEYWORD), null, 
     41                                                FrameworkColors.GetColor(TextEditorPreferences.COLOR_KEYWORD), null, 
    4242                                                SWT.BOLD)); 
    4343                IToken verbToken = new Token( 
    4444                                new TextAttribute( 
    45                                                 FrameworkColors.GetColor(SEFEditorPreferences.COLOR_VERB), null, 
     45                                                FrameworkColors.GetColor(TextEditorPreferences.COLOR_VERB), null, 
    4646                                                SWT.BOLD)); 
    4747                IToken pathToken = new Token( 
    4848                                new TextAttribute( 
    49                                                 FrameworkColors.GetColor(SEFEditorPreferences.COLOR_VALUE))); 
     49                                                FrameworkColors.GetColor(TextEditorPreferences.COLOR_VALUE))); 
    5050 
    5151                rules = new IRule[3]; 
     
    7575                                new Token( 
    7676                                                new TextAttribute( 
    77                                                                 FrameworkColors.GetColor(SEFEditorPreferences.COLOR_DEFAULT)))); 
     77                                                                FrameworkColors.GetColor(TextEditorPreferences.COLOR_DEFAULT)))); 
    7878                setRules(rules); 
    7979        } 
  • trunk/framework-plugin/src/com/tresys/framework/plugin/editor/policy/text/TextPolicyDocumentProvider.java

    r1502 r1512  
    3232import com.tresys.framework.plugin.editor.policy.IPolicyEditor; 
    3333import com.tresys.framework.plugin.editor.policy.PolicyDocumentProvider; 
    34 import com.tresys.framework.plugin.preferences.SEFPreferencePage
     34import com.tresys.framework.plugin.preferences.TextEditorPreferences
    3535 
    3636public class TextPolicyDocumentProvider  
     
    9797                                return; 
    9898                         
    99                         if (SEFramework_Plugin.getDefault().getPreferenceStore().getBoolean(SEFPreferencePage.CONSTANT_COMPILE))  
     99                        if (SEFramework_Plugin.getDefault().getPreferenceStore().getBoolean(TextEditorPreferences.CONSTANT_COMPILE))  
    100100                        { 
    101101                                schedule(3000); 
     
    145145                        { 
    146146                                if (event.fText.equals("{") 
    147                                         && SEFramework_Plugin.getDefault().getPreferenceStore().getBoolean(SEFPreferencePage.BRACE_COMPLETION) 
     147                                        && SEFramework_Plugin.getDefault().getPreferenceStore().getBoolean(TextEditorPreferences.BRACE_COMPLETION) 
    148148                                        && !((IDocumentExtension3) getCurrentDocument ()).getPartition("comment", event.fOffset, false).getType().equals(FrameworkCommentPartitionScanner.FRAMEWORK_COMMENT))  
    149149                                { 
  • trunk/framework-plugin/src/com/tresys/framework/plugin/editor/sysresource/SystemResourcesDocumentProvider.java

    r1198 r1512  
    3131import com.tresys.framework.plugin.SEFramework_Plugin; 
    3232import com.tresys.framework.plugin.editor.FrameworkCommentPartitionScanner; 
    33 import com.tresys.framework.plugin.preferences.SEFPreferencePage
     33import com.tresys.framework.plugin.preferences.TextEditorPreferences
    3434 
    3535 
     
    8181                                try { 
    8282                                        if (event.fText.equals("{") 
    83                                                 && SEFramework_Plugin.getDefault().getPreferenceStore().getBoolean(SEFPreferencePage.BRACE_COMPLETION) 
     83                                                && SEFramework_Plugin.getDefault().getPreferenceStore().getBoolean(TextEditorPreferences.BRACE_COMPLETION) 
    8484                                                && !((IDocumentExtension3) currentDocument).getPartition("comment", event.fOffset, false).getType().equals(FrameworkCommentPartitionScanner.FRAMEWORK_COMMENT)) { 
    8585                                                         
     
    109109                                timer = new Timer(); 
    110110                                if (SEFramework_Plugin.getDefault().getPreferenceStore().getBoolean( 
    111                                                 SEFPreferencePage.CONSTANT_COMPILE)) { 
     111                                                TextEditorPreferences.CONSTANT_COMPILE)) { 
    112112                                        timer.schedule(new TimerTask() { 
    113113                                                public void run() { 
  • trunk/framework-plugin/src/com/tresys/framework/plugin/editor/sysresource/SystemResourcesHighlightScanner.java

    r1111 r1512  
    1919 
    2020import com.tresys.framework.plugin.editor.FrameworkColors; 
    21 import com.tresys.framework.plugin.preferences.SEFEditorPreferences; 
     21import com.tresys.framework.plugin.preferences.TextEditorPreferences; 
    2222 
    2323 
     
    3232                IToken commentToken = new Token( 
    3333                                new TextAttribute( 
    34                                                 FrameworkColors.GetColor(SEFEditorPreferences.COLOR_COMMENT)));        
     34                                                FrameworkColors.GetColor(TextEditorPreferences.COLOR_COMMENT)));       
    3535 
    3636                rules = new IRule[1]; 
     
    4141                                new Token( 
    4242                                                new TextAttribute( 
    43                                                                 FrameworkColors.GetColor(SEFEditorPreferences.COLOR_DEFAULT)))); 
     43                                                                FrameworkColors.GetColor(TextEditorPreferences.COLOR_DEFAULT)))); 
    4444                setRules(rules); 
    4545        } 
  • trunk/framework-plugin/src/com/tresys/framework/plugin/preferences/Messages.java

    r1344 r1512  
    2626         
    2727 
    28         // editor preferences 
    29         public static String prefs_editor; 
    30         public static String prefs_description; 
     28        // text editor preferences 
     29        public static String prefs_text_editor; 
     30        public static String prefs_text_description; 
    3131        public static String option_verbose_output; 
    3232        public static String option_output_to_console; 
     
    4242        public static String option_color_type; 
    4343 
     44        // graphical editor preferences 
     45        public static String prefs_graphic_editor; 
     46        public static String prefs_graphic_description; 
     47        public static String option_creation_wizard; 
     48        public static String option_policy_tool_sticky; 
     49        public static String option_policy_access_sticky; 
     50         
    4451        // plug-in preferences 
    4552        public static String prefs_plugin; 
  • trunk/framework-plugin/src/com/tresys/framework/plugin/preferences/PreferenceInitializer.java

    r1315 r1512  
    2626 * Class used to initialize default preference values. 
    2727 */ 
    28 public class PreferenceInitializer extends AbstractPreferenceInitializer { 
     28public class PreferenceInitializer  
     29        extends AbstractPreferenceInitializer  
     30
    2931 
    30         public static final Color WHITE = new Color(Display.getCurrent(), 255, 255, 
    31                         255); 
     32        public static final Color WHITE = new Color(Display.getCurrent(), 255, 255, 255); 
    3233        public static final Color BLACK = new Color(Display.getCurrent(), 0, 0, 0); 
    3334        public static final Color BLUE = new Color(Display.getCurrent(), 0, 0, 192); 
    3435        public static final Color RED = new Color(Display.getCurrent(), 192, 27, 27); 
    35         public static final Color MAROON = new Color(Display.getCurrent(), 165, 42, 
    36                         42); 
    37         public static final Color GREEN = new Color(Display.getCurrent(), 63, 127, 
    38                         95); 
    39         public static final Color PURPLE = new Color(Display.getCurrent(), 127, 0, 
    40                         85); 
    41         public static final Color ORANGE = new Color(Display.getCurrent(), 255, 100, 
    42                         0); 
     36        public static final Color MAROON = new Color(Display.getCurrent(), 165, 42, 42); 
     37        public static final Color GREEN = new Color(Display.getCurrent(), 63, 127, 95); 
     38        public static final Color PURPLE = new Color(Display.getCurrent(), 127, 0, 85); 
     39        public static final Color ORANGE = new Color(Display.getCurrent(), 255, 100, 0); 
    4340         
    4441        /** 
    4542         * This will set the default preferences for the preference store 
    4643         */ 
    47         public void initializeDefaultPreferences() { 
     44        public void initializeDefaultPreferences()  
     45        { 
    4846                IPreferenceStore store = SEFramework_Plugin.getDefault().getPreferenceStore(); 
    4947 
    5048                // This is where you set the default preferences; 
    5149                 
    52                 try { 
    53                         URL basePathURL = new URL( 
    54                                         SEFramework_Plugin.getDefault().getBundle().getEntry("/"), ""); 
    55                 String basePath = Platform.asLocalURL(basePathURL).getPath(); 
    56                         store.setDefault(SEFPreferencePage.BASE_DICT_PATH, 
    57                                         basePath + "resources/dictionary/dictionary.fdic"); 
     50                try  
     51                { 
     52                        URL basePathURL = new URL(SEFramework_Plugin.getDefault().getBundle().getEntry("/"), ""); 
     53                        String basePath = Platform.asLocalURL(basePathURL).getPath(); 
     54                        store.setDefault(SEFPreferencePage.BASE_DICT_PATH, basePath + "resources/dictionary/dictionary.fdic"); 
    5855                        store.setDefault(SEFPreferencePage.BASE_POLICY_PATH, basePath + "refpolicy"); 
    5956                         
    60                 } catch (MalformedURLException mue) {} catch (IOException ioe) {} 
     57                }  
     58                catch (MalformedURLException mue)  
     59                {}  
     60                catch (IOException ioe)  
     61                {} 
    6162                 
    62                 store.setDefault(SEFPreferencePage.BRACE_COMPLETION, true); 
    6363                store.setDefault(SEFPreferencePage.VERBOSE_COMPILE, false); 
    64                 store.setDefault(SEFPreferencePage.CONSTANT_COMPILE, true); 
    6564                store.setDefault(SEFPreferencePage.REDIRECT_OUTPUT, true); 
     65 
     66                store.setDefault(TextEditorPreferences.BRACE_COMPLETION, true); 
     67                store.setDefault(TextEditorPreferences.CONSTANT_COMPILE, true); 
     68 
     69                store.setDefault(TextEditorPreferences.COLOR_COMMENT, 
     70                                GetStringFromColor(GREEN)); 
     71                store.setDefault(TextEditorPreferences.COLOR_DEFAULT, 
     72                                GetStringFromColor(BLACK)); 
     73                store.setDefault(TextEditorPreferences.COLOR_KEYWORD, 
     74                                GetStringFromColor(MAROON)); 
     75                store.setDefault(TextEditorPreferences.COLOR_NAME, 
     76                                GetStringFromColor(ORANGE)); 
     77                store.setDefault(TextEditorPreferences.COLOR_TYPE, 
     78                                GetStringFromColor(RED)); 
     79                store.setDefault(TextEditorPreferences.COLOR_VALUE, 
     80                                GetStringFromColor(BLUE)); 
     81                store.setDefault(TextEditorPreferences.COLOR_VECTOR, 
     82                                GetStringFromColor(BLUE)); 
     83                store.setDefault(TextEditorPreferences.COLOR_VERB, 
     84                                GetStringFromColor(PURPLE)); 
    6685                 
    67                 store.setDefault(SEFEditorPreferences.COLOR_COMMENT, 
    68                                 GetStringFromColor(GREEN)); 
    69                 store.setDefault(SEFEditorPreferences.COLOR_DEFAULT, 
    70                                 GetStringFromColor(BLACK)); 
    71                 store.setDefault(SEFEditorPreferences.COLOR_KEYWORD, 
    72                                 GetStringFromColor(MAROON)); 
    73                 store.setDefault(SEFEditorPreferences.COLOR_NAME, 
    74                                 GetStringFromColor(ORANGE)); 
    75                 store.setDefault(SEFEditorPreferences.COLOR_TYPE, 
    76                                 GetStringFromColor(RED)); 
    77                 store.setDefault(SEFEditorPreferences.COLOR_VALUE, 
    78                                 GetStringFromColor(BLUE)); 
    79                 store.setDefault(SEFEditorPreferences.COLOR_VECTOR, 
    80                                 GetStringFromColor(BLUE)); 
    81                 store.setDefault(SEFEditorPreferences.COLOR_VERB, 
    82                                 GetStringFromColor(PURPLE)); 
     86                store.setDefault(GraphicEditorPreferences.SHOW_WIZARD, true); 
     87                store.setDefault(GraphicEditorPreferences.ITEM_TOOL_STICKY, false); 
     88                store.setDefault(GraphicEditorPreferences.ITEM_ACCESS_STICKY, true); 
    8389        } 
    8490 
     
    8894         * @return                      A String representing the color given 
    8995         */ 
    90         private String GetStringFromColor(Color theColor) { 
     96        private String GetStringFromColor(Color theColor)  
     97        { 
    9198                String colorString = theColor.toString(); 
    9299 
  • trunk/framework-plugin/src/com/tresys/framework/plugin/preferences/SEFPreferencePage.java

    r1337 r1512  
    1111 
    1212 
     13import org.eclipse.jface.preference.BooleanFieldEditor; 
    1314import org.eclipse.jface.preference.FieldEditorPreferencePage; 
    1415import org.eclipse.jface.preference.FileFieldEditor; 
     
    2122 
    2223 
    23 public class SEFPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage { 
     24public class SEFPreferencePage  
     25        extends FieldEditorPreferencePage  
     26        implements IWorkbenchPreferencePage  
     27
    2428 
    2529         
     
    3034         
    3135        public static final String VERBOSE_COMPILE = "verboseCompiler";                 //$NON-NLS-1$ 
    32         public static final String BRACE_COMPLETION = "useBraceCompletion";             //$NON-NLS-1$ 
    33         public static final String CONSTANT_COMPILE = "constantCompile";                //$NON-NLS-1$ 
    3436        public static final String REDIRECT_OUTPUT = "redirectOutput";                  //$NON-NLS-1$ 
    3537         
     
    3739         * Create a new SEFramework preference page with a grid layout and set it's title 
    3840         */ 
    39         public SEFPreferencePage() { 
     41        public SEFPreferencePage()  
     42        { 
    4043                super(GRID); 
    4144                setPreferenceStore(SEFramework_Plugin.getDefault().getPreferenceStore()); 
    4245                setTitle(Messages.prefs_plugin); 
    4346                setDescription(Messages.prefs_plugin_description); 
    44                 setImageDescriptor( 
    45                                 SEFramework_Plugin.getDefault().getImageRegistry().getDescriptor( 
     47                setImageDescriptor(SEFramework_Plugin.getDefault().getImageRegistry().getDescriptor( 
    4648                                                FRAMEWORKImageRegistry.FRAMEWORK_ICON)); 
    47                  
    4849        } 
    4950         
     
    5253         *  as save and restoring themselves 
    5354         */ 
    54         public void createFieldEditors() {               
    55                 addField( 
    56                                 new FileFieldEditor(BASE_DICT_PATH, Messages.prefs_dictionary_file, 
     55        public void createFieldEditors()  
     56        { 
     57 
     58                addField (new FileFieldEditor(BASE_DICT_PATH, Messages.prefs_dictionary_file, 
    5759                                getFieldEditorParent())); 
    5860        /*      addField( 
    …</