Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 59139 Details for
Bug 173457
[Actions] Convert Team action set to new menu support
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Intial version of the patch file
patch_173457_20070216.txt (text/plain), 65.90 KB, created by
Tomasz Zarna
on 2007-02-16 09:17:43 EST
(
hide
)
Description:
Intial version of the patch file
Filename:
MIME Type:
Creator:
Tomasz Zarna
Created:
2007-02-16 09:17:43 EST
Size:
65.90 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.team.ui >Index: src/org/eclipse/team/internal/ui/history/CompareLocalHistoryHandler.java >=================================================================== >RCS file: src/org/eclipse/team/internal/ui/history/CompareLocalHistoryHandler.java >diff -N src/org/eclipse/team/internal/ui/history/CompareLocalHistoryHandler.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/team/internal/ui/history/CompareLocalHistoryHandler.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,24 @@ >+/******************************************************************************* >+ * Copyright (c) 2006 IBM Corporation and others. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * IBM Corporation - initial API and implementation >+ *******************************************************************************/ >+package org.eclipse.team.internal.ui.history; >+ >+import org.eclipse.team.internal.ui.TeamUIMessages; >+ >+public class CompareLocalHistoryHandler extends ShowLocalHistoryHandler { >+ >+ protected boolean isCompare() { >+ return true; >+ } >+ >+ protected String getPromptTitle() { >+ return TeamUIMessages.CompareLocalHistory_0; >+ } >+} >Index: src/org/eclipse/team/internal/ui/handlers/TeamHandler.java >=================================================================== >RCS file: src/org/eclipse/team/internal/ui/handlers/TeamHandler.java >diff -N src/org/eclipse/team/internal/ui/handlers/TeamHandler.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/team/internal/ui/handlers/TeamHandler.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,167 @@ >+/******************************************************************************* >+ * Copyright (c) 2007 IBM Corporation and others. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * IBM Corporation - initial API and implementation >+ *******************************************************************************/ >+package org.eclipse.team.internal.ui.handlers; >+ >+import java.lang.reflect.InvocationTargetException; >+import java.util.ArrayList; >+ >+import org.eclipse.core.commands.AbstractHandler; >+import org.eclipse.core.commands.ExecutionEvent; >+import org.eclipse.core.resources.IProject; >+import org.eclipse.core.resources.IResource; >+import org.eclipse.core.runtime.NullProgressMonitor; >+import org.eclipse.jface.dialogs.ProgressMonitorDialog; >+import org.eclipse.jface.operation.IRunnableWithProgress; >+import org.eclipse.jface.viewers.*; >+import org.eclipse.swt.custom.BusyIndicator; >+import org.eclipse.swt.widgets.Display; >+import org.eclipse.swt.widgets.Shell; >+import org.eclipse.team.internal.ui.TeamUIPlugin; >+import org.eclipse.team.internal.ui.Utils; >+import org.eclipse.ui.*; >+import org.eclipse.ui.handlers.HandlerUtil; >+ >+public abstract class TeamHandler extends AbstractHandler { >+ >+ // Constants for determining the type of progress. Subclasses may >+ // pass one of these values to the run method. >+ public final static int PROGRESS_DIALOG = 1; >+ public final static int PROGRESS_BUSYCURSOR = 2; >+ >+ /** >+ * Convenience method for running an operation with progress and error >+ * feedback. >+ * >+ * @param runnable >+ * the runnable which executes the operation >+ * @param problemMessage >+ * the message to display in the case of errors >+ * @param progressKind >+ * one of PROGRESS_BUSYCURSOR or PROGRESS_DIALOG >+ */ >+ final protected void run(final IRunnableWithProgress runnable, >+ final String problemMessage, int progressKind, ExecutionEvent event) { >+ final Exception[] exceptions = new Exception[] { null }; >+ switch (progressKind) { >+ case PROGRESS_BUSYCURSOR: >+ BusyIndicator.showWhile(Display.getCurrent(), new Runnable() { >+ public void run() { >+ try { >+ runnable.run(new NullProgressMonitor()); >+ } catch (InvocationTargetException e) { >+ exceptions[0] = e; >+ } catch (InterruptedException e) { >+ exceptions[0] = null; >+ } >+ } >+ }); >+ break; >+ default: >+ case PROGRESS_DIALOG: >+ try { >+ new ProgressMonitorDialog(HandlerUtil.getActiveShell(event)) >+ .run(true, true, runnable); >+ } catch (InvocationTargetException e) { >+ exceptions[0] = e; >+ } catch (InterruptedException e) { >+ exceptions[0] = null; >+ } >+ break; >+ } >+ if (exceptions[0] != null) { >+ handle(exceptions[0], null, problemMessage, event); >+ } >+ } >+ >+ /** >+ * Shows the given errors to the user. >+ * >+ * @param exception >+ * the status containing the error >+ * @param title >+ * the title of the error dialog >+ * @param message >+ * the message for the error dialog >+ */ >+ protected void handle(Exception exception, String title, String message, >+ ExecutionEvent event) { >+ Utils.handleError(HandlerUtil.getActiveShell(event), exception, title, >+ message); >+ } >+ >+ protected IResource[] getSelectedResources(ExecutionEvent event) { >+ ISelection currentSelection = HandlerUtil.getCurrentSelection(event); >+ if (currentSelection == null >+ || !(currentSelection instanceof IStructuredSelection)) >+ currentSelection = StructuredSelection.EMPTY; >+ >+ return Utils >+ .getContributedResources(((IStructuredSelection) currentSelection) >+ .toArray()); >+ } >+ >+ protected IProject[] getSelectedProjects(ExecutionEvent event) { >+ IResource[] selectedResources = getSelectedResources(event); >+ if (selectedResources.length == 0) >+ return new IProject[0]; >+ ArrayList projects = new ArrayList(); >+ for (int i = 0; i < selectedResources.length; i++) { >+ IResource resource = selectedResources[i]; >+ if (resource.getType() == IResource.PROJECT) { >+ projects.add(resource); >+ } >+ } >+ return (IProject[]) projects.toArray(new IProject[projects.size()]); >+ } >+ >+ protected IWorkbenchPart getTargetPart(ExecutionEvent event) { >+ return HandlerUtil.getActivePart(event); >+ } >+ >+ protected Shell getShell(ExecutionEvent event) { >+ Shell shell = HandlerUtil.getActiveShell(event); >+ if (shell != null) { >+ return shell; >+ } else if (HandlerUtil.getActivePart(event) != null) { >+ return HandlerUtil.getActivePart(event).getSite().getShell(); >+ } else if (HandlerUtil.getActiveWorkbenchWindow(event) != null) { >+ return HandlerUtil.getActiveWorkbenchWindow(event).getShell(); >+ } else { >+ IWorkbench workbench = TeamUIPlugin.getPlugin().getWorkbench(); >+ if (workbench == null) >+ return null; >+ IWorkbenchWindow window = workbench.getActiveWorkbenchWindow(); >+ if (window == null) >+ return null; >+ return window.getShell(); >+ } >+ >+ } >+ >+ protected ISelection getSelection(ExecutionEvent event) { >+ // ISelection selection = (ISelection) context >+ // .getVariable(ISources.ACTIVE_CURRENT_SELECTION_NAME); >+ ISelection selection = HandlerUtil.getCurrentSelection(event); >+ if (selection != null) >+ return selection; >+ // IWorkbenchWindow activeWorkbenchWindow = >+ // getActiveWorkbenchWindow(context); >+ IWorkbenchWindow activeWorkbenchWindow = HandlerUtil >+ .getActiveWorkbenchWindow(event); >+ if (activeWorkbenchWindow != null) { >+ IWorkbenchPage activePage = activeWorkbenchWindow.getActivePage(); >+ if (activePage != null) { >+ return activePage.getSelection(); >+ } >+ } >+ return null; >+ } >+} >Index: src/org/eclipse/team/internal/ui/handlers/ApplyPatchHandler.java >=================================================================== >RCS file: src/org/eclipse/team/internal/ui/handlers/ApplyPatchHandler.java >diff -N src/org/eclipse/team/internal/ui/handlers/ApplyPatchHandler.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/team/internal/ui/handlers/ApplyPatchHandler.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,41 @@ >+/******************************************************************************* >+ * Copyright (c) 2007 IBM Corporation and others. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * IBM Corporation - initial API and implementation >+ *******************************************************************************/ >+package org.eclipse.team.internal.ui.handlers; >+ >+import org.eclipse.compare.patch.ApplyPatchOperation; >+import org.eclipse.core.commands.ExecutionEvent; >+import org.eclipse.core.commands.ExecutionException; >+import org.eclipse.core.resources.IResource; >+import org.eclipse.swt.custom.BusyIndicator; >+import org.eclipse.swt.widgets.Display; >+ >+public class ApplyPatchHandler extends TeamHandler { >+ >+ public Object execute(ExecutionEvent event) throws ExecutionException { >+ System.out.println("applyPatchHandler"); >+ IResource[] resources = getSelectedResources(event); >+ >+ IResource resource = null; >+ if (resources.length > 0) { >+ resource = resources[0]; >+ } >+ ApplyPatchOperation op = new ApplyPatchOperation(getTargetPart(event), >+ resource); >+ BusyIndicator.showWhile(Display.getDefault(), op); >+ >+ return null; >+ } >+ >+ public boolean isEnabled() { >+ return true; >+ } >+ >+} >Index: src/org/eclipse/team/internal/ui/actions/ApplyPatchAction.java >=================================================================== >RCS file: src/org/eclipse/team/internal/ui/actions/ApplyPatchAction.java >diff -N src/org/eclipse/team/internal/ui/actions/ApplyPatchAction.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/team/internal/ui/actions/ApplyPatchAction.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,43 @@ >+/******************************************************************************* >+ * Copyright (c) 2006 IBM Corporation and others. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * IBM Corporation - initial API and implementation >+ *******************************************************************************/ >+package org.eclipse.team.internal.ui.actions; >+ >+import org.eclipse.compare.patch.ApplyPatchOperation; >+import org.eclipse.core.resources.IResource; >+import org.eclipse.jface.action.IAction; >+import org.eclipse.swt.custom.BusyIndicator; >+import org.eclipse.swt.widgets.Display; >+import org.eclipse.team.core.TeamException; >+ >+/** >+ * @deprecated Use >+ * <code>org.eclipse.team.internal.ui.handlers.ApplyPatchHandler</code> >+ * instead. >+ */ >+public class ApplyPatchAction extends TeamAction { >+ >+ protected boolean isEnabled() throws TeamException { >+ return true; >+ } >+ >+ public void run(IAction action) { >+ System.out.println("applyPatchAction"); >+ IResource[] resources = getSelectedResources(); >+ IResource resource = null; >+ if (resources.length > 0) { >+ resource = resources[0]; >+ } >+ ApplyPatchOperation op = new ApplyPatchOperation(getTargetPart(), >+ resource); >+ BusyIndicator.showWhile(Display.getDefault(), op); >+ } >+ >+} >Index: src/org/eclipse/team/internal/ui/handlers/ConfigureProjectHandler.java >=================================================================== >RCS file: src/org/eclipse/team/internal/ui/handlers/ConfigureProjectHandler.java >diff -N src/org/eclipse/team/internal/ui/handlers/ConfigureProjectHandler.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/team/internal/ui/handlers/ConfigureProjectHandler.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,66 @@ >+/******************************************************************************* >+ * Copyright (c) 2007 IBM Corporation and others. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * IBM Corporation - initial API and implementation >+ *******************************************************************************/ >+package org.eclipse.team.internal.ui.handlers; >+ >+import java.lang.reflect.InvocationTargetException; >+ >+import org.eclipse.core.commands.ExecutionEvent; >+import org.eclipse.core.commands.ExecutionException; >+import org.eclipse.core.resources.IProject; >+import org.eclipse.core.runtime.IProgressMonitor; >+import org.eclipse.jface.operation.IRunnableWithProgress; >+import org.eclipse.jface.wizard.IWizard; >+import org.eclipse.jface.wizard.WizardDialog; >+import org.eclipse.swt.SWT; >+import org.eclipse.swt.widgets.Shell; >+import org.eclipse.team.internal.ui.TeamUIMessages; >+import org.eclipse.team.internal.ui.actions.TeamAction; >+import org.eclipse.team.internal.ui.wizards.ConfigureProjectWizard; >+ >+public class ConfigureProjectHandler extends TeamHandler { >+ >+ private static class ResizeWizardDialog extends WizardDialog { >+ public ResizeWizardDialog(Shell parentShell, IWizard newWizard) { >+ super(parentShell, newWizard); >+ setShellStyle(getShellStyle() | SWT.RESIZE); >+ } >+ } >+ >+ public Object execute(final ExecutionEvent event) throws ExecutionException { >+ System.out.println("ConfigureProjectHandler:execute"); >+ run(new IRunnableWithProgress() { >+ public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { >+ try { >+ IProject project = getSelectedProjects(event)[0]; >+ ConfigureProjectWizard wizard = new ConfigureProjectWizard(); >+ wizard.init(null, project); >+ WizardDialog dialog = new ResizeWizardDialog(getShell(event), wizard); >+ //dialog. >+ dialog.open(); >+ } catch (Exception e) { >+ throw new InvocationTargetException(e); >+ } >+ } >+ }, TeamUIMessages.ConfigureProjectAction_configureProject, TeamAction.PROGRESS_BUSYCURSOR,event); >+ >+ return null; >+ } >+ >+ public boolean isEnabled() { >+// IProject[] selectedProjects = getSelectedProjects(); >+// if (selectedProjects.length != 1) return false; >+// if (!selectedProjects[0].isAccessible()) return false; >+// if (!RepositoryProvider.isShared(selectedProjects[0])) return true; >+// return false; >+ return true; >+ } >+ >+} >Index: src/org/eclipse/team/internal/ui/handlers/ImportProjectSetHandler.java >=================================================================== >RCS file: src/org/eclipse/team/internal/ui/handlers/ImportProjectSetHandler.java >diff -N src/org/eclipse/team/internal/ui/handlers/ImportProjectSetHandler.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/team/internal/ui/handlers/ImportProjectSetHandler.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,62 @@ >+/******************************************************************************* >+ * Copyright (c) 2007 IBM Corporation and others. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * IBM Corporation - initial API and implementation >+ *******************************************************************************/ >+package org.eclipse.team.internal.ui.handlers; >+ >+import java.lang.reflect.InvocationTargetException; >+import java.util.Iterator; >+ >+import org.eclipse.core.commands.ExecutionEvent; >+import org.eclipse.core.commands.ExecutionException; >+import org.eclipse.core.resources.IFile; >+import org.eclipse.core.runtime.*; >+import org.eclipse.jface.dialogs.ErrorDialog; >+import org.eclipse.jface.dialogs.ProgressMonitorDialog; >+import org.eclipse.jface.operation.IRunnableWithProgress; >+import org.eclipse.jface.viewers.ITreeSelection; >+import org.eclipse.swt.widgets.Display; >+import org.eclipse.swt.widgets.Shell; >+import org.eclipse.team.internal.ui.*; >+import org.eclipse.ui.handlers.HandlerUtil; >+ >+public class ImportProjectSetHandler extends TeamHandler { >+ >+ public Object execute(final ExecutionEvent event) throws ExecutionException { >+ >+ final ITreeSelection treeSelection = ((ITreeSelection) HandlerUtil >+ .getCurrentSelection(event)); >+ >+ final Shell shell = Display.getDefault().getActiveShell(); >+ try { >+ new ProgressMonitorDialog(shell).run(true, true, >+ new IRunnableWithProgress() { >+ public void run(IProgressMonitor monitor) >+ throws InvocationTargetException, >+ InterruptedException { >+ Iterator iterator = treeSelection.iterator(); >+ while (iterator.hasNext()) { >+ IFile file = (IFile) iterator.next(); >+ ProjectSetImporter.importProjectSet(file >+ .getLocation().toString(), shell, >+ monitor); >+ } >+ } >+ }); >+ } catch (InvocationTargetException exception) { >+ ErrorDialog.openError(shell, null, null, new Status(IStatus.ERROR, >+ TeamUIPlugin.PLUGIN_ID, IStatus.ERROR, >+ TeamUIMessages.ImportProjectSetAction_0, exception >+ .getTargetException())); >+ } catch (InterruptedException exception) { >+ } >+ >+ return null; >+ } >+} >Index: src/org/eclipse/team/internal/ui/actions/ImportProjectSetAction.java >=================================================================== >RCS file: src/org/eclipse/team/internal/ui/actions/ImportProjectSetAction.java >diff -N src/org/eclipse/team/internal/ui/actions/ImportProjectSetAction.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/team/internal/ui/actions/ImportProjectSetAction.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,78 @@ >+/******************************************************************************* >+ * Copyright (c) 2000, 2005 IBM Corporation and others. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * IBM Corporation - initial API and implementation >+ *******************************************************************************/ >+package org.eclipse.team.internal.ui.actions; >+ >+import java.lang.reflect.InvocationTargetException; >+import java.util.Iterator; >+ >+import org.eclipse.core.resources.IFile; >+import org.eclipse.core.runtime.IProgressMonitor; >+import org.eclipse.core.runtime.IStatus; >+import org.eclipse.core.runtime.Status; >+import org.eclipse.jface.action.IAction; >+import org.eclipse.jface.dialogs.ErrorDialog; >+import org.eclipse.jface.dialogs.ProgressMonitorDialog; >+import org.eclipse.jface.operation.IRunnableWithProgress; >+import org.eclipse.jface.viewers.ISelection; >+import org.eclipse.jface.viewers.IStructuredSelection; >+import org.eclipse.swt.widgets.Display; >+import org.eclipse.swt.widgets.Shell; >+import org.eclipse.team.internal.ui.*; >+import org.eclipse.ui.IObjectActionDelegate; >+import org.eclipse.ui.IWorkbenchPart; >+import org.eclipse.ui.actions.ActionDelegate; >+ >+/** >+ * @deprecated Use >+ * <code>org.eclipse.team.internal.ui.handlers.ImportProjectSetHandler</code> >+ * instead. >+ */ >+public class ImportProjectSetAction extends ActionDelegate implements >+ IObjectActionDelegate { >+ >+ private IStructuredSelection fSelection; >+ >+ public void run(IAction action) { >+ final Shell shell = Display.getDefault().getActiveShell(); >+ try { >+ new ProgressMonitorDialog(shell).run(true, true, >+ new IRunnableWithProgress() { >+ public void run(IProgressMonitor monitor) >+ throws InvocationTargetException, >+ InterruptedException { >+ Iterator iterator = fSelection.iterator(); >+ while (iterator.hasNext()) { >+ IFile file = (IFile) iterator.next(); >+ ProjectSetImporter.importProjectSet(file >+ .getLocation().toString(), shell, >+ monitor); >+ } >+ } >+ }); >+ } catch (InvocationTargetException exception) { >+ ErrorDialog.openError(shell, null, null, new Status(IStatus.ERROR, >+ TeamUIPlugin.PLUGIN_ID, IStatus.ERROR, >+ TeamUIMessages.ImportProjectSetAction_0, exception >+ .getTargetException())); >+ } catch (InterruptedException exception) { >+ } >+ } >+ >+ public void selectionChanged(IAction action, ISelection sel) { >+ if (sel instanceof IStructuredSelection) { >+ fSelection = (IStructuredSelection) sel; >+ } >+ } >+ >+ public void setActivePart(IAction action, IWorkbenchPart targetPart) { >+ } >+ >+} >Index: src/org/eclipse/team/internal/ui/history/ShowLocalHistoryHandler.java >=================================================================== >RCS file: src/org/eclipse/team/internal/ui/history/ShowLocalHistoryHandler.java >diff -N src/org/eclipse/team/internal/ui/history/ShowLocalHistoryHandler.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/team/internal/ui/history/ShowLocalHistoryHandler.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,158 @@ >+/******************************************************************************* >+ * Copyright (c) 2006 IBM Corporation and others. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * IBM Corporation - initial API and implementation >+ *******************************************************************************/ >+package org.eclipse.team.internal.ui.history; >+ >+import java.lang.reflect.InvocationTargetException; >+ >+import org.eclipse.core.commands.*; >+import org.eclipse.core.resources.*; >+import org.eclipse.core.runtime.*; >+import org.eclipse.jface.dialogs.ErrorDialog; >+import org.eclipse.jface.dialogs.MessageDialog; >+import org.eclipse.jface.operation.IRunnableWithProgress; >+import org.eclipse.jface.viewers.*; >+import org.eclipse.swt.widgets.Shell; >+import org.eclipse.team.internal.ui.TeamUIMessages; >+import org.eclipse.team.internal.ui.TeamUIPlugin; >+import org.eclipse.team.ui.TeamUI; >+import org.eclipse.team.ui.history.IHistoryPage; >+import org.eclipse.team.ui.history.IHistoryView; >+import org.eclipse.ui.*; >+import org.eclipse.ui.handlers.HandlerUtil; >+ >+public class ShowLocalHistoryHandler extends AbstractHandler /*ActionDelegate implements IObjectActionDelegate */{ >+ >+// private IStructuredSelection fSelection; >+// private IWorkbenchPart targetPart; >+ >+ public Object execute(final ExecutionEvent event) throws ExecutionException { >+ System.out.println("ShowLocalHistoryHandler:execute"); >+ IFileState states[]= getLocalHistory(event); >+ if (states == null || states.length == 0) >+ return null; >+ try { >+ PlatformUI.getWorkbench().getProgressService().busyCursorWhile(new IRunnableWithProgress() { >+ public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { >+ final IResource resource = (IResource) getSelection(event).getFirstElement(); >+ Runnable r = new Runnable() { >+ public void run() { >+ IHistoryView view = TeamUI.showHistoryFor(TeamUIPlugin.getActivePage(), resource, LocalHistoryPageSource.getInstance()); >+ IHistoryPage page = view.getHistoryPage(); >+ if (page instanceof LocalHistoryPage){ >+ LocalHistoryPage historyPage = (LocalHistoryPage) page; >+ historyPage.setClickAction(isCompare()); >+ } >+ } >+ }; >+ TeamUIPlugin.getStandardDisplay().asyncExec(r); >+ } >+ }); >+ } catch (InvocationTargetException exception) { >+ ErrorDialog.openError(getShell(event), null, null, new Status(IStatus.ERROR, TeamUIPlugin.PLUGIN_ID, IStatus.ERROR, TeamUIMessages.ShowLocalHistory_1, exception.getTargetException())); >+ } catch (InterruptedException exception) { >+ } >+ return null; >+ } >+ >+// public void run(IAction action) { >+// IFileState states[]= getLocalHistory(); >+// if (states == null || states.length == 0) >+// return; >+// try { >+// PlatformUI.getWorkbench().getProgressService().busyCursorWhile(new IRunnableWithProgress() { >+// public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { >+// final IResource resource = (IResource) fSelection.getFirstElement(); >+// Runnable r = new Runnable() { >+// public void run() { >+// IHistoryView view = TeamUI.showHistoryFor(TeamUIPlugin.getActivePage(), resource, LocalHistoryPageSource.getInstance()); >+// IHistoryPage page = view.getHistoryPage(); >+// if (page instanceof LocalHistoryPage){ >+// LocalHistoryPage historyPage = (LocalHistoryPage) page; >+// historyPage.setClickAction(isCompare()); >+// } >+// } >+// }; >+// TeamUIPlugin.getStandardDisplay().asyncExec(r); >+// } >+// }); >+// } catch (InvocationTargetException exception) { >+// ErrorDialog.openError(getShell(), null, null, new Status(IStatus.ERROR, TeamUIPlugin.PLUGIN_ID, IStatus.ERROR, TeamUIMessages.ShowLocalHistory_1, exception.getTargetException())); >+// } catch (InterruptedException exception) { >+// } >+// } >+ >+// public void selectionChanged(IAction action, ISelection sel) { >+// if (sel instanceof IStructuredSelection) { >+// fSelection= (IStructuredSelection) sel; >+// } >+// } >+// public void setActivePart(IAction action, IWorkbenchPart targetPart) { >+// this.targetPart = targetPart; >+// } >+ >+ protected Shell getShell(ExecutionEvent event) { >+// if (targetPart != null) >+// return targetPart.getSite().getShell(); >+// return TeamUIPlugin.getActivePage().getActivePart().getSite().getShell(); >+ Shell shell = HandlerUtil.getActiveShell(event); >+ if (shell != null) { >+ return shell; >+ } else if (HandlerUtil.getActivePart(event) != null) { >+ return HandlerUtil.getActivePart(event).getSite().getShell(); >+ } else if (HandlerUtil.getActiveWorkbenchWindow(event) != null) { >+ return HandlerUtil.getActiveWorkbenchWindow(event).getShell(); >+ } else { >+ IWorkbench workbench = TeamUIPlugin.getPlugin().getWorkbench(); >+ if (workbench == null) >+ return null; >+ IWorkbenchWindow window = workbench.getActiveWorkbenchWindow(); >+ if (window == null) >+ return null; >+ return window.getShell(); >+ } >+ } >+ >+ protected boolean isCompare() { >+ return false; >+ } >+ >+ public IStructuredSelection getSelection(ExecutionEvent event) { >+// return fSelection; >+ ISelection currentSelection = HandlerUtil.getCurrentSelection(event); >+ if (currentSelection == null >+ || !(currentSelection instanceof IStructuredSelection)) >+ currentSelection = StructuredSelection.EMPTY; >+ >+ return (IStructuredSelection) currentSelection; >+ } >+ >+ protected IFileState[] getLocalHistory(ExecutionEvent event) { >+ final IFile file = (IFile) getSelection(event).getFirstElement(); >+ IFileState states[]; >+ try { >+ states= file.getHistory(null); >+ } catch (CoreException ex) { >+ MessageDialog.openError(getShell(event), getPromptTitle(), ex.getMessage()); >+ return null; >+ } >+ >+ if (states == null || states.length <= 0) { >+ MessageDialog.openInformation(getShell(event), getPromptTitle(), TeamUIMessages.ShowLocalHistory_0); >+ return states; >+ } >+ return states; >+ } >+ >+ protected String getPromptTitle() { >+ return TeamUIMessages.ShowLocalHistory_2; >+ } >+ >+} >Index: plugin.properties >=================================================================== >RCS file: plugin.properties >diff -N plugin.properties >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ plugin.properties 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,98 @@ >+############################################################################### >+# Copyright (c) 2000, 2006 IBM Corporation and others. >+# All rights reserved. This program and the accompanying materials >+# are made available under the terms of the Eclipse Public License v1.0 >+# which accompanies this distribution, and is available at >+# http://www.eclipse.org/legal/epl-v10.html >+# >+# Contributors: >+# IBM Corporation - initial API and implementation >+############################################################################### >+providerName=Eclipse.org >+pluginName=Team Support UI >+ >+Team=Team >+configurationWizards=Configuration Wizards >+synchronizeParticipants=Synchronize Participants >+synchronizeWizards=Synchronize Wizards >+logicalViews=Logical Synchronize Views >+ >+PreferenceKeywords.Team=team >+PreferenceKeywords.FileContent=team file content type >+TeamPreferencePage.name=Team >+TextPreferencePage.name=File Content >+IgnorePreferencePage.name=Ignored Resources >+ >+ConfigureProject.label=Share Project... >+ConfigureProject.tooltip=Share the project with others using a version and configuration management system. >+ConfigureProject.mnemonic=S >+ >+ApplyPatch.label=Apply Patch... >+ApplyPatch.tooltip=Apply a patch to one or more workspace projects. >+ApplyPatch.mnemonic=y >+Command.applyPatch.name=Apply Patch... >+Command.applyPatch.description=Apply a patch to one or more workspace projects. >+ >+ImportProjectSet.label=Import Project &Set... >+ >+TeamGroupMenu.label=Team >+TeamGroupMenu.mnemonic=e >+Team.viewCategory=Team >+ >+Synchronizing.perspective=Team Synchronizing >+Synchronizing.openPerspectiveDescription=Open the Team Synchronizing Perspective >+SyncView.name=Synchronize >+Synchronizing.perspective.description=This perspective is designed to support the synchronization of resources in the local workspace with their counterparts shared in a repository. It incorporates views for synchronizing, browsing history and comparing resource content. >+ >+ViewCommand.synchronizeView.name=Synchronize >+ViewCommand.synchronizeView.description=Show the Synchronize view >+ViewCommand.historyView.name=History >+ViewCommand.historyView.description=Show the Team History view >+ >+ProjectSetImportWizard.name=Team Project Set >+ProjectSetImportWizard.description=A wizard that imports a Team Project Set >+ProjectSetExportWizard.name=Team Project Set >+ProjectSetExportWizard.description=A wizard that exports a Team Project Set >+ >+Command.category.name=Team >+Command.category.description=Actions that apply when working with a Team >+ >+Command.syncAll.name=Synchronize... >+Command.syncAll.description=Synchronize resources in the workspace with another location >+ >+Command.syncLast.name=Repeat last synchronization >+Command.syncLast.description=Repeat the last synchronization >+ >+Command.importProjectSet.name=Import Project Set... >+Command.importProjectSet.description=Import Project Set into the workspace >+ >+Command.showLocalHistory.name=Show Local History >+Command.showLocalHistory.description=Show Local History >+ >+Command.compareLocalHistory.name=Local History... >+Command.compareLocalHistory.description=Compare the Selected Resource with Local History >+ >+Command.configureProject.name=Share Project... >+ >+CompressFolderView.name=Compress Folders >+CompressFolderView.description=Compress in-sync folders paths >+ >+FileRevision.OpenAction.name=&Open >+FileRevision.Compare.name=&Compare >+ >+TeamContentProvider = Team Content Providers >+TeamDecorators = Team Decorators >+HistoryView = History >+ModelSyncParticipant = Synchronization >+ResourcesContentExtension = Resources >+EnabledModels = Models >+Workspace=Workspace >+ >+ShowLocalHistory.label=Show Local History >+ShowLocalHistory.mnemonic=H >+CompareLocalHistory.label=Local History... >+CompareLocalHistory.tooltip=Compare the Selected Resource with Local History >+CompareLocalHistory.mnemonic=L >+ReplaceLocalHistory.label= Local History... >+ReplaceLocalHistory.tooltip= Replace the Selected Resource with Local History >+ReplaceLocalHistory.mnemonic=L >Index: src/org/eclipse/team/internal/ui/actions/ConfigureProjectAction.java >=================================================================== >RCS file: src/org/eclipse/team/internal/ui/actions/ConfigureProjectAction.java >diff -N src/org/eclipse/team/internal/ui/actions/ConfigureProjectAction.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/team/internal/ui/actions/ConfigureProjectAction.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,80 @@ >+/******************************************************************************* >+ * Copyright (c) 2000, 2006 IBM Corporation and others. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * IBM Corporation - initial API and implementation >+ *******************************************************************************/ >+package org.eclipse.team.internal.ui.actions; >+ >+ >+import java.lang.reflect.InvocationTargetException; >+ >+import org.eclipse.core.resources.IProject; >+import org.eclipse.core.runtime.IProgressMonitor; >+import org.eclipse.jface.action.IAction; >+import org.eclipse.jface.operation.IRunnableWithProgress; >+import org.eclipse.jface.wizard.IWizard; >+import org.eclipse.jface.wizard.WizardDialog; >+import org.eclipse.swt.SWT; >+import org.eclipse.swt.widgets.Shell; >+import org.eclipse.team.core.RepositoryProvider; >+import org.eclipse.team.internal.ui.TeamUIMessages; >+import org.eclipse.team.internal.ui.wizards.ConfigureProjectWizard; >+import org.eclipse.ui.IWorkbenchWindow; >+import org.eclipse.ui.IWorkbenchWindowActionDelegate; >+ >+/** >+ * Action for configuring a project. Configuring involves associating >+ * the project with a Team provider and performing any provider-specific >+ * configuration that is necessary. >+ * >+ * @deprecated Use <code>org.eclipse.team.internal.ui.handlers.ConfigureProjectHandler</code> instead. >+ */ >+public class ConfigureProjectAction extends TeamAction implements IWorkbenchWindowActionDelegate { >+ private static class ResizeWizardDialog extends WizardDialog { >+ public ResizeWizardDialog(Shell parentShell, IWizard newWizard) { >+ super(parentShell, newWizard); >+ setShellStyle(getShellStyle() | SWT.RESIZE); >+ } >+ } >+ >+ /* >+ * Method declared on IActionDelegate. >+ */ >+ public void run(IAction action) { >+ run(new IRunnableWithProgress() { >+ public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { >+ try { >+ IProject project = getSelectedProjects()[0]; >+ ConfigureProjectWizard wizard = new ConfigureProjectWizard(); >+ wizard.init(null, project); >+ WizardDialog dialog = new ResizeWizardDialog(getShell(), wizard); >+ //dialog. >+ dialog.open(); >+ } catch (Exception e) { >+ throw new InvocationTargetException(e); >+ } >+ } >+ }, TeamUIMessages.ConfigureProjectAction_configureProject, PROGRESS_BUSYCURSOR); >+ } >+ /** >+ * @see TeamAction#isEnabled() >+ */ >+ protected boolean isEnabled() { >+ IProject[] selectedProjects = getSelectedProjects(); >+ if (selectedProjects.length != 1) return false; >+ if (!selectedProjects[0].isAccessible()) return false; >+ if (!RepositoryProvider.isShared(selectedProjects[0])) return true; >+ return false; >+ } >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#init(org.eclipse.ui.IWorkbenchWindow) >+ */ >+ public void init(IWorkbenchWindow window) { >+ } >+} >Index: plugin.xml >=================================================================== >RCS file: plugin.xml >diff -N plugin.xml >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ plugin.xml 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,696 @@ >+<?xml version="1.0" encoding="UTF-8"?> >+<?eclipse version="3.0"?> >+<plugin> >+ >+ <extension-point id="configurationWizards" name="%configurationWizards" schema="schema/configurationWizards.exsd"/> >+ <extension-point id="synchronizeParticipants" name="%synchronizeParticipants" schema="schema/synchronizeParticipants.exsd"/> >+ <extension-point id="synchronizeWizards" name="%synchronizeWizards" schema="schema/synchronizeWizards.exsd"/> >+ <extension-point id="teamContentProviders" name="%TeamContentProvider" schema="schema/teamContentProviders.exsd"/> >+ <extension-point id="teamDecorators" name="%TeamDecorators" schema="schema/teamDecorators.exsd"/> >+ >+<!-- **************** PREFERENCES ******************* --> >+ <extension >+ point="org.eclipse.ui.keywords"> >+ <keyword >+ label="%PreferenceKeywords.Team" >+ id="org.eclipse.team.ui.team"/> >+ <keyword >+ label="%PreferenceKeywords.FileContent" >+ id="org.eclipse.team.ui.team.fileContent"/> >+ </extension> >+ <extension >+ point="org.eclipse.ui.preferencePages"> >+ <page >+ name="%TeamPreferencePage.name" >+ class="org.eclipse.team.internal.ui.preferences.SyncViewerPreferencePage" >+ id="org.eclipse.team.ui.TeamPreferences"> >+ <keywordReference id="org.eclipse.team.ui.team"/> >+ </page> >+ <page >+ name="%TextPreferencePage.name" >+ category="org.eclipse.team.ui.TeamPreferences" >+ class="org.eclipse.team.internal.ui.preferences.TextPreferencePage" >+ id="org.eclipse.team.ui.TextPreferences"> >+ <keywordReference id="org.eclipse.team.ui.team.fileContent"/> >+ </page> >+ <page >+ name="%IgnorePreferencePage.name" >+ category="org.eclipse.team.ui.TeamPreferences" >+ class="org.eclipse.team.internal.ui.preferences.IgnorePreferencePage" >+ id="org.eclipse.team.ui.IgnorePreferences"> >+ <keywordReference id="org.eclipse.team.ui.team"/> >+ </page> >+ <page >+ category="org.eclipse.team.ui.TeamPreferences" >+ class="org.eclipse.team.internal.ui.mapping.ModelEnablementPreferencePage" >+ id="org.eclipse.team.ui.enabledModels" >+ name="%EnabledModels"/> >+ </extension> >+<!-- ****************** POPUP ACTIONS *************** --> >+ <extension >+ point="org.eclipse.ui.popupMenus"> >+ <!--objectContribution >+ objectClass="org.eclipse.core.resources.mapping.ResourceMapping" >+ adaptable="true" >+ id="org.eclipse.team.ui.ResourceContributions"> >+ <menu >+ label="%TeamGroupMenu.label" >+ path="additions" >+ id="team.main"> >+ <separator >+ name="group1"> >+ </separator> >+ <separator >+ name="group2"> >+ </separator> >+ <separator >+ name="group3"> >+ </separator> >+ <separator >+ name="group4"> >+ </separator> >+ <separator >+ name="group5"> >+ </separator> >+ <separator >+ name="group6"> >+ </separator> >+ <separator >+ name="group7"> >+ </separator> >+ <separator >+ name="group8"> >+ </separator> >+ <separator >+ name="group9"> >+ </separator> >+ <separator >+ name="group10"> >+ </separator> >+ <separator >+ name="targetGroup"> >+ </separator> >+ <separator >+ name="projectGroup"> >+ </separator> >+ </menu> >+ </objectContribution--> >+ <!--objectContribution >+ objectClass="org.eclipse.core.resources.mapping.ResourceMapping" >+ adaptable="true" >+ id="org.eclipse.team.ui.ProjectContributions"> >+ <action >+ label="%ConfigureProject.label" >+ tooltip="%ConfigureProject.tooltip" >+ class="org.eclipse.team.internal.ui.actions.ConfigureProjectAction" >+ menubarPath="team.main/projectGroup" >+ enablesFor="1" >+ id="nonbound.org.eclipse.team.ui.ConfigureProject"> >+ </action> >+ <enablement> >+ <not> >+ <adapt type="org.eclipse.core.resources.mapping.ResourceMapping"> >+ <test property="org.eclipse.core.resources.projectPersistentProperty" args="org.eclipse.team.core.repository" /> >+ </adapt> >+ </not> >+ </enablement> >+ </objectContribution--> >+ <!--objectContribution >+ objectClass="org.eclipse.core.resources.IFile" >+ nameFilter="*.psf" >+ id="org.eclipse.team.ui.ProjectSetFileContributions"> >+ <action >+ label="%ImportProjectSet.label" >+ class="org.eclipse.team.internal.ui.actions.ImportProjectSetAction" >+ menubarPath="team.main" >+ enablesFor="*" >+ id="nonbound.org.eclipse.team.ui.ImportProjectSetAction"> >+ </action> >+ </objectContribution--> >+ <objectContribution >+ adaptable="true" >+ id="org.eclipse.team.ui.UnmanagedFileContributions" >+ objectClass="org.eclipse.core.resources.IFile"> >+ <!--action >+ class="org.eclipse.team.internal.ui.history.ShowLocalHistory" >+ id="org.eclipse.team.ui.showLocalHistory" >+ label="%ShowLocalHistory.label" >+ menubarPath="team.main/group4" >+ enablesFor="1" >+ tooltip="%ShowLocalHistory.label"/--> >+ <!--action >+ class="org.eclipse.team.internal.ui.history.CompareLocalHistory" >+ id="org.eclipse.team.ui.compareLocalHistory" >+ label="%CompareLocalHistory.label" >+ menubarPath="compareWithMenu/compareWithGroup" >+ enablesFor="1" >+ overrideActionId="compareWithHistory" >+ tooltip="%CompareLocalHistory.tooltip"/--> >+ <action >+ class="org.eclipse.team.internal.ui.history.ReplaceLocalHistory" >+ id="org.eclipse.team.ui.replaceLocalHistory" >+ label="%ReplaceLocalHistory.label" >+ menubarPath="replaceWithMenu/replaceWithGroup" >+ enablesFor="1" >+ overrideActionId="replaceFromHistory" >+ tooltip="%ReplaceLocalHistory.tooltip"/> >+ </objectContribution> >+ </extension> >+<!-- ************** Views ********************** --> >+ <extension >+ point="org.eclipse.ui.views"> >+ <category >+ name="%Team.viewCategory" >+ id="org.eclipse.team.ui"> >+ </category> >+ <view >+ name="%SyncView.name" >+ icon="$nl$/icons/full/eview16/synch_synch.gif" >+ fastViewWidthRatio="0.25" >+ category="org.eclipse.team.ui" >+ allowMultiple="true" >+ class="org.eclipse.team.internal.ui.synchronize.SynchronizeView" >+ id="org.eclipse.team.sync.views.SynchronizeView"> >+ </view> >+ <view >+ allowMultiple="true" >+ category="org.eclipse.team.ui" >+ class="org.eclipse.team.internal.ui.history.GenericHistoryView" >+ icon="icons/full/eview16/history_view.gif" >+ id="org.eclipse.team.ui.GenericHistoryView" >+ name="%HistoryView"/> >+ <!-- <view >+ name="%CompareView.name" >+ icon="$nl$/icons/full/eview16/compare_view.gif" >+ fastViewWidthRatio="0.25" >+ category="org.eclipse.team.ui" >+ class="org.eclipse.team.internal.ui.synchronize.CompareView" >+ id="org.eclipse.team.sync.views.CompareView"> >+ </view> --> >+ </extension> >+<!-- **************** Synchronizing Perspective ******************* --> >+ <extension >+ point="org.eclipse.ui.perspectives"> >+ <perspective >+ name="%Synchronizing.perspective" >+ icon="$nl$/icons/full/eview16/synch_synch.gif" >+ class="org.eclipse.team.internal.ui.synchronize.TeamSynchronizingPerspective" >+ id="org.eclipse.team.ui.TeamSynchronizingPerspective"> >+ <description> >+ %Synchronizing.perspective.description >+ </description> >+ </perspective> >+ </extension> >+ <extension >+ point="org.eclipse.ui.perspectiveExtensions"> >+ <perspectiveExtension >+ targetID="org.eclipse.ui.resourcePerspective"> >+ <perspectiveShortcut >+ id="org.eclipse.team.ui.TeamSynchronizingPerspective"> >+ </perspectiveShortcut> >+ <showInPart >+ id="org.eclipse.team.ui.GenericHistoryView"> >+ </showInPart> >+ </perspectiveExtension> >+ </extension> >+ >+<!-- ********** New Project Wizard ************** --> >+ <extension >+ point="org.eclipse.ui.newWizards"> >+ <category name="%Team" id="org.eclipse.team.ui.newWizards"> >+ </category> >+ </extension> >+<!-- ****************** Import Wizards ********************* --> >+ <extension >+ point="org.eclipse.ui.importWizards"> >+ <category >+ name="%Team" >+ id="org.eclipse.team.ui.importWizards"> >+ </category> >+ >+ <wizard >+ name="%ProjectSetImportWizard.name" >+ icon="$nl$/icons/full/obj/import_projectset.gif" >+ class="org.eclipse.team.internal.ui.wizards.ProjectSetImportWizard" >+ category="org.eclipse.team.ui.importWizards" >+ id="org.eclipse.team.ui.ProjectSetImportWizard"> >+ <description> >+ %ProjectSetImportWizard.description >+ </description> >+ <selection >+ class="org.eclipse.core.resources.IProject"> >+ </selection> >+ </wizard> >+ </extension> >+<!-- ****************** Export Wizards ********************* --> >+ <extension >+ point="org.eclipse.ui.exportWizards"> >+ <category >+ name="%Team" >+ id="org.eclipse.team.ui.exportWizards"> >+ </category> >+ <wizard >+ name="%ProjectSetExportWizard.name" >+ icon="$nl$/icons/full/obj/export_projectset.gif" >+ class="org.eclipse.team.internal.ui.wizards.ProjectSetExportWizard" >+ category="org.eclipse.team.ui.exportWizards" >+ id="org.eclipse.team.ui.ProjectSetExportWizard"> >+ <description> >+ %ProjectSetExportWizard.description >+ </description> >+ <selection >+ class="org.eclipse.core.resources.IProject"> >+ </selection> >+ </wizard> >+ </extension> >+<!-- ***************** Perspective Extensions ********************** --> >+ <extension >+ point="org.eclipse.ui.perspectiveExtensions"> >+ <perspectiveExtension >+ targetID="org.eclipse.team.ui.TeamSynchronizingPerspective"> >+ <showInPart >+ id="org.eclipse.ui.views.ResourceNavigator"> >+ </showInPart> >+ <showInPart >+ id="org.eclipse.team.ui.GenericHistoryView"> >+ </showInPart> >+ </perspectiveExtension> >+ </extension> >+<!-- ***************** Actions ********************** --> >+ <extension >+ point="org.eclipse.ui.commands"> >+ <category >+ name="%Command.category.name" >+ description="%Command.category.description" >+ id="org.eclipse.team.ui.category.team"> >+ </category> >+ <command >+ name="%Command.syncAll.name" >+ categoryId="org.eclipse.team.ui.category.team" >+ description="%Command.syncAll.description" >+ id="org.eclipse.team.ui.synchronizeAll"> >+ </command> >+ <command >+ name="%Command.syncLast.name" >+ categoryId="org.eclipse.team.ui.category.team" >+ description="%Command.syncLast.description" >+ id="org.eclipse.team.ui.synchronizeLast"> >+ </command> >+ <command >+ name="%Command.applyPatch.name" >+ categoryId="org.eclipse.team.ui.category.team" >+ description="%Command.applyPatch.description" >+ id="org.eclipse.team.ui.applyPatch"> >+ </command> >+ <command >+ name="%Synchronizing.perspective" >+ description="%Synchronizing.openPerspectiveDescription" >+ categoryId="org.eclipse.ui.category.perspectives" >+ id="org.eclipse.team.ui.TeamSynchronizingPerspective"/> >+ <command >+ name="%ViewCommand.synchronizeView.name" >+ description="%ViewCommand.synchronizeView.description" >+ categoryId="org.eclipse.ui.category.views" >+ id="org.eclipse.team.sync.views.SynchronizeView"/> >+ <command >+ name="%ViewCommand.historyView.name" >+ description="%ViewCommand.historyView.description" >+ categoryId="org.eclipse.ui.category.views" >+ id="org.eclipse.team.ui.GenericHistoryView"/> >+ <!-- TZarna: added commands --> >+ <command >+ categoryId="org.eclipse.team.ui.category.team" >+ defaultHandler="org.eclipse.team.internal.ui.handlers.ApplyPatchHandler" >+ description="%Command.applyPatch.description" >+ id="org.eclipse.team.ui.applyPatch" >+ name="%Command.applyPatch.name"> >+ </command> >+ <command >+ categoryId="org.eclipse.team.ui.category.team" >+ defaultHandler="org.eclipse.team.internal.ui.handlers.ConfigureProjectHandler" >+ id="org.eclipse.team.ui.configureProject" >+ name="%Command.configureProject.name"> >+ </command> >+ <command >+ categoryId="org.eclipse.team.ui.category.team" >+ defaultHandler="org.eclipse.team.internal.ui.handlers.SynchronizeHandler" >+ description="%Command.syncAll.description" >+ id="org.eclipse.team.ui.synchronizeAll" >+ name="%Command.syncAll.name"> >+ </command> >+ <command >+ categoryId="org.eclipse.team.ui.category.team" >+ defaultHandler="org.eclipse.team.internal.ui.handlers.ImportProjectSetHandler" >+ description="%Command.importProjectSet.description" >+ id="org.eclipse.team.ui.importProjectSet" >+ name="%Command.importProjectSet.name"> >+ </command> >+ <command >+ categoryId="org.eclipse.team.ui.category.team" >+ defaultHandler="org.eclipse.team.internal.ui.history.ShowLocalHistoryHandler" >+ description="%Command.showLocalHistory.description" >+ id="org.eclipse.team.ui.showLocalHistory" >+ name="%Command.showLocalHistory.name"> >+ </command> >+ <command >+ categoryId="org.eclipse.team.ui.category.team" >+ defaultHandler="org.eclipse.team.internal.ui.history.CompareLocalHistoryHandler" >+ description="%Command.compareLocalHistory.description" >+ id="org.eclipse.team.ui.compareLocalHistory" >+ name="%Command.compareLocalHistory.name"> >+ </command> >+ </extension> >+ >+ <extension >+ point="org.eclipse.ui.bindings"> >+ <key >+ sequence="M3+M2+Q Y" >+ contextId="org.eclipse.ui.globalScope" >+ commandId="org.eclipse.team.sync.views.SynchronizeView" >+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/> >+ <key >+ sequence="M3+M2+Q Z" >+ contextId="org.eclipse.ui.globalScope" >+ commandId="org.eclipse.team.ui.GenericHistoryView" >+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/> >+ </extension> >+<!-- action sets --> >+ <!--extension >+ point="org.eclipse.ui.actionSets"> >+ <actionSet >+ label="%Command.category.name" >+ description="%Command.category.description" >+ visible="false" >+ id="org.eclipse.team.ui.actionSet"> >+ <action >+ allowLabelUpdate="true" >+ toolbarPath="Normal/Team" >+ label="%Command.syncAll.name" >+ tooltip="%Command.syncAll.name" >+ class="org.eclipse.team.internal.ui.synchronize.actions.GlobalRefreshAction" >+ icon="$nl$/icons/full/elcl16/synch_participants.gif" >+ style="pulldown" >+ id="org.eclipse.team.ui.synchronizeAll"> >+ </action> >+ <action >+ allowLabelUpdate="true" >+ label="%ConfigureProject.label" >+ tooltip="%ConfigureProject.tooltip" >+ class="org.eclipse.team.internal.ui.actions.ConfigureProjectAction" >+ menubarPath="project/open.ext" >+ id="org.eclipse.team.ui.ConfigureProject"/> >+ <action >+ allowLabelUpdate="true" >+ class="org.eclipse.team.internal.ui.actions.ApplyPatchAction" >+ definitionId="org.eclipse.team.ui.applyPatch" >+ id="org.eclipse.team.ui.ApplyPatchAction" >+ label="%ApplyPatch.label" >+ menubarPath="project/additions" >+ tooltip="%ApplyPatch.tooltip"/> >+ </actionSet> >+ </extension--> >+ >+ <!-- file modification validator --> >+ >+ <extension >+ point="org.eclipse.team.core.defaultFileModificationValidator"> >+ <validator class="org.eclipse.team.internal.ui.DefaultUIFileModificationValidator"/> >+ </extension> >+ >+ <!-- adapter factory --> >+ >+ <extension >+ point="org.eclipse.core.runtime.adapters"> >+ <factory >+ adaptableType="org.eclipse.compare.structuremergeviewer.DiffNode" >+ class="org.eclipse.team.internal.ui.TeamAdapterFactory"> >+ <adapter type="org.eclipse.ui.model.IWorkbenchAdapter"/> >+ </factory> >+ <factory >+ adaptableType="org.eclipse.core.resources.mapping.ModelProvider" >+ class="org.eclipse.team.internal.ui.TeamAdapterFactory"> >+ <adapter type="org.eclipse.team.core.mapping.IResourceMappingMerger"/> >+ <adapter type="org.eclipse.team.ui.mapping.ISynchronizationCompareAdapter"/> >+ <adapter type="org.eclipse.team.core.mapping.ISynchronizationScopeParticipantFactory"/> >+ </factory> >+ <factory >+ adaptableType="org.eclipse.team.core.RepositoryProviderType" >+ class="org.eclipse.team.internal.ui.TeamAdapterFactory"> >+ <adapter type="org.eclipse.team.ui.mapping.ITeamStateProvider"/> >+ </factory> >+ </extension> >+ <extension >+ point="org.eclipse.ui.navigator.navigatorContent"> >+ <navigatorContent >+ contentProvider="org.eclipse.team.internal.ui.mapping.ResourceModelContentProvider" >+ id="org.eclipse.team.ui.resourceContent" >+ labelProvider="org.eclipse.team.internal.ui.mapping.ResourceModelLabelProvider" >+ name="%ResourcesContentExtension" >+ priority="lowest"> >+ <enablement> >+ <or> >+ <instanceof value="org.eclipse.core.internal.resources.mapping.ResourceModelProvider"/> >+ <instanceof value="org.eclipse.core.resources.IResource"/> >+ <instanceof value="org.eclipse.team.core.mapping.ISynchronizationScope"/> >+ <instanceof value="org.eclipse.team.core.mapping.ISynchronizationContext"/> >+ </or> >+ </enablement> >+ <actionProvider class="org.eclipse.team.internal.ui.mapping.ResourceModelActionProvider"/> >+ <commonSorter >+ class="org.eclipse.team.internal.ui.mapping.ResourceModelSorter" >+ id="org.eclipse.team.ui.resourceSorter"/> >+ </navigatorContent> >+ </extension> >+ <extension >+ point="org.eclipse.ui.navigator.viewer"> >+ <viewer >+ viewerId="org.eclipse.team.ui.navigatorViewer"> >+ <popupMenu >+ allowsPlatformContributions="false" >+ id="org.eclipse.team.ui.navigatorViewer#PopupMenu"> >+ <insertionPoint name="file"/> >+ <insertionPoint name="edit"/> >+ <insertionPoint name="synchronize"/> >+ <insertionPoint >+ name="navigate" >+ separator="true"/> >+ <insertionPoint >+ name="merge" >+ separator="true"/> >+ <insertionPoint >+ name="other" >+ separator="true"/> >+ <insertionPoint >+ name="sort" >+ separator="true"/> >+ <insertionPoint >+ name="additions" >+ separator="true"/> >+ <insertionPoint >+ name="properties" >+ separator="true"/> >+ </popupMenu> >+ </viewer> >+ </extension> >+ >+ <!-- *************** Synchronize View Participant **************** --> >+ <extension >+ point="org.eclipse.team.ui.synchronizeParticipants"> >+ <participant >+ class="org.eclipse.team.ui.synchronize.ModelSynchronizeParticipant" >+ icon="$nl$/icons/full/eview16/synch_synch.gif" >+ id="org.eclipse.team.ui.synchronization_context_synchronize_participant" >+ name="%ModelSyncParticipant" >+ persistent="false"> >+ </participant> >+ </extension> >+ <extension >+ id="teamContentProvider" >+ name="%Workspace" >+ point="org.eclipse.team.ui.teamContentProviders"> >+ <teamContentProvider >+ contentExtensionId="org.eclipse.team.ui.resourceContent" >+ icon="/$nl$/icons/full/obj/workspace_obj.gif" >+ modelProviderId="org.eclipse.core.resources.modelProvider" >+ preferencePage="org.eclipse.team.internal.ui.preferences.ResourceModelPreferencePage" >+ supportsFlatLayout="true"/> >+ </extension> >+ <extension >+ point="org.eclipse.team.core.storageMergers"> >+ <storageMerger >+ class="org.eclipse.team.internal.ui.mapping.TextStorageMerger" >+ extensions="txt" >+ id="org.eclipse.team.ui.textStorageMerger"/> >+ <contentTypeBinding >+ contentTypeId="org.eclipse.core.runtime.text" >+ storageMergerId="org.eclipse.team.ui.textStorageMerger"/> >+ </extension> >+ >+ <!-- *************** Activity Support **************** --> >+ <extension >+ point="org.eclipse.ui.activitySupport"> >+ <triggerPoint id="org.eclipse.team.ui.activityTriggerPoint"> >+ <hint >+ id="interactive" >+ value="true"/> >+ </triggerPoint> >+ </extension> >+ >+ <!-- *************** Menus **************** --> >+ <extension >+ point="org.eclipse.ui.menus"> >+ <menuContribution >+ locationURI="menu:project?after=additions"> >+ <!-- always enabled --> >+ <command >+ commandId="org.eclipse.team.ui.applyPatch" >+ label="%ApplyPatch.label" >+ mnemonic="%ApplyPatch.mnemonic" >+ style="push" >+ tooltip="%ApplyPatch.tooltip"> >+ <visibleWhen >+ checkEnabled="false"> >+ </visibleWhen> >+ </command> >+ </menuContribution> >+ <menuContribution >+ locationURI="menu:project?after=open.ext"> >+ <!-- enablement? --> >+ <command >+ commandId="org.eclipse.team.ui.configureProject" >+ id="org.eclipse.team.ui.ConfigureProject" >+ label="%ConfigureProject.label" >+ mnemonic="%ConfigureProject.mnemonic" >+ style="push" >+ tooltip="%ConfigureProject.tooltip"> >+ </command> >+ </menuContribution> >+ <menuContribution >+ locationURI="toolbar:org.eclipse.ui.main.toolbar"> >+ <toolbar >+ id="whatever"> >+ <command >+ commandId="org.eclipse.team.ui.synchronizeAll" >+ icon="$nl$/icons/full/elcl16/synch_participants.gif" >+ label="%Command.syncAll.name" >+ style="pulldown"> >+ </command> >+ </toolbar> >+ <!--toolbar >+ id="toolbar:org.eclipse.ui.main.toolbar?after=search"> >+ <command >+ commandId="org.eclipse.team.ui.synchronizeAll2" >+ icon="$nl$/icons/full/elcl16/synch_participants.gif" >+ label="%Command.syncAll.name" >+ style="pulldown"> >+ </command> >+ </toolbar--> >+ </menuContribution> >+ <menuContribution >+ locationURI="popup:org.eclipse.ui.popup.any?after=team.main"> >+ <!-- should be enabled only for IFiles with *.psf extension, multiselection is allowed --> >+ <command >+ commandId="org.eclipse.team.ui.importProjectSet" >+ label="%Command.importProjectSet.name" >+ style="push"> >+ </command> >+ </menuContribution> >+ <menuContribution >+ locationURI="popup:team.main?after=projectGroup"> >+ <command >+ commandId="org.eclipse.team.ui.configureProject" >+ id="nonbound.org.eclipse.team.ui.ConfigureProject" >+ label="%ConfigureProject.label" >+ mnemonic="%ConfigureProject.mnemonic" >+ style="push" >+ tooltip="%ConfigureProject.tooltip"> >+ </command> >+ </menuContribution> >+ <menuContribution >+ locationURI="popup:org.eclipse.ui.popup.any"> >+ <menu >+ id="team.main" >+ label="%TeamGroupMenu.label" >+ mnemonic="%TeamGroupMenu.mnemonic"> >+ <separator >+ name="group1" >+ visible="true"> >+ </separator> >+ <separator >+ name="group2" >+ visible="true"> >+ </separator> >+ <separator >+ name="group3" >+ visible="true"> >+ </separator> >+ <separator >+ name="group4" >+ visible="true"> >+ </separator> >+ <separator >+ name="group5" >+ visible="true"> >+ </separator> >+ <separator >+ name="group6" >+ visible="true"> >+ </separator> >+ <separator >+ name="group7" >+ visible="true"> >+ </separator> >+ <separator >+ name="group8" >+ visible="true"> >+ </separator> >+ <separator >+ name="group9" >+ visible="true"> >+ </separator> >+ <separator >+ name="group10" >+ visible="true"> >+ </separator> >+ <separator >+ name="targetGroup" >+ visible="true"> >+ </separator> >+ <separator >+ name="projectGroup" >+ visible="true"> >+ </separator> >+ </menu> >+ </menuContribution> >+ <menuContribution >+ locationURI="popup:compareWithMenu?after=compareWithGroup"> >+ <command >+ commandId="org.eclipse.team.ui.compareLocalHistory" >+ label="%CompareLocalHistory.label" >+ style="push" >+ tooltip="%CompareLocalHistory.tooltip"> >+ </command> >+ </menuContribution> >+ <menuContribution >+ locationURI="popup:team.main?after=group4"> >+ <command >+ commandId="org.eclipse.team.ui.showLocalHistory" >+ label="%ShowLocalHistory.label" >+ mnemonic="%ShowLocalHistory.mnemonic" >+ style="push" >+ > >+ </command> >+ </menuContribution> >+ <menuContribution >+ locationURI="popup:compareWithMenu?after=compareWithGroup"> >+ <command >+ commandId="org.eclipse.team.ui.compareLocalHistory" >+ label="%CompareLocalHistory.label" >+ mnemonic="%CompareLocalHistory.mnemonic" >+ style="push" >+ tooltip="%CompareLocalHistory.tooltip"> >+ </command> >+ </menuContribution> >+ </extension> >+ >+</plugin> >Index: src/org/eclipse/team/internal/ui/handlers/SynchronizeHandler.java >=================================================================== >RCS file: src/org/eclipse/team/internal/ui/handlers/SynchronizeHandler.java >diff -N src/org/eclipse/team/internal/ui/handlers/SynchronizeHandler.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/team/internal/ui/handlers/SynchronizeHandler.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+/******************************************************************************* >+ * Copyright (c) 2007 IBM Corporation and others. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * IBM Corporation - initial API and implementation >+ *******************************************************************************/ >+package org.eclipse.team.internal.ui.handlers; >+ >+import org.eclipse.core.commands.*; >+import org.eclipse.jface.dialogs.MessageDialog; >+import org.eclipse.ui.IWorkbenchWindow; >+import org.eclipse.ui.handlers.HandlerUtil; >+ >+public class SynchronizeHandler extends AbstractHandler { >+ >+ public Object execute(ExecutionEvent event) throws ExecutionException { >+ IWorkbenchWindow window = HandlerUtil >+ .getActiveWorkbenchWindowChecked(event); >+ MessageDialog.openInformation(window.getShell(), "Synchronize", >+ "Synchronize Handler Dialog!"); >+ >+ return null; >+ } >+ >+}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 173457
:
59139
|
59140
|
59355
|
59496