mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-22 14:12:10 +02:00
Step 1 of adapting Arduino IDE to new Launch Bar API.
Change-Id: I5fcfcde182eff8a5cc34d64f75ba5deea9487770
This commit is contained in:
parent
3d8907e788
commit
a170ca1895
7 changed files with 85 additions and 87 deletions
|
@ -87,7 +87,6 @@
|
||||||
<extension
|
<extension
|
||||||
point="org.eclipse.remote.core.remoteServices">
|
point="org.eclipse.remote.core.remoteServices">
|
||||||
<connectionType
|
<connectionType
|
||||||
capabilities="7"
|
|
||||||
id="org.eclipse.cdt.arduino.core.connectionType"
|
id="org.eclipse.cdt.arduino.core.connectionType"
|
||||||
name="Arduino">
|
name="Arduino">
|
||||||
</connectionType>
|
</connectionType>
|
||||||
|
@ -116,18 +115,9 @@
|
||||||
</descriptorType>
|
</descriptorType>
|
||||||
<configProvider
|
<configProvider
|
||||||
class="org.eclipse.cdt.arduino.core.internal.launch.ArduinoLaunchConfigurationProvider"
|
class="org.eclipse.cdt.arduino.core.internal.launch.ArduinoLaunchConfigurationProvider"
|
||||||
launchConfigurationType="org.eclipse.cdt.arduino.core.launchConfigurationType">
|
|
||||||
</configProvider>
|
|
||||||
<configType
|
|
||||||
descriptorType="org.eclipse.cdt.arduino.core.descriptorType"
|
descriptorType="org.eclipse.cdt.arduino.core.descriptorType"
|
||||||
isDefault="true"
|
priority="5">
|
||||||
launchConfigurationType="org.eclipse.cdt.arduino.core.launchConfigurationType"
|
</configProvider>
|
||||||
targetType="org.eclipse.cdt.arduino.core.targetType">
|
|
||||||
</configType>
|
|
||||||
<targetType
|
|
||||||
connectionTypeId="org.eclipse.cdt.arduino.core.connectionType"
|
|
||||||
id="org.eclipse.cdt.arduino.core.targetType">
|
|
||||||
</targetType>
|
|
||||||
</extension>
|
</extension>
|
||||||
<extension
|
<extension
|
||||||
point="org.eclipse.core.contenttype.contentTypes">
|
point="org.eclipse.core.contenttype.contentTypes">
|
||||||
|
|
|
@ -25,7 +25,6 @@ import java.util.Map;
|
||||||
import org.eclipse.cdt.arduino.core.internal.Activator;
|
import org.eclipse.cdt.arduino.core.internal.Activator;
|
||||||
import org.eclipse.cdt.arduino.core.internal.ArduinoProjectNature;
|
import org.eclipse.cdt.arduino.core.internal.ArduinoProjectNature;
|
||||||
import org.eclipse.cdt.arduino.core.internal.Messages;
|
import org.eclipse.cdt.arduino.core.internal.Messages;
|
||||||
import org.eclipse.cdt.arduino.core.internal.launch.ArduinoLaunchConfigurationDelegate;
|
|
||||||
import org.eclipse.cdt.arduino.core.internal.remote.ArduinoRemoteConnection;
|
import org.eclipse.cdt.arduino.core.internal.remote.ArduinoRemoteConnection;
|
||||||
import org.eclipse.cdt.core.CCProjectNature;
|
import org.eclipse.cdt.core.CCProjectNature;
|
||||||
import org.eclipse.cdt.core.CCorePlugin;
|
import org.eclipse.cdt.core.CCorePlugin;
|
||||||
|
@ -55,7 +54,6 @@ import org.eclipse.core.runtime.jobs.Job;
|
||||||
import org.eclipse.remote.core.IRemoteConnection;
|
import org.eclipse.remote.core.IRemoteConnection;
|
||||||
import org.eclipse.remote.core.IRemoteConnectionType;
|
import org.eclipse.remote.core.IRemoteConnectionType;
|
||||||
import org.eclipse.remote.core.IRemoteServicesManager;
|
import org.eclipse.remote.core.IRemoteServicesManager;
|
||||||
import org.eclipse.remote.core.launch.IRemoteLaunchConfigService;
|
|
||||||
|
|
||||||
import freemarker.template.Configuration;
|
import freemarker.template.Configuration;
|
||||||
import freemarker.template.Template;
|
import freemarker.template.Template;
|
||||||
|
@ -96,19 +94,12 @@ public class ArduinoProjectGenerator {
|
||||||
Board board = null;
|
Board board = null;
|
||||||
|
|
||||||
IRemoteServicesManager remoteManager = Activator.getService(IRemoteServicesManager.class);
|
IRemoteServicesManager remoteManager = Activator.getService(IRemoteServicesManager.class);
|
||||||
IRemoteLaunchConfigService remoteLaunchService = Activator.getService(IRemoteLaunchConfigService.class);
|
IRemoteConnectionType connectionType = remoteManager.getConnectionType(ArduinoRemoteConnection.TYPE_ID);
|
||||||
IRemoteConnection remoteConnection = remoteLaunchService.getLastActiveConnection(ArduinoLaunchConfigurationDelegate.getLaunchConfigurationType());
|
Collection<IRemoteConnection> connections = connectionType.getConnections();
|
||||||
if (remoteConnection != null) {
|
if (!connections.isEmpty()) {
|
||||||
IArduinoRemoteConnection arduinoRemote = remoteConnection.getService(IArduinoRemoteConnection.class);
|
IRemoteConnection firstConnection = connections.iterator().next();
|
||||||
board = arduinoRemote.getBoard();
|
IArduinoRemoteConnection firstArduino = firstConnection.getService(IArduinoRemoteConnection.class);
|
||||||
} else {
|
board = firstArduino.getBoard();
|
||||||
IRemoteConnectionType connectionType = remoteManager.getConnectionType(ArduinoRemoteConnection.TYPE_ID);
|
|
||||||
Collection<IRemoteConnection> connections = connectionType.getConnections();
|
|
||||||
if (!connections.isEmpty()) {
|
|
||||||
IRemoteConnection firstConnection = connections.iterator().next();
|
|
||||||
IArduinoRemoteConnection firstArduino = firstConnection.getService(IArduinoRemoteConnection.class);
|
|
||||||
board = firstArduino.getBoard();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (board == null) {
|
if (board == null) {
|
||||||
|
|
|
@ -38,32 +38,23 @@ import org.eclipse.core.runtime.jobs.Job;
|
||||||
import org.eclipse.debug.core.DebugPlugin;
|
import org.eclipse.debug.core.DebugPlugin;
|
||||||
import org.eclipse.debug.core.ILaunch;
|
import org.eclipse.debug.core.ILaunch;
|
||||||
import org.eclipse.debug.core.ILaunchConfiguration;
|
import org.eclipse.debug.core.ILaunchConfiguration;
|
||||||
import org.eclipse.debug.core.ILaunchConfigurationType;
|
import org.eclipse.launchbar.core.launch.RemoteLaunchConfigurationDelegate;
|
||||||
import org.eclipse.debug.core.model.LaunchConfigurationDelegate;
|
|
||||||
import org.eclipse.remote.core.IRemoteConnection;
|
import org.eclipse.remote.core.IRemoteConnection;
|
||||||
import org.eclipse.remote.core.launch.IRemoteLaunchConfigService;
|
|
||||||
|
|
||||||
public class ArduinoLaunchConfigurationDelegate extends LaunchConfigurationDelegate {
|
public class ArduinoLaunchConfigurationDelegate extends RemoteLaunchConfigurationDelegate {
|
||||||
|
|
||||||
public static ILaunchConfigurationType getLaunchConfigurationType() {
|
public static final String TYPE_ID = "org.eclipse.cdt.arduino.core.launchConfigurationType"; //$NON-NLS-1$
|
||||||
return DebugPlugin.getDefault().getLaunchManager()
|
|
||||||
.getLaunchConfigurationType("org.eclipse.cdt.arduino.core.launchConfigurationType"); //$NON-NLS-1$
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean buildForLaunch(ILaunchConfiguration configuration, String mode, IProgressMonitor monitor) throws CoreException {
|
public boolean buildForLaunch(ILaunchConfiguration configuration, String mode, IRemoteConnection target,
|
||||||
|
IProgressMonitor monitor) throws CoreException {
|
||||||
// 1. make sure proper build config is set active
|
// 1. make sure proper build config is set active
|
||||||
IProject project = configuration.getMappedResources()[0].getProject();
|
IProject project = configuration.getMappedResources()[0].getProject();
|
||||||
ICProjectDescription projDesc = CCorePlugin.getDefault().getProjectDescription(project);
|
ICProjectDescription projDesc = CCorePlugin.getDefault().getProjectDescription(project);
|
||||||
IRemoteConnection remoteConnection = getActiveRemote(configuration);
|
ICConfigurationDescription configDesc = getBuildConfiguration(projDesc, target);
|
||||||
if (remoteConnection == null) {
|
|
||||||
// TODO default?
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
ICConfigurationDescription configDesc = getBuildConfiguration(projDesc, remoteConnection);
|
|
||||||
boolean newConfig = false;
|
boolean newConfig = false;
|
||||||
if (configDesc == null) {
|
if (configDesc == null) {
|
||||||
IArduinoRemoteConnection arduinoRemote = remoteConnection.getService(IArduinoRemoteConnection.class);
|
IArduinoRemoteConnection arduinoRemote = target.getService(IArduinoRemoteConnection.class);
|
||||||
configDesc = ArduinoProjectGenerator.createBuildConfiguration(projDesc, arduinoRemote.getBoard());
|
configDesc = ArduinoProjectGenerator.createBuildConfiguration(projDesc, arduinoRemote.getBoard());
|
||||||
newConfig = true;
|
newConfig = true;
|
||||||
}
|
}
|
||||||
|
@ -84,31 +75,26 @@ public class ArduinoLaunchConfigurationDelegate extends LaunchConfigurationDeleg
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void launch(final ILaunchConfiguration configuration, String mode,
|
public void launch(final ILaunchConfiguration configuration, String mode, final IRemoteConnection target,
|
||||||
final ILaunch launch, IProgressMonitor monitor) throws CoreException {
|
final ILaunch launch, IProgressMonitor monitor) throws CoreException {
|
||||||
new Job(Messages.ArduinoLaunchConfigurationDelegate_0) {
|
new Job(Messages.ArduinoLaunchConfigurationDelegate_0) {
|
||||||
protected IStatus run(IProgressMonitor monitor) {
|
protected IStatus run(IProgressMonitor monitor) {
|
||||||
try {
|
try {
|
||||||
ArduinoLaunchConsoleService consoleService = getConsoleService();
|
ArduinoLaunchConsoleService consoleService = getConsoleService();
|
||||||
|
|
||||||
IRemoteConnection connection = getActiveRemote(configuration);
|
|
||||||
if (connection == null) {
|
|
||||||
return new Status(IStatus.ERROR, Activator.getId(), Messages.ArduinoLaunchConfigurationDelegate_1);
|
|
||||||
}
|
|
||||||
|
|
||||||
// The project
|
// The project
|
||||||
IProject project = (IProject) configuration.getMappedResources()[0];
|
IProject project = (IProject) configuration.getMappedResources()[0];
|
||||||
|
|
||||||
// The build environment
|
// The build environment
|
||||||
ICProjectDescription projDesc = CCorePlugin.getDefault().getProjectDescription(project);
|
ICProjectDescription projDesc = CCorePlugin.getDefault().getProjectDescription(project);
|
||||||
ICConfigurationDescription configDesc = getBuildConfiguration(projDesc, connection);
|
ICConfigurationDescription configDesc = getBuildConfiguration(projDesc, target);
|
||||||
IEnvironmentVariable[] envVars = CCorePlugin.getDefault().getBuildEnvironmentManager().getVariables(configDesc, true);
|
IEnvironmentVariable[] envVars = CCorePlugin.getDefault().getBuildEnvironmentManager().getVariables(configDesc, true);
|
||||||
List<String> envVarList = new ArrayList<String>(envVars.length + 1);
|
List<String> envVarList = new ArrayList<String>(envVars.length + 1);
|
||||||
for (IEnvironmentVariable var : envVars) {
|
for (IEnvironmentVariable var : envVars) {
|
||||||
envVarList.add(var.getName() + '=' + var.getValue());
|
envVarList.add(var.getName() + '=' + var.getValue());
|
||||||
}
|
}
|
||||||
// Add in the serial port based on launch config
|
// Add in the serial port based on launch config
|
||||||
IArduinoRemoteConnection arduinoRemote = connection.getService(IArduinoRemoteConnection.class);
|
IArduinoRemoteConnection arduinoRemote = target.getService(IArduinoRemoteConnection.class);
|
||||||
envVarList.add("SERIAL_PORT=" + arduinoRemote.getPortName()); //$NON-NLS-1$
|
envVarList.add("SERIAL_PORT=" + arduinoRemote.getPortName()); //$NON-NLS-1$
|
||||||
String[] envp = envVarList.toArray(new String[envVarList.size()]);
|
String[] envp = envVarList.toArray(new String[envVarList.size()]);
|
||||||
|
|
||||||
|
@ -120,7 +106,7 @@ public class ArduinoLaunchConfigurationDelegate extends LaunchConfigurationDeleg
|
||||||
String command = buildConfig.getBuilder().getCommand();
|
String command = buildConfig.getBuilder().getCommand();
|
||||||
|
|
||||||
// If opened, temporarily close the connection so we can use it to download the firmware.
|
// If opened, temporarily close the connection so we can use it to download the firmware.
|
||||||
boolean wasOpened = connection.isOpen();
|
boolean wasOpened = target.isOpen();
|
||||||
if (wasOpened) {
|
if (wasOpened) {
|
||||||
arduinoRemote.pause();
|
arduinoRemote.pause();
|
||||||
}
|
}
|
||||||
|
@ -162,9 +148,14 @@ public class ArduinoLaunchConfigurationDelegate extends LaunchConfigurationDeleg
|
||||||
* @param launchConfig
|
* @param launchConfig
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private ICConfigurationDescription getBuildConfiguration(ICProjectDescription projDesc, IRemoteConnection remoteConnection) throws CoreException {
|
private ICConfigurationDescription getBuildConfiguration(ICProjectDescription projDesc, IRemoteConnection target) throws CoreException {
|
||||||
IArduinoRemoteConnection arduinoRemote = remoteConnection.getService(IArduinoRemoteConnection.class);
|
String boardId;
|
||||||
String boardId = arduinoRemote.getBoard().getId();
|
if (target != null) {
|
||||||
|
IArduinoRemoteConnection arduinoRemote = target.getService(IArduinoRemoteConnection.class);
|
||||||
|
boardId = arduinoRemote.getBoard().getId();
|
||||||
|
} else {
|
||||||
|
boardId = "uno"; //$NON-NLS-1$
|
||||||
|
}
|
||||||
|
|
||||||
for (ICConfigurationDescription configDesc : projDesc.getConfigurations()) {
|
for (ICConfigurationDescription configDesc : projDesc.getConfigurations()) {
|
||||||
IConfiguration config = ManagedBuildManager.getConfigurationForDescription(configDesc);
|
IConfiguration config = ManagedBuildManager.getConfigurationForDescription(configDesc);
|
||||||
|
@ -175,8 +166,4 @@ public class ArduinoLaunchConfigurationDelegate extends LaunchConfigurationDeleg
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private IRemoteConnection getActiveRemote(ILaunchConfiguration configuration) {
|
|
||||||
IRemoteLaunchConfigService remoteLaunchService = Activator.getService(IRemoteLaunchConfigService.class);
|
|
||||||
return remoteLaunchService.getActiveConnection(configuration);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,15 +10,35 @@
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.arduino.core.internal.launch;
|
package org.eclipse.cdt.arduino.core.internal.launch;
|
||||||
|
|
||||||
|
import org.eclipse.cdt.arduino.core.internal.ArduinoProjectNature;
|
||||||
|
import org.eclipse.cdt.arduino.core.internal.remote.ArduinoRemoteConnection;
|
||||||
|
import org.eclipse.core.resources.IProject;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
import org.eclipse.debug.core.ILaunchConfigurationType;
|
import org.eclipse.launchbar.core.ILaunchDescriptor;
|
||||||
import org.eclipse.launchbar.core.ProjectLaunchConfigurationProvider;
|
import org.eclipse.launchbar.core.ProjectPerTypeLaunchConfigProvider;
|
||||||
|
import org.eclipse.remote.core.IRemoteConnection;
|
||||||
|
|
||||||
public class ArduinoLaunchConfigurationProvider extends ProjectLaunchConfigurationProvider {
|
public class ArduinoLaunchConfigurationProvider extends ProjectPerTypeLaunchConfigProvider {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ILaunchConfigurationType getLaunchConfigurationType() throws CoreException {
|
protected String getLaunchConfigurationTypeId() {
|
||||||
return ArduinoLaunchConfigurationDelegate.getLaunchConfigurationType();
|
return ArduinoLaunchConfigurationDelegate.TYPE_ID;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected String getRemoteConnectionTypeId() {
|
||||||
|
return ArduinoRemoteConnection.TYPE_ID;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean supports(ILaunchDescriptor descriptor, IRemoteConnection target) throws CoreException {
|
||||||
|
if (!super.supports(descriptor, target)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// must have the arduino nature
|
||||||
|
IProject project = descriptor.getAdapter(IProject.class);
|
||||||
|
return ArduinoProjectNature.hasNature(project);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,8 @@ public class Activator extends AbstractUIPlugin {
|
||||||
// The plug-in ID
|
// The plug-in ID
|
||||||
public static final String PLUGIN_ID = "org.eclipse.cdt.arduino.ui"; //$NON-NLS-1$
|
public static final String PLUGIN_ID = "org.eclipse.cdt.arduino.ui"; //$NON-NLS-1$
|
||||||
|
|
||||||
public static final String IMG_ARDUINO = "arduino"; //$NON-NLS-1$
|
public static final String IMG_ARDUINO = PLUGIN_ID + ".arduino"; //$NON-NLS-1$
|
||||||
|
public static final String IMG_CONNECTION_TYPE = PLUGIN_ID + ".connectionType"; //$NON-NLS-1$
|
||||||
|
|
||||||
// The shared instance
|
// The shared instance
|
||||||
private static Activator plugin;
|
private static Activator plugin;
|
||||||
|
@ -38,6 +39,7 @@ public class Activator extends AbstractUIPlugin {
|
||||||
|
|
||||||
ImageRegistry imageRegistry = getImageRegistry();
|
ImageRegistry imageRegistry = getImageRegistry();
|
||||||
imageRegistry.put(IMG_ARDUINO, imageDescriptorFromPlugin(PLUGIN_ID, "icons/cprojects.gif")); //$NON-NLS-1$
|
imageRegistry.put(IMG_ARDUINO, imageDescriptorFromPlugin(PLUGIN_ID, "icons/cprojects.gif")); //$NON-NLS-1$
|
||||||
|
imageRegistry.put(IMG_CONNECTION_TYPE, imageDescriptorFromPlugin(PLUGIN_ID, "icons/arduino.png")); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
public void stop(BundleContext context) throws Exception {
|
public void stop(BundleContext context) throws Exception {
|
||||||
|
@ -62,10 +64,6 @@ public class Activator extends AbstractUIPlugin {
|
||||||
return plugin.getBundle().getSymbolicName();
|
return plugin.getBundle().getSymbolicName();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Image getImage(String id) {
|
|
||||||
return getImageRegistry().get(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void log(Exception e) {
|
public static void log(Exception e) {
|
||||||
if (e instanceof CoreException) {
|
if (e instanceof CoreException) {
|
||||||
plugin.getLog().log(((CoreException) e).getStatus());
|
plugin.getLog().log(((CoreException) e).getStatus());
|
||||||
|
|
|
@ -19,7 +19,7 @@ public class ArduinoDescriptorLabelProvider extends LabelProvider {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Image getImage(Object element) {
|
public Image getImage(Object element) {
|
||||||
return Activator.getDefault().getImage(Activator.IMG_ARDUINO);
|
return Activator.getDefault().getImageRegistry().get(Activator.IMG_ARDUINO);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -5,19 +5,21 @@ import java.lang.reflect.InvocationTargetException;
|
||||||
import org.eclipse.cdt.arduino.ui.internal.Activator;
|
import org.eclipse.cdt.arduino.ui.internal.Activator;
|
||||||
import org.eclipse.core.runtime.IProgressMonitor;
|
import org.eclipse.core.runtime.IProgressMonitor;
|
||||||
import org.eclipse.core.runtime.IStatus;
|
import org.eclipse.core.runtime.IStatus;
|
||||||
import org.eclipse.core.runtime.PlatformObject;
|
|
||||||
import org.eclipse.core.runtime.Status;
|
import org.eclipse.core.runtime.Status;
|
||||||
import org.eclipse.jface.operation.IRunnableContext;
|
import org.eclipse.jface.operation.IRunnableContext;
|
||||||
import org.eclipse.jface.operation.IRunnableWithProgress;
|
import org.eclipse.jface.operation.IRunnableWithProgress;
|
||||||
|
import org.eclipse.jface.viewers.ILabelProvider;
|
||||||
import org.eclipse.remote.core.IRemoteConnection;
|
import org.eclipse.remote.core.IRemoteConnection;
|
||||||
import org.eclipse.remote.core.IRemoteConnectionType;
|
import org.eclipse.remote.core.IRemoteConnectionType;
|
||||||
import org.eclipse.remote.core.IRemoteConnectionType.Service;
|
import org.eclipse.remote.core.IRemoteConnectionType.Service;
|
||||||
import org.eclipse.remote.core.exception.RemoteConnectionException;
|
import org.eclipse.remote.core.exception.RemoteConnectionException;
|
||||||
|
import org.eclipse.remote.ui.AbstractRemoteUIConnectionService;
|
||||||
import org.eclipse.remote.ui.IRemoteUIConnectionService;
|
import org.eclipse.remote.ui.IRemoteUIConnectionService;
|
||||||
import org.eclipse.remote.ui.IRemoteUIConnectionWizard;
|
import org.eclipse.remote.ui.IRemoteUIConnectionWizard;
|
||||||
|
import org.eclipse.swt.graphics.Image;
|
||||||
import org.eclipse.swt.widgets.Shell;
|
import org.eclipse.swt.widgets.Shell;
|
||||||
|
|
||||||
public class ArduinoRemoteServicesUI extends PlatformObject implements IRemoteUIConnectionService {
|
public class ArduinoRemoteServicesUI extends AbstractRemoteUIConnectionService {
|
||||||
|
|
||||||
private final IRemoteConnectionType connectionType;
|
private final IRemoteConnectionType connectionType;
|
||||||
|
|
||||||
|
@ -53,6 +55,16 @@ public class ArduinoRemoteServicesUI extends PlatformObject implements IRemoteUI
|
||||||
return new NewArduinoTargetWizard();
|
return new NewArduinoTargetWizard();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ILabelProvider getLabelProvider() {
|
||||||
|
return new DefaultLabelProvider() {
|
||||||
|
@Override
|
||||||
|
public Image getImage(Object element) {
|
||||||
|
return Activator.getDefault().getImageRegistry().get(Activator.IMG_CONNECTION_TYPE);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
public static class Factory implements IRemoteConnectionType.Service.Factory {
|
public static class Factory implements IRemoteConnectionType.Service.Factory {
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Add table
Reference in a new issue