mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-09-02 13:13:36 +02:00
[180519][api] declaratively register adapter factories
This commit is contained in:
parent
202c9a5fe6
commit
08c6648552
13 changed files with 89 additions and 87 deletions
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Copyright (c) 2006 IBM Corporation. All rights reserved.
|
||||
Copyright (c) 2006, 2007 IBM Corporation. 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
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2006 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2006, 2007 IBM Corporation. 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
|
||||
|
@ -11,7 +11,7 @@
|
|||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||
*
|
||||
* Contributors:
|
||||
* {Name} (company) - description of contribution.
|
||||
* Martin Oberhuber (Wind River) - [180519][api] declaratively register adapter factories
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.files.ui;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2006 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2006, 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
|
||||
|
@ -11,13 +11,12 @@
|
|||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||
*
|
||||
* Contributors:
|
||||
* {Name} (company) - description of contribution.
|
||||
* Martin Oberhuber (Wind River) - [180519][api] declaratively register adapter factories
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.files.ui.view;
|
||||
|
||||
import org.eclipse.core.runtime.IAdapterFactory;
|
||||
import org.eclipse.core.runtime.IAdapterManager;
|
||||
import org.eclipse.rse.core.subsystems.util.ISubSystemConfigurationAdapter;
|
||||
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystemConfiguration;
|
||||
|
||||
|
@ -34,15 +33,17 @@ public class RemoteFileSubSystemConfigurationAdapterFactory implements IAdapterF
|
|||
{
|
||||
return new Class[] {ISubSystemConfigurationAdapter.class};
|
||||
}
|
||||
/**
|
||||
* Called by our plugin's startup method to register our adaptable object types
|
||||
* with the platform. We prefer to do it here to isolate/encapsulate all factory
|
||||
* logic in this one place.
|
||||
*/
|
||||
public void registerWithManager(IAdapterManager manager)
|
||||
{
|
||||
manager.registerAdapters(this, IRemoteFileSubSystemConfiguration.class);
|
||||
}
|
||||
|
||||
// /**
|
||||
// * Register this factory with the Platform's Adapter Manager.
|
||||
// * Can be used for explicit registration, but we prefer doing it
|
||||
// * declaratively in plugin.xml so this is currently not used.
|
||||
// */
|
||||
// public void registerWithManager(IAdapterManager manager)
|
||||
// {
|
||||
// manager.registerAdapters(this, IRemoteFileSubSystemConfiguration.class);
|
||||
// }
|
||||
|
||||
/**
|
||||
* @see IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2002, 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
|
||||
|
@ -11,12 +11,11 @@
|
|||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||
*
|
||||
* Contributors:
|
||||
* {Name} (company) - description of contribution.
|
||||
* Martin Oberhuber (Wind River) - [180519][api] declaratively register adapter factories
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.files.ui.view;
|
||||
import org.eclipse.core.runtime.IAdapterFactory;
|
||||
import org.eclipse.core.runtime.IAdapterManager;
|
||||
import org.eclipse.rse.core.SystemBasePlugin;
|
||||
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
|
||||
import org.eclipse.rse.ui.view.AbstractSystemRemoteAdapterFactory;
|
||||
|
@ -32,15 +31,16 @@ public class SystemViewFileAdapterFactory extends AbstractSystemRemoteAdapterFac
|
|||
{
|
||||
private SystemViewRemoteFileAdapter fileAdapter = new SystemViewRemoteFileAdapter();
|
||||
|
||||
/**
|
||||
* Called by our plugin's startup method to register our adaptable object types
|
||||
* with the platform. We prefer to do it here to isolate/encapsulate all factory
|
||||
* logic in this one place.
|
||||
*/
|
||||
public void registerWithManager(IAdapterManager manager)
|
||||
{
|
||||
manager.registerAdapters(this, IRemoteFile.class);
|
||||
}
|
||||
// /**
|
||||
// * Register this factory with the Platform's Adapter Manager.
|
||||
// * Can be used for explicit registration, but we prefer doing it
|
||||
// * declaratively in plugin.xml so this is currently not used.
|
||||
// */
|
||||
// public void registerWithManager(IAdapterManager manager)
|
||||
// {
|
||||
// manager.registerAdapters(this, IRemoteFile.class);
|
||||
// }
|
||||
|
||||
/**
|
||||
* @see IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2006 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2006, 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
|
||||
|
@ -11,13 +11,12 @@
|
|||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||
*
|
||||
* Contributors:
|
||||
* {Name} (company) - description of contribution.
|
||||
* Martin Oberhuber (Wind River) - [180519][api] declaratively register adapter factories
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.files.ui.view;
|
||||
|
||||
import org.eclipse.core.runtime.IAdapterFactory;
|
||||
import org.eclipse.core.runtime.IAdapterManager;
|
||||
import org.eclipse.rse.core.SystemBasePlugin;
|
||||
import org.eclipse.rse.services.search.IHostSearchResult;
|
||||
import org.eclipse.rse.ui.view.ISystemDragDropAdapter;
|
||||
|
@ -46,15 +45,17 @@ public class SystemViewSearchResultAdapterFactory implements IAdapterFactory
|
|||
{
|
||||
return new Class[] {ISystemViewElementAdapter.class, ISystemDragDropAdapter.class, ISystemRemoteElementAdapter.class, IPropertySource.class, IWorkbenchAdapter.class, IActionFilter.class};
|
||||
}
|
||||
/**
|
||||
* Called by our plugin's startup method to register our adaptable object types
|
||||
* with the platform. We prefer to do it here to isolate/encapsulate all factory
|
||||
* logic in this one place.
|
||||
*/
|
||||
public void registerWithManager(IAdapterManager manager)
|
||||
{
|
||||
manager.registerAdapters(this, IHostSearchResult.class);
|
||||
}
|
||||
|
||||
// /**
|
||||
// * Register this factory with the Platform's Adapter Manager.
|
||||
// * Can be used for explicit registration, but we prefer doing it
|
||||
// * declaratively in plugin.xml so this is currently not used.
|
||||
// */
|
||||
// public void registerWithManager(IAdapterManager manager)
|
||||
// {
|
||||
// manager.registerAdapters(this, IHostSearchResult.class);
|
||||
// }
|
||||
|
||||
/**
|
||||
* @see IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2002, 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
|
||||
|
@ -11,12 +11,11 @@
|
|||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||
*
|
||||
* Contributors:
|
||||
* {Name} (company) - description of contribution.
|
||||
* Martin Oberhuber (Wind River) - [180519][api] declaratively register adapter factories
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.files.ui.view;
|
||||
import org.eclipse.core.runtime.IAdapterFactory;
|
||||
import org.eclipse.core.runtime.IAdapterManager;
|
||||
import org.eclipse.rse.core.SystemBasePlugin;
|
||||
import org.eclipse.rse.services.search.IHostSearchResultSet;
|
||||
import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
|
||||
|
@ -42,15 +41,17 @@ public class SystemViewSearchResultSetAdapterFactory implements IAdapterFactory
|
|||
{
|
||||
return new Class[] {ISystemViewElementAdapter.class, ISystemRemoteElementAdapter.class, IPropertySource.class, IWorkbenchAdapter.class, IActionFilter.class};
|
||||
}
|
||||
/**
|
||||
* Called by our plugin's startup method to register our adaptable object types
|
||||
* with the platform. We prefer to do it here to isolate/encapsulate all factory
|
||||
* logic in this one place.
|
||||
*/
|
||||
public void registerWithManager(IAdapterManager manager)
|
||||
{
|
||||
manager.registerAdapters(this, IHostSearchResultSet.class);
|
||||
}
|
||||
|
||||
// /**
|
||||
// * Register this factory with the Platform's Adapter Manager.
|
||||
// * Can be used for explicit registration, but we prefer doing it
|
||||
// * declaratively in plugin.xml so this is currently not used.
|
||||
// */
|
||||
// public void registerWithManager(IAdapterManager manager)
|
||||
// {
|
||||
// manager.registerAdapters(this, IHostSearchResultSet.class);
|
||||
// }
|
||||
|
||||
/**
|
||||
* @see IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2006 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2006, 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
|
||||
|
@ -11,15 +11,13 @@
|
|||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||
*
|
||||
* Contributors:
|
||||
* {Name} (company) - description of contribution.
|
||||
* Martin Oberhuber (Wind River) - [180519][api] declaratively register adapter factories
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.shells.ui.view;
|
||||
|
||||
import org.eclipse.core.runtime.IAdapterFactory;
|
||||
import org.eclipse.core.runtime.IAdapterManager;
|
||||
import org.eclipse.rse.core.subsystems.util.ISubSystemConfigurationAdapter;
|
||||
import org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.IShellServiceSubSystemConfiguration;
|
||||
import org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.ShellServiceSubSystemConfiguration;
|
||||
|
||||
|
||||
|
@ -35,15 +33,17 @@ public class ShellServiceSubSystemConfigurationAdapterFactory implements IAdapte
|
|||
{
|
||||
return new Class[] {ISubSystemConfigurationAdapter.class};
|
||||
}
|
||||
/**
|
||||
* Called by our plugin's startup method to register our adaptable object types
|
||||
* with the platform. We prefer to do it here to isolate/encapsulate all factory
|
||||
* logic in this one place.
|
||||
*/
|
||||
public void registerWithManager(IAdapterManager manager)
|
||||
{
|
||||
manager.registerAdapters(this, IShellServiceSubSystemConfiguration.class);
|
||||
}
|
||||
|
||||
// /**
|
||||
// * Register this factory with the Platform's Adapter Manager.
|
||||
// * Can be used for explicit registration, but we prefer to rather do it
|
||||
// * declaratively in plugin.xml so this is currently not used.
|
||||
// */
|
||||
// public void registerWithManager(IAdapterManager manager)
|
||||
// {
|
||||
// manager.registerAdapters(this, IShellServiceSubSystemConfiguration.class);
|
||||
// }
|
||||
|
||||
/**
|
||||
* @see IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2002, 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
|
||||
|
@ -11,12 +11,11 @@
|
|||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||
*
|
||||
* Contributors:
|
||||
* {Name} (company) - description of contribution.
|
||||
* Martin Oberhuber (Wind River) - [180519][api] declaratively register adapter factories
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.shells.ui.view;
|
||||
import org.eclipse.core.runtime.IAdapterFactory;
|
||||
import org.eclipse.core.runtime.IAdapterManager;
|
||||
import org.eclipse.rse.core.SystemBasePlugin;
|
||||
import org.eclipse.rse.shells.ui.view.SystemViewRemoteOutputAdapter;
|
||||
import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCommandShell;
|
||||
|
@ -46,17 +45,19 @@ public class SystemViewOutputAdapterFactory implements IAdapterFactory
|
|||
{
|
||||
return new Class[] {ISystemViewElementAdapter.class, ISystemDragDropAdapter.class, ISystemRemoteElementAdapter.class, IPropertySource.class, IWorkbenchAdapter.class, IActionFilter.class};
|
||||
}
|
||||
/**
|
||||
* Called by our plugin's startup method to register our adaptable object types
|
||||
* with the platform. We prefer to do it here to isolate/encapsulate all factory
|
||||
* logic in this one place.
|
||||
*/
|
||||
public void registerWithManager(IAdapterManager manager)
|
||||
{
|
||||
manager.registerAdapters(this, IRemoteError.class);
|
||||
manager.registerAdapters(this, IRemoteOutput.class);
|
||||
manager.registerAdapters(this, IRemoteCommandShell.class);
|
||||
}
|
||||
|
||||
// /**
|
||||
// * Register this factory with the Platform's Adapter Manager.
|
||||
// * Can be used for explicit registration, but we prefer doing it
|
||||
// * declaratively in plugin.xml so this is currently not used.
|
||||
// */
|
||||
// public void registerWithManager(IAdapterManager manager)
|
||||
// {
|
||||
// manager.registerAdapters(this, IRemoteError.class);
|
||||
// manager.registerAdapters(this, IRemoteOutput.class);
|
||||
// manager.registerAdapters(this, IRemoteCommandShell.class);
|
||||
// }
|
||||
|
||||
/**
|
||||
* @see IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
|
||||
*/
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||
*
|
||||
* Contributors:
|
||||
* {Name} (company) - description of contribution.
|
||||
* Martin Oberhuber (Wind River) - [180519][api] declaratively register adapter factories
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.rse.subsystems.files.core;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2006 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2006, 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
|
||||
|
@ -11,7 +11,7 @@
|
|||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||
*
|
||||
* Contributors:
|
||||
* {Name} (company) - description of contribution.
|
||||
* Martin Oberhuber (Wind River) - [180519][api] declaratively register adapter factories
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.subsystems.files.dstore;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2006, 2007 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2006, 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
|
||||
|
@ -11,7 +11,7 @@
|
|||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||
*
|
||||
* Contributors:
|
||||
* {Name} (company) - description of contribution.
|
||||
* Martin Oberhuber (Wind River) - [180519][api] declaratively register adapter factories
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.subsystems.files.ftp;
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||
*
|
||||
* Contributors:
|
||||
* {Name} (company) - description of contribution.
|
||||
* Martin Oberhuber (Wind River) - [180519][api] declaratively register adapter factories
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.subsystems.files.local;
|
||||
|
|
|
@ -8,16 +8,14 @@
|
|||
* Contributors:
|
||||
* Martin Oberhuber (Wind River) - initial API and implementation
|
||||
* Dave McKnight (IBM) - Fix bug 148971: activate files.ui on startup
|
||||
* Martin Oberhuber (Wind River) - [180519][api] declaratively register adapter factories
|
||||
*******************************************************************************/
|
||||
package org.eclipse.rse.internal.subsystems.files.ssh;
|
||||
|
||||
import org.eclipse.core.runtime.Platform;
|
||||
import org.eclipse.jface.resource.ImageDescriptor;
|
||||
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
||||
import org.osgi.framework.BundleContext;
|
||||
|
||||
import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileEmpty;
|
||||
|
||||
/**
|
||||
* The activator class controls the plug-in life cycle
|
||||
*/
|
||||
|
|
Loading…
Add table
Reference in a new issue