mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-25 18:05:33 +02:00
[180519][api] declaratively register rse.shells.ui adapter factories
This commit is contained in:
parent
d3bb2ce174
commit
0f90b154a2
9 changed files with 83 additions and 42 deletions
|
@ -17,6 +17,71 @@ Contributors:
|
|||
<?eclipse version="3.0"?>
|
||||
<plugin>
|
||||
|
||||
<!-- ============================================ -->
|
||||
<!-- Register Adapter Factories -->
|
||||
<!-- ============================================ -->
|
||||
|
||||
<extension point="org.eclipse.core.runtime.adapters">
|
||||
<!-- Remote Error -->
|
||||
<factory
|
||||
class="org.eclipse.rse.internal.shells.ui.view.SystemViewOutputAdapterFactory"
|
||||
adaptableType="org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteError">
|
||||
<adapter type="org.eclipse.rse.ui.view.ISystemViewElementAdapter"/>
|
||||
<adapter type="org.eclipse.rse.ui.view.ISystemDragDropAdapter"/>
|
||||
<adapter type="org.eclipse.rse.ui.view.ISystemRemoteElementAdapter"/>
|
||||
<adapter type="org.eclipse.ui.views.properties.IPropertySource"/>
|
||||
<adapter type="org.eclipse.ui.model.IWorkbenchAdapter"/>
|
||||
<adapter type="org.eclipse.ui.IActionFilter"/>
|
||||
<!-- TODO Check: These are not in the adapter factories
|
||||
getAdapterList() Although the adapter implements them
|
||||
<adapter type="org.eclipse.ui.progress.IDeferredWorkbenchAdapter"/>
|
||||
<adapter type="org.eclipse.rse.core.subsystems.IRemoteObjectIdentifier"/>
|
||||
-->
|
||||
</factory>
|
||||
<!-- Remote Output -->
|
||||
<factory
|
||||
class="org.eclipse.rse.internal.shells.ui.view.SystemViewOutputAdapterFactory"
|
||||
adaptableType="org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteOutput">
|
||||
<adapter type="org.eclipse.rse.ui.view.ISystemViewElementAdapter"/>
|
||||
<adapter type="org.eclipse.rse.ui.view.ISystemDragDropAdapter"/>
|
||||
<adapter type="org.eclipse.rse.ui.view.ISystemRemoteElementAdapter"/>
|
||||
<adapter type="org.eclipse.ui.views.properties.IPropertySource"/>
|
||||
<adapter type="org.eclipse.ui.model.IWorkbenchAdapter"/>
|
||||
<adapter type="org.eclipse.ui.IActionFilter"/>
|
||||
<!-- TODO Check: These are not in the adapter factories
|
||||
getAdapterList() Although the adapter implements them
|
||||
<adapter type="org.eclipse.ui.progress.IDeferredWorkbenchAdapter"/>
|
||||
<adapter type="org.eclipse.rse.core.subsystems.IRemoteObjectIdentifier"/>
|
||||
-->
|
||||
</factory>
|
||||
<!-- Remote Command Shell -->
|
||||
<factory
|
||||
class="org.eclipse.rse.internal.shells.ui.view.SystemViewOutputAdapterFactory"
|
||||
adaptableType="org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCommandShell">
|
||||
<adapter type="org.eclipse.rse.ui.view.ISystemViewElementAdapter"/>
|
||||
<adapter type="org.eclipse.rse.ui.view.ISystemDragDropAdapter"/>
|
||||
<adapter type="org.eclipse.rse.ui.view.ISystemRemoteElementAdapter"/>
|
||||
<adapter type="org.eclipse.ui.views.properties.IPropertySource"/>
|
||||
<adapter type="org.eclipse.ui.model.IWorkbenchAdapter"/>
|
||||
<adapter type="org.eclipse.ui.IActionFilter"/>
|
||||
<!-- TODO Check: These are not in the adapter factories
|
||||
getAdapterList() Although the adapter implements them
|
||||
<adapter type="org.eclipse.ui.progress.IDeferredWorkbenchAdapter"/>
|
||||
<adapter type="org.eclipse.rse.core.subsystems.IRemoteObjectIdentifier"/>
|
||||
-->
|
||||
</factory>
|
||||
<!-- IShellServiceSubSystemConfiguration -->
|
||||
<factory
|
||||
class="org.eclipse.rse.internal.shells.ui.view.ShellServiceSubSystemConfigurationAdapterFactory"
|
||||
adaptableType="org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.IShellServiceSubSystemConfiguration">
|
||||
<adapter type="org.eclipse.rse.core.subsystems.util.ISubSystemConfigurationAdapter"/>
|
||||
</factory>
|
||||
</extension>
|
||||
|
||||
|
||||
<!-- ============================================ -->
|
||||
<!-- Register Views -->
|
||||
<!-- ============================================ -->
|
||||
<extension
|
||||
point="org.eclipse.ui.views">
|
||||
<view
|
||||
|
@ -58,7 +123,7 @@ Contributors:
|
|||
|
||||
<page
|
||||
name="%PropertyPage.ServerLauncherSettings"
|
||||
class="org.eclipse.rse.ui.propertypages.ServerLauncherPropertyPage"
|
||||
class="org.eclipse.rse.internal.ui.propertypages.ServerLauncherPropertyPage"
|
||||
id="org.eclipse.rse.ui.propertypages.serverLauncherPropertyPage">
|
||||
<filter name="serverLaunchPP" value="true"/>
|
||||
<enabledWhen>
|
||||
|
|
|
@ -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,16 +11,12 @@
|
|||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||
*
|
||||
* Contributors:
|
||||
* {Name} (company) - description of contribution.
|
||||
* Martin Oberhuber (Wind River) - [180519] declaratively register rse.shells.ui. adapter factories
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.shells.ui;
|
||||
|
||||
import org.eclipse.core.runtime.IAdapterManager;
|
||||
import org.eclipse.core.runtime.Platform;
|
||||
import org.eclipse.jface.resource.ImageDescriptor;
|
||||
import org.eclipse.rse.internal.shells.ui.view.ShellServiceSubSystemConfigurationAdapterFactory;
|
||||
import org.eclipse.rse.internal.shells.ui.view.SystemViewOutputAdapterFactory;
|
||||
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
||||
import org.osgi.framework.BundleContext;
|
||||
|
||||
|
@ -32,7 +28,6 @@ public class Activator extends AbstractUIPlugin {
|
|||
|
||||
//The shared instance.
|
||||
private static Activator plugin;
|
||||
SystemViewOutputAdapterFactory _svoaf;
|
||||
|
||||
/**
|
||||
* The constructor.
|
||||
|
@ -47,24 +42,8 @@ public class Activator extends AbstractUIPlugin {
|
|||
public void start(BundleContext context) throws Exception
|
||||
{
|
||||
super.start(context);
|
||||
|
||||
IAdapterManager manager = Platform.getAdapterManager();
|
||||
|
||||
_svoaf = new SystemViewOutputAdapterFactory();
|
||||
_svoaf.registerWithManager(manager);
|
||||
|
||||
ShellServiceSubSystemConfigurationAdapterFactory fac = new ShellServiceSubSystemConfigurationAdapterFactory();
|
||||
fac.registerWithManager(manager);
|
||||
}
|
||||
|
||||
/**
|
||||
* For pathpath access to our adapters for viewable remote output objects. Exploits the knowledge we use singleton adapters.
|
||||
*/
|
||||
public SystemViewOutputAdapterFactory getSystemViewOutputAdapterFactory()
|
||||
{
|
||||
return _svoaf;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called when the plug-in is stopped
|
||||
*/
|
||||
|
|
|
@ -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,12 +11,14 @@
|
|||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||
*
|
||||
* Contributors:
|
||||
* {Name} (company) - description of contribution.
|
||||
* Martin Oberhuber (Wind River) - [180519] declaratively register rse.shells.ui. adapter factories
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.subsystems.shells.core;
|
||||
|
||||
import org.eclipse.core.runtime.Platform;
|
||||
import org.eclipse.jface.resource.ImageDescriptor;
|
||||
import org.eclipse.rse.subsystems.shells.core.model.RemoteOutput;
|
||||
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
||||
import org.osgi.framework.BundleContext;
|
||||
|
||||
|
@ -40,6 +42,13 @@ public class Activator extends AbstractUIPlugin {
|
|||
*/
|
||||
public void start(BundleContext context) throws Exception {
|
||||
super.start(context);
|
||||
|
||||
// make sure that required adapters factories are loaded
|
||||
//(will typically activate org.eclipse.rse.shells.ui)
|
||||
//TODO Check that this does not fire up the UI if we want to be headless
|
||||
Platform.getAdapterManager().loadAdapter(new RemoteOutput(null,""), "org.eclipse.rse.ui.view.ISystemViewElementAdapter"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
// Others (IRemoteError, ShellServiceSubSystemConfigurationAdapter
|
||||
// will be available automatically once the shells.ui plugin is loaded
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -12,7 +12,6 @@ Require-Bundle: org.eclipse.ui,
|
|||
org.eclipse.dstore.core,
|
||||
org.eclipse.dstore.extra,
|
||||
org.eclipse.rse.connectorservice.dstore,
|
||||
org.eclipse.rse.shells.ui,
|
||||
org.eclipse.rse.subsystems.shells.core,
|
||||
org.eclipse.rse.core,
|
||||
org.eclipse.rse.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,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] declaratively register rse.shells.ui. adapter factories
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.subsystems.shells.dstore;
|
||||
|
@ -41,9 +41,6 @@ public class Activator extends AbstractUIPlugin {
|
|||
public void start(BundleContext context) throws Exception
|
||||
{
|
||||
super.start(context);
|
||||
|
||||
// shells ui needs to be started for proper UI init
|
||||
org.eclipse.rse.shells.ui.Activator.getDefault();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -10,7 +10,6 @@ Require-Bundle: org.eclipse.ui,
|
|||
org.eclipse.rse.services,
|
||||
org.eclipse.rse.services.local,
|
||||
org.eclipse.rse.connectorservice.local,
|
||||
org.eclipse.rse.shells.ui,
|
||||
org.eclipse.rse.subsystems.shells.core,
|
||||
org.eclipse.rse.core,
|
||||
org.eclipse.rse.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,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] declaratively register rse.shells.ui. adapter factories
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.subsystems.shells.local;
|
||||
|
@ -41,9 +41,6 @@ public class Activator extends AbstractUIPlugin {
|
|||
public void start(BundleContext context) throws Exception
|
||||
{
|
||||
super.start(context);
|
||||
|
||||
// shells ui needs to be started for proper UI init
|
||||
org.eclipse.rse.shells.ui.Activator.getDefault();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -13,7 +13,6 @@ Require-Bundle: org.eclipse.ui,
|
|||
org.eclipse.rse.services.ssh,
|
||||
org.eclipse.rse.subsystems.shells.core,
|
||||
org.eclipse.rse.subsystems.files.core,
|
||||
org.eclipse.rse.shells.ui,
|
||||
org.eclipse.rse.core,
|
||||
org.eclipse.rse.ui
|
||||
Eclipse-LazyStart: true
|
||||
|
|
|
@ -38,9 +38,6 @@ public class Activator extends AbstractUIPlugin {
|
|||
*/
|
||||
public void start(BundleContext context) throws Exception {
|
||||
super.start(context);
|
||||
|
||||
// shells ui needs to be started for proper UI init
|
||||
org.eclipse.rse.shells.ui.Activator.getDefault();
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Reference in a new issue