google-code-export / asdec

Automatically exported from code.google.com/p/asdec
1 stars 0 forks source link

DoABC combobox sorting #14

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I saw that when I open big file that contains only classes the list in combobox 
wasn't sorted and it was pain in ass to find at least one class that I wanted 
to edit, so I checked ur code and I came up with sorted list =3

<-- com.jpexs.asdec.tags.DoABCTag
change:
  public class DoABCTag extends Tag {
to:
  public class DoABCTag extends Tag implements Comparable<DoABCTag> {

in same class add this function:
    public int compareTo(DoABCTag n) {
        int lastCmp = name.compareTo(n.name);
        return (lastCmp != 0 ? lastCmp :
                name.compareTo(n.name));
    }
-->
==============================
<-- com.jpexs.asdec.abc.gui.ABCComboBoxModel
change:
    public ABCComboBoxModel(List<DoABCTag> list) {
        this.list = list;
    }
to:
    public ABCComboBoxModel(List<DoABCTag> list) {
        this.list = list;
        Collections.sort(this.list);
    }
-->

That's all ;3
also class search function would be awesome ;D
and I was wondering why did you put "DoABC (NAME)" instead of just "NAME"?

Original issue reported on code.google.com by hu...@hotmail.com on 4 Feb 2012 at 11:42

GoogleCodeExporter commented 9 years ago
The combobox lists all DoABC Tags present in the SWF file in order which they 
come in the file. Some compilers (maybe bases on configuration, I don't exactly 
know why) put each class in the separate DoABC tag and they set DoABC name to 
name of the class. I know the list is not very useful this way, I will think 
about some kind of sorting.

Original comment by jindra.p...@gmail.com on 26 Dec 2012 at 8:27

GoogleCodeExporter commented 9 years ago

Original comment by jindra.p...@gmail.com on 26 Dec 2012 at 8:29

GoogleCodeExporter commented 9 years ago

Original comment by jindra.p...@gmail.com on 26 Dec 2012 at 8:33

GoogleCodeExporter commented 9 years ago

Original comment by jindra.p...@gmail.com on 28 Dec 2012 at 9:54

GoogleCodeExporter commented 9 years ago
Hi, In version 1.1.0, the list is sorted and even better - you can select " 
-all- " item which will merge all DoABC tags in one tree.

Original comment by jindra.p...@gmail.com on 2 Jan 2013 at 8:53

GoogleCodeExporter commented 9 years ago
Wow, thank you so much! <3333
About the -all- feature, is it possible to make it possible to save it like 
that? (all DoABC tags merged)
Hmm I'll make an issue on that ;)

Original comment by hu...@hotmail.com on 18 Jan 2013 at 12:52