1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package net.sf.commonclipse;
18
19 import org.eclipse.core.resources.IWorkspace;
20 import org.eclipse.core.resources.ResourcesPlugin;
21 import org.eclipse.ui.plugin.AbstractUIPlugin;
22
23
24 /***
25 * Main plugin class.
26 * @author fgiust
27 * @version $Revision: 1.7 $ ($Author: fgiust $)
28 */
29 public class CCPlugin extends AbstractUIPlugin
30 {
31
32 /***
33 * "commonclipse".
34 */
35 public static final String PLUGIN_NAME = "commonclipse";
36
37 /***
38 * key for ToStringStyle name.
39 */
40 public static final String P_TOSTRING_STYLE = "tostring_style";
41
42 /***
43 * key for "javabean-style toString()".
44 */
45 public static final String P_TOSTRING_BEAN = "tostring_bean";
46
47 /***
48 * add appendSuper() in toString.
49 */
50 public static final String P_TOSTRING_SUPER = "tostring_super";
51
52 /***
53 * add an instance equality check to the generated equals() method.
54 */
55 public static final String P_EQUALS_INSTANCECHECK = "equals_instancecheck";
56
57 /***
58 * add appendSuper() in toString.
59 */
60 public static final String P_HASHCODE_SUPER = "hashcode_super";
61
62 /***
63 * add appendSuper() in toString.
64 */
65 public static final String P_EQUALS_SUPER = "equals_super";
66
67 /***
68 * add appendSuper() in toString.
69 */
70 public static final String P_COMPARETO_SUPER = "compareto_super";
71
72 /***
73 * esclusion list.
74 */
75 public static final String P_EXCLUDE = "exclude";
76
77 /***
78 * use final parameters in generated methods.
79 */
80 public static final String P_FINALPARAMETERS = "final_param";
81
82 /***
83 * don't ask for overwriting existing methods.
84 */
85 public static final String P_DONTASKONOVERWRITE = "dontask";
86
87 /***
88 * value for the P_TOSTRING_BEAN properties: use javabean properties in toString().
89 */
90 public static final String TOSTRINGSTYLE_BEAN = "bean";
91
92 /***
93 * value for the P_TOSTRING_BEAN properties: use fields in toString().
94 */
95 public static final String TOSTRINGSTYLE_FIELDS = "fields";
96
97 /***
98 * Shared instance.
99 */
100 private static CCPlugin plugin;
101
102 /***
103 * Constructor.
104 */
105 public CCPlugin()
106 {
107 plugin = this;
108 }
109
110 /***
111 * Returns the shared instance.
112 * @return shared instance
113 */
114 public static CCPlugin getDefault()
115 {
116 return plugin;
117 }
118
119 /***
120 * Returns the workspace instance.
121 * @return IWorkspace workspace instance
122 */
123 public static IWorkspace getWorkspace()
124 {
125 return ResourcesPlugin.getWorkspace();
126 }
127
128 }