Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-team-dev] I try to remove one element from the synchronize view

Hi,

I have started a plugin and I try to remove one element from the team
synchronize view
(like when right clic and choose => remove from view)

but with my code I only remove from the tree not from the entire view, and
these elements are still here when I try to commit

if someone can help ...


here my code :

IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindowChecked(event);
IWorkbenchPart activPart = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActivePart();
if(activPart instanceof SynchronizeView){
SynchronizeView syncView = (SynchronizeView)activPart;
TreeViewer tv = (TreeViewer) ((ISynchronizePage)syncView.getCurrentPage()).getViewer();
tv.expandAll();
SynchronizeViewWorkbenchPart synchPart = new SynchronizeViewWorkbenchPart(syncView.getParticipant(), syncView.getSite());
tv.setSelection(new StructuredSelection(), true);
tv.addFilter(new ViewerFilter() {

@Override
public boolean select(Viewer arg0, Object arg1, Object arg2) {
String elem = arg2.toString();
if(elem.endsWith(".classpath") || elem.endsWith(".project")){
return false;
}

return true;
}});
}


Back to the top