Tasks: problem handling

This commit is contained in:
Fedor Korotkov
2013-01-21 18:05:43 +04:00
parent 80c21de5d7
commit 2af7b914f8
2 changed files with 10 additions and 9 deletions
@@ -26,10 +26,10 @@ import java.util.Iterator;
/**
* @author dyoma
*/
class FilterInfo implements JDOMExternalizable {
@NonNls private static final String FILTER_NAME="NAME";
@NonNls private static final String FILTER_DESCRIPTION="DESCRIPTION";
@NonNls private static final String FILTER_REGEXP="REGEXP";
public class FilterInfo implements JDOMExternalizable {
@NonNls private static final String FILTER_NAME = "NAME";
@NonNls private static final String FILTER_DESCRIPTION = "DESCRIPTION";
@NonNls private static final String FILTER_REGEXP = "REGEXP";
private String myName = ToolsBundle.message("tools.filters.name.default");
private String myDescription;
@@ -38,7 +38,8 @@ class FilterInfo implements JDOMExternalizable {
@NonNls private static final String ATTRIBUTE_VALUE = "value";
@NonNls private static final String ATTRIBUTE_NAME = "name";
public FilterInfo() {}
public FilterInfo() {
}
public FilterInfo(String regExp, String name, String description) {
myRegExp = regExp;
@@ -112,21 +113,21 @@ class FilterInfo implements JDOMExternalizable {
Element option = new Element(ELEMENT_OPTION);
filterElement.addContent(option);
option.setAttribute(ATTRIBUTE_NAME, FILTER_NAME);
if (myName != null ) {
if (myName != null) {
option.setAttribute(ATTRIBUTE_VALUE, myName);
}
option = new Element(ELEMENT_OPTION);
filterElement.addContent(option);
option.setAttribute(ATTRIBUTE_NAME, FILTER_DESCRIPTION);
if (myDescription != null ) {
if (myDescription != null) {
option.setAttribute(ATTRIBUTE_VALUE, myDescription);
}
option = new Element(ELEMENT_OPTION);
filterElement.addContent(option);
option.setAttribute(ATTRIBUTE_NAME, FILTER_REGEXP);
if (myRegExp != null ) {
if (myRegExp != null) {
option.setAttribute(ATTRIBUTE_VALUE, myRegExp);
}
}
@@ -27,7 +27,7 @@ import com.intellij.ui.components.JBList;
import javax.swing.*;
import java.awt.*;
class OutputFiltersDialog extends DialogWrapper {
public class OutputFiltersDialog extends DialogWrapper {
private final DefaultListModel myFiltersModel = new DefaultListModel();
private final JList myFiltersList = new JBList(myFiltersModel);
private boolean myModified = false;