org.eclipse.team.ui.TeamUI Java Examples
The following examples show how to use
org.eclipse.team.ui.TeamUI.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SynchronizeAction.java From APICloud-Studio with GNU General Public License v3.0 | 6 votes |
public void execute(IAction action) throws InterruptedException, InvocationTargetException { if (action != null && !action.isEnabled()) { action.setEnabled(false); } else { IResource[] resources = getSelectedResources(); // First check if there is an existing matching participant SVNSynchronizeParticipant participant = (SVNSynchronizeParticipant)SubscriberParticipant.getMatchingParticipant(SVNSynchronizeParticipant.ID, resources); // If there isn't, create one and add to the manager if (participant == null) { participant = new SVNSynchronizeParticipant(new ResourceScope(resources)); TeamUI.getSynchronizeManager().addSynchronizeParticipants(new ISynchronizeParticipant[] {participant}); } // If called by the accelerator key, for some reason targetPart is null, thus the check if(getTargetPart() == null) { //System.out.println("site:null"+ SVNUIPlugin.getActivePage().getActivePart().getSite()); participant.refresh(resources, "Synchronizing", "Synchronizing " + participant.getName(), SVNUIPlugin.getActivePage().getActivePart().getSite()); } else { participant.refresh(resources, "Synchronizing", "Synchronizing " + participant.getName(), getTargetPart().getSite()); } } }
Example #2
Source File: ShowHistoryHandler.java From tlaplus with MIT License | 5 votes |
public static void openHistoryForModule(final Module module) { final IWorkbenchWindow activeWorkbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); if (activeWorkbenchWindow == null) { return; } final IHistoryView view = TeamUI.showHistoryFor(activeWorkbenchWindow.getActivePage(), module.getResource(), null); final IHistoryPage page = view.getHistoryPage(); if (page instanceof LocalHistoryPage) { ((LocalHistoryPage)page).setClickAction(true); } }
Example #3
Source File: SynchronizeWizard.java From APICloud-Studio with GNU General Public License v3.0 | 5 votes |
public boolean performFinish() { if (importWizard != null) { return importWizard.performFinish(); } else { IResource[] resources = selectionPage.getRootResources(); if (resources != null && resources.length > 0) { SubscriberParticipant participant = new SVNSynchronizeParticipant(selectionPage.getSynchronizeScope()); TeamUI.getSynchronizeManager().addSynchronizeParticipants(new ISynchronizeParticipant[]{participant}); // We don't know in which site to show progress because a participant could actually be shown in multiple sites. participant.run(null /* no site */); } return true; } }
Example #4
Source File: SVNLightweightDecorator.java From APICloud-Studio with GNU General Public License v3.0 | 5 votes |
private boolean isEventOfInterest(PropertyChangeEvent event) { String prop = event.getProperty(); return prop.equals(TeamUI.GLOBAL_IGNORES_CHANGED) || prop.equals(TeamUI.GLOBAL_FILE_TYPES_CHANGED) || prop.equals(SVNUIPlugin.P_DECORATORS_CHANGED) || prop.equals(SVNDecoratorConfiguration.OUTGOING_CHANGE_BACKGROUND_COLOR) || prop.equals(SVNDecoratorConfiguration.OUTGOING_CHANGE_FOREGROUND_COLOR) || prop.equals(SVNDecoratorConfiguration.OUTGOING_CHANGE_FONT) || prop.equals(SVNDecoratorConfiguration.IGNORED_FOREGROUND_COLOR) || prop.equals(SVNDecoratorConfiguration.IGNORED_BACKGROUND_COLOR) || prop.equals(SVNDecoratorConfiguration.IGNORED_FONT); }
Example #5
Source File: SVNLightweightDecorator.java From APICloud-Studio with GNU General Public License v3.0 | 5 votes |
public void dispose() { super.dispose(); PlatformUI.getWorkbench().getThemeManager().getCurrentTheme().removePropertyChangeListener(this); TeamUI.removePropertyChangeListener(this); SVNUIPlugin.getPlugin().getPreferenceStore().removePropertyChangeListener(propertyListener); SVNProviderPlugin.removeResourceStateChangeListener(this); // SVNProviderPlugin.broadcastDecoratorEnablementChanged(false /* disabled */); }
Example #6
Source File: JavaCompareWithEditionActionImpl.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
@Override public void run(ISelection selection) { IMember input= getEditionElement(selection); if (input == null) { MessageDialog.openInformation(getShell(), CompareMessages.CompareWithHistory_title, CompareMessages.CompareWithHistory_invalidSelectionMessage); return; } JavaElementHistoryPageSource pageSource = JavaElementHistoryPageSource.getInstance(); final IFile file= pageSource.getFile(input); if (file == null) { MessageDialog.openError(getShell(), CompareMessages.CompareWithHistory_title, CompareMessages.CompareWithHistory_internalErrorMessage); return; } if (USE_MODAL_COMPARE) { CompareConfiguration cc = new CompareConfiguration(); cc.setLeftEditable(false); cc.setRightEditable(false); HistoryPageCompareEditorInput ci = new HistoryPageCompareEditorInput(cc, pageSource, input); ci.setTitle(CompareMessages.JavaCompareWithEditionActionImpl_0); ci.setHelpContextId(IJavaHelpContextIds.COMPARE_ELEMENT_WITH_HISTORY_DIALOG); CompareUI.openCompareDialog(ci); } else { TeamUI.showHistoryFor(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(), input, pageSource); } }
Example #7
Source File: SVNSynchronizeParticipant.java From APICloud-Studio with GNU General Public License v3.0 | 4 votes |
protected ISynchronizeParticipantDescriptor getDescriptor() { return TeamUI.getSynchronizeManager().getParticipantDescriptor(ID); }