com.sun.hotspot.igv.filter.CustomFilter Java Examples

The following examples show how to use com.sun.hotspot.igv.filter.CustomFilter. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DiagramViewModel.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
public Diagram getDiagramToView() {

        if (diagram == null) {
            diagram = Diagram.createDiagram(getGraphToView(), Settings.get().get(Settings.NODE_TEXT, Settings.NODE_TEXT_DEFAULT));
            getFilterChain().apply(diagram, getSequenceFilterChain());
            if (getFirstPosition() != getSecondPosition()) {
                CustomFilter f = new CustomFilter(
                        "difference", "colorize('state', 'same', white);"
                        + "colorize('state', 'changed', orange);"
                        + "colorize('state', 'new', green);"
                        + "colorize('state', 'deleted', red);");
                f.apply(diagram);
           }
        }

        return diagram;
    }
 
Example #2
Source File: FilterTopComponent.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    super.readExternal(in);

    int filterSettingsCount = in.readInt();
    for (int i = 0; i < filterSettingsCount; i++) {
        String name = in.readUTF();
        FilterSetting s = new FilterSetting(name);
        int filterCount = in.readInt();
        for (int j = 0; j < filterCount; j++) {
            String filterName = in.readUTF();
            CustomFilter filter = findFilter(filterName);
            if (filter != null) {
                s.addFilter(filter);
            }
        }

        filterSettings.add(s);
    }
    updateComboBox();
}
 
Example #3
Source File: FilterTopComponent.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    super.readExternal(in);

    int filterSettingsCount = in.readInt();
    for (int i = 0; i < filterSettingsCount; i++) {
        String name = in.readUTF();
        FilterSetting s = new FilterSetting(name);
        int filterCount = in.readInt();
        for (int j = 0; j < filterCount; j++) {
            String filterName = in.readUTF();
            CustomFilter filter = findFilter(filterName);
            if (filter != null) {
                s.addFilter(filter);
            }
        }

        filterSettings.add(s);
    }
    updateComboBox();
}
 
Example #4
Source File: FilterTopComponent.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    super.readExternal(in);

    int filterSettingsCount = in.readInt();
    for (int i = 0; i < filterSettingsCount; i++) {
        String name = in.readUTF();
        FilterSetting s = new FilterSetting(name);
        int filterCount = in.readInt();
        for (int j = 0; j < filterCount; j++) {
            String filterName = in.readUTF();
            CustomFilter filter = findFilter(filterName);
            if (filter != null) {
                s.addFilter(filter);
            }
        }

        filterSettings.add(s);
    }
    updateComboBox();
}
 
Example #5
Source File: FilterTopComponent.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    super.readExternal(in);

    int filterSettingsCount = in.readInt();
    for (int i = 0; i < filterSettingsCount; i++) {
        String name = in.readUTF();
        FilterSetting s = new FilterSetting(name);
        int filterCount = in.readInt();
        for (int j = 0; j < filterCount; j++) {
            String filterName = in.readUTF();
            CustomFilter filter = findFilter(filterName);
            if (filter != null) {
                s.addFilter(filter);
            }
        }

        filterSettings.add(s);
    }
    updateComboBox();
}
 
Example #6
Source File: FilterTopComponent.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    super.readExternal(in);

    int filterSettingsCount = in.readInt();
    for (int i = 0; i < filterSettingsCount; i++) {
        String name = in.readUTF();
        FilterSetting s = new FilterSetting(name);
        int filterCount = in.readInt();
        for (int j = 0; j < filterCount; j++) {
            String filterName = in.readUTF();
            CustomFilter filter = findFilter(filterName);
            if (filter != null) {
                s.addFilter(filter);
            }
        }

        filterSettings.add(s);
    }
    updateComboBox();
}
 
Example #7
Source File: FilterTopComponent.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    super.readExternal(in);

    int filterSettingsCount = in.readInt();
    for (int i = 0; i < filterSettingsCount; i++) {
        String name = in.readUTF();
        FilterSetting s = new FilterSetting(name);
        int filterCount = in.readInt();
        for (int j = 0; j < filterCount; j++) {
            String filterName = in.readUTF();
            CustomFilter filter = findFilter(filterName);
            if (filter != null) {
                s.addFilter(filter);
            }
        }

        filterSettings.add(s);
    }
    updateComboBox();
}
 
Example #8
Source File: FilterTopComponent.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    super.readExternal(in);

    int filterSettingsCount = in.readInt();
    for (int i = 0; i < filterSettingsCount; i++) {
        String name = in.readUTF();
        FilterSetting s = new FilterSetting(name);
        int filterCount = in.readInt();
        for (int j = 0; j < filterCount; j++) {
            String filterName = in.readUTF();
            CustomFilter filter = findFilter(filterName);
            if (filter != null) {
                s.addFilter(filter);
            }
        }

        filterSettings.add(s);
    }
    updateComboBox();
}
 
Example #9
Source File: FilterTopComponent.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    super.readExternal(in);

    int filterSettingsCount = in.readInt();
    for (int i = 0; i < filterSettingsCount; i++) {
        String name = in.readUTF();
        FilterSetting s = new FilterSetting(name);
        int filterCount = in.readInt();
        for (int j = 0; j < filterCount; j++) {
            String filterName = in.readUTF();
            CustomFilter filter = findFilter(filterName);
            if (filter != null) {
                s.addFilter(filter);
            }
        }

        filterSettings.add(s);
    }
    updateComboBox();
}
 
Example #10
Source File: FilterTopComponent.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public void newFilter() {
    CustomFilter cf = new CustomFilter("My custom filter", "");
    if (cf.openInEditor()) {
        sequence.addFilter(cf);
        FileObject fo = getFileObject(cf);
        FilterChangedListener listener = new FilterChangedListener(fo, cf);
        listener.changed(cf);
        cf.getChangedEvent().addListener(listener);
    }
}
 
Example #11
Source File: FilterTopComponent.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public CustomFilter findFilter(String name) {
    for (Filter f : sequence.getFilters()) {

        CustomFilter cf = (CustomFilter) f;
        if (cf.getName().equals(name)) {
            return cf;
        }
    }

    return null;
}
 
Example #12
Source File: FilterTopComponent.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public CustomFilter findFilter(String name) {
    for (Filter f : sequence.getFilters()) {

        CustomFilter cf = (CustomFilter) f;
        if (cf.getName().equals(name)) {
            return cf;
        }
    }

    return null;
}
 
Example #13
Source File: FilterTopComponent.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public void newFilter() {
    CustomFilter cf = new CustomFilter("My custom filter", "");
    if (cf.openInEditor()) {
        sequence.addFilter(cf);
        FileObject fo = getFileObject(cf);
        FilterChangedListener listener = new FilterChangedListener(fo, cf);
        listener.changed(cf);
        cf.getChangedEvent().addListener(listener);
    }
}
 
Example #14
Source File: FilterTopComponent.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public void removeFilter(Filter f) {
    com.sun.hotspot.igv.filter.CustomFilter cf = (com.sun.hotspot.igv.filter.CustomFilter) f;

    sequence.removeFilter(cf);
    try {
        getFileObject(cf).delete();
    } catch (IOException ex) {
        Exceptions.printStackTrace(ex);
    }

}
 
Example #15
Source File: FilterTopComponent.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
private FileObject getFileObject(CustomFilter cf) {
    FileObject fo = Repository.getDefault().getDefaultFileSystem().getRoot().getFileObject(FOLDER_ID + "/" + cf.getName());
    if (fo == null) {
        try {
            fo = org.openide.filesystems.Repository.getDefault().getDefaultFileSystem().getRoot().getFileObject(FOLDER_ID).createData(cf.getName());
        } catch (IOException ex) {
            Exceptions.printStackTrace(ex);
        }
    }
    return fo;
}
 
Example #16
Source File: FilterTopComponent.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public CustomFilter findFilter(String name) {
    for (Filter f : sequence.getFilters()) {

        CustomFilter cf = (CustomFilter) f;
        if (cf.getName().equals(name)) {
            return cf;
        }
    }

    return null;
}
 
Example #17
Source File: FilterTopComponent.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
private FileObject getFileObject(CustomFilter cf) {
    FileObject fo = Repository.getDefault().getDefaultFileSystem().getRoot().getFileObject(FOLDER_ID + "/" + cf.getName());
    if (fo == null) {
        try {
            fo = org.openide.filesystems.Repository.getDefault().getDefaultFileSystem().getRoot().getFileObject(FOLDER_ID).createData(cf.getName());
        } catch (IOException ex) {
            Exceptions.printStackTrace(ex);
        }
    }
    return fo;
}
 
Example #18
Source File: FilterTopComponent.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
private FileObject getFileObject(CustomFilter cf) {
    FileObject fo = FileUtil.getConfigRoot().getFileObject(FOLDER_ID + "/" + cf.getName());
    if (fo == null) {
        try {
            fo = FileUtil.getConfigRoot().getFileObject(FOLDER_ID).createData(cf.getName());
        } catch (IOException ex) {
            Exceptions.printStackTrace(ex);
        }
    }
    return fo;
}
 
Example #19
Source File: FilterTopComponent.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public void removeFilter(Filter f) {
    com.sun.hotspot.igv.filter.CustomFilter cf = (com.sun.hotspot.igv.filter.CustomFilter) f;

    sequence.removeFilter(cf);
    try {
        getFileObject(cf).delete();
    } catch (IOException ex) {
        Exceptions.printStackTrace(ex);
    }

}
 
Example #20
Source File: FilterTopComponent.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
private FileObject getFileObject(CustomFilter cf) {
    FileObject fo = Repository.getDefault().getDefaultFileSystem().getRoot().getFileObject(FOLDER_ID + "/" + cf.getName());
    if (fo == null) {
        try {
            fo = org.openide.filesystems.Repository.getDefault().getDefaultFileSystem().getRoot().getFileObject(FOLDER_ID).createData(cf.getName());
        } catch (IOException ex) {
            Exceptions.printStackTrace(ex);
        }
    }
    return fo;
}
 
Example #21
Source File: FilterTopComponent.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public CustomFilter findFilter(String name) {
    for (Filter f : sequence.getFilters()) {

        CustomFilter cf = (CustomFilter) f;
        if (cf.getName().equals(name)) {
            return cf;
        }
    }

    return null;
}
 
Example #22
Source File: FilterTopComponent.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public void newFilter() {
    CustomFilter cf = new CustomFilter("My custom filter", "");
    if (cf.openInEditor()) {
        sequence.addFilter(cf);
        FileObject fo = getFileObject(cf);
        FilterChangedListener listener = new FilterChangedListener(fo, cf);
        listener.changed(cf);
        cf.getChangedEvent().addListener(listener);
    }
}
 
Example #23
Source File: FilterTopComponent.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public void removeFilter(Filter f) {
    com.sun.hotspot.igv.filter.CustomFilter cf = (com.sun.hotspot.igv.filter.CustomFilter) f;

    sequence.removeFilter(cf);
    try {
        getFileObject(cf).delete();
    } catch (IOException ex) {
        Exceptions.printStackTrace(ex);
    }

}
 
Example #24
Source File: FilterTopComponent.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
private FileObject getFileObject(CustomFilter cf) {
    FileObject fo = Repository.getDefault().getDefaultFileSystem().getRoot().getFileObject(FOLDER_ID + "/" + cf.getName());
    if (fo == null) {
        try {
            fo = org.openide.filesystems.Repository.getDefault().getDefaultFileSystem().getRoot().getFileObject(FOLDER_ID).createData(cf.getName());
        } catch (IOException ex) {
            Exceptions.printStackTrace(ex);
        }
    }
    return fo;
}
 
Example #25
Source File: FilterTopComponent.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public CustomFilter findFilter(String name) {
    for (Filter f : sequence.getFilters()) {

        CustomFilter cf = (CustomFilter) f;
        if (cf.getName().equals(name)) {
            return cf;
        }
    }

    return null;
}
 
Example #26
Source File: FilterTopComponent.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public void removeFilter(Filter f) {
    com.sun.hotspot.igv.filter.CustomFilter cf = (com.sun.hotspot.igv.filter.CustomFilter) f;

    sequence.removeFilter(cf);
    try {
        getFileObject(cf).delete();
    } catch (IOException ex) {
        Exceptions.printStackTrace(ex);
    }

}
 
Example #27
Source File: FilterTopComponent.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public void newFilter() {
    CustomFilter cf = new CustomFilter("My custom filter", "");
    if (cf.openInEditor()) {
        sequence.addFilter(cf);
        FileObject fo = getFileObject(cf);
        FilterChangedListener listener = new FilterChangedListener(fo, cf);
        listener.changed(cf);
        cf.getChangedEvent().addListener(listener);
    }
}
 
Example #28
Source File: FilterTopComponent.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
private FileObject getFileObject(CustomFilter cf) {
    FileObject fo = Repository.getDefault().getDefaultFileSystem().getRoot().getFileObject(FOLDER_ID + "/" + cf.getName());
    if (fo == null) {
        try {
            fo = org.openide.filesystems.Repository.getDefault().getDefaultFileSystem().getRoot().getFileObject(FOLDER_ID).createData(cf.getName());
        } catch (IOException ex) {
            Exceptions.printStackTrace(ex);
        }
    }
    return fo;
}
 
Example #29
Source File: FilterTopComponent.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public CustomFilter findFilter(String name) {
    for (Filter f : sequence.getFilters()) {

        CustomFilter cf = (CustomFilter) f;
        if (cf.getName().equals(name)) {
            return cf;
        }
    }

    return null;
}
 
Example #30
Source File: FilterTopComponent.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public void removeFilter(Filter f) {
    com.sun.hotspot.igv.filter.CustomFilter cf = (com.sun.hotspot.igv.filter.CustomFilter) f;

    sequence.removeFilter(cf);
    try {
        getFileObject(cf).delete();
    } catch (IOException ex) {
        Exceptions.printStackTrace(ex);
    }

}