@Override public void pageChanged(PageChangedEvent event) { Object selectedPage = event.getSelectedPage(); vpmAnalysisWizard.updateConfiguration(); if (selectedPage instanceof VPMAnalyzerConfigurationPage) { VPMAnalyzerConfigurationPage configPage = (VPMAnalyzerConfigurationPage) selectedPage; analyzers = configPage.getAnalyzers(); } else if (selectedPage instanceof ResultHandlingConfigurationPage) { ResultHandlingConfigurationPage resultPage = (ResultHandlingConfigurationPage) selectedPage; if (analyzers != null) { resultPage.setSelectedAnalyzers(analyzers); } } }
/** * * @param event */ protected void firePageChanged( final PageChangedEvent event ) { Object[] listeners = pageChangedListeners.getListeners( ); for ( int i = 0; i < listeners.length; i++ ) { final IPageChangedListener l = (IPageChangedListener) listeners[i]; SafeRunnable.run( new SafeRunnable( ) { public void run( ) { l.pageChanged( event ); } } ); } }
/** * Notifies any selection changed listeners that the selected page has * changed. Only listeners registered at the time this method is called * are notified. * * @param event * a selection changed event * * @see IPageChangedListener#pageChanged * * @since 2.1 */ void firePageChanged( final PageChangedEvent event ) { Object[] listeners = pageChangedListeners.getListeners( ); for ( int i = 0; i < listeners.length; i++ ) { final IPageChangedListener l = (IPageChangedListener) listeners[i]; SafeRunnable.run( new SafeRunnable( ) { public void run( ) { l.pageChanged( event ); } } ); } }
@Override protected Object openDialogBox(Control cellEditorWindow) { this.setInjectModel((InjectModel) this.getValue()); CreateInjectWizard wizard = new CreateInjectWizard(this); final WizardDialog dialog = new WizardDialog(cellEditorWindow.getShell(), wizard); if (getInjectModel() != null) { final IPageChangedListener pageChangedListener = new IPageChangedListener() { @Override public void pageChanged(PageChangedEvent event) { if (event.getSelectedPage() instanceof CreateCTablePage) { ((CreateCTablePage) dialog.getCurrentPage()) .setData((InjectModel) getInjectModel()); dialog.removePageChangedListener(this); } } }; dialog.addPageChangedListener(pageChangedListener); } dialog.open(); return this.getInjectModel(); }
protected Object openDialogBox(Control cellEditorWindow) { this.setSqlAreaModel((TableSqlAreaModel) this.getValue()); CreateTableSqlWizard wizard = new CreateTableSqlWizard(this); final WizardDialog dialog = new WizardDialog(cellEditorWindow.getShell(), wizard); if (getSqlAreaModel() != null) { final IPageChangedListener pageChangedListener = new IPageChangedListener() { @Override public void pageChanged(PageChangedEvent event) { if (event.getSelectedPage() instanceof CreateTableSqlPageOne) { ((CreateTableSqlPageOne) dialog.getCurrentPage()) .setData((TableSqlAreaModel) getSqlAreaModel()); dialog.removePageChangedListener(this); } } }; dialog.addPageChangedListener(pageChangedListener); } dialog.open(); return this.getSqlAreaModel(); }
@Override protected Object openDialogBox(Control cellEditorWindow) { this.setSqlSet((SqlSet) this.getValue()); CreateChartSqlWizard wizard = new CreateChartSqlWizard(this); final WizardDialog dialog = new WizardDialog(cellEditorWindow.getShell(), wizard); if (getSqlSet() != null) { final IPageChangedListener pageChangedListener = new IPageChangedListener() { @Override public void pageChanged(PageChangedEvent event) { if (event.getSelectedPage() instanceof CreateSelectChartPage) { ((CreateSelectChartPage) dialog.getCurrentPage()).setData(getSqlSet()); dialog.removePageChangedListener(this); } } }; dialog.addPageChangedListener(pageChangedListener); } dialog.open(); return this.getSqlSet(); }
@Override public void pageChanged(PageChangedEvent event) { Object selectedPage = event.getSelectedPage(); if (seenPages.contains(selectedPage)) return; seenPages.add(selectedPage); if (selectedPage instanceof AbstractTextEditor) { IEditorPart editorPart = (IEditorPart) selectedPage; IProject project = plugin.getProjectForEditor(editorPart.getEditorInput()); if (plugin.getIgnoreProjectsList().contains(project.getName())) return; ISourceViewer sourceViewer = (ISourceViewer) editorPart.getAdapter(ITextOperationTarget.class); sourceViewer.getDocument().addDocumentListener(new DocumentListener()); } }
/** * Notifies any selection changed listeners that the selected page has * changed. Only listeners registered at the time this method is called are * notified. * * @param event * a selection changed event * * @see IPageChangedListener#pageChanged * * @since 3.1 */ protected void firePageChanged(final PageChangedEvent event) { Object[] listeners = pageChangedListeners.getListeners(); for (int i = 0; i < listeners.length; ++i) { final IPageChangedListener l = (IPageChangedListener) listeners[i]; SafeRunnable.run(new SafeRunnable() { public void run() { l.pageChanged(event); } }); } }
/** * Creates page 1 of the multi-page editor, which allows you to change the * font used in page 2. */ void createGraphicalEditor() { graphicalEditor = new GraphicalMulePropertiesEditor(); addPageChangedListener(new IPageChangedListener() { @Override public void pageChanged(PageChangedEvent event) { if (event.getSelectedPage().equals(textEditor) && graphicalEditor.isDirty()){ textEditor.getPropertiesDocument().set(graphicalEditor.getContent()); } else if(textEditor.isDirty()) { graphicalEditor.setContent(textEditor.getPropertiesDocument().get()); } } }); try { graphicalEditorIndex = addPage(graphicalEditor, getEditorInput()); setPageText(graphicalEditorIndex, graphicalEditor.getTitle()); } catch (PartInitException e) { e.printStackTrace(); } }
/** * @see org.eclipse.jface.dialogs.IPageChangedListener#pageChanged(org.eclipse.jface.dialogs.PageChangedEvent) */ @Override public void pageChanged(final PageChangedEvent event) { if (two.equals(event.getSelectedPage())) { two.updateOrderInfo(one.getOrderForUpdate()); } }
public void firePageChanged(final PageChangedEvent event) { Object[] listeners = pageChangeListeners.getListeners(); for (int i = 0; i < listeners.length; ++i) { final IPageChangedListener l = (IPageChangedListener) listeners[i]; SafeRunnable.run(new SafeRunnable() { public void run() { l.pageChanged(event); } }); } }
/** * Creates page 1 of the multi-page editor, which allows you to change the font used in page 2. */ void createPage0() throws PartInitException { reportContainer = new ReportContainer(this, jrContext); reportContainer.addPageChangedListener(new IPageChangedListener() { public void pageChanged(PageChangedEvent event) { updateContentOutline(getActivePage()); } }); int index = addPage(reportContainer, getEditorInput()); setPageText(index, Messages.JrxmlEditor_design); }
@Override protected void pageChanged(PageChangedEvent event) { Object page = event.getSelectedPage(); if (page instanceof IWorkbenchPart) { setBaseEnabled(page != null && ((IWorkbenchPart) page).getAdapter(Timeline.class) != null); } }
@Override protected void pageChanged(PageChangedEvent event) { Object selectedPage = event.getSelectedPage(); if (selectedPage instanceof IWorkbenchPart) { setBaseEnabled(isDecorable((IWorkbenchPart) selectedPage)); } }
@Override public void pageChanged(PageChangedEvent event) { Object page = event.getSelectedPage(); if (page instanceof IWorkbenchPart) { updateHandler((IWorkbenchPart) page); } }
@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); } }
/** * Updates this dialog's controls to reflect the current page. */ protected void update() { // Update the window title updateWindowTitle(); // Update the title bar updateTitleBar(); // Update the buttons updateButtons(); // Fires the page change event firePageChanged(new PageChangedEvent(this, getCurrentPage())); }
/** * Updates this dialog's controls to reflect the current page. */ protected void update() { // Update the title bar updateTitle(); // Update the message line updateMessage(); // Update the buttons updateButtons(); //Saved the selected node in the preferences setSelectedNode(); firePageChanged(new PageChangedEvent(this, getCurrentPage())); }
/** * Notifies any selection changed listeners that the selected page * has changed. * Only listeners registered at the time this method is called are notified. * * @param event a selection changed event * * @see IPageChangedListener#pageChanged * * @since 3.1 */ protected void firePageChanged(final PageChangedEvent event) { Object[] listeners = pageChangedListeners.getListeners(); for (int i = 0; i < listeners.length; i++) { final IPageChangedListener l = (IPageChangedListener) listeners[i]; SafeRunnable.run(new SafeRunnable() { public void run() { l.pageChanged(event); } }); } }
@Override public void pageChanged(PageChangedEvent event) { if (isCurrentPage()) { workspaceTableViewer.setInput(null); loadWorkspaces(); setPageComplete(!workspaceTableViewer.getSelection().isEmpty()); } }
@Override public void pageChanged(PageChangedEvent event) { if (isCurrentPage()) { projectTableViewer.setInput(null); workspaceComboViewer.setInput(null); loadWorkspaces(); validatePage(); } }
/** * Called whenever the wizard page has changed and forces its container * to resize its content. * * @see org.eclipse.jface.dialogs.IPageChangedListener#pageChanged(org.eclipse.jface.dialogs.PageChangedEvent) */ public void pageChanged( PageChangedEvent event ) { if ( this.wizardPage == event.getSelectedPage( ) ) { // force size update IWizardContainer container = getContainer( ); if ( container instanceof IWizardContainer2 ) { ( (IWizardContainer2) container ).updateSize( ); } } }
public void switchTask( ) { // Set the description for each task String strDesc = this.wizardBase.getCurrentTask( ).getDescription( ); if ( strDesc != null ) { setMessage( strDesc ); } // Update or create UI if ( getTabContainer( ).getSelectionIndex( ) < 0 ) { getTabContainer( ).setSelection( 0 ); } CTabItem currentItem = getTabContainer( ).getItem( getTabContainer( ).getSelectionIndex( ) ); this.wizardBase.getCurrentTask( ).createControl( getTabContainer( ) ); if ( currentItem.getControl( ) == null ) { currentItem.setControl( this.wizardBase.getCurrentTask( ).getControl( ) ); } // Pack every task to show as much as possible packWizard( ); // Notify page changed to refresh help page firePageChanged( new PageChangedEvent( this, this.wizardBase.getCurrentTask( ) ) ); }
@Override public void performRequest(Request request) { if (request.getType().equals(RequestConstants.REQ_OPEN)) { SqlSet sqlSet = new SqlSet(); CreateChartSqlWizard wizard = new CreateChartSqlWizard(sqlSet); final WizardDialog dialog = new WizardDialog(Display.getCurrent().getActiveShell(), wizard); if (((ChartBlockModel) this.getModel()).getSqlSet() != null) { final IPageChangedListener pageChangedListener = new IPageChangedListener() { @Override public void pageChanged(PageChangedEvent event) { if (event.getSelectedPage() instanceof CreateSelectChartPage) { ((CreateSelectChartPage) dialog.getCurrentPage()) .setData(((ChartBlockModel) getModel()).getSqlSet()); dialog.removePageChangedListener(this); } } }; dialog.addPageChangedListener(pageChangedListener); } dialog.open(); if (sqlSet.getChartType() != null && sqlSet.getSqls() != null) { ((ChartBlockModel) getModel()).setSqlSet(sqlSet); ((ChartBlockModel) getModel()).setChartType(sqlSet.getChartType().getName()); ((ChartBlockModel) getModel()).setChartTypeDisplayName(sqlSet.getChartType() .getDisplayName()); ((ChartBlockModel) getModel()).setBlockName(sqlSet.getName()); this.getRoot().getViewer().getEditDomain().getCommandStack().execute(new Command() { }); } } }
/** * Called whenever a page in the wizard is changed. Since all wizard pages * are constructed and added to the wizard on launch, this page won't know * about result types selected by the user. This listener will update the * list of result types once this page is shown to the user. */ @Override public void pageChanged(PageChangedEvent event) { lstVisualizations.removeAll(); // Populate the list of visualizations based on result types for (IVisualization visualization : visualizationPluginMan .getVisualizationsBySupportedResultTypeSet(wizardData .getChosenResultTypes())) { lstVisualizations.add(visualization.getName()); } }
@Override public void init(IWorkbench targetWorkbench, IStructuredSelection currentSelection) { // this.selection = currentSelection; List<?> selectedResources = IDE.computeSelectedResources(currentSelection); List<IProject> workspaceProjects = Arrays.asList(ResourcesPlugin.getWorkspace().getRoot().getProjects()); // Find all selected projects Set<IProject> projects = selectedResources.stream() .filter(m -> m instanceof IResource) .map(m -> ((IResource) m).getProject()) .filter(p -> p.isOpen()) // only open projects .collect(Collectors.toSet()); // make the behavior predictable by ordering: TreeSet<IProject> sortedProjects = Sets .<IProject> newTreeSet((a, b) -> a.getName() .compareToIgnoreCase(b.getName())); sortedProjects.addAll(projects); // 0) turn into IN4JSProject and give and process further. // a) find out which projects fulfill the npm-"exportable"-contract // b) give back a list to the user what to export, // c) disable things not fullfilling the contract. // d) take choosing from the list and pass to exporter in non-ui package. // 0) List<IN4JSEclipseProject> rawN4jsProjects = Lists.newArrayList(); iP2in4jsP = HashBiMap.create(); for (IProject iProject : workspaceProjects) { IN4JSEclipseProject mappedIn4jsProject = map2In4js(iProject); if (mappedIn4jsProject != null) { rawN4jsProjects.add(mappedIn4jsProject); iP2in4jsP.put(iProject, mappedIn4jsProject); } } // filter out Non-N4JS-projects from initial selection. sortedProjects.retainAll(iP2in4jsP.keySet()); // filter out all non-N4JS-projects from the workspace projects. ArrayList<IProject> filteredWorkspaceProjects = new ArrayList<>(workspaceProjects); filteredWorkspaceProjects.retainAll(iP2in4jsP.keySet()); setWindowTitle("N4JS to npm Export"); setNeedsProgressMonitor(true); Map<IProject, Boolean> selectedProjects = new HashMap<>(); // Add all workspace projects to list, default selection value is false filteredWorkspaceProjects.forEach(project -> selectedProjects.put(project, false)); // Override selection value for all initially selected projects sortedProjects.forEach(project -> selectedProjects.put(project, true)); // exportPage = new ExportSelectionPage("Export Page", rawN4jsProjects, labelProvider); exportPage = new ExportSelectionPage("Export Page", selectedProjects); if (runTools()) toolRunnerPage = new NpmToolRunnerPage("npm Execution Page"); comparePage = new PackageJsonComparePage("Compare package.json Page"); pageListener = new IPageChangedListener() { @Override public void pageChanged(PageChangedEvent event) { if (event.getSelectedPage() == comparePage) { udpatePackagJasonComparison(); } } }; }
public void pageChanged(final PageChangedEvent event) { final INavigationHistory navigationHistory = getSite().getPage() .getNavigationHistory(); navigationHistory.markLocation((IEditorPart) event .getSelectedPage()); }
protected void pageChange(final int newPageIndex, final int oldPageIndex) { getActiveEditor(); deactivateSite(false, false); IPartService partService = (IPartService) getSite().getService(IPartService.class); if (partService.getActivePart() == this) { setFocus(); } IEditorPart activeEditor = getEditor(newPageIndex); IEditorActionBarContributor contributor = getEditorSite().getActionBarContributor(); if (contributor != null && contributor instanceof MultiPageEditorActionBarContributor) { ((MultiPageEditorActionBarContributor) contributor).setActivePage(activeEditor); } if (activeEditor != null) { ISelectionProvider selectionProvider = activeEditor.getSite().getSelectionProvider(); if (selectionProvider != null) { ISelectionProvider outerProvider = getSite().getSelectionProvider(); if (outerProvider instanceof MultiPageToolbarSelectionProvider) { SelectionChangedEvent event = new SelectionChangedEvent(selectionProvider, selectionProvider.getSelection()); MultiPageToolbarSelectionProvider provider = (MultiPageToolbarSelectionProvider) outerProvider; provider.fireSelectionChanged(event); provider.firePostSelectionChanged(event); } else { if (Policy.DEBUG_MPE) { Tracing.printTrace(TRACING_COMPONENT, "MultiPageEditorPart " + getTitle() //$NON-NLS-1$ + " did not propogate selection for " //$NON-NLS-1$ + activeEditor.getTitle()); } } } } activateSite(); postPageChange(newPageIndex, oldPageIndex); Object selectedPage = getSelectedPage(); if (selectedPage != null) { firePageChanged(new PageChangedEvent(this, selectedPage)); } }
public void pageChanged(PageChangedEvent event) { }
@Override public void pageChanged(PageChangedEvent event) { refreshEditorCommand(oldEditorPartReference); }
protected void pageChanged(PageChangedEvent event) { //do nothing by default; override if necessary }
@Override public void pageChanged(org.eclipse.jface.dialogs.PageChangedEvent event) { AbstractPlanEditorHandler.this.pageChanged(event); }
@Override public final void pageChanged(PageChangedEvent event) { if (event.getSelectedPage() == this) { pageActivated(); } }