Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Adding a SortAction to my View(should it be implemented or it's already there)
Adding a SortAction to my View [message #962923] Mon, 29 October 2012 08:37
Eclipse UserFriend
Hiiii,

I'm trying to add a SortAction to my view similar to the one in eclipse ( Outline view ), I know how to add a command or an action to the toolbar of the view, but the sort action 1st I thought I ll code it but, is it already there??& Can I how add it to my RCP app.

It seems I can't post the link, so here's the code I found

ToolBarManager toolBarManager = new ToolBarManager(SWT.FLAT);
ToolBar toolbar = toolBarManager.createControl(section);
toolbar.setCursor(Display.getDefault().getSystemCursor(SWT.CURSOR_HAND));

// Add sort action to the tool bar
fSortAction = new SortAction(fExtensionTree, PDEUIMessages.ExtensionsPage_sortAlpha, null, null, this);
toolBarManager.add(fSortAction);
// Add collapse action to the tool bar
fCollapseAction = new CollapseAction(fExtensionTree, PDEUIMessages.ExtensionsPage_collapseAll);
toolBarManager.add(fCollapseAction);

toolBarManager.update(true);

section.setTextClient(toolbar);

[Updated on: Mon, 29 October 2012 09:08] by Moderator

Previous Topic:Re-Opening View Problem
Next Topic:Product export not exporting external referenced libraries
Goto Forum:
  


Current Time: Wed Oct 15 17:49:37 EDT 2025

Powered by FUDForum. Page generated in 0.04024 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top