final ClientEntry entry = isConnected(project.getWorkspace().getRoot());
if (entry == null) {
MessageDialog.openInformation(PlatformUI.getWorkbench().getDisplay().getActiveShell(), Messages.EditorCompoundContributionItem_EXCEPTION_NOT_CONNECTED_TITLE, Messages.EditorCompoundContributionItem_EXCEPTION_NOT_CONNECTED_MESSAGE);
return;
}
final EclipseCollabSharedObject collabsharedobject = entry.getSharedObject();
if (collabsharedobject != null) {
collabsharedobject.sendOpenAndSelectForFile(null, project.getName() + "/" + file.getProjectRelativePath().toString(), textSelection.getOffset(), textSelection.getLength()); //$NON-NLS-1$
}
}
};
final ClientEntry entry = isConnected(project.getWorkspace().getRoot());
if (entry == null)
return EMPTY;
final EclipseCollabSharedObject collabsharedobject = entry.getSharedObject();
if (collabsharedobject == null)
return EMPTY;
action.setText(NLS.bind(Messages.EditorCompoundContributionItem_SHARE_SELECTION_MENU_ITEM_NAME, collabsharedobject.getWindowTitle()));
if (menuImageDescriptor != null)
action.setImageDescriptor(menuImageDescriptor);
//action.setAccelerator(SWT.CTRL | SWT.SHIFT | '1');
return new IContributionItem[] {new Separator(), new ActionContributionItem(action)};
}