use of org.erlide.wrangler.refactoring.backend.UserRefactoringInfo in project erlide_eclipse by erlang.
the class UserMyRefacContribution method getContributionItems.
@SuppressWarnings({ "unchecked", "rawtypes" })
@Override
protected IContributionItem[] getContributionItems() {
final List<UserRefactoringInfo> refacs = UserRefactoringsManager.getInstance().getMyElementary();
if (refacs.isEmpty()) {
final CommandContributionItemParameter param = new CommandContributionItemParameter(PlatformUI.getWorkbench(), null, "org.erlide.wrangler.refactoring.empty", CommandContributionItem.STYLE_PUSH);
param.label = "<Empty>";
final CommandContributionItem item = new CommandContributionItem(param);
return new IContributionItem[] { item };
}
final IContributionItem[] items = new IContributionItem[refacs.size()];
int i = 0;
for (final UserRefactoringInfo info : refacs) {
final CommandContributionItemParameter param = new CommandContributionItemParameter(PlatformUI.getWorkbench(), info.getCallback(), "org.erlide.wrangler.refactoring.gen_refac", CommandContributionItem.STYLE_PUSH);
param.label = info.getLabel();
param.parameters = new HashMap();
param.parameters.put("org.erlide.wrangler.refactoring.gen_refac.callback", info.getCallback());
param.parameters.put("org.erlide.wrangler.refactoring.gen_refac.name", info.getLabel());
items[i] = new CommandContributionItem(param);
i++;
}
return items;
}
use of org.erlide.wrangler.refactoring.backend.UserRefactoringInfo in project erlide_eclipse by erlang.
the class UserRefacContribution method getContributionItems.
@SuppressWarnings({ "rawtypes", "unchecked" })
@Override
protected IContributionItem[] getContributionItems() {
final List<UserRefactoringInfo> refacs = UserRefactoringsManager.getInstance().getElementary();
final IContributionItem[] items = new IContributionItem[refacs.size()];
int i = 0;
for (final UserRefactoringInfo info : refacs) {
final CommandContributionItemParameter param = new CommandContributionItemParameter(PlatformUI.getWorkbench(), info.getCallback(), "org.erlide.wrangler.refactoring.gen_refac", CommandContributionItem.STYLE_PUSH);
param.label = info.getLabel();
param.parameters = new HashMap();
param.parameters.put("org.erlide.wrangler.refactoring.gen_refac.callback", info.getCallback());
param.parameters.put("org.erlide.wrangler.refactoring.gen_refac.name", info.getLabel());
items[i] = new CommandContributionItem(param);
i++;
}
return items;
}
Aggregations