Changeset 1512
- Timestamp:
- 03/06/07 14:48:37 (2 years ago)
- Files:
-
- trunk/framework-plugin/plugin.properties (modified) (1 diff)
- trunk/framework-plugin/plugin.xml (modified) (1 diff)
- trunk/framework-plugin/src/com/tresys/framework/compiler/PolicyGenerator.java (modified) (1 diff)
- trunk/framework-plugin/src/com/tresys/framework/compiler/policy/ControlResource.java (modified) (1 diff)
- trunk/framework-plugin/src/com/tresys/framework/plugin/editor/dictionary/DictionaryDocumentProvider.java (modified) (3 diffs)
- trunk/framework-plugin/src/com/tresys/framework/plugin/editor/dictionary/DictionaryHighlightScanner.java (modified) (3 diffs)
- trunk/framework-plugin/src/com/tresys/framework/plugin/editor/policy/graphic/commands/ControlResourceCreateCommand.java (modified) (5 diffs)
- trunk/framework-plugin/src/com/tresys/framework/plugin/editor/policy/graphic/commands/ShapeCreateCommand.java (modified) (3 diffs)
- trunk/framework-plugin/src/com/tresys/framework/plugin/editor/policy/graphic/model/ControlResourceShape.java (modified) (6 diffs)
- trunk/framework-plugin/src/com/tresys/framework/plugin/editor/policy/text/PolicyHighlightScanner.java (modified) (3 diffs)
- trunk/framework-plugin/src/com/tresys/framework/plugin/editor/policy/text/TextPolicyDocumentProvider.java (modified) (3 diffs)
- trunk/framework-plugin/src/com/tresys/framework/plugin/editor/sysresource/SystemResourcesDocumentProvider.java (modified) (3 diffs)
- trunk/framework-plugin/src/com/tresys/framework/plugin/editor/sysresource/SystemResourcesHighlightScanner.java (modified) (3 diffs)
- trunk/framework-plugin/src/com/tresys/framework/plugin/preferences/GraphicEditorPreferences.java (added)
- trunk/framework-plugin/src/com/tresys/framework/plugin/preferences/Messages.java (modified) (2 diffs)
- trunk/framework-plugin/src/com/tresys/framework/plugin/preferences/PreferenceInitializer.java (modified) (2 diffs)
- trunk/framework-plugin/src/com/tresys/framework/plugin/preferences/SEFPreferencePage.java (modified) (6 diffs)
- trunk/framework-plugin/src/com/tresys/framework/plugin/preferences/TextEditorPreferences.java (moved) (moved from trunk/framework-plugin/src/com/tresys/framework/plugin/preferences/SEFEditorPreferences.java) (3 diffs)
- trunk/framework-plugin/src/com/tresys/framework/plugin/preferences/messages.properties (modified) (2 diffs)
- trunk/framework-plugin/src/com/tresys/framework/plugin/wizards/ControlResourcePropertyPage.java (added)
- trunk/framework-plugin/src/com/tresys/framework/plugin/wizards/ControlResourcePropertyWizard.java (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/framework-plugin/plugin.properties
r1465 r1512 39 39 frameworkPrefs = CDS Framework 40 40 policyTextEditor = Text Editor 41 policyGraphicEditor = Graphical Editor 41 42 42 43 ## wizards trunk/framework-plugin/plugin.xml
r1502 r1512 78 78 name="%frameworkPrefs"/> 79 79 <page 80 id=" org.eclipse.ui.editorPreferences"80 id="com.tresys.framework.plugin.preferences.TextEditorPreferences" 81 81 name="%policyTextEditor" 82 class="com.tresys.framework.plugin.preferences. SEFEditorPreferences"82 class="com.tresys.framework.plugin.preferences.TextEditorPreferences" 83 83 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"/> 84 89 </extension> 85 90 trunk/framework-plugin/src/com/tresys/framework/compiler/PolicyGenerator.java
r1468 r1512 351 351 { 352 352 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; 353 360 354 361 buf.append("resource "); 355 Rdef rdef = i_resource.getRdef();356 Domain dom = i_resource.getDomain();357 362 358 363 buf.append(rdef.GetName()); trunk/framework-plugin/src/com/tresys/framework/compiler/policy/ControlResource.java
r1506 r1512 116 116 ClearAllRdef(); 117 117 Add(i_rdef, i_tok); 118 119 String sName = i_rdef.GetName(); 120 sName = sName.substring(0, sName.length()-1); 121 setSubName (sName); 122 118 123 } 119 124 trunk/framework-plugin/src/com/tresys/framework/plugin/editor/dictionary/DictionaryDocumentProvider.java
r1502 r1512 35 35 import com.tresys.framework.plugin.builder.FrameworkNature; 36 36 import com.tresys.framework.plugin.editor.FrameworkCommentPartitionScanner; 37 import com.tresys.framework.plugin.preferences. SEFPreferencePage;37 import com.tresys.framework.plugin.preferences.TextEditorPreferences; 38 38 39 39 … … 93 93 if (event.fText.equals("{") 94 94 && SEFramework_Plugin.getDefault().getPreferenceStore().getBoolean( 95 SEFPreferencePage.BRACE_COMPLETION)95 TextEditorPreferences.BRACE_COMPLETION) 96 96 && !((IDocumentExtension3) currentDocument).getPartition("comment", event.fOffset, false).getType().equals(FrameworkCommentPartitionScanner.FRAMEWORK_COMMENT)) 97 97 { … … 126 126 timer = new Timer(); 127 127 if (SEFramework_Plugin.getDefault().getPreferenceStore().getBoolean( 128 SEFPreferencePage.CONSTANT_COMPILE)) {128 TextEditorPreferences.CONSTANT_COMPILE)) { 129 129 timer.schedule(new TimerTask() { 130 130 public void run() { trunk/framework-plugin/src/com/tresys/framework/plugin/editor/dictionary/DictionaryHighlightScanner.java
r1111 r1512 25 25 import com.tresys.framework.plugin.editor.FrameworkColors; 26 26 import com.tresys.framework.plugin.editor.KeywordHighlightRule; 27 import com.tresys.framework.plugin.preferences. SEFEditorPreferences;27 import com.tresys.framework.plugin.preferences.TextEditorPreferences; 28 28 29 29 … … 38 38 IToken commentToken = new Token( 39 39 new TextAttribute( 40 FrameworkColors.GetColor( SEFEditorPreferences.COLOR_COMMENT)));40 FrameworkColors.GetColor(TextEditorPreferences.COLOR_COMMENT))); 41 41 IToken keywordToken = new Token( 42 42 new TextAttribute( 43 FrameworkColors.GetColor( SEFEditorPreferences.COLOR_KEYWORD), null,43 FrameworkColors.GetColor(TextEditorPreferences.COLOR_KEYWORD), null, 44 44 SWT.BOLD)); 45 45 IToken verbToken = new Token( 46 46 new TextAttribute( 47 FrameworkColors.GetColor( SEFEditorPreferences.COLOR_VERB), null,47 FrameworkColors.GetColor(TextEditorPreferences.COLOR_VERB), null, 48 48 SWT.BOLD)); 49 49 IToken nameToken = new Token( 50 50 new TextAttribute( 51 FrameworkColors.GetColor( SEFEditorPreferences.COLOR_NAME)));51 FrameworkColors.GetColor(TextEditorPreferences.COLOR_NAME))); 52 52 IToken valueToken = new Token( 53 53 new TextAttribute( 54 FrameworkColors.GetColor( SEFEditorPreferences.COLOR_VALUE)));54 FrameworkColors.GetColor(TextEditorPreferences.COLOR_VALUE))); 55 55 IToken vectorToken = new Token( 56 56 new TextAttribute( 57 FrameworkColors.GetColor( SEFEditorPreferences.COLOR_VECTOR)));57 FrameworkColors.GetColor(TextEditorPreferences.COLOR_VECTOR))); 58 58 IToken typeToken = new Token( 59 59 new TextAttribute( 60 FrameworkColors.GetColor( SEFEditorPreferences.COLOR_TYPE)));60 FrameworkColors.GetColor(TextEditorPreferences.COLOR_TYPE))); 61 61 62 62 // If this is just normal text, use this set of rules … … 106 106 FrameworkColors.GetColor( 107 107 SEFramework_Plugin.getDefault().getPreferenceStore().getString( 108 SEFEditorPreferences.COLOR_DEFAULT)))));108 TextEditorPreferences.COLOR_DEFAULT))))); 109 109 setRules(rules); 110 110 } trunk/framework-plugin/src/com/tresys/framework/plugin/editor/policy/graphic/commands/ControlResourceCreateCommand.java
r1337 r1512 14 14 import org.eclipse.draw2d.geometry.Rectangle; 15 15 import org.eclipse.gef.commands.Command; 16 import org.eclipse.jface.window.Window; 17 import org.eclipse.jface.wizard.WizardDialog; 18 import org.eclipse.swt.widgets.Display; 16 19 20 import com.tresys.framework.plugin.SEFramework_Plugin; 17 21 import com.tresys.framework.plugin.editor.policy.graphic.model.ControlResourceShape; 18 22 import com.tresys.framework.plugin.editor.policy.graphic.model.DomainShape; 19 23 import com.tresys.framework.plugin.editor.policy.graphic.model.PolicyDiagram; 24 import com.tresys.framework.plugin.preferences.GraphicEditorPreferences; 20 25 21 26 public class ControlResourceCreateCommand … … 26 31 PolicyDiagram m_diagram; 27 32 Rectangle m_bounds; 33 boolean m_bWasInserted = false; 28 34 29 35 public ControlResourceCreateCommand (ControlResourceShape i_newShape, PolicyDiagram i_parent, Rectangle i_bounds) … … 125 131 126 132 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 } 127 159 } 128 160 … … 132 164 PolicyDiagram parent = domain.getParent(); 133 165 134 //m_newShape.setDomain(domain);166 m_newShape.setDomain(domain); 135 167 parent.addChild(m_newShape); 136 168 } … … 142 174 PolicyDiagram parent = domain.getParent(); 143 175 176 m_newShape.setDomain(null); 144 177 parent.removeChild(m_newShape); 145 178 } trunk/framework-plugin/src/com/tresys/framework/plugin/editor/policy/graphic/commands/ShapeCreateCommand.java
r1456 r1512 33 33 import org.eclipse.ui.part.FileEditorInput; 34 34 35 import com.tresys.framework.plugin.SEFramework_Plugin; 35 36 import com.tresys.framework.plugin.builder.FrameworkNature; 36 37 import com.tresys.framework.plugin.builder.SELinuxSystem; … … 38 39 import com.tresys.framework.plugin.editor.policy.graphic.model.PolicyDiagram; 39 40 import com.tresys.framework.plugin.editor.policy.graphic.model.Shape; 41 import com.tresys.framework.plugin.preferences.GraphicEditorPreferences; 40 42 41 43 /** … … 104 106 redo(); 105 107 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 114 125 if (m_bWasInserted) 115 126 { trunk/framework-plugin/src/com/tresys/framework/plugin/editor/policy/graphic/model/ControlResourceShape.java
r1426 r1512 32 32 import com.tresys.framework.plugin.builder.SELinuxSystem; 33 33 import com.tresys.framework.plugin.editor.policy.graphic.IShapeVisitor; 34 import com.tresys.framework.plugin.wizards.ControlResourcePropertyWizard; 34 35 35 36 public class ControlResourceShape … … 63 64 if (m_domain != null) 64 65 m_domain.remove(this); 66 ControlResource res = (ControlResource) getComponent (); 67 if (res != null && m_domain != i_domain) 68 res.setDomain(null); 65 69 66 70 m_domain = i_domain; 67 ControlResource res = null;68 71 String sName = "none"; //$NON-NLS-1$ 69 72 70 if ( getComponent()== null)73 if (res == null) 71 74 { 72 75 if (m_domain != null) … … 104 107 } 105 108 } 106 109 107 110 setComponent (res); 108 111 // setName (sName); … … 110 113 111 114 if (m_domain != null) 115 { 112 116 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 */ 115 134 public DomainShape getDomain () 116 135 { … … 147 166 public Wizard getWizard() 148 167 { 168 if (getComponent() != null) 169 return new ControlResourcePropertyWizard (this); 170 149 171 return null; 150 172 } … … 230 252 231 253 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 ()); 236 255 } 237 256 else trunk/framework-plugin/src/com/tresys/framework/plugin/editor/policy/text/PolicyHighlightScanner.java
r1175 r1512 23 23 import com.tresys.framework.plugin.editor.KeywordHighlightRule; 24 24 import com.tresys.framework.plugin.editor.policy.PolicyDocumentProvider; 25 import com.tresys.framework.plugin.preferences. SEFEditorPreferences;25 import com.tresys.framework.plugin.preferences.TextEditorPreferences; 26 26 27 27 … … 36 36 IToken commentToken = new Token( 37 37 new TextAttribute( 38 FrameworkColors.GetColor( SEFEditorPreferences.COLOR_COMMENT)));38 FrameworkColors.GetColor(TextEditorPreferences.COLOR_COMMENT))); 39 39 IToken keywordToken = new Token( 40 40 new TextAttribute( 41 FrameworkColors.GetColor( SEFEditorPreferences.COLOR_KEYWORD), null,41 FrameworkColors.GetColor(TextEditorPreferences.COLOR_KEYWORD), null, 42 42 SWT.BOLD)); 43 43 IToken verbToken = new Token( 44 44 new TextAttribute( 45 FrameworkColors.GetColor( SEFEditorPreferences.COLOR_VERB), null,45 FrameworkColors.GetColor(TextEditorPreferences.COLOR_VERB), null, 46 46 SWT.BOLD)); 47 47 IToken pathToken = new Token( 48 48 new TextAttribute( 49 FrameworkColors.GetColor( SEFEditorPreferences.COLOR_VALUE)));49 FrameworkColors.GetColor(TextEditorPreferences.COLOR_VALUE))); 50 50 51 51 rules = new IRule[3]; … … 75 75 new Token( 76 76 new TextAttribute( 77 FrameworkColors.GetColor( SEFEditorPreferences.COLOR_DEFAULT))));77 FrameworkColors.GetColor(TextEditorPreferences.COLOR_DEFAULT)))); 78 78 setRules(rules); 79 79 } trunk/framework-plugin/src/com/tresys/framework/plugin/editor/policy/text/TextPolicyDocumentProvider.java
r1502 r1512 32 32 import com.tresys.framework.plugin.editor.policy.IPolicyEditor; 33 33 import com.tresys.framework.plugin.editor.policy.PolicyDocumentProvider; 34 import com.tresys.framework.plugin.preferences. SEFPreferencePage;34 import com.tresys.framework.plugin.preferences.TextEditorPreferences; 35 35 36 36 public class TextPolicyDocumentProvider … … 97 97 return; 98 98 99 if (SEFramework_Plugin.getDefault().getPreferenceStore().getBoolean( SEFPreferencePage.CONSTANT_COMPILE))99 if (SEFramework_Plugin.getDefault().getPreferenceStore().getBoolean(TextEditorPreferences.CONSTANT_COMPILE)) 100 100 { 101 101 schedule(3000); … … 145 145 { 146 146 if (event.fText.equals("{") 147 && SEFramework_Plugin.getDefault().getPreferenceStore().getBoolean( SEFPreferencePage.BRACE_COMPLETION)147 && SEFramework_Plugin.getDefault().getPreferenceStore().getBoolean(TextEditorPreferences.BRACE_COMPLETION) 148 148 && !((IDocumentExtension3) getCurrentDocument ()).getPartition("comment", event.fOffset, false).getType().equals(FrameworkCommentPartitionScanner.FRAMEWORK_COMMENT)) 149 149 { trunk/framework-plugin/src/com/tresys/framework/plugin/editor/sysresource/SystemResourcesDocumentProvider.java
r1198 r1512 31 31 import com.tresys.framework.plugin.SEFramework_Plugin; 32 32 import com.tresys.framework.plugin.editor.FrameworkCommentPartitionScanner; 33 import com.tresys.framework.plugin.preferences. SEFPreferencePage;33 import com.tresys.framework.plugin.preferences.TextEditorPreferences; 34 34 35 35 … … 81 81 try { 82 82 if (event.fText.equals("{") 83 && SEFramework_Plugin.getDefault().getPreferenceStore().getBoolean( SEFPreferencePage.BRACE_COMPLETION)83 && SEFramework_Plugin.getDefault().getPreferenceStore().getBoolean(TextEditorPreferences.BRACE_COMPLETION) 84 84 && !((IDocumentExtension3) currentDocument).getPartition("comment", event.fOffset, false).getType().equals(FrameworkCommentPartitionScanner.FRAMEWORK_COMMENT)) { 85 85 … … 109 109 timer = new Timer(); 110 110 if (SEFramework_Plugin.getDefault().getPreferenceStore().getBoolean( 111 SEFPreferencePage.CONSTANT_COMPILE)) {111 TextEditorPreferences.CONSTANT_COMPILE)) { 112 112 timer.schedule(new TimerTask() { 113 113 public void run() { trunk/framework-plugin/src/com/tresys/framework/plugin/editor/sysresource/SystemResourcesHighlightScanner.java
r1111 r1512 19 19 20 20 import com.tresys.framework.plugin.editor.FrameworkColors; 21 import com.tresys.framework.plugin.preferences. SEFEditorPreferences;21 import com.tresys.framework.plugin.preferences.TextEditorPreferences; 22 22 23 23 … … 32 32 IToken commentToken = new Token( 33 33 new TextAttribute( 34 FrameworkColors.GetColor( SEFEditorPreferences.COLOR_COMMENT)));34 FrameworkColors.GetColor(TextEditorPreferences.COLOR_COMMENT))); 35 35 36 36 rules = new IRule[1]; … … 41 41 new Token( 42 42 new TextAttribute( 43 FrameworkColors.GetColor( SEFEditorPreferences.COLOR_DEFAULT))));43 FrameworkColors.GetColor(TextEditorPreferences.COLOR_DEFAULT)))); 44 44 setRules(rules); 45 45 } trunk/framework-plugin/src/com/tresys/framework/plugin/preferences/Messages.java
r1344 r1512 26 26 27 27 28 // editor preferences29 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; 31 31 public static String option_verbose_output; 32 32 public static String option_output_to_console; … … 42 42 public static String option_color_type; 43 43 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 44 51 // plug-in preferences 45 52 public static String prefs_plugin; trunk/framework-plugin/src/com/tresys/framework/plugin/preferences/PreferenceInitializer.java
r1315 r1512 26 26 * Class used to initialize default preference values. 27 27 */ 28 public class PreferenceInitializer extends AbstractPreferenceInitializer { 28 public class PreferenceInitializer 29 extends AbstractPreferenceInitializer 30 { 29 31 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); 32 33 public static final Color BLACK = new Color(Display.getCurrent(), 0, 0, 0); 33 34 public static final Color BLUE = new Color(Display.getCurrent(), 0, 0, 192); 34 35 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); 43 40 44 41 /** 45 42 * This will set the default preferences for the preference store 46 43 */ 47 public void initializeDefaultPreferences() { 44 public void initializeDefaultPreferences() 45 { 48 46 IPreferenceStore store = SEFramework_Plugin.getDefault().getPreferenceStore(); 49 47 50 48 // This is where you set the default preferences; 51 49 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"); 58 55 store.setDefault(SEFPreferencePage.BASE_POLICY_PATH, basePath + "refpolicy"); 59 56 60 } catch (MalformedURLException mue) {} catch (IOException ioe) {} 57 } 58 catch (MalformedURLException mue) 59 {} 60 catch (IOException ioe) 61 {} 61 62 62 store.setDefault(SEFPreferencePage.BRACE_COMPLETION, true);63 63 store.setDefault(SEFPreferencePage.VERBOSE_COMPILE, false); 64 store.setDefault(SEFPreferencePage.CONSTANT_COMPILE, true);65 64 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)); 66 85 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); 83 89 } 84 90 … … 88 94 * @return A String representing the color given 89 95 */ 90 private String GetStringFromColor(Color theColor) { 96 private String GetStringFromColor(Color theColor) 97 { 91 98 String colorString = theColor.toString(); 92 99 trunk/framework-plugin/src/com/tresys/framework/plugin/preferences/SEFPreferencePage.java
r1337 r1512 11 11 12 12 13 import org.eclipse.jface.preference.BooleanFieldEditor; 13 14 import org.eclipse.jface.preference.FieldEditorPreferencePage; 14 15 import org.eclipse.jface.preference.FileFieldEditor; … … 21 22 22 23 23 public class SEFPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage { 24 public class SEFPreferencePage 25 extends FieldEditorPreferencePage 26 implements IWorkbenchPreferencePage 27 { 24 28 25 29 … … 30 34 31 35 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$34 36 public static final String REDIRECT_OUTPUT = "redirectOutput"; //$NON-NLS-1$ 35 37 … … 37 39 * Create a new SEFramework preference page with a grid layout and set it's title 38 40 */ 39 public SEFPreferencePage() { 41 public SEFPreferencePage() 42 { 40 43 super(GRID); 41 44 setPreferenceStore(SEFramework_Plugin.getDefault().getPreferenceStore()); 42 45 setTitle(Messages.prefs_plugin); 43 46 setDescription(Messages.prefs_plugin_description); 44 setImageDescriptor( 45 SEFramework_Plugin.getDefault().getImageRegistry().getDescriptor( 47 setImageDescriptor(SEFramework_Plugin.getDefault().getImageRegistry().getDescriptor( 46 48 FRAMEWORKImageRegistry.FRAMEWORK_ICON)); 47 48 49 } 49 50 … … 52 53 * as save and restoring themselves 53 54 */ 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, 57 59 getFieldEditorParent())); 58 60 /* addField( … …
