Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » How to call share Project command from my plugin java code(I am trying to call egit share project command Team->Share Project from my eclipse plugin java code . its not working please help .)
How to call share Project command from my plugin java code [message #1449325] Tue, 21 October 2014 07:26
reeta aggarwal is currently offline reeta aggarwalFriend
Messages: 1
Registered: October 2014
Junior Member
Following is my plugin code snippet . Please let me know what is wrong here.There is no exception on command execution but also nothing happens that's why i m not able to debug the issue in this code.

// Obtain IServiceLocator implementer, e.g. from PlatformUI.getWorkbench():
IServiceLocator serviceLocator = PlatformUI.getWorkbench();

ICommandService commandService = (ICommandService) serviceLocator
IEvaluationService eService=(IEvaluationService) serviceLocator
try {

" Going to EXECUTE share project command for "
+ ((BPProjectWizard) getWizard())
// Lookup commmand with its ID
Command command = commandService.

if (command.isEnabled()) {
" The command is enabled" + command +" Category is "+command.getCategory());

Map params = new HashMap();
((BPProjectWizard) getWizard()).getFirstPage()

SasPlugin.getDefault().log("create execution event "+eService);

IEvaluationContext ecCurrent=eService.getCurrentState(); //hService.createContextSnapshot(true);
EvaluationContext ec = new EvaluationContext(
ecCurrent, ((BPProjectWizard) getWizard()).getFirstPage().getProjectHandle());

((BPProjectWizard) getWizard())
((BPProjectWizard) getWizard()).getWorkbench()

ExecutionEvent EE = new ExecutionEvent(command,params, null,

// Optionally pass a ExecutionEvent instance, default
// no-param arg creates blank event


SasPlugin.getDefault().log(" command EXECUTED ********* ");
Previous Topic:implement sparse checkout
Next Topic:Performance bad, possible to use native git?
Goto Forum:

Current Time: Sun Aug 09 00:56:00 GMT 2020

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

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

Back to the top