diff options
author | Jean Michel-Lemieux | 2003-10-14 20:21:02 +0000 |
---|---|---|
committer | Jean Michel-Lemieux | 2003-10-14 20:21:02 +0000 |
commit | 4dad004d73d63cf1aa95a6e30af6bcd9072e8d7f (patch) | |
tree | 7cbda537d15c77adcae59b1ab6dd4147b2e0da8c | |
parent | e48b69ed99cf4c7b2923bce0a76fed7ee2b10240 (diff) | |
download | eclipse.platform.team-4dad004d73d63cf1aa95a6e30af6bcd9072e8d7f.tar.gz eclipse.platform.team-4dad004d73d63cf1aa95a6e30af6bcd9072e8d7f.tar.xz eclipse.platform.team-4dad004d73d63cf1aa95a6e30af6bcd9072e8d7f.zip |
*** empty log message ***
14 files changed, 1097 insertions, 110 deletions
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/NewSynchronizeView.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/NewSynchronizeView.java new file mode 100644 index 000000000..92c0cd2e7 --- /dev/null +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/NewSynchronizeView.java @@ -0,0 +1,369 @@ +/******************************************************************************* + * Copyright (c) 2000, 2003 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Common Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/cpl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.team.internal.ui.sync.pages; + +import java.util.HashMap; +import java.util.Map; + +import org.eclipse.core.resources.IResource; +import org.eclipse.jface.action.IToolBarManager; +import org.eclipse.jface.action.MenuManager; +import org.eclipse.jface.util.IPropertyChangeListener; +import org.eclipse.jface.util.PropertyChangeEvent; +import org.eclipse.jface.viewers.IBasicPropertyConstants; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Menu; +import org.eclipse.team.core.subscribers.TeamSubscriber; +import org.eclipse.team.ui.TeamUI; +import org.eclipse.team.ui.sync.INewSynchronizeView; +import org.eclipse.team.ui.sync.ISynchronizeManager; +import org.eclipse.team.ui.sync.ISynchronizePageListener; +import org.eclipse.team.ui.sync.ISynchronizeViewPage; +import org.eclipse.ui.IWorkbenchPart; +import org.eclipse.ui.IWorkingSet; +import org.eclipse.ui.part.IPage; +import org.eclipse.ui.part.IPageBookViewPage; +import org.eclipse.ui.part.MessagePage; +import org.eclipse.ui.part.PageBook; +import org.eclipse.ui.part.PageBookView; + +public class NewSynchronizeView extends PageBookView implements INewSynchronizeView, ISynchronizePageListener, IPropertyChangeListener { + + /** + * The console being displayed, or <code>null</code> if none + */ + private ISynchronizeViewPage fActivePage = null; + + /** + * Map of consoles to dummy console parts (used to close pages) + */ + private Map fPageToPart; + + /** + * Map of parts to consoles + */ + private Map fPartToPage; + + // actions + private boolean isAvailable() { + return getPageBook() != null && !getPageBook().isDisposed(); + } + + /* (non-Javadoc) + * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent) + */ + public void propertyChange(PropertyChangeEvent event) { + Object source = event.getSource(); + if (source instanceof ISynchronizeViewPage && event.getProperty().equals(IBasicPropertyConstants.P_TEXT)) { + if (source.equals(getSynchronizeTarget())) { + updateTitle(); + } + } + + } + + /* (non-Javadoc) + * @see org.eclipse.ui.IPartListener#partClosed(org.eclipse.ui.IWorkbenchPart) + */ + public void partClosed(IWorkbenchPart part) { + super.partClosed(part); + } + + /* (non-Javadoc) + * @see org.eclipse.debug.internal.ui.console.IConsoleView#getConsole() + */ + public ISynchronizeViewPage getSynchronizeTarget() { + return fActivePage; + } + + /* (non-Javadoc) + * @see org.eclipse.ui.part.PageBookView#showPageRec(org.eclipse.ui.part.PageBookView.PageRec) + */ + protected void showPageRec(PageRec pageRec) { + super.showPageRec(pageRec); + fActivePage = (ISynchronizeViewPage)fPartToPage.get(pageRec.part); + updateTitle(); + } + + /** + * Updates the view title based on the active console + */ + protected void updateTitle() { + ISynchronizeViewPage console = getSynchronizeTarget(); + if (console == null) { + setTitle("Synchronize View"); + } else { + setTitle("Synch"); + } + } + + /* (non-Javadoc) + * @see org.eclipse.ui.part.PageBookView#doDestroyPage(org.eclipse.ui.IWorkbenchPart, org.eclipse.ui.part.PageBookView.PageRec) + */ + protected void doDestroyPage(IWorkbenchPart part, PageRec pageRecord) { + IPage page = pageRecord.page; + page.dispose(); + pageRecord.dispose(); + + ISynchronizeViewPage console = (ISynchronizeViewPage)fPartToPage.get(part); + console.removePropertyChangeListener(this); + + // empty cross-reference cache + fPartToPage.remove(part); + fPageToPart.remove(console); + } + + /* (non-Javadoc) + * @see org.eclipse.ui.part.PageBookView#doCreatePage(org.eclipse.ui.IWorkbenchPart) + */ + protected PageRec doCreatePage(IWorkbenchPart dummyPart) { + SynchronizeViewWorkbenchPart part = (SynchronizeViewWorkbenchPart)dummyPart; + ISynchronizeViewPage console = part.getConsole(); + IPageBookViewPage page = console.createPage(this); + initPage(page); + page.createControl(getPageBook()); + console.addPropertyChangeListener(this); + PageRec rec = new PageRec(dummyPart, page); + return rec; + } + + /* (non-Javadoc) + * @see org.eclipse.ui.part.PageBookView#isImportant(org.eclipse.ui.IWorkbenchPart) + */ + protected boolean isImportant(IWorkbenchPart part) { + return part instanceof SynchronizeViewWorkbenchPart; + } + + /* (non-Javadoc) + * @see org.eclipse.ui.IWorkbenchPart#dispose() + */ + public void dispose() { + super.dispose(); + TeamUI.getSynchronizeManager().removeSynchronizePageListener(this); + } + + /* (non-Javadoc) + * @see org.eclipse.ui.part.PageBookView#createDefaultPage(org.eclipse.ui.part.PageBook) + */ + protected IPage createDefaultPage(PageBook book) { + MessagePage page = new MessagePage(); + page.createControl(getPageBook()); + initPage(page); + return page; + } + + /* (non-Javadoc) + * @see org.eclipse.ui.console.IConsoleListener#consolesAdded(org.eclipse.ui.console.IConsole[]) + */ + public void consolesAdded(final ISynchronizeViewPage[] consoles) { + if (isAvailable()) { + Runnable r = new Runnable() { + public void run() { + for (int i = 0; i < consoles.length; i++) { + if (isAvailable()) { + ISynchronizeViewPage console = consoles[i]; + SynchronizeViewWorkbenchPart part = new SynchronizeViewWorkbenchPart(console, getSite()); + fPageToPart.put(console, part); + fPartToPage.put(part, console); + partActivated(part); + } + } + } + }; + asyncExec(r); + } + } + + /* (non-Javadoc) + * @see org.eclipse.ui.console.IConsoleListener#consolesRemoved(org.eclipse.ui.console.IConsole[]) + */ + public void consolesRemoved(final ISynchronizeViewPage[] consoles) { + if (isAvailable()) { + Runnable r = new Runnable() { + public void run() { + for (int i = 0; i < consoles.length; i++) { + if (isAvailable()) { + ISynchronizeViewPage console = consoles[i]; + SynchronizeViewWorkbenchPart part = (SynchronizeViewWorkbenchPart)fPageToPart.get(console); + if (part != null) { + partClosed(part); + } + if (getSynchronizeTarget() == null) { + ISynchronizeViewPage[] available = TeamUI.getSynchronizeManager().getSynchronizePages(); + if (available.length > 0) { + display(available[available.length - 1]); + } + } + } + } + } + }; + asyncExec(r); + } + } + + /** + * Constructs a console view + */ + public NewSynchronizeView() { + super(); + fPageToPart = new HashMap(); + fPartToPage = new HashMap(); + } + + /** + * Creates a pop-up menu on the given control. The menu + * is registered with this view's site, such that other + * plug-ins may contribute to the menu. + * + * @param menuControl the control with which the pop-up + * menu will be associated with. + */ + protected void createContextMenu(Control menuControl) { + MenuManager menuMgr= new MenuManager("#PopUp"); //$NON-NLS-1$ + menuMgr.setRemoveAllWhenShown(true); + Menu menu= menuMgr.createContextMenu(menuControl); + menuControl.setMenu(menu); + + // register the context menu such that other plugins may contribute to it + if (getSite() != null) { + getSite().registerContextMenu(menuMgr, null); + } + } + + protected void createActions() { + //fPinAction = new PinConsoleAction(this); + //fDisplayConsoleAction = new ConsoleDropDownAction(this); + } + + protected void configureToolBar(IToolBarManager mgr) { +// mgr.add(new Separator(IConsoleConstants.LAUNCH_GROUP)); +// mgr.add(new Separator(IConsoleConstants.OUTPUT_GROUP)); +// mgr.add(fPinAction); +// mgr.add(fDisplayConsoleAction); + } + + /* (non-Javadoc) + * @see org.eclipse.ui.console.IConsoleView#display(org.eclipse.ui.console.IConsole) + */ + public void display(ISynchronizeViewPage console) { + SynchronizeViewWorkbenchPart part = (SynchronizeViewWorkbenchPart)fPageToPart.get(console); + if (part != null) { + partActivated(part); + } + } + + /* (non-Javadoc) + * @see org.eclipse.ui.part.PageBookView#getBootstrapPart() + */ + protected IWorkbenchPart getBootstrapPart() { + return null; + } + + /** + * Registers the given runnable with the display + * associated with this view's control, if any. + * + * @see org.eclipse.swt.widgets.Display#asyncExec(java.lang.Runnable) + */ + public void asyncExec(Runnable r) { + if (isAvailable()) { + getPageBook().getDisplay().asyncExec(r); + } + } + + /** + * Creates this view's underlying viewer and actions. + * Hooks a pop-up menu to the underlying viewer's control, + * as well as a key listener. When the delete key is pressed, + * the <code>REMOVE_ACTION</code> is invoked. Hooks help to + * this view. Subclasses must implement the following methods + * which are called in the following order when a view is + * created:<ul> + * <li><code>createViewer(Composite)</code> - the context + * menu is hooked to the viewer's control.</li> + * <li><code>createActions()</code></li> + * <li><code>configureToolBar(IToolBarManager)</code></li> + * <li><code>getHelpContextId()</code></li> + * </ul> + * @see IWorkbenchPart#createPartControl(Composite) + */ + public void createPartControl(Composite parent) { + //registerPartListener(); + super.createPartControl(parent); + createActions(); + IToolBarManager tbm= getViewSite().getActionBars().getToolBarManager(); + configureToolBar(tbm); + updateForExistingConsoles(); + getViewSite().getActionBars().updateActionBars(); + } + + /** + * Initialize for existing consoles + */ + private void updateForExistingConsoles() { + ISynchronizeManager manager = TeamUI.getSynchronizeManager(); + // create pages for consoles + ISynchronizeViewPage[] consoles = manager.getSynchronizePages(); + consolesAdded(consoles); + // add as a listener + manager.addSynchronizePageListener(this); + } + + /* (non-Javadoc) + * @see org.eclipse.team.ui.sync.ISynchronizeView#refreshWithRemote(org.eclipse.team.core.subscribers.TeamSubscriber, org.eclipse.core.resources.IResource[]) + */ + public void refreshWithRemote(TeamSubscriber subscriber, IResource[] resources) { + // TODO Auto-generated method stub + + } + + /* (non-Javadoc) + * @see org.eclipse.team.ui.sync.ISynchronizeView#refreshWithRemote(org.eclipse.team.core.subscribers.TeamSubscriber) + */ + public void refreshWithRemote(TeamSubscriber subscriber) { + // TODO Auto-generated method stub + + } + + /* (non-Javadoc) + * @see org.eclipse.team.ui.sync.ISynchronizeView#refreshWithRemote() + */ + public void refreshWithRemote() { + // TODO Auto-generated method stub + + } + + /* (non-Javadoc) + * @see org.eclipse.team.ui.sync.ISynchronizeView#getCurrentViewType() + */ + public int getCurrentViewType() { + // TODO Auto-generated method stub + return 0; + } + + /* (non-Javadoc) + * @see org.eclipse.team.ui.sync.ISynchronizeView#setWorkingSet(org.eclipse.ui.IWorkingSet) + */ + public void setWorkingSet(IWorkingSet workingSet) { + // TODO Auto-generated method stub + + } + + /* (non-Javadoc) + * @see org.eclipse.team.ui.sync.ISynchronizeView#setMode(int) + */ + public void setMode(int mode) { + // TODO Auto-generated method stub + + } +}
\ No newline at end of file diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/SubscriberSynchronizeViewPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/SubscriberSynchronizeViewPage.java new file mode 100644 index 000000000..a4d5d2466 --- /dev/null +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/SubscriberSynchronizeViewPage.java @@ -0,0 +1,76 @@ +package org.eclipse.team.internal.ui.sync.pages; + +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.team.core.subscribers.TeamSubscriber; +import org.eclipse.team.ui.sync.INewSynchronizeView; +import org.eclipse.ui.IActionBars; +import org.eclipse.ui.PartInitException; +import org.eclipse.ui.part.IPageBookViewPage; +import org.eclipse.ui.part.IPageSite; + +public class SubscriberSynchronizeViewPage implements IPageBookViewPage { + + private IPageSite site; + private TeamSubscriber subscriber; + private INewSynchronizeView view; + + public SubscriberSynchronizeViewPage(TeamSubscriber subscriber, INewSynchronizeView view) { + this.view = view; + this.subscriber = subscriber; + } + + /* (non-Javadoc) + * @see org.eclipse.ui.part.IPageBookViewPage#getSite() + */ + public IPageSite getSite() { + return site; + } + + /* (non-Javadoc) + * @see org.eclipse.ui.part.IPageBookViewPage#init(org.eclipse.ui.part.IPageSite) + */ + public void init(IPageSite site) throws PartInitException { + this.site = site; + } + + /* (non-Javadoc) + * @see org.eclipse.ui.part.IPage#createControl(org.eclipse.swt.widgets.Composite) + */ + public void createControl(Composite parent) { + // TODO Auto-generated method stub + + } + + /* (non-Javadoc) + * @see org.eclipse.ui.part.IPage#dispose() + */ + public void dispose() { + // TODO Auto-generated method stub + + } + + /* (non-Javadoc) + * @see org.eclipse.ui.part.IPage#getControl() + */ + public Control getControl() { + // TODO Auto-generated method stub + return null; + } + + /* (non-Javadoc) + * @see org.eclipse.ui.part.IPage#setActionBars(org.eclipse.ui.IActionBars) + */ + public void setActionBars(IActionBars actionBars) { + // TODO Auto-generated method stub + + } + + /* (non-Javadoc) + * @see org.eclipse.ui.part.IPage#setFocus() + */ + public void setFocus() { + // TODO Auto-generated method stub + + } +} diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/SynchronizeManager.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/SynchronizeManager.java new file mode 100644 index 000000000..b309ad5e3 --- /dev/null +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/SynchronizeManager.java @@ -0,0 +1,160 @@ +/******************************************************************************* + * Copyright (c) 2000, 2003 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Common Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/cpl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.team.internal.ui.sync.pages; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.core.runtime.ISafeRunnable; +import org.eclipse.core.runtime.Platform; +import org.eclipse.jface.util.ListenerList; +import org.eclipse.team.ui.sync.ISynchronizeManager; +import org.eclipse.team.ui.sync.ISynchronizePageListener; +import org.eclipse.team.ui.sync.ISynchronizeViewPage; + +public class SynchronizeManager implements ISynchronizeManager { + /** + * Synchronize View page listeners + */ + private ListenerList fListeners = null; + + /** + * List of registered synchronize view pages + */ + private List synchronizePages = new ArrayList(10); + + // change notification constants + private final static int ADDED = 1; + private final static int REMOVED = 2; + + /** + * Notifies a console listener of additions or removals + */ + class SynchronizeViewPageNotifier implements ISafeRunnable { + + private ISynchronizePageListener fListener; + private int fType; + private ISynchronizeViewPage[] fChanged; + + /* (non-Javadoc) + * @see org.eclipse.core.runtime.ISafeRunnable#handleException(java.lang.Throwable) + */ + public void handleException(Throwable exception) { + // TODO: + //IStatus status = new Status(IStatus.ERROR, ConsolePlugin.getUniqueIdentifier(), IConsoleConstants.INTERNAL_ERROR, ConsoleMessages.getString("ConsoleManager.0"), exception); //$NON-NLS-1$ + //ConsolePlugin.log(status); + } + + /* (non-Javadoc) + * @see org.eclipse.core.runtime.ISafeRunnable#run() + */ + public void run() throws Exception { + switch (fType) { + case ADDED: + fListener.consolesAdded(fChanged); + break; + case REMOVED: + fListener.consolesRemoved(fChanged); + break; + } + } + + /** + * Notifies the given listener of the adds/removes + * + * @param consoles the consoles that changed + * @param update the type of change + */ + public void notify(ISynchronizeViewPage[] consoles, int update) { + if (fListeners == null) { + return; + } + fChanged = consoles; + fType = update; + Object[] copiedListeners= fListeners.getListeners(); + for (int i= 0; i < copiedListeners.length; i++) { + fListener = (ISynchronizePageListener)copiedListeners[i]; + Platform.run(this); + } + fChanged = null; + fListener = null; + } + } + + /* (non-Javadoc) + * @see org.eclipse.ui.console.IConsoleManager#addConsoleListener(org.eclipse.ui.console.IConsoleListener) + */ + public void addSynchronizePageListener(ISynchronizePageListener listener) { + if (fListeners == null) { + fListeners = new ListenerList(5); + } + fListeners.add(listener); + } + + /* (non-Javadoc) + * @see org.eclipse.ui.console.IConsoleManager#removeConsoleListener(org.eclipse.ui.console.IConsoleListener) + */ + public void removeSynchronizePageListener(ISynchronizePageListener listener) { + if (fListeners != null) { + fListeners.remove(listener); + } + } + + /* (non-Javadoc) + * @see org.eclipse.ui.console.IConsoleManager#addConsoles(org.eclipse.ui.console.IConsole[]) + */ + public synchronized void addSynchronizePages(ISynchronizeViewPage[] consoles) { + List added = new ArrayList(consoles.length); + for (int i = 0; i < consoles.length; i++) { + ISynchronizeViewPage console = consoles[i]; + if (!synchronizePages.contains(console)) { + synchronizePages.add(console); + added.add(console); + } + } + if (!added.isEmpty()) { + fireUpdate((ISynchronizeViewPage[])added.toArray(new ISynchronizeViewPage[added.size()]), ADDED); + } + } + + /* (non-Javadoc) + * @see org.eclipse.ui.console.IConsoleManager#removeConsoles(org.eclipse.ui.console.IConsole[]) + */ + public synchronized void removeSynchronizePages(ISynchronizeViewPage[] consoles) { + List removed = new ArrayList(consoles.length); + for (int i = 0; i < consoles.length; i++) { + ISynchronizeViewPage console = consoles[i]; + if (synchronizePages.remove(console)) { + removed.add(console); + } + } + if (!removed.isEmpty()) { + fireUpdate((ISynchronizeViewPage[])removed.toArray(new ISynchronizeViewPage[removed.size()]), REMOVED); + } + } + + /* (non-Javadoc) + * @see org.eclipse.ui.console.IConsoleManager#getConsoles() + */ + public synchronized ISynchronizeViewPage[] getSynchronizePages() { + return (ISynchronizeViewPage[])synchronizePages.toArray(new ISynchronizeViewPage[synchronizePages.size()]); + } + + /** + * Fires notification. + * + * @param consoles consoles added/removed + * @param type ADD or REMOVE + */ + private void fireUpdate(ISynchronizeViewPage[] consoles, int type) { + new SynchronizeViewPageNotifier().notify(consoles, type); + } +} diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/SynchronizeViewWorkbenchPart.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/SynchronizeViewWorkbenchPart.java new file mode 100644 index 000000000..028515156 --- /dev/null +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/SynchronizeViewWorkbenchPart.java @@ -0,0 +1,125 @@ +/******************************************************************************* + * Copyright (c) 2000, 2003 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Common Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/cpl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.team.internal.ui.sync.pages; + +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.team.ui.sync.ISynchronizeViewPage; +import org.eclipse.ui.IPropertyListener; +import org.eclipse.ui.IWorkbenchPart; +import org.eclipse.ui.IWorkbenchPartSite; + +/** + * Fake part to use as keys in page book for console pages + */ +public class SynchronizeViewWorkbenchPart implements IWorkbenchPart { + + private ISynchronizeViewPage fConsole = null; + private IWorkbenchPartSite fSite = null; + + /* (non-Javadoc) + * @see java.lang.Object#equals(java.lang.Object) + */ + public boolean equals(Object obj) { + return (obj instanceof SynchronizeViewWorkbenchPart) && + fConsole.equals(((SynchronizeViewWorkbenchPart)obj).fConsole); + } + + /* (non-Javadoc) + * @see java.lang.Object#hashCode() + */ + public int hashCode() { + return fConsole.hashCode(); + } + + /** + * Constructs a part for the given console that binds to the given + * site + */ + public SynchronizeViewWorkbenchPart(ISynchronizeViewPage console, IWorkbenchPartSite site) { + fConsole = console; + fSite = site; + } + + /* (non-Javadoc) + * @see org.eclipse.ui.IWorkbenchPart#addPropertyListener(org.eclipse.ui.IPropertyListener) + */ + public void addPropertyListener(IPropertyListener listener) { + } + + /* (non-Javadoc) + * @see org.eclipse.ui.IWorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite) + */ + public void createPartControl(Composite parent) { + } + + /* (non-Javadoc) + * @see org.eclipse.ui.IWorkbenchPart#dispose() + */ + public void dispose() { + } + + /* (non-Javadoc) + * @see org.eclipse.ui.IWorkbenchPart#getSite() + */ + public IWorkbenchPartSite getSite() { + return fSite; + } + + /* (non-Javadoc) + * @see org.eclipse.ui.IWorkbenchPart#getTitle() + */ + public String getTitle() { + return ""; //$NON-NLS-1$ + } + + /* (non-Javadoc) + * @see org.eclipse.ui.IWorkbenchPart#getTitleImage() + */ + public Image getTitleImage() { + return null; + } + + /* (non-Javadoc) + * @see org.eclipse.ui.IWorkbenchPart#getTitleToolTip() + */ + public String getTitleToolTip() { + return ""; //$NON-NLS-1$ + } + + /* (non-Javadoc) + * @see org.eclipse.ui.IWorkbenchPart#removePropertyListener(org.eclipse.ui.IPropertyListener) + */ + public void removePropertyListener(IPropertyListener listener) { + } + + /* (non-Javadoc) + * @see org.eclipse.ui.IWorkbenchPart#setFocus() + */ + public void setFocus() { + } + + /* (non-Javadoc) + * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class) + */ + public Object getAdapter(Class adapter) { + return null; + } + + /** + * Returns the console associated with this part. + * + * @return console associated with this part + */ + protected ISynchronizeViewPage getConsole() { + return fConsole; + } +}
\ No newline at end of file diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/views/SynchronizeView.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/views/SynchronizeView.java index 27778a51c..29c2528a0 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/views/SynchronizeView.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/views/SynchronizeView.java @@ -67,7 +67,6 @@ import org.eclipse.team.internal.ui.sync.actions.SyncViewerActions; import org.eclipse.team.internal.ui.sync.sets.ISyncSetChangedListener; import org.eclipse.team.internal.ui.sync.sets.SubscriberInput; import org.eclipse.team.internal.ui.sync.sets.SyncSetChangedEvent; -import org.eclipse.team.ui.sync.ISynchronizeTarget; import org.eclipse.team.ui.sync.ISynchronizeView; import org.eclipse.team.ui.sync.actions.AndSyncInfoFilter; import org.eclipse.team.ui.sync.actions.PseudoConflictFilter; @@ -87,14 +86,14 @@ import org.eclipse.ui.PlatformUI; import org.eclipse.ui.WorkbenchException; import org.eclipse.ui.actions.ActionContext; import org.eclipse.ui.part.IShowInSource; -import org.eclipse.ui.part.PageBookView; import org.eclipse.ui.part.ShowInContext; +import org.eclipse.ui.part.ViewPart; import org.eclipse.ui.views.navigator.ResourceSorter; /** * The Team Synchronization view. */ -public class SynchronizeView extends PageBookView implements ITeamResourceChangeListener, ISyncSetChangedListener, ISynchronizeView { +public class SynchronizeView extends ViewPart implements ITeamResourceChangeListener, ISyncSetChangedListener, ISynchronizeView { // The property id for <code>getCurrentViewType</code>. public static final int PROP_VIEWTYPE = 1; @@ -721,8 +720,8 @@ public class SynchronizeView extends PageBookView implements ITeamResourceChange } } - public void display(ISynchronizeTarget synchronizeTarget) { - activateSubscriber(synchronizeTarget); + public void selectSubscriber(TeamSubscriber subscriber) { + activateSubscriber(subscriber); } /** diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamUI.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamUI.java index ce9888b57..d75e632a9 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamUI.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamUI.java @@ -12,7 +12,9 @@ package org.eclipse.team.ui; import org.eclipse.jface.util.IPropertyChangeListener; import org.eclipse.team.internal.ui.TeamUIPlugin; +import org.eclipse.team.internal.ui.sync.pages.SynchronizeManager; import org.eclipse.team.internal.ui.sync.views.SynchronizeView; +import org.eclipse.team.ui.sync.ISynchronizeManager; import org.eclipse.team.ui.sync.ISynchronizeView; import org.eclipse.ui.IWorkbenchPage; @@ -20,9 +22,21 @@ import org.eclipse.ui.IWorkbenchPage; * TeamUI contains public API for generic UI-based Team functionality */ public class TeamUI { + + // manages synchronize pages + private static ISynchronizeManager synchronizeManager; + // property change types public static String GLOBAL_IGNORES_CHANGED = "global_ignores_changed"; //$NON-NLS-1$ + + public static ISynchronizeManager getSynchronizeManager() { + if (synchronizeManager == null) { + synchronizeManager = new SynchronizeManager(); + } + return synchronizeManager; + } + /** * Makes the synchronize view visible in the active page and returns a handle * to the view. diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/AbstractSynchronizeViewPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/AbstractSynchronizeViewPage.java new file mode 100644 index 000000000..5bac6c4ea --- /dev/null +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/AbstractSynchronizeViewPage.java @@ -0,0 +1,204 @@ +/******************************************************************************* + * Copyright (c) 2000, 2003 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Common Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/cpl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.team.ui.sync; + +import org.eclipse.core.runtime.ISafeRunnable; +import org.eclipse.core.runtime.Platform; +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.jface.util.IPropertyChangeListener; +import org.eclipse.jface.util.ListenerList; +import org.eclipse.jface.util.PropertyChangeEvent; +import org.eclipse.jface.viewers.IBasicPropertyConstants; + +public abstract class AbstractSynchronizeViewPage implements ISynchronizeViewPage { + + // property listeners + private ListenerList fListeners; + + private String fName = null; + + private ImageDescriptor fImageDescriptor = null; + + /** + * Used to notify this console of lifecycle methods <code>init()</code> + * and <code>dispose()</code>. + */ + class Lifecycle implements ISynchronizePageListener { + + /* (non-Javadoc) + * @see org.eclipse.ui.console.IConsoleListener#consolesAdded(org.eclipse.ui.console.IConsole[]) + */ + public void consolesAdded(ISynchronizeViewPage[] consoles) { + for (int i = 0; i < consoles.length; i++) { + ISynchronizeViewPage console = consoles[i]; + if (console == AbstractSynchronizeViewPage.this) { + init(); + } + } + + } + + /* (non-Javadoc) + * @see org.eclipse.ui.console.IConsoleListener#consolesRemoved(org.eclipse.ui.console.IConsole[]) + */ + public void consolesRemoved(ISynchronizeViewPage[] consoles) { + for (int i = 0; i < consoles.length; i++) { + ISynchronizeViewPage console = consoles[i]; + if (console == AbstractSynchronizeViewPage.this) { + //ConsolePlugin.getDefault().getConsoleManager().removeConsoleListener(this); + dispose(); + } + } + } + } + + /** + * Notifies listeners of property changes, handling any exceptions + */ + class PropertyNotifier implements ISafeRunnable { + + private IPropertyChangeListener fListener; + private PropertyChangeEvent fEvent; + + /** + * @see org.eclipse.core.runtime.ISafeRunnable#handleException(java.lang.Throwable) + */ + public void handleException(Throwable exception) { + // TODO: + //IStatus status = new Status(IStatus.ERROR, ConsolePlugin.getUniqueIdentifier(), IConsoleConstants.INTERNAL_ERROR, ConsoleMessages.getString("AbstractConsole.0"), exception); //$NON-NLS-1$ + //ConsolePlugin.log(status); + } + + /** + * @see org.eclipse.core.runtime.ISafeRunnable#run() + */ + public void run() throws Exception { + fListener.propertyChange(fEvent); + } + + /** + * Notifies listeners of the property change + * + * @param property the property that has changed + */ + public void notify(PropertyChangeEvent event) { + if (fListeners == null) { + return; + } + fEvent = event; + Object[] copiedListeners= fListeners.getListeners(); + for (int i= 0; i < copiedListeners.length; i++) { + fListener = (IPropertyChangeListener)copiedListeners[i]; + Platform.run(this); + } + fListener = null; + } + } + + /** + * Constructs a new console with the given name and image. + * + * @param name console name, cannot be <code>null</code> + * @param imageDescriptor image descriptor, or <code>null</code> if none + */ + public AbstractSynchronizeViewPage(String name, ImageDescriptor imageDescriptor) { + setName(name); + setImageDescriptor(imageDescriptor); + //ConsolePlugin.getDefault().getConsoleManager().addConsoleListener(new Lifecycle()); + } + + /* (non-Javadoc) + * @see org.eclipse.ui.console.IConsole#getName() + */ + public String getName() { + return fName; + } + + /** + * Sets the name of this console to the specified value and notifies + * property listeners of the change. + * + * @param name the new name + */ + protected void setName(String name) { + String old = fName; + fName = name; + firePropertyChange(this, IBasicPropertyConstants.P_TEXT, old, name); + } + + /* (non-Javadoc) + * @see org.eclipse.ui.console.IConsole#getImageDescriptor() + */ + public ImageDescriptor getImageDescriptor() { + return fImageDescriptor; + } + + /** + * Sets the image descriptor for this console to the specified value and notifies + * property listeners of the change. + * + * @param imageDescriptor the new image descriptor + */ + protected void setImageDescriptor(ImageDescriptor imageDescriptor) { + ImageDescriptor old = fImageDescriptor; + fImageDescriptor =imageDescriptor; + firePropertyChange(this, IBasicPropertyConstants.P_IMAGE, old, imageDescriptor); + } + + /* (non-Javadoc) + * @see org.eclipse.ui.console.IConsole#addPropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener) + */ + public void addPropertyChangeListener(IPropertyChangeListener listener) { + if (fListeners == null) { + fListeners = new ListenerList(); + } + fListeners.add(listener); + } + + /* (non-Javadoc) + * @see org.eclipse.ui.console.IConsole#removePropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener) + */ + public void removePropertyChangeListener(IPropertyChangeListener listener) { + if (fListeners != null) { + fListeners.remove(listener); + } + } + + /** + * Notify all listeners that the given property has changed. + * + * @param source the object on which a property has changed + * @param property identifier of the property that has changed + * @param oldValue the old value of the property, or <code>null</code> + * @param newValue the new value of the property, or <code>null</code> + */ + public void firePropertyChange(Object source, String property, Object oldValue, Object newValue) { + if (fListeners == null) { + return; + } + PropertyNotifier notifier = new PropertyNotifier(); + notifier.notify(new PropertyChangeEvent(source, property, oldValue, newValue)); + } + + /** + * Called when this console is added to the console manager. Default + * implementation does nothing. Subclasses may override. + */ + protected void init() { + } + + /** + * Called when this console is removed from the console manager. Default + * implementation does nothing. Subclasses may override. + */ + protected void dispose() { + } +} diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/INewSynchronizeView.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/INewSynchronizeView.java new file mode 100644 index 000000000..178d438c3 --- /dev/null +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/INewSynchronizeView.java @@ -0,0 +1,88 @@ +/******************************************************************************* + * Copyright (c) 2000, 2003 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Common Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/cpl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.team.ui.sync; + +import org.eclipse.core.resources.IResource; +import org.eclipse.team.core.subscribers.TeamSubscriber; +import org.eclipse.ui.IViewPart; +import org.eclipse.ui.IWorkingSet; + +/** + * A view that displays synchronization targets that are registered with the + * synchronize view manager. + * <p> + * Clients are not intended to implement this interface. + * </p> + * + * @since 3.0 + */ +public interface INewSynchronizeView extends IViewPart { + + // TODO: I would like to make modes an optional + // part of the synchronize targets and allow them to configure their uses. + public final static int INCOMING_MODE = 1; + public final static int OUTGOING_MODE = 2; + public final static int BOTH_MODE = 3; + public final static int CONFLICTING_MODE = 4; + + /** + * Called to set the current selection in the sync viewer for the given + * subscriber. The viewType parameter determines in which configuration of + * the view the selection should be made in. If there are no resources + * passed in the given subscriber is activate. + * + * @param resources + * the resources to select + * @param viewType + * the view configuration in which to select the resources + */ + public void display(ISynchronizeViewPage synchronizeTarget); + + /** + * Returns the synchronization target currently being displayed. + * + * @return the synchronize target currently being displayed, or <code>null</code> + * if none + */ + public ISynchronizeViewPage getSynchronizeTarget(); + + /** + * Refreshes the resources from the specified subscriber. The working set + * or filters applied to the synchronize view are ignored. + */ + public void refreshWithRemote(TeamSubscriber subscriber, IResource[] resources); + + /** + * Refreshes the resources in the current input for the given subscriber. + */ + public void refreshWithRemote(TeamSubscriber subscriber); + + /** + * Refreshes the active subscriber. + */ + public void refreshWithRemote(); + + /** + * Returns the current view configuration. + */ + public int getCurrentViewType(); + + /** + * Sets the working set used by the view to the given working set + */ + public void setWorkingSet(IWorkingSet workingSet); + + /** + * Sets the current mode shown in the sync view. Valid modes are: + * INCOMING_MODE, OUTGOING_MODE, BOTH_MODE, CONFLICTING_MODE + */ + public void setMode(int mode); +}
\ No newline at end of file diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/ISynchronizeTargetManager.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/ISynchronizeManager.java index c2f985b11..ea05f5c6e 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/ISynchronizeTargetManager.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/ISynchronizeManager.java @@ -11,13 +11,13 @@ package org.eclipse.team.ui.sync; /** - * Manages synchronization targets. + * Manages synchronization pages. * <p> * Clients are not intended to implement this interface. * </p> * @since 3.0 */ -public interface ISynchronizeTargetManager { +public interface ISynchronizeManager { /** * Registers the given listener for console notifications. Has @@ -25,7 +25,7 @@ public interface ISynchronizeTargetManager { * * @param listener listener to register */ - public void addConsoleListener(ISynchronizeTargetListener listener); + public void addSynchronizePageListener(ISynchronizePageListener listener); /** * Deregisters the given listener for console notifications. Has @@ -33,7 +33,7 @@ public interface ISynchronizeTargetManager { * * @param listener listener to deregister */ - public void removeConsoleListener(ISynchronizeTargetListener listener); + public void removeSynchronizePageListener(ISynchronizePageListener listener); /** * Adds the given consoles to the console manager. Has no effect for @@ -42,7 +42,7 @@ public interface ISynchronizeTargetManager { * * @param consoles consoles to add */ - public void addConsoles(ISynchronizeTarget[] consoles); + public void addSynchronizePages(ISynchronizeViewPage[] consoles); /** * Removes the given consoles from the console manager. If the consoles are @@ -50,12 +50,12 @@ public interface ISynchronizeTargetManager { * * @param consoles consoles to remove */ - public void removeConsoles(ISynchronizeTarget[] consoles); + public void removeSynchronizePages(ISynchronizeViewPage[] consoles); /** * Returns a collection of consoles registered with the console manager. * * @return a collection of consoles registered with the console manager */ - public ISynchronizeTarget[] getConsoles(); + public ISynchronizeViewPage[] getSynchronizePages(); } diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/ISynchronizeTargetListener.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/ISynchronizePageListener.java index 6d63f37bd..d5195b784 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/ISynchronizeTargetListener.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/ISynchronizePageListener.java @@ -18,7 +18,7 @@ package org.eclipse.team.ui.sync; * </p> * @since 3.0 */ -public interface ISynchronizeTargetListener { +public interface ISynchronizePageListener { /** * Notification the given consoles have been added to the console @@ -26,7 +26,7 @@ public interface ISynchronizeTargetListener { * * @param consoles added consoles */ - public void consolesAdded(ISynchronizeTarget[] synchronizeTargets); + public void consolesAdded(ISynchronizeViewPage[] synchronizeTargets); /** * Notification the given consoles have been removed from the @@ -34,6 +34,6 @@ public interface ISynchronizeTargetListener { * * @param consoles removed consoles */ - public void consolesRemoved(ISynchronizeTarget[] synchronizeTargets); + public void consolesRemoved(ISynchronizeViewPage[] synchronizeTargets); } diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/ISynchronizeView.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/ISynchronizeView.java index 2f394c713..93368a08f 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/ISynchronizeView.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/ISynchronizeView.java @@ -12,64 +12,40 @@ package org.eclipse.team.ui.sync; import org.eclipse.core.resources.IResource; import org.eclipse.team.core.subscribers.TeamSubscriber; -import org.eclipse.ui.IViewPart; import org.eclipse.ui.IWorkingSet; -/** - * A view that displays synchronization targets that are registered with the - * synchronize view manager. - * <p> - * Clients are not intended to implement this interface. - * </p> - * - * @since 3.0 - */ -public interface ISynchronizeView extends IViewPart { - - // TODO: I would like to make modes an optional - // part of the synchronize targets and allow them to configure their uses. +public interface ISynchronizeView { public final static int INCOMING_MODE = 1; public final static int OUTGOING_MODE = 2; public final static int BOTH_MODE = 3; public final static int CONFLICTING_MODE = 4; /** - * Called to set the current selection in the sync viewer for the given - * subscriber. The viewType parameter determines in which configuration of - * the view the selection should be made in. If there are no resources - * passed in the given subscriber is activate. - * - * @param resources - * the resources to select - * @param viewType - * the view configuration in which to select the resources - */ - public void display(ISynchronizeTarget synchronizeTarget); - - /** - * Returns the synchronization target currently being displayed. + * Called to set the current selection in the sync viewer for the given subscriber. The viewType + * parameter determines in which configuration of the view the selection should be made in. If + * there are no resources passed in the given subscriber is activate. * - * @return the synchronize target currently being displayed, or <code>null</code> - * if none + * @param resources the resources to select + * @param viewType the view configuration in which to select the resources */ - public ISynchronizeTarget getSynchronizeTarget(); - + public void selectSubscriber(TeamSubscriber subscriber); + /** - * Refreshes the resources from the specified subscriber. The working set - * or filters applied to the synchronize view are ignored. + * Refreshes the resources from the specified subscriber. The working set or filters applied + * to the synchronize view are ignored. */ public void refreshWithRemote(TeamSubscriber subscriber, IResource[] resources); /** * Refreshes the resources in the current input for the given subscriber. - */ + */ public void refreshWithRemote(TeamSubscriber subscriber); - + /** * Refreshes the active subscriber. - */ + */ public void refreshWithRemote(); - + /** * Returns the current view configuration. */ @@ -79,10 +55,11 @@ public interface ISynchronizeView extends IViewPart { * Sets the working set used by the view to the given working set */ public void setWorkingSet(IWorkingSet workingSet); - + /** * Sets the current mode shown in the sync view. Valid modes are: - * INCOMING_MODE, OUTGOING_MODE, BOTH_MODE, CONFLICTING_MODE + * INCOMING_MODE, OUTGOING_MODE, BOTH_MODE, + * CONFLICTING_MODE */ public void setMode(int mode); -}
\ No newline at end of file +} diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/ISynchronizeTarget.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/ISynchronizeViewPage.java index 96920a627..f019aceec 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/ISynchronizeTarget.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/ISynchronizeViewPage.java @@ -10,8 +10,8 @@ *******************************************************************************/ package org.eclipse.team.ui.sync; -import org.eclipse.core.runtime.Preferences.IPropertyChangeListener; import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.jface.util.IPropertyChangeListener; import org.eclipse.ui.part.IPageBookViewPage; /** @@ -21,7 +21,7 @@ import org.eclipse.ui.part.IPageBookViewPage; * * @since 3.0 */ -public interface ISynchronizeTarget { +public interface ISynchronizeViewPage { /** * Returns the name of this synchronize target. * @@ -45,7 +45,7 @@ public interface ISynchronizeTarget { * @param view the view in which the page is to be created * @return a page book view page representation of this synchronize target */ - public IPageBookViewPage createPage(ISynchronizeView view); + public IPageBookViewPage createPage(INewSynchronizeView view); /** * Adds a listener for changes to properties of this synchronize target. @@ -74,4 +74,4 @@ public interface ISynchronizeTarget { * @param listener a property listener */ public void removePropertyChangeListener(IPropertyChangeListener listener); -} +}
\ No newline at end of file diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/SubscriberPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/SubscriberPage.java new file mode 100644 index 000000000..c8fb245b2 --- /dev/null +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/SubscriberPage.java @@ -0,0 +1,25 @@ +package org.eclipse.team.ui.sync; + +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.team.core.subscribers.TeamSubscriber; +import org.eclipse.team.internal.ui.sync.pages.*; +import org.eclipse.ui.part.IPageBookViewPage; + +public class SubscriberPage extends AbstractSynchronizeViewPage { + + private TeamSubscriber subscriber; + + public SubscriberPage(TeamSubscriber subscriber, String name, ImageDescriptor imageDescriptor) { + super(name, imageDescriptor); + this.subscriber = subscriber; + // TODO Auto-generated constructor stub + } + + /* (non-Javadoc) + * @see org.eclipse.team.ui.sync.ISynchronizeViewPage#createPage(org.eclipse.team.ui.sync.ISynchronizeView) + */ + public IPageBookViewPage createPage(INewSynchronizeView view) { + // TODO Auto-generated method stub + return new SubscriberSynchronizeViewPage(subscriber, view); + } +} diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/SyncInfoSynchronizeTarget.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/SyncInfoSynchronizeTarget.java deleted file mode 100644 index c3d8fb829..000000000 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/SyncInfoSynchronizeTarget.java +++ /dev/null @@ -1,50 +0,0 @@ -package org.eclipse.team.ui.sync; - -import org.eclipse.core.runtime.Preferences.IPropertyChangeListener; -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.ui.part.IPageBookViewPage; - - -public class SyncInfoSynchronizeTarget implements ISynchronizeTarget { - - /* (non-Javadoc) - * @see org.eclipse.team.ui.sync.ISynchronizeTarget#getName() - */ - public String getName() { - // TODO Auto-generated method stub - return null; - } - - /* (non-Javadoc) - * @see org.eclipse.team.ui.sync.ISynchronizeTarget#getImageDescriptor() - */ - public ImageDescriptor getImageDescriptor() { - // TODO Auto-generated method stub - return null; - } - - /* (non-Javadoc) - * @see org.eclipse.team.ui.sync.ISynchronizeTarget#createPage(org.eclipse.team.ui.sync.ISynchronizeView) - */ - public IPageBookViewPage createPage(ISynchronizeView view) { - // TODO Auto-generated method stub - return null; - } - - /* (non-Javadoc) - * @see org.eclipse.team.ui.sync.ISynchronizeTarget#addPropertyChangeListener(org.eclipse.core.runtime.Preferences.IPropertyChangeListener) - */ - public void addPropertyChangeListener(IPropertyChangeListener listener) { - // TODO Auto-generated method stub - - } - - /* (non-Javadoc) - * @see org.eclipse.team.ui.sync.ISynchronizeTarget#removePropertyChangeListener(org.eclipse.core.runtime.Preferences.IPropertyChangeListener) - */ - public void removePropertyChangeListener(IPropertyChangeListener listener) { - // TODO Auto-generated method stub - - } - -} |