mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-11 11:05:24 +02:00
Bug 466095 - Externalize Strings and minimize warnings.
Removed dead code and minimize use of internal interfaces. Change-Id: Ief9c29bff721940bf5a173dfacf60b715691dcf7
This commit is contained in:
parent
e8eec12ec4
commit
3c33b772b8
33 changed files with 242 additions and 242 deletions
|
@ -23,7 +23,7 @@ import org.eclipse.launchbar.core.internal.Activator;
|
||||||
public abstract class LaunchConfigurationProvider implements ILaunchConfigurationProvider {
|
public abstract class LaunchConfigurationProvider implements ILaunchConfigurationProvider {
|
||||||
|
|
||||||
// Used to make sure this is the config we've created
|
// Used to make sure this is the config we've created
|
||||||
protected static final String ORIGINAL_NAME = Activator.PLUGIN_ID + ".originalName";
|
protected static final String ORIGINAL_NAME = Activator.PLUGIN_ID + ".originalName"; //$NON-NLS-1$
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ILaunchConfiguration createLaunchConfiguration(ILaunchManager launchManager, ILaunchDescriptor descriptor) throws CoreException {
|
public ILaunchConfiguration createLaunchConfiguration(ILaunchManager launchManager, ILaunchDescriptor descriptor) throws CoreException {
|
||||||
|
@ -71,7 +71,7 @@ public abstract class LaunchConfigurationProvider implements ILaunchConfiguratio
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// we created it if it has the same name we created it with
|
// we created it if it has the same name we created it with
|
||||||
return configuration.getAttribute(ORIGINAL_NAME, "").equals(configuration.getName());
|
return configuration.getAttribute(ORIGINAL_NAME, "").equals(configuration.getName()); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,9 +28,9 @@ public class ProjectLaunchDescriptor extends PlatformObject implements ILaunchDe
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
|
public <T> T getAdapter(Class<T> adapter) {
|
||||||
if (IProject.class.equals(adapter)) {
|
if (IProject.class.equals(adapter)) {
|
||||||
return project;
|
return adapter.cast(project);
|
||||||
}
|
}
|
||||||
return super.getAdapter(adapter);
|
return super.getAdapter(adapter);
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,7 @@ import org.osgi.framework.ServiceReference;
|
||||||
|
|
||||||
public class Activator extends Plugin {
|
public class Activator extends Plugin {
|
||||||
|
|
||||||
public static final String PLUGIN_ID = "org.eclipse.launchbar.core";
|
public static final String PLUGIN_ID = "org.eclipse.launchbar.core"; //$NON-NLS-1$
|
||||||
private static Activator plugin;
|
private static Activator plugin;
|
||||||
|
|
||||||
public void start(BundleContext bundleContext) throws Exception {
|
public void start(BundleContext bundleContext) throws Exception {
|
||||||
|
@ -71,10 +71,10 @@ public class Activator extends Plugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final String DEBUG_ONE =
|
private static final String DEBUG_ONE =
|
||||||
PLUGIN_ID + "/debug/launchbar";
|
PLUGIN_ID + "/debug/launchbar"; //$NON-NLS-1$
|
||||||
|
|
||||||
public static void trace(String str) {
|
public static void trace(String str) {
|
||||||
if (plugin == null || (plugin.isDebugging() && "true".equalsIgnoreCase(Platform.getDebugOption(DEBUG_ONE))))
|
if (plugin == null || (plugin.isDebugging() && "true".equalsIgnoreCase(Platform.getDebugOption(DEBUG_ONE)))) //$NON-NLS-1$
|
||||||
System.out.println("launchbar: " + str);
|
System.out.println("launchbar: " + str); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,9 +30,9 @@ public class DefaultLaunchDescriptor extends PlatformObject implements ILaunchDe
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
|
public <T> T getAdapter(Class<T> adapter) {
|
||||||
if (ILaunchConfiguration.class.equals(adapter)) {
|
if (ILaunchConfiguration.class.equals(adapter)) {
|
||||||
return configuration;
|
return adapter.cast(configuration);
|
||||||
}
|
}
|
||||||
return super.getAdapter(adapter);
|
return super.getAdapter(adapter);
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@ import org.eclipse.launchbar.core.ILaunchDescriptorType;
|
||||||
*/
|
*/
|
||||||
public class DefaultLaunchDescriptorType implements ILaunchDescriptorType {
|
public class DefaultLaunchDescriptorType implements ILaunchDescriptorType {
|
||||||
|
|
||||||
public static final String ID = Activator.PLUGIN_ID + ".descriptorType.default";
|
public static final String ID = Activator.PLUGIN_ID + ".descriptorType.default"; //$NON-NLS-1$
|
||||||
|
|
||||||
private Map<ILaunchConfiguration, DefaultLaunchDescriptor> descriptors = new HashMap<>();
|
private Map<ILaunchConfiguration, DefaultLaunchDescriptor> descriptors = new HashMap<>();
|
||||||
|
|
||||||
|
|
|
@ -120,9 +120,9 @@ public class LaunchBarManager implements ILaunchBarManager, ILaunchConfiguration
|
||||||
private IRemoteConnection activeLaunchTarget;
|
private IRemoteConnection activeLaunchTarget;
|
||||||
|
|
||||||
// private static final String PREF_ACTIVE_CONFIG_DESC = "activeConfigDesc";
|
// private static final String PREF_ACTIVE_CONFIG_DESC = "activeConfigDesc";
|
||||||
private static final String PREF_ACTIVE_LAUNCH_MODE = "activeLaunchMode";
|
private static final String PREF_ACTIVE_LAUNCH_MODE = "activeLaunchMode"; //$NON-NLS-1$
|
||||||
private static final String PREF_ACTIVE_LAUNCH_TARGET = "activeLaunchTarget";
|
private static final String PREF_ACTIVE_LAUNCH_TARGET = "activeLaunchTarget"; //$NON-NLS-1$
|
||||||
private static final String PREF_CONFIG_DESC_ORDER = "configDescList";
|
private static final String PREF_CONFIG_DESC_ORDER = "configDescList"; //$NON-NLS-1$
|
||||||
|
|
||||||
boolean initialized = false;
|
boolean initialized = false;
|
||||||
|
|
||||||
|
@ -135,7 +135,7 @@ public class LaunchBarManager implements ILaunchBarManager, ILaunchConfiguration
|
||||||
remoteServicesManager.addRemoteConnectionChangeListener(this);
|
remoteServicesManager.addRemoteConnectionChangeListener(this);
|
||||||
|
|
||||||
if (doInit) {
|
if (doInit) {
|
||||||
new Job("Launch Bar Initialization") {
|
new Job(Messages.LaunchBarManager_0) {
|
||||||
@Override
|
@Override
|
||||||
protected IStatus run(IProgressMonitor monitor) {
|
protected IStatus run(IProgressMonitor monitor) {
|
||||||
try {
|
try {
|
||||||
|
@ -160,7 +160,7 @@ public class LaunchBarManager implements ILaunchBarManager, ILaunchConfiguration
|
||||||
|
|
||||||
// To allow override by tests
|
// To allow override by tests
|
||||||
IExtensionPoint getExtensionPoint() throws CoreException {
|
IExtensionPoint getExtensionPoint() throws CoreException {
|
||||||
return Platform.getExtensionRegistry().getExtensionPoint(Activator.PLUGIN_ID, "launchBarContributions");
|
return Platform.getExtensionRegistry().getExtensionPoint(Activator.PLUGIN_ID, "launchBarContributions"); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
// To allow override by tests
|
// To allow override by tests
|
||||||
|
@ -173,7 +173,7 @@ public class LaunchBarManager implements ILaunchBarManager, ILaunchConfiguration
|
||||||
try {
|
try {
|
||||||
// Fetch the desc order before the init messes it up
|
// Fetch the desc order before the init messes it up
|
||||||
IEclipsePreferences store = getPreferenceStore();
|
IEclipsePreferences store = getPreferenceStore();
|
||||||
String configDescIds = store.get(PREF_CONFIG_DESC_ORDER, "");
|
String configDescIds = store.get(PREF_CONFIG_DESC_ORDER, ""); //$NON-NLS-1$
|
||||||
// Load up the types
|
// Load up the types
|
||||||
loadExtensions();
|
loadExtensions();
|
||||||
// Add in the default descriptor type
|
// Add in the default descriptor type
|
||||||
|
@ -188,7 +188,7 @@ public class LaunchBarManager implements ILaunchBarManager, ILaunchConfiguration
|
||||||
launchManager.addLaunchConfigurationListener(this);
|
launchManager.addLaunchConfigurationListener(this);
|
||||||
// Reorder the descriptors based on the preference
|
// Reorder the descriptors based on the preference
|
||||||
if (!configDescIds.isEmpty()) {
|
if (!configDescIds.isEmpty()) {
|
||||||
String[] split = configDescIds.split(",");
|
String[] split = configDescIds.split(","); //$NON-NLS-1$
|
||||||
ILaunchDescriptor last = null;
|
ILaunchDescriptor last = null;
|
||||||
for (String id : split) {
|
for (String id : split) {
|
||||||
Pair<String, String> key = toId(id);
|
Pair<String, String> key = toId(id);
|
||||||
|
@ -222,17 +222,17 @@ public class LaunchBarManager implements ILaunchBarManager, ILaunchConfiguration
|
||||||
for (IConfigurationElement element : extension.getConfigurationElements()) {
|
for (IConfigurationElement element : extension.getConfigurationElements()) {
|
||||||
try {
|
try {
|
||||||
String elementName = element.getName();
|
String elementName = element.getName();
|
||||||
if (elementName.equals("descriptorType")) {
|
if (elementName.equals("descriptorType")) { //$NON-NLS-1$
|
||||||
LaunchDescriptorTypeInfo typeInfo = new LaunchDescriptorTypeInfo(element);
|
LaunchDescriptorTypeInfo typeInfo = new LaunchDescriptorTypeInfo(element);
|
||||||
addDescriptorType(typeInfo);
|
addDescriptorType(typeInfo);
|
||||||
} else if (elementName.equals("targetType")) {
|
} else if (elementName.equals("targetType")) { //$NON-NLS-1$
|
||||||
LaunchTargetTypeInfo info = new LaunchTargetTypeInfo(element);
|
LaunchTargetTypeInfo info = new LaunchTargetTypeInfo(element);
|
||||||
targetTypes.put(info.getId(), info);
|
targetTypes.put(info.getId(), info);
|
||||||
} else if (elementName.equals("configType")) {
|
} else if (elementName.equals("configType")) { //$NON-NLS-1$
|
||||||
String descriptorTypeId = element.getAttribute("descriptorType");
|
String descriptorTypeId = element.getAttribute("descriptorType"); //$NON-NLS-1$
|
||||||
String targetTypeId = element.getAttribute("targetType");
|
String targetTypeId = element.getAttribute("targetType"); //$NON-NLS-1$
|
||||||
String launchConfigTypeId = element.getAttribute("launchConfigurationType");
|
String launchConfigTypeId = element.getAttribute("launchConfigurationType"); //$NON-NLS-1$
|
||||||
String isDefaultStr = element.getAttribute("isDefault");
|
String isDefaultStr = element.getAttribute("isDefault"); //$NON-NLS-1$
|
||||||
boolean isDefault = isDefaultStr != null ? Boolean.parseBoolean(isDefaultStr) : false;
|
boolean isDefault = isDefaultStr != null ? Boolean.parseBoolean(isDefaultStr) : false;
|
||||||
|
|
||||||
// add to desc type -> target type mapping
|
// add to desc type -> target type mapping
|
||||||
|
@ -258,13 +258,13 @@ public class LaunchBarManager implements ILaunchBarManager, ILaunchConfiguration
|
||||||
|
|
||||||
// also assume that the target type works for the config type
|
// also assume that the target type works for the config type
|
||||||
addDefaultConfigTargetType(launchConfigTypeId, targetTypeId, isDefault);
|
addDefaultConfigTargetType(launchConfigTypeId, targetTypeId, isDefault);
|
||||||
} else if (elementName.equals("configProvider")) {
|
} else if (elementName.equals("configProvider")) { //$NON-NLS-1$
|
||||||
LaunchConfigProviderInfo info = new LaunchConfigProviderInfo(element);
|
LaunchConfigProviderInfo info = new LaunchConfigProviderInfo(element);
|
||||||
configProviders.put(info.getLaunchConfigTypeId(), info);
|
configProviders.put(info.getLaunchConfigTypeId(), info);
|
||||||
} else if (elementName.equals("defaultConfigTarget")) {
|
} else if (elementName.equals("defaultConfigTarget")) { //$NON-NLS-1$
|
||||||
String configTypeId = element.getAttribute("launchConfigurationType");
|
String configTypeId = element.getAttribute("launchConfigurationType"); //$NON-NLS-1$
|
||||||
String targetTypeId = element.getAttribute("targetType");
|
String targetTypeId = element.getAttribute("targetType"); //$NON-NLS-1$
|
||||||
String isDefaultStr = element.getAttribute("isDefault");
|
String isDefaultStr = element.getAttribute("isDefault"); //$NON-NLS-1$
|
||||||
boolean isDefault = isDefaultStr != null ? Boolean.parseBoolean(isDefaultStr) : false;
|
boolean isDefault = isDefaultStr != null ? Boolean.parseBoolean(isDefaultStr) : false;
|
||||||
addDefaultConfigTargetType(configTypeId, targetTypeId, isDefault);
|
addDefaultConfigTargetType(configTypeId, targetTypeId, isDefault);
|
||||||
}
|
}
|
||||||
|
@ -279,8 +279,8 @@ public class LaunchBarManager implements ILaunchBarManager, ILaunchConfiguration
|
||||||
for (IConfigurationElement element : extension.getConfigurationElements()) {
|
for (IConfigurationElement element : extension.getConfigurationElements()) {
|
||||||
try {
|
try {
|
||||||
String elementName = element.getName();
|
String elementName = element.getName();
|
||||||
if (elementName.equals("objectProvider")) {
|
if (elementName.equals("objectProvider")) { //$NON-NLS-1$
|
||||||
ILaunchObjectProvider objectProvider = (ILaunchObjectProvider) element.createExecutableExtension("class");
|
ILaunchObjectProvider objectProvider = (ILaunchObjectProvider) element.createExecutableExtension("class"); //$NON-NLS-1$
|
||||||
addObjectProvider(objectProvider);
|
addObjectProvider(objectProvider);
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -309,7 +309,7 @@ public class LaunchBarManager implements ILaunchBarManager, ILaunchConfiguration
|
||||||
orderedDescriptorTypes.add(typeInfo);
|
orderedDescriptorTypes.add(typeInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
Activator.trace("registered descriptor type " + typeInfo.getId());
|
Activator.trace("registered descriptor type " + typeInfo.getId()); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addDefaultConfigTargetType(String configTypeId, String targetTypeId, boolean isDefault) {
|
private void addDefaultConfigTargetType(String configTypeId, String targetTypeId, boolean isDefault) {
|
||||||
|
@ -371,7 +371,7 @@ public class LaunchBarManager implements ILaunchBarManager, ILaunchConfiguration
|
||||||
}
|
}
|
||||||
|
|
||||||
private String toString(Pair<String, String> key) {
|
private String toString(Pair<String, String> key) {
|
||||||
return key.getFirst() + ":" + key.getSecond();
|
return key.getFirst() + ":" + key.getSecond(); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
private Pair<String, String> toId(String key) {
|
private Pair<String, String> toId(String key) {
|
||||||
|
@ -476,7 +476,7 @@ public class LaunchBarManager implements ILaunchBarManager, ILaunchConfiguration
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ILaunchDescriptor launchObjectAdded(Object launchObject) {
|
public ILaunchDescriptor launchObjectAdded(Object launchObject) {
|
||||||
Activator.trace("launch object added " + launchObject);
|
Activator.trace("launch object added " + launchObject); //$NON-NLS-1$
|
||||||
ILaunchDescriptor desc = objectDescriptorMap.get(launchObject);
|
ILaunchDescriptor desc = objectDescriptorMap.get(launchObject);
|
||||||
if (desc != null)
|
if (desc != null)
|
||||||
return desc;
|
return desc;
|
||||||
|
@ -498,7 +498,7 @@ public class LaunchBarManager implements ILaunchBarManager, ILaunchConfiguration
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void launchObjectRemoved(Object launchObject) throws CoreException {
|
public void launchObjectRemoved(Object launchObject) throws CoreException {
|
||||||
Activator.trace("launch object removed " + launchObject);
|
Activator.trace("launch object removed " + launchObject); //$NON-NLS-1$
|
||||||
ILaunchDescriptor desc = objectDescriptorMap.get(launchObject);
|
ILaunchDescriptor desc = objectDescriptorMap.get(launchObject);
|
||||||
removeDescriptor(launchObject, desc);
|
removeDescriptor(launchObject, desc);
|
||||||
}
|
}
|
||||||
|
@ -545,16 +545,16 @@ public class LaunchBarManager implements ILaunchBarManager, ILaunchConfiguration
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setActiveLaunchDescriptor(ILaunchDescriptor descriptor) throws CoreException {
|
public void setActiveLaunchDescriptor(ILaunchDescriptor descriptor) throws CoreException {
|
||||||
Activator.trace("set active descriptor " + descriptor);
|
Activator.trace("set active descriptor " + descriptor); //$NON-NLS-1$
|
||||||
if (activeLaunchDesc == descriptor) {
|
if (activeLaunchDesc == descriptor) {
|
||||||
// Sync since targets could be changed since last time (and modes theoretically too)
|
// Sync since targets could be changed since last time (and modes theoretically too)
|
||||||
syncActiveTarget();
|
syncActiveTarget();
|
||||||
syncActiveMode();
|
syncActiveMode();
|
||||||
Activator.trace("resync for " + descriptor);
|
Activator.trace("resync for " + descriptor); //$NON-NLS-1$
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (descriptor != null && !descriptors.containsValue(descriptor))
|
if (descriptor != null && !descriptors.containsValue(descriptor))
|
||||||
throw new IllegalStateException("Active descriptor must be in the map of descriptors");
|
throw new IllegalStateException(Messages.LaunchBarManager_1);
|
||||||
if (descriptor == null)
|
if (descriptor == null)
|
||||||
descriptor = getLastUsedDescriptor(); // do not set to null unless no descriptors
|
descriptor = getLastUsedDescriptor(); // do not set to null unless no descriptors
|
||||||
activeLaunchDesc = descriptor;
|
activeLaunchDesc = descriptor;
|
||||||
|
@ -575,7 +575,7 @@ public class LaunchBarManager implements ILaunchBarManager, ILaunchConfiguration
|
||||||
}
|
}
|
||||||
|
|
||||||
private void storeActiveDescriptor(ILaunchDescriptor descriptor) {
|
private void storeActiveDescriptor(ILaunchDescriptor descriptor) {
|
||||||
Activator.trace("new active config is stored " + descriptor);
|
Activator.trace("new active config is stored " + descriptor); //$NON-NLS-1$
|
||||||
|
|
||||||
// Store the desc order, active one is the last one
|
// Store the desc order, active one is the last one
|
||||||
StringBuffer buff = new StringBuffer();
|
StringBuffer buff = new StringBuffer();
|
||||||
|
@ -624,8 +624,8 @@ public class LaunchBarManager implements ILaunchBarManager, ILaunchConfiguration
|
||||||
String modeNames[] = new String[] {
|
String modeNames[] = new String[] {
|
||||||
storedModeId,
|
storedModeId,
|
||||||
lastActiveModeId,
|
lastActiveModeId,
|
||||||
"run",
|
"run", //$NON-NLS-1$
|
||||||
"debug",
|
"debug", //$NON-NLS-1$
|
||||||
supportedModes[0].getIdentifier()
|
supportedModes[0].getIdentifier()
|
||||||
};
|
};
|
||||||
for (int i = 0; i < modeNames.length; i++) {
|
for (int i = 0; i < modeNames.length; i++) {
|
||||||
|
@ -736,7 +736,7 @@ public class LaunchBarManager implements ILaunchBarManager, ILaunchConfiguration
|
||||||
if (activeLaunchMode == mode)
|
if (activeLaunchMode == mode)
|
||||||
return;
|
return;
|
||||||
if (activeLaunchDesc != null && mode != null && !supportsMode(mode))
|
if (activeLaunchDesc != null && mode != null && !supportsMode(mode))
|
||||||
throw new IllegalStateException("Mode is not supported by descriptor");
|
throw new IllegalStateException(Messages.LaunchBarManager_2);
|
||||||
// change mode
|
// change mode
|
||||||
activeLaunchMode = mode;
|
activeLaunchMode = mode;
|
||||||
storeLaunchMode(activeLaunchDesc, mode);
|
storeLaunchMode(activeLaunchDesc, mode);
|
||||||
|
@ -920,7 +920,7 @@ public class LaunchBarManager implements ILaunchBarManager, ILaunchConfiguration
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void launchConfigurationAdded(ILaunchConfiguration configuration) {
|
public void launchConfigurationAdded(ILaunchConfiguration configuration) {
|
||||||
Activator.trace("launch config added " + configuration);
|
Activator.trace("launch config added " + configuration); //$NON-NLS-1$
|
||||||
try {
|
try {
|
||||||
LaunchConfigProviderInfo info = configProviders.get(configuration.getType().getIdentifier());
|
LaunchConfigProviderInfo info = configProviders.get(configuration.getType().getIdentifier());
|
||||||
if (info != null) {
|
if (info != null) {
|
||||||
|
@ -936,7 +936,7 @@ public class LaunchBarManager implements ILaunchBarManager, ILaunchConfiguration
|
||||||
}
|
}
|
||||||
configMap.put(provider, configuration);
|
configMap.put(provider, configuration);
|
||||||
}
|
}
|
||||||
Activator.trace("launch config claimed by " + provider);
|
Activator.trace("launch config claimed by " + provider); //$NON-NLS-1$
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -945,7 +945,7 @@ public class LaunchBarManager implements ILaunchBarManager, ILaunchConfiguration
|
||||||
Activator.log(e);
|
Activator.log(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
Activator.trace("launch config not claimed");
|
Activator.trace("launch config not claimed"); //$NON-NLS-1$
|
||||||
try {
|
try {
|
||||||
ILaunchDescriptor desc = defaultDescriptorType.getDescriptor(configuration);
|
ILaunchDescriptor desc = defaultDescriptorType.getDescriptor(configuration);
|
||||||
addDescriptor(configuration, desc);
|
addDescriptor(configuration, desc);
|
||||||
|
@ -956,7 +956,7 @@ public class LaunchBarManager implements ILaunchBarManager, ILaunchConfiguration
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void launchConfigurationRemoved(ILaunchConfiguration configuration) {
|
public void launchConfigurationRemoved(ILaunchConfiguration configuration) {
|
||||||
Activator.trace("launch config removed " + configuration);
|
Activator.trace("launch config removed " + configuration); //$NON-NLS-1$
|
||||||
|
|
||||||
// Is there any way this method is called when a LC still exists??? This may be dead code.
|
// Is there any way this method is called when a LC still exists??? This may be dead code.
|
||||||
// configuration.getType() will fail when !configuration.exists()
|
// configuration.getType() will fail when !configuration.exists()
|
||||||
|
@ -966,7 +966,7 @@ public class LaunchBarManager implements ILaunchBarManager, ILaunchConfiguration
|
||||||
if (info != null) {
|
if (info != null) {
|
||||||
ILaunchConfigurationProvider provider = info.getProvider();
|
ILaunchConfigurationProvider provider = info.getProvider();
|
||||||
if (provider.launchConfigurationRemoved(configuration)) {
|
if (provider.launchConfigurationRemoved(configuration)) {
|
||||||
Activator.trace("launch config removed by " + provider);
|
Activator.trace("launch config removed by " + provider); //$NON-NLS-1$
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -975,7 +975,7 @@ public class LaunchBarManager implements ILaunchBarManager, ILaunchConfiguration
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Activator.trace("launch config not claimed");
|
Activator.trace("launch config not claimed"); //$NON-NLS-1$
|
||||||
ILaunchDescriptor desc = objectDescriptorMap.get(configuration);
|
ILaunchDescriptor desc = objectDescriptorMap.get(configuration);
|
||||||
if (desc == null) {
|
if (desc == null) {
|
||||||
/* WARNING: This is slow. Call only as a last resort */
|
/* WARNING: This is slow. Call only as a last resort */
|
||||||
|
@ -990,7 +990,7 @@ public class LaunchBarManager implements ILaunchBarManager, ILaunchConfiguration
|
||||||
final ILaunchConfigurationProvider provider = e2.getKey();
|
final ILaunchConfigurationProvider provider = e2.getKey();
|
||||||
try {
|
try {
|
||||||
provider.launchConfigurationRemoved(e2.getValue());
|
provider.launchConfigurationRemoved(e2.getValue());
|
||||||
Activator.trace("launch config removed by " + provider);
|
Activator.trace("launch config removed by " + provider); //$NON-NLS-1$
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
Activator.log(e);
|
Activator.log(e);
|
||||||
}
|
}
|
||||||
|
@ -1007,7 +1007,7 @@ public class LaunchBarManager implements ILaunchBarManager, ILaunchConfiguration
|
||||||
for (ILaunchConfigurationProvider provider : configMap.keySet()) {
|
for (ILaunchConfigurationProvider provider : configMap.keySet()) {
|
||||||
try {
|
try {
|
||||||
if (provider.launchConfigurationRemoved(configuration)) {
|
if (provider.launchConfigurationRemoved(configuration)) {
|
||||||
Activator.trace("launch config removed by " + provider);
|
Activator.trace("launch config removed by " + provider); //$NON-NLS-1$
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
|
|
|
@ -10,7 +10,7 @@ public class LaunchConfigProviderInfo {
|
||||||
private ILaunchConfigurationProvider provider;
|
private ILaunchConfigurationProvider provider;
|
||||||
|
|
||||||
public LaunchConfigProviderInfo(IConfigurationElement element) {
|
public LaunchConfigProviderInfo(IConfigurationElement element) {
|
||||||
this.launchConfigTypeId = element.getAttribute("launchConfigurationType");
|
this.launchConfigTypeId = element.getAttribute("launchConfigurationType"); //$NON-NLS-1$
|
||||||
this.element = element;
|
this.element = element;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ public class LaunchConfigProviderInfo {
|
||||||
|
|
||||||
public ILaunchConfigurationProvider getProvider() throws CoreException {
|
public ILaunchConfigurationProvider getProvider() throws CoreException {
|
||||||
if (provider == null) {
|
if (provider == null) {
|
||||||
provider = (ILaunchConfigurationProvider) element.createExecutableExtension("class");
|
provider = (ILaunchConfigurationProvider) element.createExecutableExtension("class"); //$NON-NLS-1$
|
||||||
element = null;
|
element = null;
|
||||||
}
|
}
|
||||||
return provider;
|
return provider;
|
||||||
|
|
|
@ -8,9 +8,9 @@ public class LaunchConfigTypeInfo {
|
||||||
private final String launchConfigTypeId;
|
private final String launchConfigTypeId;
|
||||||
|
|
||||||
public LaunchConfigTypeInfo(IConfigurationElement element) {
|
public LaunchConfigTypeInfo(IConfigurationElement element) {
|
||||||
this.descriptorTypeId = element.getAttribute("descriptorType");
|
this.descriptorTypeId = element.getAttribute("descriptorType"); //$NON-NLS-1$
|
||||||
this.targetTypeId = element.getAttribute("targetType");
|
this.targetTypeId = element.getAttribute("targetType"); //$NON-NLS-1$
|
||||||
this.launchConfigTypeId = element.getAttribute("launchConfigurationType");
|
this.launchConfigTypeId = element.getAttribute("launchConfigurationType"); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getDescriptorTypeId() {
|
public String getDescriptorTypeId() {
|
||||||
|
|
|
@ -11,8 +11,8 @@ public class LaunchDescriptorTypeInfo {
|
||||||
private ILaunchDescriptorType type;
|
private ILaunchDescriptorType type;
|
||||||
|
|
||||||
public LaunchDescriptorTypeInfo(IConfigurationElement element) {
|
public LaunchDescriptorTypeInfo(IConfigurationElement element) {
|
||||||
this.id = element.getAttribute("id");
|
this.id = element.getAttribute("id"); //$NON-NLS-1$
|
||||||
String priorityStr = element.getAttribute("priority");
|
String priorityStr = element.getAttribute("priority"); //$NON-NLS-1$
|
||||||
this.priority = 1;
|
this.priority = 1;
|
||||||
if (priorityStr != null) {
|
if (priorityStr != null) {
|
||||||
try {
|
try {
|
||||||
|
@ -42,7 +42,7 @@ public class LaunchDescriptorTypeInfo {
|
||||||
|
|
||||||
public ILaunchDescriptorType getType() throws CoreException {
|
public ILaunchDescriptorType getType() throws CoreException {
|
||||||
if (type == null) {
|
if (type == null) {
|
||||||
type = (ILaunchDescriptorType) element.createExecutableExtension("class");
|
type = (ILaunchDescriptorType) element.createExecutableExtension("class"); //$NON-NLS-1$
|
||||||
element = null;
|
element = null;
|
||||||
}
|
}
|
||||||
return type;
|
return type;
|
||||||
|
|
|
@ -15,22 +15,22 @@ import org.eclipse.core.runtime.IConfigurationElement;
|
||||||
import org.eclipse.remote.core.IRemoteConnection;
|
import org.eclipse.remote.core.IRemoteConnection;
|
||||||
|
|
||||||
class LaunchTargetTypeInfo {
|
class LaunchTargetTypeInfo {
|
||||||
private static final String ANY = "";
|
private static final String ANY = ""; //$NON-NLS-1$
|
||||||
private final String id;
|
private final String id;
|
||||||
private final String connectionTypeId;
|
private final String connectionTypeId;
|
||||||
private String osname;
|
private String osname;
|
||||||
private String osarch;
|
private String osarch;
|
||||||
|
|
||||||
public LaunchTargetTypeInfo(IConfigurationElement ce) {
|
public LaunchTargetTypeInfo(IConfigurationElement ce) {
|
||||||
id = ce.getAttribute("id");
|
id = ce.getAttribute("id"); //$NON-NLS-1$
|
||||||
connectionTypeId = ce.getAttribute("connectionTypeId");
|
connectionTypeId = ce.getAttribute("connectionTypeId"); //$NON-NLS-1$
|
||||||
if (id == null || connectionTypeId == null)
|
if (id == null || connectionTypeId == null)
|
||||||
throw new NullPointerException();
|
throw new NullPointerException();
|
||||||
osname = ce.getAttribute("osname");
|
osname = ce.getAttribute("osname"); //$NON-NLS-1$
|
||||||
if (osname == null) {
|
if (osname == null) {
|
||||||
osname = ANY;
|
osname = ANY;
|
||||||
}
|
}
|
||||||
osarch = ce.getAttribute("osarch");
|
osarch = ce.getAttribute("osarch"); //$NON-NLS-1$
|
||||||
if (osarch == null) {
|
if (osarch == null) {
|
||||||
osarch = ANY;
|
osarch = ANY;
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,9 @@ import org.eclipse.osgi.util.NLS;
|
||||||
|
|
||||||
public class Messages extends NLS {
|
public class Messages extends NLS {
|
||||||
private static final String BUNDLE_NAME = "org.eclipse.launchbar.core.internal.messages"; //$NON-NLS-1$
|
private static final String BUNDLE_NAME = "org.eclipse.launchbar.core.internal.messages"; //$NON-NLS-1$
|
||||||
|
public static String LaunchBarManager_0;
|
||||||
|
public static String LaunchBarManager_1;
|
||||||
|
public static String LaunchBarManager_2;
|
||||||
public static String LocalTarget_name;
|
public static String LocalTarget_name;
|
||||||
static {
|
static {
|
||||||
// initialize resource bundle
|
// initialize resource bundle
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
LaunchBarManager_1=Active descriptor must be in the map of descriptors
|
||||||
|
LaunchBarManager_2=Mode is not supported by descriptor
|
||||||
################################################################################
|
################################################################################
|
||||||
# Copyright (c) 2014 QNX Software Systems and others.
|
# Copyright (c) 2014 QNX Software Systems and others.
|
||||||
# All rights reserved. This program and the accompanying materials
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
@ -9,4 +11,5 @@
|
||||||
# Doug Schaefer
|
# Doug Schaefer
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
|
LaunchBarManager_0=Launch Bar Initialization
|
||||||
LocalTarget_name=Local Machine
|
LocalTarget_name=Local Machine
|
||||||
|
|
|
@ -15,6 +15,6 @@ public interface ILaunchBarUIConstants {
|
||||||
/**
|
/**
|
||||||
* Parameter name for the edit target command.
|
* Parameter name for the edit target command.
|
||||||
*/
|
*/
|
||||||
public static final String TARGET_NAME = "targetName";
|
public static final String TARGET_NAME = "targetName"; //$NON-NLS-1$
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,19 +41,19 @@ public class Activator extends AbstractUIPlugin {
|
||||||
public static final String PLUGIN_ID = "org.eclipse.launchbar.ui"; //$NON-NLS-1$
|
public static final String PLUGIN_ID = "org.eclipse.launchbar.ui"; //$NON-NLS-1$
|
||||||
|
|
||||||
// Images
|
// Images
|
||||||
public static final String IMG_BUTTON_BUILD = "build";
|
public static final String IMG_BUTTON_BUILD = "build"; //$NON-NLS-1$
|
||||||
public static final String IMG_BUTTON_LAUNCH = "launch";
|
public static final String IMG_BUTTON_LAUNCH = "launch"; //$NON-NLS-1$
|
||||||
public static final String IMG_BUTTON_STOP = "stop";
|
public static final String IMG_BUTTON_STOP = "stop"; //$NON-NLS-1$
|
||||||
|
|
||||||
// Command ids
|
// Command ids
|
||||||
public static final String CMD_BUILD = PLUGIN_ID + ".command.buildActive";
|
public static final String CMD_BUILD = PLUGIN_ID + ".command.buildActive"; //$NON-NLS-1$
|
||||||
public static final String CMD_LAUNCH = PLUGIN_ID + ".command.launchActive";
|
public static final String CMD_LAUNCH = PLUGIN_ID + ".command.launchActive"; //$NON-NLS-1$
|
||||||
public static final String CMD_STOP = PLUGIN_ID + ".command.stop";
|
public static final String CMD_STOP = PLUGIN_ID + ".command.stop"; //$NON-NLS-1$
|
||||||
public static final String CMD_CONFIG = PLUGIN_ID + ".command.configureActiveLaunch";
|
public static final String CMD_CONFIG = PLUGIN_ID + ".command.configureActiveLaunch"; //$NON-NLS-1$
|
||||||
|
|
||||||
// Preference ids
|
// Preference ids
|
||||||
public static final String PREF_ENABLE_LAUNCHBAR = "enableLaunchBar";
|
public static final String PREF_ENABLE_LAUNCHBAR = "enableLaunchBar"; //$NON-NLS-1$
|
||||||
public static final String PREF_LAUNCH_HISTORY_SIZE = "launchHistorySize";
|
public static final String PREF_LAUNCH_HISTORY_SIZE = "launchHistorySize"; //$NON-NLS-1$
|
||||||
|
|
||||||
// The shared instance
|
// The shared instance
|
||||||
private static Activator plugin;
|
private static Activator plugin;
|
||||||
|
@ -72,9 +72,9 @@ public class Activator extends AbstractUIPlugin {
|
||||||
plugin = this;
|
plugin = this;
|
||||||
|
|
||||||
ImageRegistry imageRegistry = getImageRegistry();
|
ImageRegistry imageRegistry = getImageRegistry();
|
||||||
imageRegistry.put(IMG_BUTTON_BUILD, imageDescriptorFromPlugin(PLUGIN_ID, "icons/build.png"));
|
imageRegistry.put(IMG_BUTTON_BUILD, imageDescriptorFromPlugin(PLUGIN_ID, "icons/build.png")); //$NON-NLS-1$
|
||||||
imageRegistry.put(IMG_BUTTON_LAUNCH, imageDescriptorFromPlugin(PLUGIN_ID, "icons/launch.png"));
|
imageRegistry.put(IMG_BUTTON_LAUNCH, imageDescriptorFromPlugin(PLUGIN_ID, "icons/launch.png")); //$NON-NLS-1$
|
||||||
imageRegistry.put(IMG_BUTTON_STOP, imageDescriptorFromPlugin(PLUGIN_ID, "icons/stop.png"));
|
imageRegistry.put(IMG_BUTTON_STOP, imageDescriptorFromPlugin(PLUGIN_ID, "icons/stop.png")); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
public void stop(BundleContext context) throws Exception {
|
public void stop(BundleContext context) throws Exception {
|
||||||
|
|
|
@ -15,12 +15,12 @@ public class LaunchBarPreferencePage extends FieldEditorPreferencePage implement
|
||||||
@Override
|
@Override
|
||||||
public void init(IWorkbench workbench) {
|
public void init(IWorkbench workbench) {
|
||||||
setPreferenceStore(Activator.getDefault().getPreferenceStore());
|
setPreferenceStore(Activator.getDefault().getPreferenceStore());
|
||||||
setDescription("Preferences for the Launch Bar.");
|
setDescription(Messages.LaunchBarPreferencePage_0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void createFieldEditors() {
|
protected void createFieldEditors() {
|
||||||
addField(new BooleanFieldEditor(Activator.PREF_ENABLE_LAUNCHBAR, "Enable the Launch Bar.", getFieldEditorParent()));
|
addField(new BooleanFieldEditor(Activator.PREF_ENABLE_LAUNCHBAR, Messages.LaunchBarPreferencePage_1, getFieldEditorParent()));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,8 +10,6 @@
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.launchbar.ui.internal;
|
package org.eclipse.launchbar.ui.internal;
|
||||||
|
|
||||||
import java.net.MalformedURLException;
|
|
||||||
import java.net.URL;
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
@ -20,56 +18,28 @@ import org.eclipse.core.runtime.IConfigurationElement;
|
||||||
import org.eclipse.core.runtime.IExtension;
|
import org.eclipse.core.runtime.IExtension;
|
||||||
import org.eclipse.core.runtime.IExtensionPoint;
|
import org.eclipse.core.runtime.IExtensionPoint;
|
||||||
import org.eclipse.core.runtime.Platform;
|
import org.eclipse.core.runtime.Platform;
|
||||||
import org.eclipse.jface.resource.ImageDescriptor;
|
|
||||||
import org.eclipse.jface.viewers.ILabelProvider;
|
import org.eclipse.jface.viewers.ILabelProvider;
|
||||||
import org.eclipse.launchbar.core.ILaunchDescriptor;
|
import org.eclipse.launchbar.core.ILaunchDescriptor;
|
||||||
import org.eclipse.launchbar.core.internal.ExecutableExtension;
|
import org.eclipse.launchbar.core.internal.ExecutableExtension;
|
||||||
import org.eclipse.launchbar.core.internal.LaunchBarManager;
|
import org.eclipse.launchbar.core.internal.LaunchBarManager;
|
||||||
import org.eclipse.launchbar.ui.IHoverProvider;
|
|
||||||
import org.eclipse.swt.graphics.Image;
|
|
||||||
import org.eclipse.ui.INewWizard;
|
|
||||||
|
|
||||||
public class LaunchBarUIManager {
|
public class LaunchBarUIManager {
|
||||||
|
|
||||||
LaunchBarManager manager;
|
private LaunchBarManager manager;
|
||||||
Map<String, ExecutableExtension<ILabelProvider>> descriptorLabelProviders = new HashMap<>();
|
private Map<String, ExecutableExtension<ILabelProvider>> descriptorLabelProviders = new HashMap<>();
|
||||||
Map<String, LaunchBarTargetContribution> targetContributions = new HashMap<>();
|
|
||||||
|
|
||||||
private final LaunchBarTargetContribution DEFAULT_CONTRIBUTION = new LaunchBarTargetContribution(null, null, null, null,
|
|
||||||
null, null);
|
|
||||||
|
|
||||||
public LaunchBarUIManager(LaunchBarManager manager) {
|
public LaunchBarUIManager(LaunchBarManager manager) {
|
||||||
this.manager = manager;
|
this.manager = manager;
|
||||||
|
|
||||||
IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint(Activator.PLUGIN_ID, "launchBarUIContributions");
|
IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint(Activator.PLUGIN_ID, "launchBarUIContributions"); //$NON-NLS-1$
|
||||||
IExtension[] extensions = point.getExtensions();
|
IExtension[] extensions = point.getExtensions();
|
||||||
for (IExtension extension : extensions) {
|
for (IExtension extension : extensions) {
|
||||||
for (IConfigurationElement element : extension.getConfigurationElements()) {
|
for (IConfigurationElement element : extension.getConfigurationElements()) {
|
||||||
String elementName = element.getName();
|
String elementName = element.getName();
|
||||||
if (elementName.equals("descriptorUI")) {
|
if (elementName.equals("descriptorUI")) { //$NON-NLS-1$
|
||||||
String descriptorTypeId = element.getAttribute("descriptorTypeId");
|
String descriptorTypeId = element.getAttribute("descriptorTypeId"); //$NON-NLS-1$
|
||||||
ExecutableExtension<ILabelProvider> labelProvider = new ExecutableExtension<>(element, "labelProvider");
|
ExecutableExtension<ILabelProvider> labelProvider = new ExecutableExtension<>(element, "labelProvider"); //$NON-NLS-1$
|
||||||
descriptorLabelProviders.put(descriptorTypeId, labelProvider);
|
descriptorLabelProviders.put(descriptorTypeId, labelProvider);
|
||||||
} else if (elementName.equals("targetUI")) {
|
|
||||||
String targetTypeId = element.getAttribute("targetTypeId");
|
|
||||||
String targetName = element.getAttribute("name");
|
|
||||||
String iconStr = element.getAttribute("icon");
|
|
||||||
ExecutableExtension<ILabelProvider> labelProvider = new ExecutableExtension<ILabelProvider>(element, "labelProvider");
|
|
||||||
|
|
||||||
ExecutableExtension<IHoverProvider> hoverProvider = null;
|
|
||||||
if (element.getAttribute("hoverProvider") != null) {
|
|
||||||
hoverProvider = new ExecutableExtension<IHoverProvider>(element, "hoverProvider");
|
|
||||||
}
|
|
||||||
|
|
||||||
String editCommandId = element.getAttribute("editCommandId");
|
|
||||||
|
|
||||||
ExecutableExtension<INewWizard> newWizard = null;
|
|
||||||
if (element.getAttribute("newWizard") != null) {
|
|
||||||
newWizard = new ExecutableExtension<INewWizard>(element, "newWizard");
|
|
||||||
}
|
|
||||||
|
|
||||||
targetContributions.put(targetTypeId, new LaunchBarTargetContribution(targetName, iconStr,
|
|
||||||
labelProvider, hoverProvider, editCommandId, newWizard));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -84,41 +54,4 @@ public class LaunchBarUIManager {
|
||||||
return provider != null ? provider.get() : null;
|
return provider != null ? provider.get() : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private class LaunchBarTargetContribution {
|
|
||||||
String name;
|
|
||||||
String iconStr;
|
|
||||||
Image icon;
|
|
||||||
ExecutableExtension<ILabelProvider> labelProvider;
|
|
||||||
ExecutableExtension<IHoverProvider> hoverProvider;
|
|
||||||
String editCommandId;
|
|
||||||
ExecutableExtension<INewWizard> newWizard;
|
|
||||||
|
|
||||||
LaunchBarTargetContribution(String name, String iconStr,
|
|
||||||
ExecutableExtension<ILabelProvider> labelProvider,
|
|
||||||
ExecutableExtension<IHoverProvider> hoverProvider,
|
|
||||||
String editCommand,
|
|
||||||
ExecutableExtension<INewWizard> newWizard) {
|
|
||||||
this.name = name;
|
|
||||||
this.iconStr = iconStr;
|
|
||||||
this.icon = null;
|
|
||||||
this.labelProvider = labelProvider;
|
|
||||||
this.hoverProvider = hoverProvider;
|
|
||||||
this.editCommandId = editCommand;
|
|
||||||
this.newWizard = newWizard;
|
|
||||||
}
|
|
||||||
|
|
||||||
Image getIcon() {
|
|
||||||
if (icon == null) {
|
|
||||||
if (iconStr != null && !iconStr.isEmpty()) {
|
|
||||||
try {
|
|
||||||
icon = ImageDescriptor.createFromURL(new URL(iconStr)).createImage();
|
|
||||||
} catch (MalformedURLException e) {
|
|
||||||
Activator.log(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return icon;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,9 +14,46 @@ import org.eclipse.osgi.util.NLS;
|
||||||
|
|
||||||
public class Messages extends NLS {
|
public class Messages extends NLS {
|
||||||
private static final String BUNDLE_NAME = "org.eclipse.launchbar.ui.internal.messages"; //$NON-NLS-1$
|
private static final String BUNDLE_NAME = "org.eclipse.launchbar.ui.internal.messages"; //$NON-NLS-1$
|
||||||
|
public static String ConfigSelector_0;
|
||||||
|
public static String ConfigSelector_1;
|
||||||
|
public static String ConfigSelector_2;
|
||||||
|
public static String ConfigSelector_3;
|
||||||
|
public static String CSelector_0;
|
||||||
|
public static String CSelector_1;
|
||||||
|
public static String EditButton_0;
|
||||||
|
public static String FilterControl_0;
|
||||||
|
public static String FilterControl_1;
|
||||||
|
public static String LaunchBarControl_0;
|
||||||
public static String LaunchBarControl_Build;
|
public static String LaunchBarControl_Build;
|
||||||
public static String LaunchBarControl_Launch;
|
public static String LaunchBarControl_Launch;
|
||||||
public static String LaunchBarControl_Stop;
|
public static String LaunchBarControl_Stop;
|
||||||
|
public static String LaunchBarListViewer_0;
|
||||||
|
public static String LaunchBarPreferencePage_0;
|
||||||
|
public static String LaunchBarPreferencePage_1;
|
||||||
|
public static String LaunchConfigurationEditDialog_0;
|
||||||
|
public static String LaunchConfigurationEditDialog_1;
|
||||||
|
public static String LaunchConfigurationEditDialog_2;
|
||||||
|
public static String LaunchConfigurationEditDialog_3;
|
||||||
|
public static String LaunchConfigurationEditDialog_4;
|
||||||
|
public static String LaunchConfigurationEditDialog_5;
|
||||||
|
public static String LaunchConfigurationEditDialog_6;
|
||||||
|
public static String ModeSelector_0;
|
||||||
|
public static String NewLaunchConfigEditPage_0;
|
||||||
|
public static String NewLaunchConfigEditPage_1;
|
||||||
|
public static String NewLaunchConfigEditPage_2;
|
||||||
|
public static String NewLaunchConfigEditPage_3;
|
||||||
|
public static String NewLaunchConfigEditPage_4;
|
||||||
|
public static String NewLaunchConfigEditPage_5;
|
||||||
|
public static String NewLaunchConfigEditPage_6;
|
||||||
|
public static String NewLaunchConfigModePage_0;
|
||||||
|
public static String NewLaunchConfigModePage_1;
|
||||||
|
public static String NewLaunchConfigModePage_2;
|
||||||
|
public static String NewLaunchConfigTypePage_0;
|
||||||
|
public static String NewLaunchConfigTypePage_1;
|
||||||
|
public static String NewLaunchConfigTypePage_2;
|
||||||
|
public static String NewLaunchConfigWizard_0;
|
||||||
|
public static String StopActiveCommandHandler_0;
|
||||||
|
public static String StopActiveCommandHandler_1;
|
||||||
public static String TargetSelector_CreateNewTarget;
|
public static String TargetSelector_CreateNewTarget;
|
||||||
static {
|
static {
|
||||||
// initialize resource bundle
|
// initialize resource bundle
|
||||||
|
|
|
@ -20,13 +20,13 @@ import org.eclipse.core.runtime.IStatus;
|
||||||
import org.eclipse.core.runtime.Status;
|
import org.eclipse.core.runtime.Status;
|
||||||
import org.eclipse.core.runtime.jobs.IJobManager;
|
import org.eclipse.core.runtime.jobs.IJobManager;
|
||||||
import org.eclipse.core.runtime.jobs.Job;
|
import org.eclipse.core.runtime.jobs.Job;
|
||||||
import org.eclipse.debug.core.DebugException;
|
|
||||||
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.ILaunchConfigurationWorkingCopy;
|
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
|
||||||
import org.eclipse.launchbar.core.internal.LaunchBarManager;
|
import org.eclipse.launchbar.core.internal.LaunchBarManager;
|
||||||
import org.eclipse.launchbar.ui.internal.Activator;
|
import org.eclipse.launchbar.ui.internal.Activator;
|
||||||
|
import org.eclipse.launchbar.ui.internal.Messages;
|
||||||
|
|
||||||
public class StopActiveCommandHandler extends AbstractHandler {
|
public class StopActiveCommandHandler extends AbstractHandler {
|
||||||
private LaunchBarManager launchBarManager;
|
private LaunchBarManager launchBarManager;
|
||||||
|
@ -49,7 +49,7 @@ public class StopActiveCommandHandler extends AbstractHandler {
|
||||||
protected void stopActiveLaunches() {
|
protected void stopActiveLaunches() {
|
||||||
final ILaunch[] activeLaunches = DebugPlugin.getDefault().getLaunchManager().getLaunches();
|
final ILaunch[] activeLaunches = DebugPlugin.getDefault().getLaunchManager().getLaunches();
|
||||||
if (activeLaunches != null && activeLaunches.length > 0) {
|
if (activeLaunches != null && activeLaunches.length > 0) {
|
||||||
new Job("Stopping launches") {
|
new Job(Messages.StopActiveCommandHandler_0) {
|
||||||
protected IStatus run(IProgressMonitor monitor) {
|
protected IStatus run(IProgressMonitor monitor) {
|
||||||
try {
|
try {
|
||||||
ILaunchConfiguration activeConfig = launchBarManager.getActiveLaunchConfiguration();
|
ILaunchConfiguration activeConfig = launchBarManager.getActiveLaunchConfiguration();
|
||||||
|
@ -74,7 +74,7 @@ public class StopActiveCommandHandler extends AbstractHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void stopBuild() {
|
protected void stopBuild() {
|
||||||
Job job = new Job("Stopping build") {
|
Job job = new Job(Messages.StopActiveCommandHandler_1) {
|
||||||
@Override
|
@Override
|
||||||
protected IStatus run(IProgressMonitor progress) {
|
protected IStatus run(IProgressMonitor progress) {
|
||||||
// stops all builds
|
// stops all builds
|
||||||
|
|
|
@ -24,6 +24,7 @@ import org.eclipse.jface.viewers.IStructuredContentProvider;
|
||||||
import org.eclipse.jface.viewers.SelectionChangedEvent;
|
import org.eclipse.jface.viewers.SelectionChangedEvent;
|
||||||
import org.eclipse.jface.viewers.StructuredSelection;
|
import org.eclipse.jface.viewers.StructuredSelection;
|
||||||
import org.eclipse.launchbar.ui.IHoverProvider;
|
import org.eclipse.launchbar.ui.IHoverProvider;
|
||||||
|
import org.eclipse.launchbar.ui.internal.Messages;
|
||||||
import org.eclipse.swt.SWT;
|
import org.eclipse.swt.SWT;
|
||||||
import org.eclipse.swt.events.DisposeEvent;
|
import org.eclipse.swt.events.DisposeEvent;
|
||||||
import org.eclipse.swt.events.DisposeListener;
|
import org.eclipse.swt.events.DisposeListener;
|
||||||
|
@ -98,12 +99,12 @@ public abstract class CSelector extends Composite {
|
||||||
final Object eventSource = e.getSource();
|
final Object eventSource = e.getSource();
|
||||||
if ((eventSource == currentLabel || eventSource == buttonComposite || eventSource == currentIcon)) {
|
if ((eventSource == currentLabel || eventSource == buttonComposite || eventSource == currentIcon)) {
|
||||||
if (hoverProvider.displayHover(selection)) {
|
if (hoverProvider.displayHover(selection)) {
|
||||||
buttonComposite.setToolTipText("");
|
buttonComposite.setToolTipText(""); //$NON-NLS-1$
|
||||||
if (currentLabel != null) {
|
if (currentLabel != null) {
|
||||||
currentLabel.setToolTipText("");
|
currentLabel.setToolTipText(""); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
if (currentIcon != null) {
|
if (currentIcon != null) {
|
||||||
currentIcon.setToolTipText("");
|
currentIcon.setToolTipText(""); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
toolTipWasModified = true;
|
toolTipWasModified = true;
|
||||||
}
|
}
|
||||||
|
@ -131,12 +132,13 @@ public abstract class CSelector extends Composite {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
protected boolean isFocusAncestor(Control control) {
|
protected boolean myIsFocusAncestor(Control control) {
|
||||||
while (control != null && control != this && !(control instanceof Shell)) {
|
while (control != null && control != this && !(control instanceof Shell)) {
|
||||||
control = control.getParent();
|
control = control.getParent();
|
||||||
}
|
}
|
||||||
return control == this;
|
return control == this;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Listener focusOutListener = new Listener() {
|
private Listener focusOutListener = new Listener() {
|
||||||
private Job closingJob;
|
private Job closingJob;
|
||||||
|
|
||||||
|
@ -146,7 +148,7 @@ public abstract class CSelector extends Composite {
|
||||||
case SWT.FocusIn:
|
case SWT.FocusIn:
|
||||||
if (closingJob != null)
|
if (closingJob != null)
|
||||||
closingJob.cancel();
|
closingJob.cancel();
|
||||||
if (event.widget instanceof Control && isFocusAncestor((Control) event.widget)) {
|
if (event.widget instanceof Control && myIsFocusAncestor((Control) event.widget)) {
|
||||||
break; // not closing
|
break; // not closing
|
||||||
}
|
}
|
||||||
if (!isPopUpInFocus()) {
|
if (!isPopUpInFocus()) {
|
||||||
|
@ -159,7 +161,7 @@ public abstract class CSelector extends Composite {
|
||||||
// to another child, lets schedule a job to wait before we close
|
// to another child, lets schedule a job to wait before we close
|
||||||
if (closingJob != null)
|
if (closingJob != null)
|
||||||
closingJob.cancel();
|
closingJob.cancel();
|
||||||
closingJob = new Job("Closing popup") {
|
closingJob = new Job(Messages.CSelector_0) {
|
||||||
@Override
|
@Override
|
||||||
protected IStatus run(IProgressMonitor monitor) {
|
protected IStatus run(IProgressMonitor monitor) {
|
||||||
if (monitor.isCanceled())
|
if (monitor.isCanceled())
|
||||||
|
@ -246,7 +248,7 @@ public abstract class CSelector extends Composite {
|
||||||
public void setDelayedSelection(final Object element, long millis) {
|
public void setDelayedSelection(final Object element, long millis) {
|
||||||
if (delayJob != null)
|
if (delayJob != null)
|
||||||
delayJob.cancel();
|
delayJob.cancel();
|
||||||
delayJob = new Job("Updating launch bar selection") {
|
delayJob = new Job(Messages.CSelector_1) {
|
||||||
@Override
|
@Override
|
||||||
protected IStatus run(final IProgressMonitor monitor) {
|
protected IStatus run(final IProgressMonitor monitor) {
|
||||||
if (monitor.isCanceled())
|
if (monitor.isCanceled())
|
||||||
|
|
|
@ -28,6 +28,7 @@ import org.eclipse.launchbar.core.internal.LaunchBarManager;
|
||||||
import org.eclipse.launchbar.ui.internal.Activator;
|
import org.eclipse.launchbar.ui.internal.Activator;
|
||||||
import org.eclipse.launchbar.ui.internal.DefaultDescriptorLabelProvider;
|
import org.eclipse.launchbar.ui.internal.DefaultDescriptorLabelProvider;
|
||||||
import org.eclipse.launchbar.ui.internal.LaunchBarUIManager;
|
import org.eclipse.launchbar.ui.internal.LaunchBarUIManager;
|
||||||
|
import org.eclipse.launchbar.ui.internal.Messages;
|
||||||
import org.eclipse.launchbar.ui.internal.commands.ConfigureActiveLaunchHandler;
|
import org.eclipse.launchbar.ui.internal.commands.ConfigureActiveLaunchHandler;
|
||||||
import org.eclipse.launchbar.ui.internal.dialogs.NewLaunchConfigWizard;
|
import org.eclipse.launchbar.ui.internal.dialogs.NewLaunchConfigWizard;
|
||||||
import org.eclipse.swt.SWT;
|
import org.eclipse.swt.SWT;
|
||||||
|
@ -46,17 +47,16 @@ import org.eclipse.swt.layout.GridLayout;
|
||||||
import org.eclipse.swt.widgets.Composite;
|
import org.eclipse.swt.widgets.Composite;
|
||||||
import org.eclipse.swt.widgets.Label;
|
import org.eclipse.swt.widgets.Label;
|
||||||
|
|
||||||
@SuppressWarnings("restriction")
|
|
||||||
public class ConfigSelector extends CSelector {
|
public class ConfigSelector extends CSelector {
|
||||||
private LaunchBarUIManager uiManager = Activator.getDefault().getLaunchBarUIManager();
|
private LaunchBarUIManager uiManager = Activator.getDefault().getLaunchBarUIManager();
|
||||||
private DefaultDescriptorLabelProvider defaultProvider;
|
private DefaultDescriptorLabelProvider defaultProvider;
|
||||||
|
|
||||||
private static final String[] noConfigs = new String[] { "No Launch Configurations" };
|
private static final String[] noConfigs = new String[] { Messages.ConfigSelector_0 };
|
||||||
|
|
||||||
public ConfigSelector(Composite parent, int style) {
|
public ConfigSelector(Composite parent, int style) {
|
||||||
super(parent, style);
|
super(parent, style);
|
||||||
|
|
||||||
setToolTipText("Launch configuration");
|
setToolTipText(Messages.ConfigSelector_1);
|
||||||
defaultProvider = new DefaultDescriptorLabelProvider();
|
defaultProvider = new DefaultDescriptorLabelProvider();
|
||||||
|
|
||||||
setContentProvider(new IStructuredContentProvider() {
|
setContentProvider(new IStructuredContentProvider() {
|
||||||
|
@ -187,7 +187,7 @@ public class ConfigSelector extends CSelector {
|
||||||
|
|
||||||
final Label createLabel = new Label(createButton, SWT.None);
|
final Label createLabel = new Label(createButton, SWT.None);
|
||||||
createLabel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
|
createLabel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
|
||||||
createLabel.setText("Create New Configuration...");
|
createLabel.setText(Messages.ConfigSelector_2);
|
||||||
createLabel.setBackground(backgroundColor);
|
createLabel.setBackground(backgroundColor);
|
||||||
|
|
||||||
MouseListener mouseListener = new MouseAdapter() {
|
MouseListener mouseListener = new MouseAdapter() {
|
||||||
|
@ -195,7 +195,7 @@ public class ConfigSelector extends CSelector {
|
||||||
final NewLaunchConfigWizard wizard = new NewLaunchConfigWizard();
|
final NewLaunchConfigWizard wizard = new NewLaunchConfigWizard();
|
||||||
WizardDialog dialog = new WizardDialog(getShell(), wizard);
|
WizardDialog dialog = new WizardDialog(getShell(), wizard);
|
||||||
if (dialog.open() == Window.OK) {
|
if (dialog.open() == Window.OK) {
|
||||||
new Job("Create Launch Configuration") {
|
new Job(Messages.ConfigSelector_3) {
|
||||||
protected IStatus run(IProgressMonitor monitor) {
|
protected IStatus run(IProgressMonitor monitor) {
|
||||||
try {
|
try {
|
||||||
final LaunchBarManager barManager = uiManager.getManager();
|
final LaunchBarManager barManager = uiManager.getManager();
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
package org.eclipse.launchbar.ui.internal.controls;
|
package org.eclipse.launchbar.ui.internal.controls;
|
||||||
|
|
||||||
import org.eclipse.launchbar.ui.internal.Activator;
|
import org.eclipse.launchbar.ui.internal.Activator;
|
||||||
|
import org.eclipse.launchbar.ui.internal.Messages;
|
||||||
import org.eclipse.swt.widgets.Composite;
|
import org.eclipse.swt.widgets.Composite;
|
||||||
|
|
||||||
public class EditButton extends CButton {
|
public class EditButton extends CButton {
|
||||||
public EditButton(Composite parent, int style) {
|
public EditButton(Composite parent, int style) {
|
||||||
super(parent, style);
|
super(parent, style);
|
||||||
setHotImage(Activator.getDefault().getImage("icons/config_config.png"));
|
setHotImage(Activator.getDefault().getImage("icons/config_config.png")); //$NON-NLS-1$
|
||||||
setColdImage(Activator.getDefault().getImage("icons/edit_cold.png"));
|
setColdImage(Activator.getDefault().getImage("icons/edit_cold.png")); //$NON-NLS-1$
|
||||||
setToolTipText("Edit");
|
setToolTipText(Messages.EditButton_0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,7 @@ import org.eclipse.jface.viewers.ILabelProvider;
|
||||||
import org.eclipse.jface.viewers.StructuredSelection;
|
import org.eclipse.jface.viewers.StructuredSelection;
|
||||||
import org.eclipse.jface.viewers.Viewer;
|
import org.eclipse.jface.viewers.Viewer;
|
||||||
import org.eclipse.jface.viewers.ViewerFilter;
|
import org.eclipse.jface.viewers.ViewerFilter;
|
||||||
|
import org.eclipse.launchbar.ui.internal.Messages;
|
||||||
import org.eclipse.osgi.util.NLS;
|
import org.eclipse.osgi.util.NLS;
|
||||||
import org.eclipse.swt.SWT;
|
import org.eclipse.swt.SWT;
|
||||||
import org.eclipse.swt.accessibility.AccessibleAdapter;
|
import org.eclipse.swt.accessibility.AccessibleAdapter;
|
||||||
|
@ -33,7 +34,6 @@ import org.eclipse.swt.widgets.Composite;
|
||||||
import org.eclipse.swt.widgets.Control;
|
import org.eclipse.swt.widgets.Control;
|
||||||
import org.eclipse.swt.widgets.Display;
|
import org.eclipse.swt.widgets.Display;
|
||||||
import org.eclipse.swt.widgets.Text;
|
import org.eclipse.swt.widgets.Text;
|
||||||
import org.eclipse.ui.internal.WorkbenchMessages;
|
|
||||||
import org.eclipse.ui.progress.WorkbenchJob;
|
import org.eclipse.ui.progress.WorkbenchJob;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -101,7 +101,7 @@ public class FilterControl extends Composite {
|
||||||
protected void init() {
|
protected void init() {
|
||||||
createControl(this, SWT.NONE);
|
createControl(this, SWT.NONE);
|
||||||
createRefreshJob();
|
createRefreshJob();
|
||||||
setInitialText(WorkbenchMessages.FilteredTree_FilterMessage);
|
setInitialText(Messages.FilterControl_0);
|
||||||
setFont(parent.getFont());
|
setFont(parent.getFont());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -224,7 +224,7 @@ public class FilterControl extends Composite {
|
||||||
e.result = initialText;
|
e.result = initialText;
|
||||||
} else {
|
} else {
|
||||||
e.result = NLS.bind(
|
e.result = NLS.bind(
|
||||||
WorkbenchMessages.FilteredTree_AccessibleListenerFiltered,
|
Messages.FilterControl_1,
|
||||||
new String[] {
|
new String[] {
|
||||||
filterTextString,
|
filterTextString,
|
||||||
String.valueOf(getFilteredItemsCount()) });
|
String.valueOf(getFilteredItemsCount()) });
|
||||||
|
|
|
@ -73,7 +73,7 @@ public class LaunchBarControl implements Listener {
|
||||||
|
|
||||||
Label label = new Label(container, SWT.NONE);
|
Label label = new Label(container, SWT.NONE);
|
||||||
label.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
|
label.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
|
||||||
label.setText("on" + ":");
|
label.setText(Messages.LaunchBarControl_0 + ":"); //$NON-NLS-1$
|
||||||
|
|
||||||
targetSelector = new TargetSelector(container, SWT.NONE);
|
targetSelector = new TargetSelector(container, SWT.NONE);
|
||||||
targetSelector.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
|
targetSelector.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
|
||||||
|
|
|
@ -7,12 +7,10 @@ import java.util.List;
|
||||||
import org.eclipse.jface.layout.GridDataFactory;
|
import org.eclipse.jface.layout.GridDataFactory;
|
||||||
import org.eclipse.jface.layout.GridLayoutFactory;
|
import org.eclipse.jface.layout.GridLayoutFactory;
|
||||||
import org.eclipse.jface.preference.IPreferenceStore;
|
import org.eclipse.jface.preference.IPreferenceStore;
|
||||||
import org.eclipse.jface.viewers.ArrayContentProvider;
|
|
||||||
import org.eclipse.jface.viewers.ICellModifier;
|
import org.eclipse.jface.viewers.ICellModifier;
|
||||||
import org.eclipse.jface.viewers.IFontProvider;
|
import org.eclipse.jface.viewers.IFontProvider;
|
||||||
import org.eclipse.jface.viewers.ILabelProvider;
|
import org.eclipse.jface.viewers.ILabelProvider;
|
||||||
import org.eclipse.jface.viewers.IStructuredContentProvider;
|
import org.eclipse.jface.viewers.IStructuredContentProvider;
|
||||||
import org.eclipse.jface.viewers.LabelProvider;
|
|
||||||
import org.eclipse.jface.viewers.StructuredSelection;
|
import org.eclipse.jface.viewers.StructuredSelection;
|
||||||
import org.eclipse.jface.viewers.StructuredViewer;
|
import org.eclipse.jface.viewers.StructuredViewer;
|
||||||
import org.eclipse.jface.viewers.Viewer;
|
import org.eclipse.jface.viewers.Viewer;
|
||||||
|
@ -20,6 +18,7 @@ import org.eclipse.jface.viewers.ViewerComparator;
|
||||||
import org.eclipse.jface.viewers.ViewerFilter;
|
import org.eclipse.jface.viewers.ViewerFilter;
|
||||||
import org.eclipse.launchbar.core.ILaunchDescriptor;
|
import org.eclipse.launchbar.core.ILaunchDescriptor;
|
||||||
import org.eclipse.launchbar.ui.internal.Activator;
|
import org.eclipse.launchbar.ui.internal.Activator;
|
||||||
|
import org.eclipse.launchbar.ui.internal.Messages;
|
||||||
import org.eclipse.swt.SWT;
|
import org.eclipse.swt.SWT;
|
||||||
import org.eclipse.swt.custom.ScrolledComposite;
|
import org.eclipse.swt.custom.ScrolledComposite;
|
||||||
import org.eclipse.swt.events.DisposeEvent;
|
import org.eclipse.swt.events.DisposeEvent;
|
||||||
|
@ -44,15 +43,12 @@ import org.eclipse.swt.graphics.Point;
|
||||||
import org.eclipse.swt.graphics.Rectangle;
|
import org.eclipse.swt.graphics.Rectangle;
|
||||||
import org.eclipse.swt.layout.GridData;
|
import org.eclipse.swt.layout.GridData;
|
||||||
import org.eclipse.swt.layout.GridLayout;
|
import org.eclipse.swt.layout.GridLayout;
|
||||||
import org.eclipse.swt.layout.RowLayout;
|
|
||||||
import org.eclipse.swt.widgets.Composite;
|
import org.eclipse.swt.widgets.Composite;
|
||||||
import org.eclipse.swt.widgets.Control;
|
import org.eclipse.swt.widgets.Control;
|
||||||
import org.eclipse.swt.widgets.Display;
|
|
||||||
import org.eclipse.swt.widgets.Event;
|
import org.eclipse.swt.widgets.Event;
|
||||||
import org.eclipse.swt.widgets.Label;
|
import org.eclipse.swt.widgets.Label;
|
||||||
import org.eclipse.swt.widgets.Listener;
|
import org.eclipse.swt.widgets.Listener;
|
||||||
import org.eclipse.swt.widgets.Sash;
|
import org.eclipse.swt.widgets.Sash;
|
||||||
import org.eclipse.swt.widgets.Shell;
|
|
||||||
import org.eclipse.swt.widgets.Widget;
|
import org.eclipse.swt.widgets.Widget;
|
||||||
|
|
||||||
public class LaunchBarListViewer extends StructuredViewer {
|
public class LaunchBarListViewer extends StructuredViewer {
|
||||||
|
@ -78,11 +74,13 @@ public class LaunchBarListViewer extends StructuredViewer {
|
||||||
}
|
}
|
||||||
|
|
||||||
// have to override it because standard ViewerComparator compares by labels only
|
// have to override it because standard ViewerComparator compares by labels only
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
@Override
|
@Override
|
||||||
public int compare(Viewer viewer, Object e1, Object e2) {
|
public int compare(Viewer viewer, Object e1, Object e2) {
|
||||||
return getComparator().compare(e1, e2);
|
return getComparator().compare(e1, e2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private TraverseListener listItemTraverseListener = new TraverseListener() {
|
private TraverseListener listItemTraverseListener = new TraverseListener() {
|
||||||
@Override
|
@Override
|
||||||
public void keyTraversed(TraverseEvent e) {
|
public void keyTraversed(TraverseEvent e) {
|
||||||
|
@ -152,7 +150,7 @@ public class LaunchBarListViewer extends StructuredViewer {
|
||||||
filterControl.setVisible(true);
|
filterControl.setVisible(true);
|
||||||
filterControl.setFocus();
|
filterControl.setFocus();
|
||||||
filterControl.getParent().layout(true);
|
filterControl.getParent().layout(true);
|
||||||
filterControl.getFilterText().setText(e.character + "");
|
filterControl.getFilterText().setText(e.character + ""); //$NON-NLS-1$
|
||||||
filterControl.getFilterText().setSelection(1);
|
filterControl.getFilterText().setSelection(1);
|
||||||
} else if (e.character == SWT.ESC) {
|
} else if (e.character == SWT.ESC) {
|
||||||
setDefaultSelection(new StructuredSelection());
|
setDefaultSelection(new StructuredSelection());
|
||||||
|
@ -175,7 +173,7 @@ public class LaunchBarListViewer extends StructuredViewer {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "[" + index + "] " + labelProvider.getText(element);
|
return "[" + index + "] " + labelProvider.getText(element); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
}
|
}
|
||||||
public ListItem(Composite parent, int style, Object element, int index, ILabelProvider labelProvider,
|
public ListItem(Composite parent, int style, Object element, int index, ILabelProvider labelProvider,
|
||||||
ICellModifier modifier) {
|
ICellModifier modifier) {
|
||||||
|
@ -427,7 +425,7 @@ public class LaunchBarListViewer extends StructuredViewer {
|
||||||
// ignore
|
// ignore
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
sash.setToolTipText("Increase/Decrease size of recently used elements pane");
|
sash.setToolTipText(Messages.LaunchBarListViewer_0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -504,6 +502,7 @@ public class LaunchBarListViewer extends StructuredViewer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("rawtypes")
|
||||||
@Override
|
@Override
|
||||||
protected List getSelectionFromWidget() {
|
protected List getSelectionFromWidget() {
|
||||||
ArrayList<Object> arrayList = new ArrayList<>();
|
ArrayList<Object> arrayList = new ArrayList<>();
|
||||||
|
@ -569,7 +568,7 @@ public class LaunchBarListViewer extends StructuredViewer {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void setSelectionToWidget(List l, boolean reveal) {
|
protected void setSelectionToWidget(@SuppressWarnings("rawtypes") List l, boolean reveal) {
|
||||||
if (l.size() == 0) {
|
if (l.size() == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -682,29 +681,6 @@ public class LaunchBarListViewer extends StructuredViewer {
|
||||||
this.finalSelection = finalSelection;
|
this.finalSelection = finalSelection;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
|
||||||
Display display = Display.getDefault();
|
|
||||||
Shell shell = new Shell();
|
|
||||||
RowLayout rowLayout = new RowLayout();
|
|
||||||
shell.setLayout(rowLayout);
|
|
||||||
(new Label(shell, SWT.NULL)).setText("Hello");
|
|
||||||
LaunchBarListViewer v = new LaunchBarListViewer(shell);
|
|
||||||
v.setContentProvider(new ArrayContentProvider());
|
|
||||||
v.setLabelProvider(new LabelProvider());
|
|
||||||
v.setInput(new String[] { "aaa", "bbb", "ccc" });
|
|
||||||
shell.pack();
|
|
||||||
shell.open();
|
|
||||||
// textUser.forceFocus();
|
|
||||||
// Set up the event loop.
|
|
||||||
while (!shell.isDisposed()) {
|
|
||||||
if (!display.readAndDispatch()) {
|
|
||||||
// If no more entries in event queue
|
|
||||||
display.sleep();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
display.dispose();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setFocus() {
|
public void setFocus() {
|
||||||
if (selIndex >= 0 && listItems != null && listItems.length < selIndex)
|
if (selIndex >= 0 && listItems != null && listItems.length < selIndex)
|
||||||
listItems[selIndex].setFocus();
|
listItems[selIndex].setFocus();
|
||||||
|
|
|
@ -25,6 +25,7 @@ import org.eclipse.jface.viewers.LabelProvider;
|
||||||
import org.eclipse.jface.viewers.Viewer;
|
import org.eclipse.jface.viewers.Viewer;
|
||||||
import org.eclipse.launchbar.core.internal.LaunchBarManager;
|
import org.eclipse.launchbar.core.internal.LaunchBarManager;
|
||||||
import org.eclipse.launchbar.ui.internal.Activator;
|
import org.eclipse.launchbar.ui.internal.Activator;
|
||||||
|
import org.eclipse.launchbar.ui.internal.Messages;
|
||||||
import org.eclipse.swt.graphics.Image;
|
import org.eclipse.swt.graphics.Image;
|
||||||
import org.eclipse.swt.graphics.Point;
|
import org.eclipse.swt.graphics.Point;
|
||||||
import org.eclipse.swt.widgets.Composite;
|
import org.eclipse.swt.widgets.Composite;
|
||||||
|
@ -32,14 +33,14 @@ import org.eclipse.swt.widgets.Composite;
|
||||||
@SuppressWarnings("restriction")
|
@SuppressWarnings("restriction")
|
||||||
public class ModeSelector extends CSelector {
|
public class ModeSelector extends CSelector {
|
||||||
|
|
||||||
private static final String[] noModes = new String[] { "---" };
|
private static final String[] noModes = new String[] { "---" }; //$NON-NLS-1$
|
||||||
|
|
||||||
private final LaunchBarManager manager = Activator.getDefault().getLaunchBarUIManager().getManager();
|
private final LaunchBarManager manager = Activator.getDefault().getLaunchBarUIManager().getManager();
|
||||||
|
|
||||||
public ModeSelector(Composite parent, int style) {
|
public ModeSelector(Composite parent, int style) {
|
||||||
super(parent, style);
|
super(parent, style);
|
||||||
|
|
||||||
setToolTipText("Launch configuration");
|
setToolTipText(Messages.ModeSelector_0);
|
||||||
|
|
||||||
setContentProvider(new IStructuredContentProvider() {
|
setContentProvider(new IStructuredContentProvider() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -98,7 +99,7 @@ public class ModeSelector extends CSelector {
|
||||||
try {
|
try {
|
||||||
ILaunchGroup group = getLaunchGroup(mode.getIdentifier());
|
ILaunchGroup group = getLaunchGroup(mode.getIdentifier());
|
||||||
if (group != null) {
|
if (group != null) {
|
||||||
return group.getLabel().replace("&", "");
|
return group.getLabel().replace("&", ""); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
}
|
}
|
||||||
} catch (CoreException e) {
|
} catch (CoreException e) {
|
||||||
Activator.log(e.getStatus());
|
Activator.log(e.getStatus());
|
||||||
|
@ -115,21 +116,21 @@ public class ModeSelector extends CSelector {
|
||||||
String mode1 = ((ILaunchMode)o1).getIdentifier();
|
String mode1 = ((ILaunchMode)o1).getIdentifier();
|
||||||
String mode2 = ((ILaunchMode)o2).getIdentifier();
|
String mode2 = ((ILaunchMode)o2).getIdentifier();
|
||||||
// run comes first, then debug, then the rest
|
// run comes first, then debug, then the rest
|
||||||
if (mode1.equals("run")) {
|
if (mode1.equals("run")) { //$NON-NLS-1$
|
||||||
if (mode2.equals("run"))
|
if (mode2.equals("run")) //$NON-NLS-1$
|
||||||
return 0;
|
return 0;
|
||||||
else
|
else
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (mode2.equals("run"))
|
if (mode2.equals("run")) //$NON-NLS-1$
|
||||||
return 1;
|
return 1;
|
||||||
if (mode1.equals("debug")) {
|
if (mode1.equals("debug")) { //$NON-NLS-1$
|
||||||
if (mode2.equals("debug"))
|
if (mode2.equals("debug")) //$NON-NLS-1$
|
||||||
return 0;
|
return 0;
|
||||||
else
|
else
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (mode2.equals("debug"))
|
if (mode2.equals("debug")) //$NON-NLS-1$
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -26,6 +26,7 @@ import org.eclipse.jface.dialogs.IDialogConstants;
|
||||||
import org.eclipse.jface.dialogs.MessageDialog;
|
import org.eclipse.jface.dialogs.MessageDialog;
|
||||||
import org.eclipse.jface.operation.IRunnableWithProgress;
|
import org.eclipse.jface.operation.IRunnableWithProgress;
|
||||||
import org.eclipse.launchbar.ui.internal.Activator;
|
import org.eclipse.launchbar.ui.internal.Activator;
|
||||||
|
import org.eclipse.launchbar.ui.internal.Messages;
|
||||||
import org.eclipse.swt.SWT;
|
import org.eclipse.swt.SWT;
|
||||||
import org.eclipse.swt.graphics.Font;
|
import org.eclipse.swt.graphics.Font;
|
||||||
import org.eclipse.swt.layout.GridData;
|
import org.eclipse.swt.layout.GridData;
|
||||||
|
@ -82,9 +83,9 @@ public class LaunchConfigurationEditDialog extends LaunchConfigurationProperties
|
||||||
leftButtonComp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
leftButtonComp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
||||||
leftButtonComp.setFont(parent.getFont());
|
leftButtonComp.setFont(parent.getFont());
|
||||||
|
|
||||||
createButton(leftButtonComp, DELETE_ID, "Delete", false);
|
createButton(leftButtonComp, DELETE_ID, Messages.LaunchConfigurationEditDialog_0, false);
|
||||||
createButton(leftButtonComp, DUPLICATE_ID, "Duplicate", false);
|
createButton(leftButtonComp, DUPLICATE_ID, Messages.LaunchConfigurationEditDialog_1, false);
|
||||||
createButton(leftButtonComp, LAUNCH_ID, "Launch", false);
|
createButton(leftButtonComp, LAUNCH_ID, Messages.LaunchConfigurationEditDialog_2, false);
|
||||||
|
|
||||||
Composite mainButtonComp = new Composite(composite, SWT.NONE);
|
Composite mainButtonComp = new Composite(composite, SWT.NONE);
|
||||||
layout = new GridLayout();
|
layout = new GridLayout();
|
||||||
|
@ -121,9 +122,9 @@ public class LaunchConfigurationEditDialog extends LaunchConfigurationProperties
|
||||||
if (c.isWorkingCopy())
|
if (c.isWorkingCopy())
|
||||||
c = ((ILaunchConfigurationWorkingCopy)c).getOriginal();
|
c = ((ILaunchConfigurationWorkingCopy)c).getOriginal();
|
||||||
final ILaunchConfiguration config = c;
|
final ILaunchConfiguration config = c;
|
||||||
if (MessageDialog.openConfirm(getShell(), "Confirm Delete",
|
if (MessageDialog.openConfirm(getShell(), Messages.LaunchConfigurationEditDialog_3,
|
||||||
"Are you sure you want to delete " + config.getName())) {
|
Messages.LaunchConfigurationEditDialog_4 + config.getName())) {
|
||||||
new Job("Deleting launch configuration") {
|
new Job(Messages.LaunchConfigurationEditDialog_5) {
|
||||||
protected IStatus run(IProgressMonitor monitor) {
|
protected IStatus run(IProgressMonitor monitor) {
|
||||||
try {
|
try {
|
||||||
config.delete();
|
config.delete();
|
||||||
|
@ -139,7 +140,7 @@ public class LaunchConfigurationEditDialog extends LaunchConfigurationProperties
|
||||||
case DUPLICATE_ID:
|
case DUPLICATE_ID:
|
||||||
final ILaunchConfiguration original = getLaunchConfiguration();
|
final ILaunchConfiguration original = getLaunchConfiguration();
|
||||||
final String newName = DebugPlugin.getDefault().getLaunchManager().generateLaunchConfigurationName(original.getName());
|
final String newName = DebugPlugin.getDefault().getLaunchManager().generateLaunchConfigurationName(original.getName());
|
||||||
new Job("Duplicating launch configuration") {
|
new Job(Messages.LaunchConfigurationEditDialog_6) {
|
||||||
protected IStatus run(IProgressMonitor monitor) {
|
protected IStatus run(IProgressMonitor monitor) {
|
||||||
try {
|
try {
|
||||||
ILaunchConfigurationWorkingCopy newWorkingCopy = original.copy(newName);
|
ILaunchConfigurationWorkingCopy newWorkingCopy = original.copy(newName);
|
||||||
|
|
|
@ -30,6 +30,7 @@ import org.eclipse.jface.resource.ColorRegistry;
|
||||||
import org.eclipse.jface.resource.JFaceResources;
|
import org.eclipse.jface.resource.JFaceResources;
|
||||||
import org.eclipse.jface.wizard.WizardPage;
|
import org.eclipse.jface.wizard.WizardPage;
|
||||||
import org.eclipse.launchbar.ui.internal.Activator;
|
import org.eclipse.launchbar.ui.internal.Activator;
|
||||||
|
import org.eclipse.launchbar.ui.internal.Messages;
|
||||||
import org.eclipse.swt.SWT;
|
import org.eclipse.swt.SWT;
|
||||||
import org.eclipse.swt.custom.CTabFolder;
|
import org.eclipse.swt.custom.CTabFolder;
|
||||||
import org.eclipse.swt.custom.CTabItem;
|
import org.eclipse.swt.custom.CTabItem;
|
||||||
|
@ -42,6 +43,7 @@ import org.eclipse.swt.widgets.Composite;
|
||||||
import org.eclipse.swt.widgets.Label;
|
import org.eclipse.swt.widgets.Label;
|
||||||
import org.eclipse.swt.widgets.Text;
|
import org.eclipse.swt.widgets.Text;
|
||||||
|
|
||||||
|
@SuppressWarnings("restriction")
|
||||||
public class NewLaunchConfigEditPage extends WizardPage {
|
public class NewLaunchConfigEditPage extends WizardPage {
|
||||||
ILaunchConfigurationWorkingCopy workingCopy;
|
ILaunchConfigurationWorkingCopy workingCopy;
|
||||||
ILaunchConfigurationTabGroup tabGroup;
|
ILaunchConfigurationTabGroup tabGroup;
|
||||||
|
@ -51,9 +53,9 @@ public class NewLaunchConfigEditPage extends WizardPage {
|
||||||
private LaunchConfigurationManager launchConfigurationMgr = DebugUIPlugin.getDefault().getLaunchConfigurationManager();
|
private LaunchConfigurationManager launchConfigurationMgr = DebugUIPlugin.getDefault().getLaunchConfigurationManager();
|
||||||
|
|
||||||
public NewLaunchConfigEditPage() {
|
public NewLaunchConfigEditPage() {
|
||||||
super("NewLaunchConfigEditPage");
|
super(Messages.NewLaunchConfigEditPage_0);
|
||||||
setTitle("Launch Configuration Properties");
|
setTitle(Messages.NewLaunchConfigEditPage_1);
|
||||||
setDescription("Edit the new launch configuration properties");
|
setDescription(Messages.NewLaunchConfigEditPage_2);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -62,7 +64,7 @@ public class NewLaunchConfigEditPage extends WizardPage {
|
||||||
comp.setLayout(new GridLayout(2, false));
|
comp.setLayout(new GridLayout(2, false));
|
||||||
Label label = new Label(comp, SWT.NONE);
|
Label label = new Label(comp, SWT.NONE);
|
||||||
label.setLayoutData(new GridData());
|
label.setLayoutData(new GridData());
|
||||||
label.setText("Name:");
|
label.setText(Messages.NewLaunchConfigEditPage_3 + ":"); //$NON-NLS-1$
|
||||||
nameText = new Text(comp, SWT.BORDER);
|
nameText = new Text(comp, SWT.BORDER);
|
||||||
nameText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
|
nameText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
|
||||||
ColorRegistry reg = JFaceResources.getColorRegistry();
|
ColorRegistry reg = JFaceResources.getColorRegistry();
|
||||||
|
@ -97,14 +99,14 @@ public class NewLaunchConfigEditPage extends WizardPage {
|
||||||
private String checkName(String name) {
|
private String checkName(String name) {
|
||||||
try {
|
try {
|
||||||
if (name.isEmpty()) {
|
if (name.isEmpty()) {
|
||||||
return "Name can not be empty";
|
return Messages.NewLaunchConfigEditPage_4;
|
||||||
}
|
}
|
||||||
|
|
||||||
ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
|
ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
|
||||||
if (manager.isExistingLaunchConfigurationName(name)) {
|
if (manager.isExistingLaunchConfigurationName(name)) {
|
||||||
ILaunchConfiguration config = ((LaunchManager) manager).findLaunchConfiguration(name);
|
ILaunchConfiguration config = ((LaunchManager) manager).findLaunchConfiguration(name);
|
||||||
if (config != workingCopy.getOriginal()) {
|
if (config != workingCopy.getOriginal()) {
|
||||||
return ("A configuration with this name already exists");
|
return (Messages.NewLaunchConfigEditPage_5);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -120,7 +122,7 @@ public class NewLaunchConfigEditPage extends WizardPage {
|
||||||
return;
|
return;
|
||||||
try {
|
try {
|
||||||
String initialMode = ((NewLaunchConfigWizard) getWizard()).modePage.selectedGroup.getMode();
|
String initialMode = ((NewLaunchConfigWizard) getWizard()).modePage.selectedGroup.getMode();
|
||||||
workingCopy = type.newInstance(null, "New Configuration");
|
workingCopy = type.newInstance(null, Messages.NewLaunchConfigEditPage_6);
|
||||||
tabGroup = LaunchConfigurationPresentationManager.getDefault().getTabGroup(workingCopy, initialMode);
|
tabGroup = LaunchConfigurationPresentationManager.getDefault().getTabGroup(workingCopy, initialMode);
|
||||||
for (CTabItem item : tabFolder.getItems())
|
for (CTabItem item : tabFolder.getItems())
|
||||||
item.dispose();
|
item.dispose();
|
||||||
|
@ -236,7 +238,7 @@ public class NewLaunchConfigEditPage extends WizardPage {
|
||||||
@Override
|
@Override
|
||||||
public String generateName(String name) {
|
public String generateName(String name) {
|
||||||
if (name == null)
|
if (name == null)
|
||||||
return "";
|
return ""; //$NON-NLS-1$
|
||||||
return DebugPlugin.getDefault().getLaunchManager().generateLaunchConfigurationName(name);
|
return DebugPlugin.getDefault().getLaunchManager().generateLaunchConfigurationName(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,7 @@ import org.eclipse.debug.ui.DebugUITools;
|
||||||
import org.eclipse.debug.ui.ILaunchGroup;
|
import org.eclipse.debug.ui.ILaunchGroup;
|
||||||
import org.eclipse.jface.resource.ImageDescriptor;
|
import org.eclipse.jface.resource.ImageDescriptor;
|
||||||
import org.eclipse.jface.wizard.WizardPage;
|
import org.eclipse.jface.wizard.WizardPage;
|
||||||
|
import org.eclipse.launchbar.ui.internal.Messages;
|
||||||
import org.eclipse.swt.SWT;
|
import org.eclipse.swt.SWT;
|
||||||
import org.eclipse.swt.events.SelectionAdapter;
|
import org.eclipse.swt.events.SelectionAdapter;
|
||||||
import org.eclipse.swt.events.SelectionEvent;
|
import org.eclipse.swt.events.SelectionEvent;
|
||||||
|
@ -32,9 +33,9 @@ public class NewLaunchConfigModePage extends WizardPage {
|
||||||
ILaunchGroup selectedGroup;
|
ILaunchGroup selectedGroup;
|
||||||
|
|
||||||
public NewLaunchConfigModePage() {
|
public NewLaunchConfigModePage() {
|
||||||
super("Select Initial Launch Mode");
|
super(Messages.NewLaunchConfigModePage_0);
|
||||||
setTitle("Initial Launch Mode");
|
setTitle(Messages.NewLaunchConfigModePage_1);
|
||||||
setDescription("Select initial launch mode.");
|
setDescription(Messages.NewLaunchConfigModePage_2);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -49,14 +50,14 @@ public class NewLaunchConfigModePage extends WizardPage {
|
||||||
Set<ILaunchGroup> done = new HashSet<>();
|
Set<ILaunchGroup> done = new HashSet<>();
|
||||||
|
|
||||||
for (ILaunchGroup group : DebugUITools.getLaunchGroups()) {
|
for (ILaunchGroup group : DebugUITools.getLaunchGroups()) {
|
||||||
if (group.getMode().equals("run")) {
|
if (group.getMode().equals("run")) { //$NON-NLS-1$
|
||||||
createModeItem(group);
|
createModeItem(group);
|
||||||
done.add(group);
|
done.add(group);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (ILaunchGroup group : DebugUITools.getLaunchGroups()) {
|
for (ILaunchGroup group : DebugUITools.getLaunchGroups()) {
|
||||||
if (group.getMode().equals("debug")) {
|
if (group.getMode().equals("debug")) { //$NON-NLS-1$
|
||||||
createModeItem(group);
|
createModeItem(group);
|
||||||
done.add(group);
|
done.add(group);
|
||||||
}
|
}
|
||||||
|
@ -73,7 +74,7 @@ public class NewLaunchConfigModePage extends WizardPage {
|
||||||
int i = 0;
|
int i = 0;
|
||||||
boolean hasDebug = false;
|
boolean hasDebug = false;
|
||||||
for (TableItem item : table.getItems()) {
|
for (TableItem item : table.getItems()) {
|
||||||
if ("debug".equals(((ILaunchGroup) item.getData()).getMode())) {
|
if ("debug".equals(((ILaunchGroup) item.getData()).getMode())) { //$NON-NLS-1$
|
||||||
hasDebug = true;
|
hasDebug = true;
|
||||||
table.select(i);
|
table.select(i);
|
||||||
break;
|
break;
|
||||||
|
@ -103,7 +104,7 @@ public class NewLaunchConfigModePage extends WizardPage {
|
||||||
return;
|
return;
|
||||||
|
|
||||||
TableItem item = new TableItem(table, SWT.NONE);
|
TableItem item = new TableItem(table, SWT.NONE);
|
||||||
item.setText(group.getLabel().replace("&", ""));
|
item.setText(group.getLabel().replace("&", "")); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
ImageDescriptor imageDesc = group.getImageDescriptor();
|
ImageDescriptor imageDesc = group.getImageDescriptor();
|
||||||
if (imageDesc != null) {
|
if (imageDesc != null) {
|
||||||
item.setImage(imageDesc.createImage());
|
item.setImage(imageDesc.createImage());
|
||||||
|
|
|
@ -17,6 +17,7 @@ import org.eclipse.debug.ui.ILaunchGroup;
|
||||||
import org.eclipse.jface.resource.ImageDescriptor;
|
import org.eclipse.jface.resource.ImageDescriptor;
|
||||||
import org.eclipse.jface.wizard.IWizardPage;
|
import org.eclipse.jface.wizard.IWizardPage;
|
||||||
import org.eclipse.jface.wizard.WizardPage;
|
import org.eclipse.jface.wizard.WizardPage;
|
||||||
|
import org.eclipse.launchbar.ui.internal.Messages;
|
||||||
import org.eclipse.swt.SWT;
|
import org.eclipse.swt.SWT;
|
||||||
import org.eclipse.swt.layout.GridData;
|
import org.eclipse.swt.layout.GridData;
|
||||||
import org.eclipse.swt.layout.GridLayout;
|
import org.eclipse.swt.layout.GridLayout;
|
||||||
|
@ -29,9 +30,9 @@ public class NewLaunchConfigTypePage extends WizardPage {
|
||||||
private Table table;
|
private Table table;
|
||||||
|
|
||||||
public NewLaunchConfigTypePage() {
|
public NewLaunchConfigTypePage() {
|
||||||
super("Select Launch Configuration Type");
|
super(Messages.NewLaunchConfigTypePage_0);
|
||||||
setTitle("Launch Configuration Type");
|
setTitle(Messages.NewLaunchConfigTypePage_1);
|
||||||
setDescription("Select the type of launch configuration to create.");
|
setDescription(Messages.NewLaunchConfigTypePage_2);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -21,6 +21,7 @@ import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
|
||||||
import org.eclipse.debug.core.ILaunchMode;
|
import org.eclipse.debug.core.ILaunchMode;
|
||||||
import org.eclipse.jface.wizard.Wizard;
|
import org.eclipse.jface.wizard.Wizard;
|
||||||
import org.eclipse.launchbar.ui.internal.Activator;
|
import org.eclipse.launchbar.ui.internal.Activator;
|
||||||
|
import org.eclipse.launchbar.ui.internal.Messages;
|
||||||
|
|
||||||
public class NewLaunchConfigWizard extends Wizard implements ILaunchConfigurationListener {
|
public class NewLaunchConfigWizard extends Wizard implements ILaunchConfigurationListener {
|
||||||
|
|
||||||
|
@ -31,7 +32,7 @@ public class NewLaunchConfigWizard extends Wizard implements ILaunchConfiguratio
|
||||||
private List<ILaunchConfiguration> configsToDelete = new ArrayList<>();
|
private List<ILaunchConfiguration> configsToDelete = new ArrayList<>();
|
||||||
|
|
||||||
public NewLaunchConfigWizard() {
|
public NewLaunchConfigWizard() {
|
||||||
setWindowTitle("Create Launch Configuration");
|
setWindowTitle(Messages.NewLaunchConfigWizard_0);
|
||||||
initListeners();
|
initListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,41 @@
|
||||||
|
ConfigSelector_0=No Launch Configurations
|
||||||
|
ConfigSelector_1=Launch configuration
|
||||||
|
ConfigSelector_2=Create New Configuration...
|
||||||
|
ConfigSelector_3=Create Launch Configuration
|
||||||
|
CSelector_0=Closing popup
|
||||||
|
CSelector_1=Updating launch bar selection
|
||||||
|
EditButton_0=Edit
|
||||||
|
FilterControl_0=type filter text
|
||||||
|
FilterControl_1={0} {1} matches.
|
||||||
|
LaunchBarControl_0=on
|
||||||
LaunchBarControl_Build=Build
|
LaunchBarControl_Build=Build
|
||||||
LaunchBarControl_Launch=Launch
|
LaunchBarControl_Launch=Launch
|
||||||
LaunchBarControl_Stop=Stop
|
LaunchBarControl_Stop=Stop
|
||||||
|
LaunchBarListViewer_0=Increase/Decrease size of recently used elements pane
|
||||||
|
LaunchBarPreferencePage_0=Preferences for the Launch Bar.
|
||||||
|
LaunchBarPreferencePage_1=Enable the Launch Bar.
|
||||||
|
LaunchConfigurationEditDialog_0=Delete
|
||||||
|
LaunchConfigurationEditDialog_1=Duplicate
|
||||||
|
LaunchConfigurationEditDialog_2=Launch
|
||||||
|
LaunchConfigurationEditDialog_3=Confirm Delete
|
||||||
|
LaunchConfigurationEditDialog_4=Are you sure you want to delete
|
||||||
|
LaunchConfigurationEditDialog_5=Deleting launch configuration
|
||||||
|
LaunchConfigurationEditDialog_6=Duplicating launch configuration
|
||||||
|
ModeSelector_0=Launch configuration
|
||||||
|
NewLaunchConfigEditPage_0=NewLaunchConfigEditPage
|
||||||
|
NewLaunchConfigEditPage_1=Launch Configuration Properties
|
||||||
|
NewLaunchConfigEditPage_2=Edit the new launch configuration properties
|
||||||
|
NewLaunchConfigEditPage_3=Name
|
||||||
|
NewLaunchConfigEditPage_4=Name can not be empty
|
||||||
|
NewLaunchConfigEditPage_5=A configuration with this name already exists
|
||||||
|
NewLaunchConfigEditPage_6=New Configuration
|
||||||
|
NewLaunchConfigModePage_0=Select Initial Launch Mode
|
||||||
|
NewLaunchConfigModePage_1=Initial Launch Mode
|
||||||
|
NewLaunchConfigModePage_2=Select initial launch mode.
|
||||||
|
NewLaunchConfigTypePage_0=Select Launch Configuration Type
|
||||||
|
NewLaunchConfigTypePage_1=Launch Configuration Type
|
||||||
|
NewLaunchConfigTypePage_2=Select the type of launch configuration to create.
|
||||||
|
NewLaunchConfigWizard_0=Create Launch Configuration
|
||||||
|
StopActiveCommandHandler_0=Stopping launches
|
||||||
|
StopActiveCommandHandler_1=Stopping build
|
||||||
TargetSelector_CreateNewTarget=Create New Connection...
|
TargetSelector_CreateNewTarget=Create New Connection...
|
||||||
|
|
|
@ -53,6 +53,7 @@ import org.junit.FixMethodOrder;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runners.MethodSorters;
|
import org.junit.runners.MethodSorters;
|
||||||
|
|
||||||
|
@SuppressWarnings("restriction")
|
||||||
@FixMethodOrder(MethodSorters.JVM)
|
@FixMethodOrder(MethodSorters.JVM)
|
||||||
public class LaunchBarManager2Test {
|
public class LaunchBarManager2Test {
|
||||||
private LaunchBarManager manager;
|
private LaunchBarManager manager;
|
||||||
|
|
|
@ -27,7 +27,7 @@ import org.eclipse.remote.core.IRemoteServicesManager;
|
||||||
import org.eclipse.remote.core.launch.IRemoteLaunchConfigService;
|
import org.eclipse.remote.core.launch.IRemoteLaunchConfigService;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
@SuppressWarnings("nls")
|
||||||
public class LaunchBarManagerTest {
|
public class LaunchBarManagerTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
Loading…
Add table
Reference in a new issue