Closed jjhugues closed 3 years ago
We need the following:
@jjhugues did you intend the flag to be project specific (project A can use annex B, but project C can NOT use annex B) or is the flag should be applied to all projects (if annex B flag is unchecked, then it can NOT be used in project A and project C)
@AaronGreenhouse Do you know if it is possible to access preferences from stand alone java programs (jar files) that you can run from command line to process aadl file?
The flag should be project specific
@asazonova I don't know for sure, but I think it would probably work. The core Workspace preference and project properties data structures are not UI-specific.
@lwrage
for workspace preference, we use final IPreferenceStore store = OsateCorePlugin.getDefault().getPreferenceStore(); for project preference, we use final IScopeContext context = new ProjectScope(project); final Preferences prefs = context.getNode(PREFS_QUALIFIER);
This Preferences prefs object does not have a method to set a default value. However, unlike workspace preference, for projects we set the preference explicitly with prefs.putBoolean(annexExtensionId.toLowerCase(), value); - see implementation below: @Override public void putBoolean(String key, boolean value) { wrapped.putBoolean(key, value); }
this one does not have a check if oldValue == newValue, which is good for us, it will just set the preference to false without ignoring it
Conclusion,
Add screenshots and explanation how to use this feature to Advanced section of help (org.osate.help)
In some cases, one may want to deactivate an annex from the regular parsing phase. For instance apply analyses that do not depend on them
One may imagine a configuration parameter for that, that would simply deactivate the corresponding registered parser
An open question could be: how about analysis? We could have a warning if EMV2 is disabled when trying to run FHA or FTA