Skip to content

Commit d41e48b

Browse files
committed
more cleaning
1 parent 5e2a088 commit d41e48b

File tree

1 file changed

+12
-15
lines changed

1 file changed

+12
-15
lines changed

java/src/processing/mode/java/tweak/SketchParser.java

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -496,22 +496,20 @@ private ColorMode getColorModeForContext(String context) {
496496
}
497497
}
498498

499-
// if non found, create the default color mode for this context and return it
500-
ColorMode newCM = new ColorMode(context);
501-
colorModes.add(newCM);
502-
503-
return newCM;
499+
// if none found, create the default color mode for this context and return it
500+
ColorMode newMode = new ColorMode(context);
501+
colorModes.add(newMode);
502+
return newMode;
504503
}
505504

506-
private void handleMultipleColorModes()
507-
{
505+
506+
private void handleMultipleColorModes() {
508507
// count how many color modes per context
509508
Map<String, Integer> modeCount = new HashMap<String, Integer>();
510-
for (ColorMode cm : colorModes)
511-
{
509+
for (ColorMode cm : colorModes) {
512510
Integer prev = modeCount.get(cm.drawContext);
513511
if (prev == null) {
514-
prev=0;
512+
prev = 0;
515513
}
516514
modeCount.put(cm.drawContext, prev+1);
517515
}
@@ -525,11 +523,10 @@ private void handleMultipleColorModes()
525523
}
526524
}
527525

528-
/* keep only hex and web color boxes in color calls
529-
* that belong to 'multipleContexts' contexts
530-
*/
531-
for (int i=0; i<codeTabs.length; i++) {
532-
ArrayList<ColorControlBox> toDelete = new ArrayList<ColorControlBox>();
526+
// keep only hex and web color boxes in color calls
527+
// that belong to 'multipleContexts' contexts
528+
for (int i = 0; i < codeTabs.length; i++) {
529+
List<ColorControlBox> toDelete = new ArrayList<ColorControlBox>();
533530
for (String context : multipleContexts) {
534531
for (ColorControlBox ccb : colorBoxes.get(i)) {
535532
if (ccb.drawContext.equals(context) && !ccb.isHex) {

0 commit comments

Comments
 (0)