@Override public Shell getShell() { return site.getShell(); }
@Override public Shell getShell() { return site.getShell(); }
public Shell getShell() { return pageSite.getShell(); }
public Shell getShell() { return site.getShell(); }
public void onConfigChanged(ConfigChangedEvent event) { // force a refresh of the page lastObject = null; myPage.getSite().getShell().getDisplay().asyncExec(new Runnable() { public void run() { myPage.setPropertySourceProvider(RepositoryPropertySourceProvider.this); } }); } });
/** * Returns the shell in which this page is displayed. * * @return the shell */ private Shell getShell() { return getSite().getShell(); }
/** * Returns the shell in which this page is displayed. * * @return the shell */ private Shell getShell() { return getSite().getShell(); }
@Override public void widgetSelected(SelectionEvent e) { String preferencePageId = "org.eclipse.egit.ui.internal.preferences.HistoryPreferencePage"; //$NON-NLS-1$ PreferenceDialog dialog = PreferencesUtil .createPreferenceDialogOn(getSite().getShell(), preferencePageId, new String[] { preferencePageId }, null); dialog.open(); } });
@Override public void handleException(Throwable exception) { if (exception instanceof PartInitException) { PartInitException pie = (PartInitException) exception; ErrorDialog.openError(getSite().getShell(), SearchMessages.DefaultSearchViewPage_show_match, SearchMessages.DefaultSearchViewPage_error_no_editor, pie.getStatus()); } }
@Override public void run() { new BranchConfigurationDialog(source.myPage.getSite().getShell(), source.myBranchName, source.myRepository).open(); source.myPage.refresh(); }
@Override protected Template editTemplate(Template template, boolean edit, boolean isNameModifiable) { EditTemplateDialog dialog= new EditTemplateDialog(getSite().getShell(), template, edit, isNameModifiable, getContextTypeRegistry()); if (dialog.open() == Window.OK) return dialog.getTemplate(); return null; }
@Override protected Template editTemplate(Template template, boolean edit, boolean isNameModifiable) { EditTemplateDialog dialog= new EditTemplateDialog(getSite().getShell(), template, edit, isNameModifiable, getContextTypeRegistry()); if (dialog.open() == Window.OK) return dialog.getTemplate(); return null; }
@Override public void run() { final StoredConfig config; DisplayMode mode = source.getCurrentMode(); switch (mode) { case EFFECTIVE: return; case SYSTEM: config = source.systemConfig; break; case USER: config = source.userHomeConfig; break; case REPO: config = source.repositoryConfig; break; default: return; } new EditDialog(source.myPage.getSite().getShell(), (FileBasedConfig) config, mode.getText()).open(); source.myPage.refresh(); }
protected void handleOpen(OpenEvent event) { Object firstElement= ((IStructuredSelection)event.getSelection()).getFirstElement(); if (firstElement instanceof ICompilationUnit || firstElement instanceof IClassFile || firstElement instanceof IMember) { if (getDisplayedMatchCount(firstElement) == 0) { try { fEditorOpener.openElement(firstElement); } catch (CoreException e) { ExceptionHandler.handle(e, getSite().getShell(), SearchMessages.JavaSearchResultPage_open_editor_error_title, SearchMessages.JavaSearchResultPage_open_editor_error_message); } return; } } super.handleOpen(event); }
public void run() { Shell shell= fPage.getSite().getShell(); AbstractTextSearchResult input= fPage.getInput(); if (input == null) { return; } MatchFilter[] allFilters= input.getAllMatchFilters(); MatchFilter[] checkedFilters= input.getActiveMatchFilters(); Integer limit= fPage.getElementLimit(); boolean enableMatchFilterConfiguration= checkedFilters != null; boolean enableLimitConfiguration= limit != null; int elementLimit= limit != null ? limit.intValue() : -1; MatchFilterSelectionDialog dialog = new MatchFilterSelectionDialog(shell, enableMatchFilterConfiguration, allFilters, checkedFilters, enableLimitConfiguration, elementLimit); if (dialog.open() == Window.OK) { if (enableMatchFilterConfiguration) { input.setActiveMatchFilters(dialog.getMatchFilters()); } if (enableLimitConfiguration) { fPage.setElementLimit(new Integer(dialog.getLimit())); } } }
@Override public void run() { Shell shell= fPage.getSite().getShell(); AbstractTextSearchResult input= fPage.getInput(); if (input == null) { return; } MatchFilter[] allFilters= input.getAllMatchFilters(); MatchFilter[] checkedFilters= input.getActiveMatchFilters(); Integer limit= fPage.getElementLimit(); boolean enableMatchFilterConfiguration= checkedFilters != null; boolean enableLimitConfiguration= limit != null; int elementLimit= limit != null ? limit.intValue() : -1; MatchFilterSelectionDialog dialog = new MatchFilterSelectionDialog(shell, enableMatchFilterConfiguration, allFilters, checkedFilters, enableLimitConfiguration, elementLimit); if (dialog.open() == Window.OK) { if (enableMatchFilterConfiguration) { input.setActiveMatchFilters(dialog.getMatchFilters()); } if (enableLimitConfiguration) { fPage.setElementLimit(Integer.valueOf(dialog.getLimit())); } } }
@Override protected void handleOpen(OpenEvent event) { Object firstElement= ((IStructuredSelection)event.getSelection()).getFirstElement(); if (firstElement instanceof ICompilationUnit || firstElement instanceof IClassFile || firstElement instanceof IMember) { if (getDisplayedMatchCount(firstElement) == 0) { try { fEditorOpener.openElement(firstElement); } catch (CoreException e) { ExceptionHandler.handle(e, getSite().getShell(), SearchMessages.JavaSearchResultPage_open_editor_error_title, SearchMessages.JavaSearchResultPage_open_editor_error_message); } return; } } super.handleOpen(event); }
@Override protected void handleOpen(OpenEvent event) { Object firstElement= ((IStructuredSelection)event.getSelection()).getFirstElement(); if (firstElement instanceof ICompilationUnit || firstElement instanceof IClassFile || firstElement instanceof IMember) { if (getDisplayedMatchCount(firstElement) == 0) { try { fEditorOpener.openElement(firstElement); } catch (CoreException e) { ExceptionHandler.handle(e, getSite().getShell(), SearchMessages.JavaSearchResultPage_open_editor_error_title, SearchMessages.JavaSearchResultPage_open_editor_error_message); } return; } } super.handleOpen(event); }
@Override protected void fillContextMenu(IMenuManager mgr) { super.fillContextMenu(mgr); addSortActions(mgr); fActionGroup.setContext(new ActionContext(getSite().getSelectionProvider().getSelection())); fActionGroup.fillContextMenu(mgr); FileSearchQuery query= (FileSearchQuery) getInput().getQuery(); if (query.getSearchString().length() > 0) { IStructuredSelection selection = getViewer().getStructuredSelection(); if (!selection.isEmpty()) { ReplaceAction replaceSelection= new ReplaceAction(getSite().getShell(), (FileSearchResult)getInput(), selection.toArray()); replaceSelection.setText(SearchMessages.ReplaceAction_label_selected); mgr.appendToGroup(IContextMenuConstants.GROUP_REORGANIZE, replaceSelection); } ReplaceAction replaceAll= new ReplaceAction(getSite().getShell(), (FileSearchResult)getInput(), null); replaceAll.setText(SearchMessages.ReplaceAction_label_all); mgr.appendToGroup(IContextMenuConstants.GROUP_REORGANIZE, replaceAll); } }
@Override public void run() { super.run(); ISelection sel = new StructuredSelection(new AnnotationTypeNode(editor, null)); PropertyPage page = new EditorAnnotationPropertyPage(); page.setElement(new AnnotationTypeNode(editor, null)); page.setTitle("Styles"); PreferenceManager mgr = new PreferenceManager(); IPreferenceNode node = new PreferenceNode("1", page); mgr.addToRoot(node); PropertyDialog dialog = new PropertyDialog(getSite().getShell(), mgr, sel); dialog.create(); dialog.setMessage(page.getTitle()); dialog.open(); } };