mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-28 19:35:36 +02:00
[235626] Convert examples to MessageBundle format
This commit is contained in:
parent
19fdbcabac
commit
e97b62b224
13 changed files with 280 additions and 253 deletions
|
@ -319,7 +319,7 @@
|
||||||
<feature url="features/org.eclipse.rse.telnet_2.1.0.qualifier.jar" id="org.eclipse.rse.telnet" version="2.1.0.qualifier">
|
<feature url="features/org.eclipse.rse.telnet_2.1.0.qualifier.jar" id="org.eclipse.rse.telnet" version="2.1.0.qualifier">
|
||||||
<category name="TM and RSE 3.0"/>
|
<category name="TM and RSE 3.0"/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature url="features/org.eclipse.rse.examples_2.1.0.qualifier.jar" id="org.eclipse.rse.examples" version="2.1.0.qualifier">
|
<feature url="features/org.eclipse.rse.examples_3.0.0.qualifier.jar" id="org.eclipse.rse.examples" version="3.0.0.qualifier">
|
||||||
<category name="TM and RSE 3.0"/>
|
<category name="TM and RSE 3.0"/>
|
||||||
</feature>
|
</feature>
|
||||||
<feature url="features/org.eclipse.rse.remotecdt_2.1.0.qualifier.jar" id="org.eclipse.rse.remotecdt" version="2.1.0.qualifier">
|
<feature url="features/org.eclipse.rse.remotecdt_2.1.0.qualifier.jar" id="org.eclipse.rse.remotecdt" version="2.1.0.qualifier">
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<feature
|
<feature
|
||||||
id="org.eclipse.rse.examples"
|
id="org.eclipse.rse.examples"
|
||||||
label="%featureName"
|
label="%featureName"
|
||||||
version="2.1.0.qualifier"
|
version="3.0.0.qualifier"
|
||||||
provider-name="%providerName"
|
provider-name="%providerName"
|
||||||
plugin="org.eclipse.rse.examples.tutorial"
|
plugin="org.eclipse.rse.examples.tutorial"
|
||||||
image="eclipse_update_120.jpg">
|
image="eclipse_update_120.jpg">
|
||||||
|
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
||||||
Bundle-ManifestVersion: 2
|
Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: %pluginName
|
Bundle-Name: %pluginName
|
||||||
Bundle-SymbolicName: org.eclipse.rse.examples.tutorial;singleton:=true
|
Bundle-SymbolicName: org.eclipse.rse.examples.tutorial;singleton:=true
|
||||||
Bundle-Version: 2.0.100.qualifier
|
Bundle-Version: 3.0.0.qualifier
|
||||||
Bundle-Activator: samples.RSESamplesPlugin
|
Bundle-Activator: samples.RSESamplesPlugin
|
||||||
Bundle-Vendor: %providerName
|
Bundle-Vendor: %providerName
|
||||||
Bundle-Localization: plugin
|
Bundle-Localization: plugin
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/********************************************************************************
|
/********************************************************************************
|
||||||
* Copyright (c) 2006, 2007 IBM Corporation and others. All rights reserved.
|
* Copyright (c) 2006, 2008 IBM Corporation and others. All rights reserved.
|
||||||
* This program and the accompanying materials are made available under the terms
|
* This program and the accompanying materials are made available under the terms
|
||||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
@ -12,13 +12,11 @@
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Martin Oberhuber (Wind River) - Adapted original tutorial code to Open RSE.
|
* Martin Oberhuber (Wind River) - Adapted original tutorial code to Open RSE.
|
||||||
|
* Martin Oberhuber (Wind River) - [235626] Convert examples to MessageBundle format
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package samples;
|
package samples;
|
||||||
|
|
||||||
import java.util.MissingResourceException;
|
|
||||||
import java.util.ResourceBundle;
|
|
||||||
|
|
||||||
import org.eclipse.core.resources.IWorkspace;
|
import org.eclipse.core.resources.IWorkspace;
|
||||||
import org.eclipse.core.resources.ResourcesPlugin;
|
import org.eclipse.core.resources.ResourcesPlugin;
|
||||||
import org.eclipse.core.runtime.IAdapterManager;
|
import org.eclipse.core.runtime.IAdapterManager;
|
||||||
|
@ -37,7 +35,6 @@ public class RSESamplesPlugin extends SystemBasePlugin {
|
||||||
//The shared instance.
|
//The shared instance.
|
||||||
private static RSESamplesPlugin plugin;
|
private static RSESamplesPlugin plugin;
|
||||||
//Resource bundle.
|
//Resource bundle.
|
||||||
private ResourceBundle resourceBundle;
|
|
||||||
private static SystemMessageFile messageFile = null;
|
private static SystemMessageFile messageFile = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -63,7 +60,6 @@ public class RSESamplesPlugin extends SystemBasePlugin {
|
||||||
|
|
||||||
DeveloperSubSystemConfigurationAdapterFactory sscaf = new DeveloperSubSystemConfigurationAdapterFactory();
|
DeveloperSubSystemConfigurationAdapterFactory sscaf = new DeveloperSubSystemConfigurationAdapterFactory();
|
||||||
sscaf.registerWithManager(manager);
|
sscaf.registerWithManager(manager);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -73,7 +69,6 @@ public class RSESamplesPlugin extends SystemBasePlugin {
|
||||||
public void stop(BundleContext context) throws Exception {
|
public void stop(BundleContext context) throws Exception {
|
||||||
super.stop(context);
|
super.stop(context);
|
||||||
plugin = null;
|
plugin = null;
|
||||||
resourceBundle = null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -92,46 +87,6 @@ public class RSESamplesPlugin extends SystemBasePlugin {
|
||||||
return ResourcesPlugin.getWorkspace();
|
return ResourcesPlugin.getWorkspace();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the string from the plugin's resource bundle,
|
|
||||||
* or 'key' if not found.
|
|
||||||
* @see java.util.ResourceBundle#getString(String)
|
|
||||||
*
|
|
||||||
* @param key the key for the desired string
|
|
||||||
* @return the string for the given key
|
|
||||||
*/
|
|
||||||
public static String getResourceString(String key) {
|
|
||||||
ResourceBundle bundle= RSESamplesPlugin.getDefault().getResourceBundle();
|
|
||||||
try {
|
|
||||||
return (bundle != null) ? bundle.getString(key) : key;
|
|
||||||
} catch (MissingResourceException e) {
|
|
||||||
return key;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Return the plugin's Resource bundle.
|
|
||||||
* @return the Resource bundle
|
|
||||||
*/
|
|
||||||
public ResourceBundle getResourceBundle() {
|
|
||||||
try {
|
|
||||||
if (resourceBundle == null)
|
|
||||||
resourceBundle = ResourceBundle.getBundle("samples.rseSamplesResources"); //$NON-NLS-1$
|
|
||||||
} catch (MissingResourceException x) {
|
|
||||||
resourceBundle = null;
|
|
||||||
}
|
|
||||||
return resourceBundle;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @see AbstractUIPlugin#initializeDefaultPreferences
|
|
||||||
*/
|
|
||||||
//protected void initializeDefaultPreferences(IPreferenceStore store)
|
|
||||||
//{
|
|
||||||
// super.initializeDefaultPreferences(store);
|
|
||||||
// //RSESamplesPreferencePage.initDefaults(store);
|
|
||||||
//}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize the image registry by declaring all of the required graphics.
|
* Initialize the image registry by declaring all of the required graphics.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -0,0 +1,61 @@
|
||||||
|
/*******************************************************************************
|
||||||
|
* Copyright (c) 2008 Wind River Systems, Inc. and others.
|
||||||
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* Martin Oberhuber (Wind River) - [235626] initial API and implementation
|
||||||
|
*******************************************************************************/
|
||||||
|
|
||||||
|
package samples;
|
||||||
|
|
||||||
|
import org.eclipse.osgi.util.NLS;
|
||||||
|
|
||||||
|
public class RSESamplesResources extends NLS {
|
||||||
|
private static String BUNDLE_NAME = "samples.rseSamplesResources"; //$NON-NLS-1$
|
||||||
|
|
||||||
|
public static String pp_size_label;
|
||||||
|
public static String pp_size_tooltip;
|
||||||
|
public static String pp_files_label;
|
||||||
|
public static String pp_files_tooltip;
|
||||||
|
public static String pp_folders_label;
|
||||||
|
public static String pp_folders_tooltip;
|
||||||
|
public static String pp_stopButton_label;
|
||||||
|
public static String pp_stopButton_tooltip;
|
||||||
|
|
||||||
|
// Tutorial #3: Creating a Subsystem Configuration
|
||||||
|
public static String connectorservice_devr_name;
|
||||||
|
public static String connectorservice_devr_desc;
|
||||||
|
|
||||||
|
public static String property_devr_resource_type;
|
||||||
|
public static String property_devr_id_name;
|
||||||
|
public static String property_devr_id_desc;
|
||||||
|
public static String property_devr_dept_name;
|
||||||
|
public static String property_devr_dept_desc;
|
||||||
|
public static String property_team_resource_type;
|
||||||
|
public static String filter_default_name;
|
||||||
|
|
||||||
|
// Tutorial #3a: Adding a Custom Filter
|
||||||
|
public static String property_type_teamfilter;
|
||||||
|
public static String property_type_devrfilter;
|
||||||
|
|
||||||
|
public static String filter_team_dlgtitle;
|
||||||
|
public static String filter_team_pagetitle;
|
||||||
|
public static String filter_team_pagetext;
|
||||||
|
|
||||||
|
public static String filter_devr_dlgtitle;
|
||||||
|
public static String filter_devr_pagetitle;
|
||||||
|
public static String filter_devr_pagetext;
|
||||||
|
public static String filter_devr_teamprompt_label;
|
||||||
|
public static String filter_devr_teamprompt_tooltip;
|
||||||
|
public static String filter_devr_devrprompt_label;
|
||||||
|
public static String filter_devr_devrprompt_tooltip;
|
||||||
|
|
||||||
|
static {
|
||||||
|
NLS.initializeMessages(BUNDLE_NAME, RSESamplesResources.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -14,6 +14,7 @@
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Martin Oberhuber (Wind River) - Adapted original tutorial code to Open RSE.
|
* Martin Oberhuber (Wind River) - Adapted original tutorial code to Open RSE.
|
||||||
* Xuan Chen (IBM) - [223126] [api][breaking] Remove API related to User Actions in RSE Core/UI
|
* Xuan Chen (IBM) - [223126] [api][breaking] Remove API related to User Actions in RSE Core/UI
|
||||||
|
* Martin Oberhuber (Wind River) - [235626] Convert examples to MessageBundle format
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package samples.model;
|
package samples.model;
|
||||||
|
@ -30,6 +31,7 @@ import org.eclipse.ui.views.properties.IPropertyDescriptor;
|
||||||
import org.eclipse.ui.views.properties.PropertyDescriptor;
|
import org.eclipse.ui.views.properties.PropertyDescriptor;
|
||||||
|
|
||||||
import samples.RSESamplesPlugin;
|
import samples.RSESamplesPlugin;
|
||||||
|
import samples.RSESamplesResources;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is the adapter which enables us to work with our remote developer resources.
|
* This is the adapter which enables us to work with our remote developer resources.
|
||||||
|
@ -84,7 +86,7 @@ public class DeveloperResourceAdapter extends AbstractSystemViewAdapter
|
||||||
*/
|
*/
|
||||||
public String getType(Object element)
|
public String getType(Object element)
|
||||||
{
|
{
|
||||||
return RSESamplesPlugin.getResourceString("property.devr_resource.type"); //$NON-NLS-1$
|
return RSESamplesResources.property_devr_resource_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -117,13 +119,13 @@ public class DeveloperResourceAdapter extends AbstractSystemViewAdapter
|
||||||
// the following array should be made static to it isn't created every time
|
// the following array should be made static to it isn't created every time
|
||||||
PropertyDescriptor[] ourPDs = new PropertyDescriptor[2];
|
PropertyDescriptor[] ourPDs = new PropertyDescriptor[2];
|
||||||
ourPDs[0] = new PropertyDescriptor("devr_id", //$NON-NLS-1$
|
ourPDs[0] = new PropertyDescriptor("devr_id", //$NON-NLS-1$
|
||||||
RSESamplesPlugin.getResourceString("property.devr_id.name")); //$NON-NLS-1$
|
RSESamplesResources.property_devr_id_name);
|
||||||
ourPDs[0].setDescription(
|
ourPDs[0].setDescription(
|
||||||
RSESamplesPlugin.getResourceString("property.devr_id.desc")); //$NON-NLS-1$
|
RSESamplesResources.property_devr_id_desc);
|
||||||
ourPDs[1] = new PropertyDescriptor("devr_dept", //$NON-NLS-1$
|
ourPDs[1] = new PropertyDescriptor("devr_dept", //$NON-NLS-1$
|
||||||
RSESamplesPlugin.getResourceString("property.devr_dept.name")); //$NON-NLS-1$
|
RSESamplesResources.property_devr_dept_name);
|
||||||
ourPDs[1].setDescription(
|
ourPDs[1].setDescription(
|
||||||
RSESamplesPlugin.getResourceString("property.devr_dept.desc")); //$NON-NLS-1$
|
RSESamplesResources.property_devr_dept_desc);
|
||||||
return ourPDs;
|
return ourPDs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
* Martin Oberhuber (Wind River) - Adapted original tutorial code to Open RSE.
|
* Martin Oberhuber (Wind River) - Adapted original tutorial code to Open RSE.
|
||||||
* Xuan Chen (IBM) - [160775] [api] [breaking] [nl] rename (at least within a zip) blocks UI thread
|
* Xuan Chen (IBM) - [160775] [api] [breaking] [nl] rename (at least within a zip) blocks UI thread
|
||||||
* Xuan Chen (IBM) - [223126] [api][breaking] Remove API related to User Actions in RSE Core/UI
|
* Xuan Chen (IBM) - [223126] [api][breaking] Remove API related to User Actions in RSE Core/UI
|
||||||
|
* Martin Oberhuber (Wind River) - [235626] Convert examples to MessageBundle format
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package samples.model;
|
package samples.model;
|
||||||
|
@ -30,6 +31,7 @@ import org.eclipse.swt.widgets.Shell;
|
||||||
import org.eclipse.ui.views.properties.IPropertyDescriptor;
|
import org.eclipse.ui.views.properties.IPropertyDescriptor;
|
||||||
|
|
||||||
import samples.RSESamplesPlugin;
|
import samples.RSESamplesPlugin;
|
||||||
|
import samples.RSESamplesResources;
|
||||||
import samples.subsystems.DeveloperSubSystem;
|
import samples.subsystems.DeveloperSubSystem;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -84,7 +86,7 @@ public class TeamResourceAdapter extends AbstractSystemViewAdapter implements
|
||||||
*/
|
*/
|
||||||
public String getType(Object element)
|
public String getType(Object element)
|
||||||
{
|
{
|
||||||
return RSESamplesPlugin.getResourceString("property.team_resource.type"); //$NON-NLS-1$
|
return RSESamplesResources.property_team_resource_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# Copyright (c) 2006, 2007 IBM Corporation and others.
|
# Copyright (c) 2006, 2008 IBM Corporation and others.
|
||||||
# All rights reserved. This program and the accompanying materials
|
# All rights reserved. This program and the accompanying materials
|
||||||
# are made available under the terms of the Eclipse Public License v1.0
|
# are made available under the terms of the Eclipse Public License v1.0
|
||||||
# which accompanies this distribution, and is available at
|
# which accompanies this distribution, and is available at
|
||||||
|
@ -13,45 +13,46 @@
|
||||||
#
|
#
|
||||||
# Contributors:
|
# Contributors:
|
||||||
# Martin Oberhuber (Wind River) - Adapted original tutorial code to Open RSE.
|
# Martin Oberhuber (Wind River) - Adapted original tutorial code to Open RSE.
|
||||||
|
# Martin Oberhuber (Wind River) - [235626] Convert examples to MessageBundle format
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
# NLS_MESSAGEFORMAT_VAR
|
# NLS_MESSAGEFORMAT_VAR
|
||||||
# NLS_ENCODING=UTF-8
|
# NLS_ENCODING=UTF-8
|
||||||
|
|
||||||
# Tutorial #2: Creating a Remote Resource Property Page
|
# Tutorial #2: Creating a Remote Resource Property Page
|
||||||
pp.size.label=Size
|
pp_size_label=Size
|
||||||
pp.size.tooltip=Cumulative size, in bytes
|
pp_size_tooltip=Cumulative size, in bytes
|
||||||
pp.files.label=Files
|
pp_files_label=Files
|
||||||
pp.files.tooltip=Cumulative number of files
|
pp_files_tooltip=Cumulative number of files
|
||||||
pp.folders.label=Folders
|
pp_folders_label=Folders
|
||||||
pp.folders.tooltip=Cumulative number of folders
|
pp_folders_tooltip=Cumulative number of folders
|
||||||
pp.stopButton.label=Stop
|
pp_stopButton_label=Stop
|
||||||
pp.stopButton.tooltip=Cancel the thread
|
pp_stopButton_tooltip=Cancel the thread
|
||||||
|
|
||||||
# Tutorial #3: Creating a Subsystem Configuration
|
# Tutorial #3: Creating a Subsystem Configuration
|
||||||
connectorservice.devr.name=DeveloperConnectorService
|
connectorservice_devr_name=DeveloperConnectorService
|
||||||
connectorservice.devr.desc=Manages connections to faked remote developer resources.
|
connectorservice_devr_desc=Manages connections to faked remote developer resources.
|
||||||
|
|
||||||
property.devr_resource.type=Developer resource
|
property_devr_resource_type=Developer resource
|
||||||
property.devr_id.name=Id
|
property_devr_id_name=Id
|
||||||
property.devr_id.desc=ID number
|
property_devr_id_desc=ID number
|
||||||
property.devr_dept.name=Department
|
property_devr_dept_name=Department
|
||||||
property.devr_dept.desc=Department number
|
property_devr_dept_desc=Department number
|
||||||
property.team_resource.type=Team resource
|
property_team_resource_type=Team resource
|
||||||
filter.default.name=All Teams
|
filter_default_name=All Teams
|
||||||
|
|
||||||
# Tutorial #3a: Adding a Custom Filter
|
# Tutorial #3a: Adding a Custom Filter
|
||||||
property.type.teamfilter=Team filter
|
property_type_teamfilter=Team filter
|
||||||
property.type.devrfilter=Developer filter
|
property_type_devrfilter=Developer filter
|
||||||
|
|
||||||
filter.team.dlgtitle=Change Team Filter
|
filter_team_dlgtitle=Change Team Filter
|
||||||
filter.team.pagetitle=Team Filter
|
filter_team_pagetitle=Team Filter
|
||||||
filter.team.pagetext=Create a new filter to list teams
|
filter_team_pagetext=Create a new filter to list teams
|
||||||
|
|
||||||
filter.devr.dlgtitle=Change Developer Filter
|
filter_devr_dlgtitle=Change Developer Filter
|
||||||
filter.devr.pagetitle=Developer Filter
|
filter_devr_pagetitle=Developer Filter
|
||||||
filter.devr.pagetext=Create a new filter to list developers
|
filter_devr_pagetext=Create a new filter to list developers
|
||||||
filter.devr.teamprompt.label=Parent team
|
filter_devr_teamprompt_label=Parent team
|
||||||
filter.devr.teamprompt.tooltip=Specify the team within which to list developers
|
filter_devr_teamprompt_tooltip=Specify the team within which to list developers
|
||||||
filter.devr.devrprompt.label=Developers
|
filter_devr_devrprompt_label=Developers
|
||||||
filter.devr.devrprompt.tooltip=Specify a simple or generic developer name pattern
|
filter_devr_devrprompt_tooltip=Specify a simple or generic developer name pattern
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/********************************************************************************
|
/********************************************************************************
|
||||||
* Copyright (c) 2006, 2007 IBM Corporation and others. All rights reserved.
|
* Copyright (c) 2006, 2008 IBM Corporation and others. All rights reserved.
|
||||||
* This program and the accompanying materials are made available under the terms
|
* This program and the accompanying materials are made available under the terms
|
||||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
@ -13,6 +13,7 @@
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Martin Oberhuber (Wind River) - Adapted original tutorial code to Open RSE.
|
* Martin Oberhuber (Wind River) - Adapted original tutorial code to Open RSE.
|
||||||
* David Dykstal (IBM) - 168977: refactoring IConnectorService and ServerLauncher hierarchies
|
* David Dykstal (IBM) - 168977: refactoring IConnectorService and ServerLauncher hierarchies
|
||||||
|
* Martin Oberhuber (Wind River) - [235626] Convert examples to MessageBundle format
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package samples.subsystems;
|
package samples.subsystems;
|
||||||
|
@ -21,7 +22,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
|
||||||
import org.eclipse.rse.core.model.IHost;
|
import org.eclipse.rse.core.model.IHost;
|
||||||
import org.eclipse.rse.core.subsystems.BasicConnectorService;
|
import org.eclipse.rse.core.subsystems.BasicConnectorService;
|
||||||
|
|
||||||
import samples.RSESamplesPlugin;
|
import samples.RSESamplesResources;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Our system class that manages connecting to, and disconnecting from,
|
* Our system class that manages connecting to, and disconnecting from,
|
||||||
|
@ -38,8 +39,7 @@ public class DeveloperConnectorService extends BasicConnectorService {
|
||||||
public DeveloperConnectorService(IHost host)
|
public DeveloperConnectorService(IHost host)
|
||||||
{
|
{
|
||||||
super(
|
super(
|
||||||
RSESamplesPlugin.getResourceString("connectorservice.devr.name"), //$NON-NLS-1$
|
RSESamplesResources.connectorservice_devr_name, RSESamplesResources.connectorservice_devr_desc,
|
||||||
RSESamplesPlugin.getResourceString("connectorservice.devr.desc"), //$NON-NLS-1$
|
|
||||||
host,
|
host,
|
||||||
0
|
0
|
||||||
);
|
);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2006, 2007 IBM Corporation and others.
|
* Copyright (c) 2006, 2008 IBM Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -13,6 +13,7 @@
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Martin Oberhuber (Wind River) - Adapted original tutorial code to Open RSE.
|
* Martin Oberhuber (Wind River) - Adapted original tutorial code to Open RSE.
|
||||||
|
* Martin Oberhuber (Wind River) - [235626] Convert examples to MessageBundle format
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package samples.subsystems;
|
package samples.subsystems;
|
||||||
|
@ -28,7 +29,7 @@ import org.eclipse.swt.widgets.Control;
|
||||||
import org.eclipse.swt.widgets.Shell;
|
import org.eclipse.swt.widgets.Shell;
|
||||||
import org.eclipse.swt.widgets.Text;
|
import org.eclipse.swt.widgets.Text;
|
||||||
|
|
||||||
import samples.RSESamplesPlugin;
|
import samples.RSESamplesResources;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Our specialized filter string edit pane for developer filters.
|
* Our specialized filter string edit pane for developer filters.
|
||||||
|
@ -66,16 +67,16 @@ public class DeveloperFilterStringEditPane extends SystemFilterStringEditPane {
|
||||||
textTeam = SystemWidgetHelpers.createLabeledTextField(
|
textTeam = SystemWidgetHelpers.createLabeledTextField(
|
||||||
composite_prompts,
|
composite_prompts,
|
||||||
null,
|
null,
|
||||||
RSESamplesPlugin.getResourceString("filter.devr.teamprompt.label"), //$NON-NLS-1$
|
RSESamplesResources.filter_devr_teamprompt_label,
|
||||||
RSESamplesPlugin.getResourceString("filter.devr.teamprompt.tooltip") //$NON-NLS-1$
|
RSESamplesResources.filter_devr_teamprompt_tooltip
|
||||||
);
|
);
|
||||||
|
|
||||||
// CREATE DEVELOPER PROMPT
|
// CREATE DEVELOPER PROMPT
|
||||||
textDevr = SystemWidgetHelpers.createLabeledTextField(
|
textDevr = SystemWidgetHelpers.createLabeledTextField(
|
||||||
composite_prompts,
|
composite_prompts,
|
||||||
null,
|
null,
|
||||||
RSESamplesPlugin.getResourceString("filter.devr.devrprompt.label"), //$NON-NLS-1$
|
RSESamplesResources.filter_devr_devrprompt_label,
|
||||||
RSESamplesPlugin.getResourceString("filter.devr.devrprompt.tooltip") //$NON-NLS-1$
|
RSESamplesResources.filter_devr_devrprompt_tooltip
|
||||||
);
|
);
|
||||||
|
|
||||||
resetFields();
|
resetFields();
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Martin Oberhuber (Wind River) - Adapted original tutorial code to Open RSE.
|
* Martin Oberhuber (Wind River) - Adapted original tutorial code to Open RSE.
|
||||||
|
* Martin Oberhuber (Wind River) - [235626] Convert examples to MessageBundle format
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package samples.subsystems;
|
package samples.subsystems;
|
||||||
|
@ -25,7 +26,7 @@ import org.eclipse.rse.core.subsystems.IConnectorService;
|
||||||
import org.eclipse.rse.core.subsystems.ISubSystem;
|
import org.eclipse.rse.core.subsystems.ISubSystem;
|
||||||
import org.eclipse.rse.core.subsystems.SubSystemConfiguration;
|
import org.eclipse.rse.core.subsystems.SubSystemConfiguration;
|
||||||
|
|
||||||
import samples.RSESamplesPlugin;
|
import samples.RSESamplesResources;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is our subsystem factory, which creates instances of our subsystems,
|
* This is our subsystem factory, which creates instances of our subsystems,
|
||||||
|
@ -72,32 +73,36 @@ public class DeveloperSubSystemConfiguration extends SubSystemConfiguration {
|
||||||
//mgr.createSystemFilter(defaultPool, "All teams", strings);
|
//mgr.createSystemFilter(defaultPool, "All teams", strings);
|
||||||
//--tutorial part 2
|
//--tutorial part 2
|
||||||
ISystemFilter filter = mgr.createSystemFilter(defaultPool,
|
ISystemFilter filter = mgr.createSystemFilter(defaultPool,
|
||||||
RSESamplesPlugin.getResourceString("filter.default.name"), //$NON-NLS-1$
|
RSESamplesResources.filter_default_name,
|
||||||
strings );
|
strings );
|
||||||
filter.setType("team"); //$NON-NLS-1$
|
filter.setType("team"); //$NON-NLS-1$
|
||||||
} catch (Exception exc) {}
|
} catch (Exception exc) {}
|
||||||
return defaultPool;
|
return defaultPool;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Intercept of parent method so we can supply our own value shown in the property
|
* Intercept of parent method so we can supply our own value shown in the
|
||||||
* sheet for the "type" property when a filter is selected within our subsystem.
|
* property sheet for the "type" property when a filter is selected within
|
||||||
|
* our subsystem.
|
||||||
|
*
|
||||||
|
* Requires this line in rseSamplesResources.properties:
|
||||||
|
* property_type_teamfilter=Team filter
|
||||||
*
|
*
|
||||||
* Requires this line in rseSamplesResources.properties: property.type.teamfilter=Team filter
|
|
||||||
* @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#getTranslatedFilterTypeProperty(org.eclipse.rse.core.filters.ISystemFilter)
|
* @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#getTranslatedFilterTypeProperty(org.eclipse.rse.core.filters.ISystemFilter)
|
||||||
*/
|
*/
|
||||||
public String getTranslatedFilterTypeProperty(ISystemFilter selectedFilter)
|
public String getTranslatedFilterTypeProperty(ISystemFilter selectedFilter)
|
||||||
{
|
{
|
||||||
//--tutorial part 1
|
//--tutorial part 1
|
||||||
//return RSESamplesPlugin.getResourceString("property.type.teamfilter"); //$NON-NLS-1$
|
//return RSESamplesResources.property_type_teamfilter;
|
||||||
//--tutorial part 2
|
//--tutorial part 2
|
||||||
String type = selectedFilter.getType();
|
String type = selectedFilter.getType();
|
||||||
if (type == null)
|
if (type == null)
|
||||||
type = "team"; //$NON-NLS-1$
|
type = "team"; //$NON-NLS-1$
|
||||||
if (type.equals("team")) //$NON-NLS-1$
|
if (type.equals("team")) //$NON-NLS-1$
|
||||||
return RSESamplesPlugin.getResourceString("property.type.teamfilter"); //$NON-NLS-1$
|
return RSESamplesResources.property_type_teamfilter;
|
||||||
else
|
else
|
||||||
return RSESamplesPlugin.getResourceString("property.type.devrfilter"); //$NON-NLS-1$
|
return RSESamplesResources.property_type_devrfilter;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2006, 2007 IBM Corporation and others.
|
* Copyright (c) 2006, 2008 IBM Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -13,6 +13,7 @@
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Martin Oberhuber (Wind River) - Adapted original tutorial code to Open RSE.
|
* Martin Oberhuber (Wind River) - Adapted original tutorial code to Open RSE.
|
||||||
|
* Martin Oberhuber (Wind River) - [235626] Convert examples to MessageBundle format
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package samples.subsystems;
|
package samples.subsystems;
|
||||||
|
@ -28,6 +29,7 @@ import org.eclipse.rse.ui.view.SubSystemConfigurationAdapter;
|
||||||
import org.eclipse.swt.widgets.Shell;
|
import org.eclipse.swt.widgets.Shell;
|
||||||
|
|
||||||
import samples.RSESamplesPlugin;
|
import samples.RSESamplesPlugin;
|
||||||
|
import samples.RSESamplesResources;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds functionality to the basic SubSystemConfiguration.
|
* Adds functionality to the basic SubSystemConfiguration.
|
||||||
|
@ -52,16 +54,16 @@ public class DeveloperSubSystemConfigurationAdapter extends
|
||||||
protected IAction[] getNewFilterPoolFilterActions(ISubSystemConfiguration factory, ISystemFilterPool selectedPool, Shell shell)
|
protected IAction[] getNewFilterPoolFilterActions(ISubSystemConfiguration factory, ISystemFilterPool selectedPool, Shell shell)
|
||||||
{
|
{
|
||||||
SystemNewFilterAction teamAction = (SystemNewFilterAction)super.getNewFilterPoolFilterAction(factory, selectedPool, shell);
|
SystemNewFilterAction teamAction = (SystemNewFilterAction)super.getNewFilterPoolFilterAction(factory, selectedPool, shell);
|
||||||
teamAction.setWizardPageTitle(RSESamplesPlugin.getResourceString("filter.team.pagetitle")); //$NON-NLS-1$
|
teamAction.setWizardPageTitle(RSESamplesResources.filter_team_pagetitle);
|
||||||
teamAction.setPage1Description(RSESamplesPlugin.getResourceString("filter.team.pagetext")); //$NON-NLS-1$
|
teamAction.setPage1Description(RSESamplesResources.filter_team_pagetext);
|
||||||
teamAction.setType("team"); //$NON-NLS-1$
|
teamAction.setType("team"); //$NON-NLS-1$
|
||||||
teamAction.setText(RSESamplesPlugin.getResourceString("filter.team.pagetitle") + "..."); //$NON-NLS-1$ //$NON-NLS-2$
|
teamAction.setText(RSESamplesResources.filter_team_pagetitle + "..."); //$NON-NLS-1$
|
||||||
|
|
||||||
SystemNewFilterAction devrAction = (SystemNewFilterAction)super.getNewFilterPoolFilterAction(factory, selectedPool, shell);
|
SystemNewFilterAction devrAction = (SystemNewFilterAction)super.getNewFilterPoolFilterAction(factory, selectedPool, shell);
|
||||||
devrAction.setWizardPageTitle(RSESamplesPlugin.getResourceString("filter.devr.pagetitle")); //$NON-NLS-1$
|
devrAction.setWizardPageTitle(RSESamplesResources.filter_devr_pagetitle);
|
||||||
devrAction.setPage1Description(RSESamplesPlugin.getResourceString("filter.devr.pagetext")); //$NON-NLS-1$
|
devrAction.setPage1Description(RSESamplesResources.filter_devr_pagetext);
|
||||||
devrAction.setType("devr"); //$NON-NLS-1$
|
devrAction.setType("devr"); //$NON-NLS-1$
|
||||||
devrAction.setText(RSESamplesPlugin.getResourceString("filter.devr.pagetitle") + "..."); //$NON-NLS-1$ //$NON-NLS-2$
|
devrAction.setText(RSESamplesResources.filter_devr_pagetitle + "..."); //$NON-NLS-1$
|
||||||
devrAction.setFilterStringEditPane(new DeveloperFilterStringEditPane(shell));
|
devrAction.setFilterStringEditPane(new DeveloperFilterStringEditPane(shell));
|
||||||
|
|
||||||
IAction[] actions = new IAction[2];
|
IAction[] actions = new IAction[2];
|
||||||
|
@ -81,11 +83,11 @@ public class DeveloperSubSystemConfigurationAdapter extends
|
||||||
type = "team"; //$NON-NLS-1$
|
type = "team"; //$NON-NLS-1$
|
||||||
if (type.equals("team")) //$NON-NLS-1$
|
if (type.equals("team")) //$NON-NLS-1$
|
||||||
{
|
{
|
||||||
action.setDialogTitle(RSESamplesPlugin.getResourceString("filter.team.dlgtitle")); //$NON-NLS-1$
|
action.setDialogTitle(RSESamplesResources.filter_team_dlgtitle);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
action.setDialogTitle(RSESamplesPlugin.getResourceString("filter.devr.dlgtitle")); //$NON-NLS-1$
|
action.setDialogTitle(RSESamplesResources.filter_devr_dlgtitle);
|
||||||
action.setFilterStringEditPane(new DeveloperFilterStringEditPane(shell));
|
action.setFilterStringEditPane(new DeveloperFilterStringEditPane(shell));
|
||||||
}
|
}
|
||||||
return action;
|
return action;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2006, 2007 IBM Corporation and others.
|
* Copyright (c) 2006, 2008 IBM Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -15,6 +15,7 @@
|
||||||
* Martin Oberhuber (Wind River) - Adapted original tutorial code to Open RSE.
|
* Martin Oberhuber (Wind River) - Adapted original tutorial code to Open RSE.
|
||||||
* Kevin Doyle (IBM) - [150492] FolderInfoPropertyPage doesn't work reliably
|
* Kevin Doyle (IBM) - [150492] FolderInfoPropertyPage doesn't work reliably
|
||||||
* David McKnight (IBM) - [207178] changing list APIs for file service and subsystems
|
* David McKnight (IBM) - [207178] changing list APIs for file service and subsystems
|
||||||
|
* Martin Oberhuber (Wind River) - [235626] Convert examples to MessageBundle format
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package samples.ui.propertypages;
|
package samples.ui.propertypages;
|
||||||
|
@ -32,6 +33,7 @@ import org.eclipse.swt.widgets.Display;
|
||||||
import org.eclipse.swt.widgets.Label;
|
import org.eclipse.swt.widgets.Label;
|
||||||
|
|
||||||
import samples.RSESamplesPlugin;
|
import samples.RSESamplesPlugin;
|
||||||
|
import samples.RSESamplesResources;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A sample property page for a remote object, which in this case is scoped via the
|
* A sample property page for a remote object, which in this case is scoped via the
|
||||||
|
@ -73,20 +75,16 @@ public class FolderInfoPropertyPage
|
||||||
Composite composite = SystemWidgetHelpers.createComposite(parent, 2);
|
Composite composite = SystemWidgetHelpers.createComposite(parent, 2);
|
||||||
// draw the gui
|
// draw the gui
|
||||||
sizeLabel = SystemWidgetHelpers.createLabeledLabel(composite,
|
sizeLabel = SystemWidgetHelpers.createLabeledLabel(composite,
|
||||||
RSESamplesPlugin.getResourceString("pp.size.label"), //$NON-NLS-1$
|
RSESamplesResources.pp_size_label, RSESamplesResources.pp_size_tooltip,
|
||||||
RSESamplesPlugin.getResourceString("pp.size.tooltip"), //$NON-NLS-1$
|
|
||||||
false);
|
false);
|
||||||
filesLabel = SystemWidgetHelpers.createLabeledLabel(composite,
|
filesLabel = SystemWidgetHelpers.createLabeledLabel(composite,
|
||||||
RSESamplesPlugin.getResourceString("pp.files.label"), //$NON-NLS-1$
|
RSESamplesResources.pp_files_label, RSESamplesResources.pp_files_tooltip,
|
||||||
RSESamplesPlugin.getResourceString("pp.files.tooltip"), //$NON-NLS-1$
|
|
||||||
false);
|
false);
|
||||||
foldersLabel = SystemWidgetHelpers.createLabeledLabel(composite,
|
foldersLabel = SystemWidgetHelpers.createLabeledLabel(composite,
|
||||||
RSESamplesPlugin.getResourceString("pp.folders.label"), //$NON-NLS-1$
|
RSESamplesResources.pp_folders_label, RSESamplesResources.pp_folders_tooltip,
|
||||||
RSESamplesPlugin.getResourceString("pp.folders.tooltip"), //$NON-NLS-1$
|
|
||||||
false);
|
false);
|
||||||
stopButton = SystemWidgetHelpers.createPushButton(composite, null,
|
stopButton = SystemWidgetHelpers.createPushButton(composite, null,
|
||||||
RSESamplesPlugin.getResourceString("pp.stopButton.label"), //$NON-NLS-1$
|
RSESamplesResources.pp_stopButton_label, RSESamplesResources.pp_stopButton_tooltip
|
||||||
RSESamplesPlugin.getResourceString("pp.stopButton.tooltip") //$NON-NLS-1$
|
|
||||||
);
|
);
|
||||||
stopButton.addSelectionListener(this);
|
stopButton.addSelectionListener(this);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue