summaryrefslogtreecommitdiff
path: root/src/plugins/preflighting.ui/src/com/motorolamobility/preflighting/ui/PreflightingUIPlugin.java
blob: e33907f052482dd8b541cf81d62daa69ec61a5fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
/*
* Copyright (C) 2012 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*      http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.motorolamobility.preflighting.ui;

import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;

public class PreflightingUIPlugin extends AbstractUIPlugin
{

    /**
     * The Preflighting UI plugin id
     */
    public static final String PREFLIGHTING_UI_PLUGIN_ID = "com.motorolamobility.preflighting.ui"; //$NON-NLS-1$

    /**
     * The preference key for preflighting command line arguments
     */
    public static final String COMMAND_LINE_PREFERENCE_KEY = PREFLIGHTING_UI_PLUGIN_ID
            + ".commandLinePreference"; //$NON-NLS-1$

    public static final String OUTPUT_LIMIT_VALUE = PREFLIGHTING_UI_PLUGIN_ID + ".outputLimit";

    public static final String OUTPUT_LIMIT_DEFAULT_VALUE = "1000";

    public static final String OUTPUT_TYPE_VALUE = PREFLIGHTING_UI_PLUGIN_ID + ".outputType";

    public static final String OUTPUT_TYPE_DEFAULT_VALUE = "0";

    public static final String WARNING_LEVEL_VALUE = PREFLIGHTING_UI_PLUGIN_ID + ".warningLevel";

    public static final String WARNING_LEVEL_DEFAULT_VALUE = "4";

    public static final String VERBOSITY_LEVEL_VALUE = PREFLIGHTING_UI_PLUGIN_ID
            + ".verbosityLevel";

    public static final String VERBOSITY_LEVEL_DEFAULT_VALUE = "0";

    /**
     * The preference key for preflighting problems view markers policy
     */
    public static final String ERRORS_TO_WARNINGS_PREFERENCE_KEY = PREFLIGHTING_UI_PLUGIN_ID
            + ".errorsToWarningPreference"; //$NON-NLS-1$

    public static final String ECLIPSE_PROBLEM_TO_WARNING_VALUE = PREFLIGHTING_UI_PLUGIN_ID
            + ".eclipseErrorToWarning";

    public static final String ECLIPSE_PROBLEM_TO_WARNING_DEFAULT_VALUE = "true";

    /**
     * The preference key for devices to be checked against
     */
    public static final String DEVICES_PREFERENCE_KEY = PREFLIGHTING_UI_PLUGIN_ID
            + ".devicesPreference"; //$NON-NLS-1$

    public static final String USE_ALL_DEVICES_PREFERENCE_KEY = PREFLIGHTING_UI_PLUGIN_ID
            + ".useAllDevicesPreference"; //$NON-NLS-1$;

    /**
     * The preference keys for checkers
     */
    public static final String CHECKERS_PREFERENCE_KEY = PREFLIGHTING_UI_PLUGIN_ID
            + ".checkersPreference"; //$NON-NLS-1$

    public static final String USE_ALL_CHECKERS_PREFERENCE_KEY = PREFLIGHTING_UI_PLUGIN_ID
            + ".useAllCheckersPreference"; //$NON-NLS-1$

    public static final String CHECKERS_PARAMS_PREFERENCE_KEY = PREFLIGHTING_UI_PLUGIN_ID
            + ".checkersParamsPreference"; //$NON-NLS-1$;

    public static final String CHECKERS_WARNING_LEVELS_PREFERENCE_KEY = PREFLIGHTING_UI_PLUGIN_ID
            + ".checkersWarningLevelsPreference"; //$NON-NLS-1$;

    public static final String CHECKERS_CONDITIONS_WARNING_LEVELS_PREFERENCE_KEY =
            PREFLIGHTING_UI_PLUGIN_ID + ".checkersConditionsWarningLevelsPreference"; //$NON-NLS-1$;

    public static final String CHECKERS_CONDITIONS_PREFERENCE_KEY = PREFLIGHTING_UI_PLUGIN_ID
            + ".checkersConditionsPreference"; //$NON-NLS-1$;

    public static final String DEFAULT_BACKWARD_COMMANDLINE = "-w4 -v";

    public static final String DEFAULT_COMMANDLINE = "-output text -w4 -v0";

    public static final String SHOW_BACKWARD_DIALOG = PREFLIGHTING_UI_PLUGIN_ID
            + ".showBackwardDialog";

    public final static String TOGGLE_DIALOG = ".toggle.dialog";

    public static final String COMMAND_LINE_PREFERENCE_PAGE =
            "com.motorolamobility.preflighting.ui.commandLinePreferencePage";

    // The shared instance
    private static PreflightingUIPlugin plugin;

    /* (non-Javadoc)
     * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
     */
    @Override
    public void start(BundleContext context) throws Exception
    {
        super.start(context);
        plugin = this;

    }

    /*
     * (non-Javadoc)
     * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
     */
    @Override
    public void stop(BundleContext context) throws Exception
    {
        plugin = null;
        super.stop(context);
    }

    /**
     * Returns the shared instance
     *
     * @return the shared instance
     */
    public static PreflightingUIPlugin getDefault()
    {
        return plugin;
    }
}