| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -496,22 +496,20 @@ private ColorMode getColorModeForContext(String context) { | |||
| 496 | 496 | } | |
| 497 | 497 | } | |
| 498 | 498 | ||
| 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; | ||
| 504 | 503 | } | |
| 505 | 504 | ||
| 506 | - private void handleMultipleColorModes() | ||
| 507 | - { | ||
| 505 | + | ||
| 506 | + private void handleMultipleColorModes() { | ||
| 508 | 507 | // count how many color modes per context | |
| 509 | 508 | Map<String, Integer> modeCount = new HashMap<String, Integer>(); | |
| 510 | - for (ColorMode cm : colorModes) | ||
| 511 | - { | ||
| 509 | + for (ColorMode cm : colorModes) { | ||
| 512 | 510 | Integer prev = modeCount.get(cm.drawContext); | |
| 513 | 511 | if (prev == null) { | |
| 514 | - prev=0; | ||
| 512 | + prev = 0; | ||
| 515 | 513 | } | |
| 516 | 514 | modeCount.put(cm.drawContext, prev+1); | |
| 517 | 515 | } | |
@@ -525,11 +523,10 @@ private void handleMultipleColorModes() | |||
| 525 | 523 | } | |
| 526 | 524 | } | |
| 527 | 525 | ||
| 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>(); | ||
| 533 | 530 | for (String context : multipleContexts) { | |
| 534 | 531 | for (ColorControlBox ccb : colorBoxes.get(i)) { | |
| 535 | 532 | if (ccb.drawContext.equals(context) && !ccb.isHex) { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments