Config () { final Config config = new Config(); config.setHighlightStartTagOnly(highlightStartTagOnly.isSelected()); config.setUseContextAtCursor(useContextAtCursor.isSelected()); config.setScrollToFirst(scrollToFirst.isSelected()); config.setAddErrorStripe(addErrorStripe.isSelected()); config.getAttributes().setBackgroundColor(chooseHighlight.getSelectedColor()); if (useContextAtCursor.isSelected()) { config.getContextAttributes().setBackgroundColor(chooseContext.getSelectedColor()); } return config; }