|
What this is
Other links
The source code/* * Sun Public License Notice * * The contents of this file are subject to the Sun Public License * Version 1.0 (the "License"). You may not use this file except in * compliance with the License. A copy of the License is available at * http://www.sun.com/ * * The Original Code is NetBeans. The Initial Developer of the Original * Code is Sun Microsystems, Inc. Portions Copyright 1997-2003 Sun * Microsystems, Inc. All Rights Reserved. */ package org.netbeans.modules.tasklist.compiler; import java.awt.BorderLayout; import java.awt.Component; import java.util.ArrayList; import javax.swing.BorderFactory; import javax.swing.JPanel; import javax.swing.UIManager; import org.netbeans.modules.tasklist.core.checklist.CheckList; import org.netbeans.modules.tasklist.core.checklist.CheckListModel; import org.netbeans.modules.tasklist.core.checklist.DefaultCheckListModel; import org.netbeans.modules.tasklist.core.filter.Filter; import org.netbeans.modules.tasklist.core.filter.FilterCondition; import org.netbeans.modules.tasklist.core.filter.IntegerFilterCondition; import org.netbeans.modules.tasklist.core.filter.StringFilterCondition; import org.openide.nodes.Node; import org.openide.util.NbBundle; /** * Filter for compile errors. * * @author Tim Lebedkov */ public class CompileErrorFilter extends Filter { private static final String[] PROP_KEYS = { "Summary", // NOI18N "Details", // NOI18N "Line", // NOI18N "Column", // NOI18N "File", // NOI18N "Folder", // NOI18N "Severity" // NOI18N }; private static final String[] PROPS = new String[PROP_KEYS.length]; static { for (int i = 0; i < PROPS.length; i++) { PROPS[i] = NbBundle.getMessage(CompileErrorFilter.class, PROP_KEYS[i]); } } /** * Creates a new instance */ public CompileErrorFilter() { super("CompileErrorFilter", true, new ArrayList(), false); // NOI18N } public String[] getProperties() { return PROPS; } public org.netbeans.modules.tasklist.core.filter.FilterCondition[] createConditions(int index) { switch (index) { case 0: // summary return StringFilterCondition.createConditions(index); case 1: // details return StringFilterCondition.createConditions(index); case 2: // line return IntegerFilterCondition.createConditions(index); case 3: // column return IntegerFilterCondition.createConditions(index); case 4: // file return StringFilterCondition.createConditions(index); case 5: // folder return StringFilterCondition.createConditions(index); case 6: // severity return SeverityFilterCondition.createConditions(index); default: throw new InternalError("Wrong index"); // NOI18N } } public Object getProperty(Object obj, int property) { CompileError t = (CompileError) obj; switch (property) { case 0: // summary return t.getSummary(); case 1: // details return t.getDetails(); case 2: // line return new Integer(t.getLine().getLineNumber()); case 3: // column return new Integer(t.getColumn()); case 4: // file return t.getFile().getNameExt(); case 5: // folder return t.getFolder().getNameExt(); case 6: // severity return new Integer(t.getSeverity()); default: throw new InternalError("Wrong index"); // NOI18N } } } |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.