コード例 #1
0
 private void reset(SeverityBasedTextAttributes info) {
   final MyTextAttributesDescription description =
       new MyTextAttributesDescription(
           info.getType().toString(),
           null,
           info.getAttributes(),
           info.getType().getAttributesKey());
   @NonNls Element textAttributes = new Element("temp");
   try {
     info.getAttributes().writeExternal(textAttributes);
     description.getTextAttributes().readExternal(textAttributes);
   } catch (Exception e) {
     LOG.error(e);
   }
   myOptionsPanel.reset(description);
 }
コード例 #2
0
 @Nullable
 public HighlightInfoType getSelectedType() {
   final SeverityBasedTextAttributes selection =
       (SeverityBasedTextAttributes) myOptionsList.getSelectedValue();
   return selection != null ? selection.getType() : null;
 }