public List<Action> getActions(WorkbenchPart part) { List<Action> lst = new ArrayList<Action>(); lst.add(new CreateChartAxisAction(part)); lst.add(new CreateCategorySeriesAction(part)); lst.add(new CreateGanttAction(part)); lst.add(new CreatePieAction(part)); lst.add(new CreateTimePeriodAction(part)); lst.add(new CreateTimeAction(part)); lst.add(new CreateXYAction(part)); lst.add(new CreateXYZAction(part)); lst.add(new ChartWizardAction(part)); return lst; }
public List<Action> getActions(WorkbenchPart part) { List<Action> lst = new ArrayList<Action>(); // lst.add(new CreateMeasureAction(part)); // lst.add(new CreateColumnGroupAction(part)); // lst.add(new CreateRowGroupAction(part)); // lst.add(new CreateCrosstabHeaderAction(part)); // lst.add(new CreateCrosstabWhenNoDataAction(part)); lst.add(new EditCrosstabStyleAction(part)); lst.add(new RemoveCrosstabStylesAction(part)); return lst; }
public List<Action> getActions(WorkbenchPart part) { List<Action> lst = new ArrayList<Action>(); // lst.add(new CreateColumnAction(part)); // lst.add(new CreateColumnGroupAction(part)); // lst.add(new CreateColumnCellAction(part)); lst.add(new EditTableStyleAction(part)); lst.add(new RemoveTableStylesAction(part)); return lst; }
public List<Action> getActions(WorkbenchPart part) { List<Action> lst = new ArrayList<Action>(); for (IComponentFactory f : nodeFactory) { List<Action> l = f.getActions(part); if (l != null && !l.isEmpty()) lst.addAll(l); } return lst; }
protected void registerListener(IEditorPart editorPart) { Validate.notNull(editorPart); disposeListener = createDisposeListener(editorPart); disposeListener.ifPresent(editorPart.getSite().getPage()::addPartListener); Optional.of(editorPart).filter(WorkbenchPart.class::isInstance).map(WorkbenchPart.class::cast) .ifPresent(e -> e.addPartPropertyListener(this::propertyChanged)); }
private void setTitle(IEditorPart key, String value) { try { Method m = WorkbenchPart.class.getDeclaredMethod("setPartName", String.class); //$NON-NLS-1$ m.setAccessible(true); m.invoke(key, value); } catch (Exception e) { IdeLog.logError(CommonEditorPlugin.getDefault(), e); } }
@Override protected void partActivated(IWorkbenchPart part) { if (part instanceof MultiPagePlanEditor) { part = ((MultiPagePlanEditor) part).getCurrentEditor(); } Object adapter = ((WorkbenchPart) part).getAdapter(MergeRowHighlightDecorator.class); MergeRowHighlightDecorator decorator = (MergeRowHighlightDecorator) adapter; updateState(decorator); }
@Override public void pageChanged(PageChangedEvent event) { Object page = event.getSelectedPage(); if (page instanceof IWorkbenchPart) { Object adapter = ((WorkbenchPart) page).getAdapter(MergeRowHighlightDecorator.class); MergeRowHighlightDecorator decorator = (MergeRowHighlightDecorator) adapter; updateState(decorator); } }
public WorkbenchPart getWorkbenchPart() { return viewPart; }
public List<Action> getActions(WorkbenchPart part) { return null; }
@Override public List<Action> getActions(WorkbenchPart part) { return null; }
public List<Action> getActions(WorkbenchPart part) { List<Action> lst = new ArrayList<Action>(); lst.add(new ChartSpiderWizardAction(part)); return lst; }
@Override public Object execute(ExecutionEvent event) throws ExecutionException { Optional.ofNullable(HandlerUtil.getActivePartChecked(event)).filter(WorkbenchPart.class::isInstance) .map(WorkbenchPart.class::cast).ifPresent(this::notifyEditorAboutRequest); return null; }
private void notifyEditorAboutRequest(WorkbenchPart part) { part.setPartProperty(key, null); part.setPartProperty(key, Boolean.TRUE.toString()); }
public List<Action> getActions(WorkbenchPart part);