eclipse plugin: add the dryrun options to wmlindent
This commit is contained in:
parent
9d447decf0
commit
d868f1df74
4 changed files with 6 additions and 1 deletions
|
@ -37,6 +37,7 @@ public class Constants
|
|||
|
||||
/** WML Tools preferences constants **/
|
||||
public static final String P_WMLINDENT_VERBOSE = "wmlindent_verbose";
|
||||
public static final String P_WMLINDENT_DRYRUN = "wmlindent_dry_run";
|
||||
|
||||
public static final String P_WMLLINT_DRYRUN = "wmllint_dry_run";
|
||||
public static final String P_WMLLINT_SPELL_CHECK = "wmllint_spell_check";
|
||||
|
|
|
@ -30,6 +30,7 @@ public class Preferences extends AbstractPreferenceInitializer {
|
|||
|
||||
// wml tools
|
||||
store.setDefault(Constants.P_WMLINDENT_VERBOSE, true);
|
||||
store.setDefault(Constants.P_WMLINDENT_DRYRUN, true);
|
||||
|
||||
store.setDefault(Constants.P_WMLLINT_DRYRUN, true);
|
||||
store.setDefault(Constants.P_WMLLINT_SPELL_CHECK, false);
|
||||
|
|
|
@ -25,6 +25,8 @@ public class WMLToolsPreferencePage extends FieldEditorPreferencePage implements
|
|||
protected void createFieldEditors()
|
||||
{
|
||||
addField(new LabelFieldEditor("WMLINDENT:", getFieldEditorParent()));
|
||||
addField(new BooleanFieldEditor(Constants.P_WMLINDENT_DRYRUN, "Dry run", 1,
|
||||
getFieldEditorParent()));
|
||||
addField(new BooleanFieldEditor(Constants.P_WMLINDENT_VERBOSE, "Verbose Output", 1,
|
||||
getFieldEditorParent()));
|
||||
addField(new LabelFieldEditor("", getFieldEditorParent()));
|
||||
|
|
|
@ -57,8 +57,9 @@ public class WMLTools
|
|||
if (!checkPrerequisites(resourcePath, null))
|
||||
return null;
|
||||
|
||||
if (dryrun)
|
||||
if (dryrun || Preferences.getBool(Constants.P_WMLINDENT_DRYRUN) == true)
|
||||
arguments.add("--dryrun");
|
||||
|
||||
if (Preferences.getBool(Constants.P_WMLINDENT_VERBOSE))
|
||||
{
|
||||
arguments.add("-v");
|
||||
|
|
Loading…
Add table
Reference in a new issue