Package org.carrot2.workbench.core

Examples of org.carrot2.workbench.core.WorkbenchCorePlugin


     * Get hold of the algorithm instance, extract its attribute descriptors.
     */
    @SuppressWarnings("unchecked")
    BindableDescriptor getAlgorithmDescriptor()
    {
        final WorkbenchCorePlugin core = WorkbenchCorePlugin.getDefault();
        final String algorithmID = getSearchResult().getInput().getAlgorithmId();

        BindableDescriptor componentDescriptor = core.getComponentDescriptor(algorithmID);
        if (componentDescriptor == null) {
            throw new RuntimeException("No descriptor for algorithm: " + algorithmID);
        }
        return componentDescriptor.only(Input.class,
            Processing.class).only(Predicates.not(new InternalAttributePredicate(false)));
View Full Code Here


     */
    @Override
    protected IStatus run(IProgressMonitor monitor)
    {
        final SearchInput searchInput = searchResult.getInput();
        final WorkbenchCorePlugin core = WorkbenchCorePlugin.getDefault();

        final ProcessingComponentDescriptor source = core.getComponent(searchInput.getSourceId());
        final ProcessingComponentDescriptor algorithm = core.getComponent(searchInput.getAlgorithmId());
   
        IStatus status;
        monitor.beginTask("Processing: "
            + source.getLabel() + " -> " + algorithm.getLabel(), IProgressMonitor.UNKNOWN);

        try
        {
            final Map<String, Object> attributes =
                searchInput.getAttributeValueSet().getAttributeValues();

            final Controller controller = core.getController();

            final ProcessingResult result = controller.process(
                attributes, source.getId(), algorithm.getId());

            PlatformUI.getWorkbench().getDisplay().syncExec(
View Full Code Here

    /**
     * Return the benchmark runner.
     */
    private Callable<Long> createBenchmarkRunner()
    {
        final WorkbenchCorePlugin core = WorkbenchCorePlugin.getDefault();
        final Controller controller = core.getController();

        final ProcessingComponentDescriptor source = core.getComponent(input.getSourceId());
        final ProcessingComponentDescriptor algorithm = core.getComponent(input.getAlgorithmId());
       
        final Map<String, Object> attributes =
            Maps.newHashMap(input.getAttributeValueSet().getAttributeValues());
       
        return new Callable<Long>() {
View Full Code Here

    @Override
    public Object execute(ExecutionEvent event)
    {
        try
        {
            final WorkbenchCorePlugin wbCore = WorkbenchCorePlugin.getDefault();
            URL index = FileLocator.find(wbCore.getBundle(),
                new Path(WELCOME_INDEX_PATH), null);

            if (index != null)
            {
                index = FileLocator.toFileURL(index);

                IWebBrowser browser = wbCore.getWorkbench().getBrowserSupport()
                    .createBrowser(
                        IWorkbenchBrowserSupport.AS_EDITOR | IWorkbenchBrowserSupport.NAVIGATION_BAR,
                        BROWSER_ID, null, null);
               
                browser.openURL(index);
View Full Code Here


    @Override
    protected AbstractBrowserVisualizationViewPage wrappedCreatePage(IWorkbenchPart part)
    {
        final SearchEditor editor = (SearchEditor) part;
        final CirclesViewPage page = new CirclesViewPage(editor);
        initPage(page);
        page.createControl(getPageBook());
        return page;
    }
View Full Code Here

    private void doGroupSelection(int [] selectedGroups)
    {
        logger.debug("Selection visualization->editor: " + Arrays.toString(selectedGroups));

        SearchEditorSelectionProvider prov =
          (SearchEditorSelectionProvider) editor.getSite().getSelectionProvider();

        prov.setSelected(selectedGroups, selectionListener);
    }
View Full Code Here

        IPreferenceStore store = Activator.getInstance().getPreferenceStore();
        store.addPropertyChangeListener(listener);

        pageSite.getActionBars().getToolBarManager().add(
            new ExportImageAction(new IControlProvider()
            {
                public Control getControl()
                {
                    return FoamTreeViewPage.this.getControl();
                }
View Full Code Here

    public void init(IPageSite pageSite)
    {
        super.init(pageSite);

        pageSite.getActionBars().getToolBarManager().add(
            new ExportImageAction(new IControlProvider()
            {
                @Override
                public Control getControl()
                {
                    return CirclesViewPage.this.getControl();
View Full Code Here

        IPreferenceStore store = Activator.getInstance().getPreferenceStore();
        store.addPropertyChangeListener(listener);

        pageSite.getActionBars().getToolBarManager().add(
            new ExportImageAction(new IControlProvider()
            {
                public Control getControl()
                {
                    return FoamTreeViewPage.this.getControl();
                }
View Full Code Here

    public void init(IPageSite pageSite)
    {
        super.init(pageSite);

        pageSite.getActionBars().getToolBarManager().add(
            new ExportImageAction(new IControlProvider()
            {
                @Override
                public Control getControl()
                {
                    return CirclesViewPage.this.getControl();
View Full Code Here

TOP

Related Classes of org.carrot2.workbench.core.WorkbenchCorePlugin

Copyright © 2018 www.massapicom. 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.