Commit 6f8aadcc authored by Kristof Szabados's avatar Kristof Szabados
Browse files

naming convention correction

parent 8debe4ba
......@@ -17,7 +17,7 @@ import org.eclipse.titanium.markers.spotters.BaseModuleCodeSmellSpotter;
import org.eclipse.titanium.markers.types.CodeSmellType;
public class MissingImport extends BaseModuleCodeSmellSpotter {
private static String MISSING_MODULE = "There is no module with name `{0}''";
private static final String MISSING_MODULE = "There is no module with name `{0}''";
public MissingImport() {
super(CodeSmellType.MISSING_IMPORT);
......
......@@ -92,14 +92,14 @@ public class SimpleRiskFieldEditor implements IRiskFieldEditor {
@Override
public void load() {
do_load(false);
doLoad(false);
old = RiskMethod.myMethod(method.getSelectionIndex());
checkValid();
}
@Override
public void loadDefault() {
do_load(true);
doLoad(true);
old = RiskMethod.myMethod(method.getSelectionIndex());
checkValid();
}
......@@ -134,7 +134,7 @@ public class SimpleRiskFieldEditor implements IRiskFieldEditor {
valid = (old != RiskMethod.NO_LOW_HIGH || spinners[0].getSelection() <= spinners[1].getSelection());
}
protected void do_load(final boolean toDefault) {
private void doLoad(final boolean toDefault) {
final RiskMethod m = PreferenceManager.getRiskMethod(owner, toDefault);
updateSpinners(m, toDefault);
method.select(m.ordinal());
......
......@@ -23,8 +23,8 @@ import org.eclipse.titanium.Activator;
* */
public final class SWTResourceManager {
private static Map<ImageDescriptor, Image> imageCache = new ConcurrentHashMap<ImageDescriptor, Image>();
private static Map<RGB, Color> m_colorMap = new HashMap<RGB, Color>();
private static final Map<ImageDescriptor, Image> IMAGE_CACHE = new ConcurrentHashMap<ImageDescriptor, Image>();
private static final Map<RGB, Color> COLOR_MAP = new HashMap<RGB, Color>();
private SWTResourceManager() {
// disabled constructor
......@@ -38,11 +38,11 @@ public final class SWTResourceManager {
* @return the {@link Color} matching the RGB value
*/
public static Color getColor(final RGB rgb) {
Color color = m_colorMap.get(rgb);
Color color = COLOR_MAP.get(rgb);
if (color == null) {
final Display display = Display.getCurrent();
color = new Color(display, rgb);
m_colorMap.put(rgb, color);
COLOR_MAP.put(rgb, color);
}
return color;
}
......@@ -69,12 +69,12 @@ public final class SWTResourceManager {
if (descriptor == null) {
return null;
}
if (imageCache.containsKey(descriptor)) {
return imageCache.get(descriptor);
if (IMAGE_CACHE.containsKey(descriptor)) {
return IMAGE_CACHE.get(descriptor);
}
final Image image = descriptor.createImage();
imageCache.put(descriptor, image);
IMAGE_CACHE.put(descriptor, image);
return image;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment