diff --git a/trunk/src/com/jpexs/asdec/Main.java b/trunk/src/com/jpexs/asdec/Main.java index 76e2505d1..1fb7ac712 100644 --- a/trunk/src/com/jpexs/asdec/Main.java +++ b/trunk/src/com/jpexs/asdec/Main.java @@ -26,8 +26,6 @@ import com.jpexs.asdec.gui.proxy.ProxyFrame; import com.jpexs.asdec.tags.DoABCTag; import com.jpexs.asdec.tags.Tag; import com.jpexs.proxy.Replacement; -import java.util.logging.Level; -import java.util.logging.Logger; import javax.swing.*; import javax.swing.filechooser.FileFilter; diff --git a/trunk/src/com/jpexs/asdec/abc/ABC.java b/trunk/src/com/jpexs/asdec/abc/ABC.java index a018a3603..7f5428381 100644 --- a/trunk/src/com/jpexs/asdec/abc/ABC.java +++ b/trunk/src/com/jpexs/asdec/abc/ABC.java @@ -733,5 +733,20 @@ public class ABC { } } - //public + public List findMultinameUsage(int multinameIndex){ + List ret=new ArrayList(); + for(int i=0;i0){ + UsageFrame usageFrame=new UsageFrame(abc, multinameIndex); + usageFrame.setVisible(true); + } + } + } + } + + }); constantTypeList.addItemListener(this); panConstants.add(constantTypeList, BorderLayout.NORTH); panConstants.add(new JScrollPane(constantTable), BorderLayout.CENTER); diff --git a/trunk/src/com/jpexs/asdec/abc/gui/UsageFrame.java b/trunk/src/com/jpexs/asdec/abc/gui/UsageFrame.java new file mode 100644 index 000000000..2b738cb21 --- /dev/null +++ b/trunk/src/com/jpexs/asdec/abc/gui/UsageFrame.java @@ -0,0 +1,99 @@ +/* + * Copyright (C) 2010 JPEXS + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +package com.jpexs.asdec.abc.gui; + +import com.jpexs.asdec.abc.ABC; +import com.jpexs.asdec.abc.types.traits.Trait; +import com.jpexs.asdec.abc.types.traits.TraitMethodGetterSetter; +import com.jpexs.asdec.gui.View; +import java.awt.BorderLayout; +import java.awt.Container; +import java.awt.FlowLayout; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.util.List; +import javax.swing.DefaultListModel; +import javax.swing.JButton; +import javax.swing.JFrame; +import javax.swing.JList; +import javax.swing.JPanel; +import javax.swing.JScrollPane; + +/** + * + * @author JPEXS + */ +public class UsageFrame extends JFrame implements ActionListener { + private JButton gotoButton=new JButton("Go to"); + private JButton cancelButton=new JButton("Cancel"); + private JList usageList; + private DefaultListModel usageListModel=new DefaultListModel(); + public UsageFrame(ABC abc,int multinameIndex){ + List usages=abc.findMultinameUsage(multinameIndex); + for(int bodyIndex:usages){ + for(int c=0;c