Examples of SortAction


Examples of org.apache.karaf.shell.commands.impl.SortAction

    public void testSortToStdout() throws Exception {
        String newLine = System.getProperty("line.separator");
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        byte[] input = ("abc" + newLine + "def" + newLine).getBytes();
        new SortAction().sort(new ByteArrayInputStream(input), new PrintStream(baos));
        assertEquals(new String(input), new String(baos.toByteArray()));
    }
View Full Code Here

Examples of org.apache.karaf.shell.commands.impl.SortAction

        String newLine = System.getProperty("line.separator");
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        String inputString = "def" + newLine + "def" + newLine + "abc" + newLine + "abc" + newLine + "def" + newLine;
        byte[] input = inputString.getBytes();
        String outputString = ("abc" + newLine + "def" + newLine);
        SortAction sort = new SortAction();
        Field unique = SortAction.class.getDeclaredField("unique");
        unique.setAccessible(true);
        unique.set(sort, true);
        sort.sort(new ByteArrayInputStream(input), new PrintStream(baos));
        assertEquals(outputString, new String(baos.toByteArray()));
    }
View Full Code Here

Examples of org.eclipse.php.internal.ui.actions.SortAction

        .createMenuContributions(viewer);
    final IContributionItem toggleLinking = menuContributions[0];
    for (int i = 1; i < menuContributions.length; i++) {
      menuContributions[i].dispose();
    }
    sortAction = new SortAction(viewer);
    final IContributionItem sortItem = new ActionContributionItem(
        sortAction);

    items = super.createToolbarContributions(viewer);
    if (items == null)
View Full Code Here

Examples of org.eclipse.php.internal.ui.actions.SortAction

                .createMenuContributions(viewer);
        final IContributionItem toggleLinking = menuContributions[0];
        for (int i = 1; i < menuContributions.length; i++) {
            menuContributions[i].dispose();
        }
        sortAction = new SortAction(viewer);
        final IContributionItem sortItem = new ActionContributionItem(
                sortAction);

        items = super.createToolbarContributions(viewer);
        if (items == null)
View Full Code Here

Examples of org.erlide.ui.actions.SortAction

    /**
     *
     */
    private void createUIActions() {
        // Add sort action to dialog menu
        fSortAction = new SortAction(fTreeViewer,
                ErlideUIMessages.PDEMultiPageContentOutline_SortingAction_tooltip,
                new ErlElementSorter(ErlElementSorter.SORT_ON_NAME),
                new ErlElementSorter(ErlElementSorter.SORT_ON_EXPORT), null, false, null);
    }
View Full Code Here

Examples of org.erlide.ui.actions.SortAction

    /**
     * @param actionBars
     */
    private void registerToolbarActions(final IActionBars actionBars) {
        final IToolBarManager toolBarManager = actionBars.getToolBarManager();
        fSortAction = new SortAction(getTreeViewer(), "Sort", new ErlElementSorter(
                ErlElementSorter.SORT_ON_NAME), new ErlElementSorter(
                ErlElementSorter.SORT_ON_EXPORT), null, false, ErlideUIPlugin
                .getDefault().getPreferenceStore());
        toolBarManager.add(fSortAction);

View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.