Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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
Tux Pengy is currently offline Tux Pengy
Messages: 6
Registered: July 2012
Junior Member
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]

Report message to a moderator

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


Current Time: Wed Apr 16 12:02:09 EDT 2014

Powered by FUDForum. Page generated in 0.01490 seconds