1 /*2 * The contents of this file are subject to the terms of the Common Development3 * and Distribution License (the License). You may not use this file except in4 * compliance with the License.5 *6 * You can obtain a copy of the License at http://www.netbeans.org/cddl.html7 * or http://www.netbeans.org/cddl.txt.8 *9 * When distributing Covered Code, include this CDDL Header Notice in each file10 * and include the License file at http://www.netbeans.org/cddl.txt.11 * If applicable, add the following below the CDDL Header, with the fields12 * enclosed by brackets [] replaced by your own identifying information:13 * "Portions Copyrighted [year] [name of copyright owner]"14 *15 * The Original Software is NetBeans. The Initial Developer of the Original16 * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun17 * Microsystems, Inc. All Rights Reserved.18 */19 20 package org.netbeans.modules.viewmodel;21 22 import java.awt.event.ActionEvent ;23 import java.beans.PropertyEditor ;24 import java.lang.IllegalAccessException ;25 import java.lang.ref.WeakReference ;26 import java.lang.reflect.InvocationTargetException ;27 import java.util.ArrayList ;28 import java.util.Collections ;29 import java.util.HashMap ;30 import javax.swing.AbstractAction ;31 import javax.swing.Action ;32 33 import org.netbeans.spi.viewmodel.ColumnModel;34 import org.netbeans.spi.viewmodel.TreeModel;35 import org.netbeans.spi.viewmodel.TableModel;36 import org.netbeans.spi.viewmodel.UnknownTypeException;37 38 import org.openide.nodes.AbstractNode;39 import org.openide.nodes.Children;40 import org.openide.nodes.Node;41 import org.openide.nodes.PropertySupport;42 import org.openide.nodes.Sheet;43 import org.openide.util.HelpCtx;44 import org.openide.util.lookup.Lookups;45 46 47 /**48 *49 * @author Jan Jancura50 */51 public class ExceptionNode extends AbstractNode {52 53 54 private Exception exception;55 56 // init ....................................................................57 58 /**59 * Creates root of call stack for given producer.60 */61 public ExceptionNode ( 62 Exception exception63 ) {64 super (65 Children.LEAF,66 Lookups.singleton (exception)67 );68 this.exception = exception;69 setIconBaseWithExtension ("org/openide/resources/actions/empty.gif");70 }71 72 public String getName () {73 return exception.getLocalizedMessage ();74 }75 76 public String getDisplayName () {77 return exception.getLocalizedMessage ();78 }79 80 public HelpCtx getHelpCtx() {81 return new HelpCtx (getClass ());82 }83 }84 85