1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-22 22:22:11 +02:00

Terminal: Fix build error

This commit is contained in:
Uwe Stieber 2015-02-16 09:06:40 +01:00
parent 9c55da9030
commit d8ef37a2ce
35 changed files with 152 additions and 159 deletions

View file

@ -11,7 +11,7 @@
package org.eclipse.tm.internal.terminal.local; package org.eclipse.tm.internal.terminal.local;
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore; import org.eclipse.tm.internal.terminal.provisional.api.ISettings;
/** /**
* The interface {@link ILocalTerminalSettings} defines the public interface for connector-specific * The interface {@link ILocalTerminalSettings} defines the public interface for connector-specific
@ -40,24 +40,24 @@ public interface ILocalTerminalSettings {
public final static String LINE_SEPARATOR_LF = "\\n"; //$NON-NLS-1$ public final static String LINE_SEPARATOR_LF = "\\n"; //$NON-NLS-1$
/** /**
* Loads the settings from a specified {@link ISettingsStore}. * Loads the settings from a specified {@link ISettings}.
* *
* TODO: the {@link #load(ISettingsStore)} method should probably extracted to a super-interface * TODO: the {@link #load(ISettings)} method should probably extracted to a super-interface
* as it appears to be common to all customized settings interfaces * as it appears to be common to all customized settings interfaces
* *
* @param store the {@link ISettingsStore} to load the settings from * @param store the {@link ISettings} to load the settings from
*/ */
public abstract void load(ISettingsStore store); public abstract void load(ISettings store);
/** /**
* Saves the settings to a specified {@link ISettingsStore}. * Saves the settings to a specified {@link ISettings}.
* *
* TODO: the {@link #save(ISettingsStore)} method should probably extracted to a super-interface * TODO: the {@link #save(ISettings)} method should probably extracted to a super-interface
* as it appears to be common to all customized settings interfaces * as it appears to be common to all customized settings interfaces
* *
* @param store the {@link ISettingsStore} for storing the settings * @param store the {@link ISettings} for storing the settings
*/ */
public abstract void save(ISettingsStore store); public abstract void save(ISettings store);
/** /**
* Gets the name of the launch configuration that will be started in the terminal. * Gets the name of the launch configuration that will be started in the terminal.

View file

@ -41,7 +41,7 @@ import org.eclipse.tm.internal.terminal.local.process.LocalTerminalProcess;
import org.eclipse.tm.internal.terminal.local.process.LocalTerminalProcessFactory; import org.eclipse.tm.internal.terminal.local.process.LocalTerminalProcessFactory;
import org.eclipse.tm.internal.terminal.local.process.LocalTerminalProcessRegistry; import org.eclipse.tm.internal.terminal.local.process.LocalTerminalProcessRegistry;
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsPage; import org.eclipse.tm.internal.terminal.provisional.api.ISettingsPage;
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore; import org.eclipse.tm.internal.terminal.provisional.api.ISettings;
import org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl; import org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl;
import org.eclipse.tm.internal.terminal.provisional.api.Logger; import org.eclipse.tm.internal.terminal.provisional.api.Logger;
import org.eclipse.tm.internal.terminal.provisional.api.TerminalState; import org.eclipse.tm.internal.terminal.provisional.api.TerminalState;
@ -105,9 +105,9 @@ implements IDebugEventSetListener {
/** /**
* Loads the connector's settings from the specified store. * Loads the connector's settings from the specified store.
* *
* @param store the {@link ISettingsStore} * @param store the {@link ISettings}
* *
* @see TerminalConnectorImpl#load(ISettingsStore) * @see TerminalConnectorImpl#load(ISettings)
* *
* TODO: the load(ISettingsStore) method should probably be made abstract in * TODO: the load(ISettingsStore) method should probably be made abstract in
* TerminalConnectorImpl, otherwise it is not immediately clear that clients need to * TerminalConnectorImpl, otherwise it is not immediately clear that clients need to
@ -120,20 +120,20 @@ implements IDebugEventSetListener {
* by the framework in a uniform way. Maybe a configuration mechanism using attributes * by the framework in a uniform way. Maybe a configuration mechanism using attributes
* (like, for example, ILaunchConfiguration) might be beneficial here. * (like, for example, ILaunchConfiguration) might be beneficial here.
*/ */
public void load(ISettingsStore store) { public void load(ISettings store) {
settings.load(store); settings.load(store);
} }
/** /**
* Stores the connector's settings into the specified store. * Stores the connector's settings into the specified store.
* See {@link #load(ISettingsStore)} for additional notes. * See {@link #load(ISettings)} for additional notes.
* *
* @param store the {@link ISettingsStore} * @param store the {@link ISettings}
* *
* @see TerminalConnectorImpl#save(ISettingsStore) * @see TerminalConnectorImpl#save(ISettings)
*/ */
public void save(ISettingsStore store) { public void save(ISettings store) {
settings.save(store); settings.save(store);
} }

View file

@ -12,7 +12,7 @@
package org.eclipse.tm.internal.terminal.local; package org.eclipse.tm.internal.terminal.local;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore; import org.eclipse.tm.internal.terminal.provisional.api.ISettings;
import org.eclipse.tm.internal.terminal.provisional.api.Logger; import org.eclipse.tm.internal.terminal.provisional.api.Logger;
/** /**
@ -27,7 +27,7 @@ public class LocalTerminalSettings implements ILocalTerminalSettings {
private String launchConfiguration; private String launchConfiguration;
/** /**
* Loads the settings from the given {@link ISettingsStore}. * Loads the settings from the given {@link ISettings}.
* This method loads the store contents by means of reflection. This is clearly overkill for * This method loads the store contents by means of reflection. This is clearly overkill for
* the few settings supported by this class, but the code is much more reusable. Pretty much * the few settings supported by this class, but the code is much more reusable. Pretty much
* every implementation of a custom settings store is implemented in the same fashion and * every implementation of a custom settings store is implemented in the same fashion and
@ -35,10 +35,10 @@ public class LocalTerminalSettings implements ILocalTerminalSettings {
* *
* TODO: check for possibilities to reuse this code! * TODO: check for possibilities to reuse this code!
* *
* @param store the {@link ISettingsStore} * @param store the {@link ISettings}
* @see ILocalTerminalSettings#load(ISettingsStore) * @see ILocalTerminalSettings#load(ISettings)
*/ */
public void load(ISettingsStore store) { public void load(ISettings store) {
Field[] declaredField = getClass().getDeclaredFields(); Field[] declaredField = getClass().getDeclaredFields();
int numberOfFields = declaredField.length; int numberOfFields = declaredField.length;
@ -64,14 +64,14 @@ public class LocalTerminalSettings implements ILocalTerminalSettings {
} }
/** /**
* Saves the settings to the specified {@link ISettingsStore}. * Saves the settings to the specified {@link ISettings}.
* See {@link #load(ISettingsStore)} for further implementation notes. * See {@link #load(ISettings)} for further implementation notes.
* *
* @param store the {@link ISettingsStore} * @param store the {@link ISettings}
* *
* @see ILocalTerminalSettings#save(ISettingsStore) * @see ILocalTerminalSettings#save(ISettings)
*/ */
public void save(ISettingsStore store) { public void save(ISettings store) {
Field[] declaredField = getClass().getDeclaredFields(); Field[] declaredField = getClass().getDeclaredFields();
int numberOfFields = declaredField.length; int numberOfFields = declaredField.length;

View file

@ -13,7 +13,7 @@ package org.eclipse.tm.internal.terminal.view;
import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.tm.internal.terminal.control.ITerminalViewControl; import org.eclipse.tm.internal.terminal.control.ITerminalViewControl;
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore; import org.eclipse.tm.internal.terminal.provisional.api.ISettings;
import org.eclipse.tm.internal.terminal.provisional.api.TerminalState; import org.eclipse.tm.internal.terminal.provisional.api.TerminalState;
/** /**
@ -47,9 +47,9 @@ public interface ITerminalViewConnection {
*/ */
ITerminalViewControl getCtlTerminal(); ITerminalViewControl getCtlTerminal();
void saveState(ISettingsStore store); void saveState(ISettings store);
void loadState(ISettingsStore store); void loadState(ISettings store);
/** /**
* @return true if the input field is visible * @return true if the input field is visible

View file

@ -10,7 +10,7 @@
*******************************************************************************/ *******************************************************************************/
package org.eclipse.tm.internal.terminal.view; package org.eclipse.tm.internal.terminal.view;
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore; import org.eclipse.tm.internal.terminal.provisional.api.ISettings;
/** /**
@ -31,7 +31,7 @@ public interface ITerminalViewConnectionManager {
} }
/** /**
* Used to create instances of the ITerminalViewConnection * Used to create instances of the ITerminalViewConnection
* when the state is read from the {@link ISettingsStore} * when the state is read from the {@link ISettings}
* *
*/ */
interface ITerminalViewConnectionFactory { interface ITerminalViewConnectionFactory {
@ -73,11 +73,11 @@ public interface ITerminalViewConnectionManager {
void addListener(ITerminalViewConnectionListener listener); void addListener(ITerminalViewConnectionListener listener);
void removeListener(ITerminalViewConnectionListener listener); void removeListener(ITerminalViewConnectionListener listener);
void saveState(ISettingsStore store); void saveState(ISettings store);
/** /**
* @param store * @param store
* @param factory used to create new {@link ITerminalViewConnection} * @param factory used to create new {@link ITerminalViewConnection}
*/ */
void loadState(ISettingsStore store,ITerminalViewConnectionFactory factory); void loadState(ISettings store,ITerminalViewConnectionFactory factory);
} }

View file

@ -10,11 +10,11 @@
*******************************************************************************/ *******************************************************************************/
package org.eclipse.tm.internal.terminal.view; package org.eclipse.tm.internal.terminal.view;
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore; import org.eclipse.tm.internal.terminal.provisional.api.ISettings;
import org.eclipse.tm.internal.terminal.provisional.api.SettingsStore; import org.eclipse.tm.internal.terminal.provisional.api.Settings;
/** /**
* Uses an array of {@link ISettingsStore} to find a value. * Uses an array of {@link ISettings} to find a value.
* <p> * <p>
* <strong>EXPERIMENTAL</strong>. This class or interface has been added as part * <strong>EXPERIMENTAL</strong>. This class or interface has been added as part
* of a work in progress. There is no guarantee that this API will work or that * of a work in progress. There is no guarantee that this API will work or that
@ -22,16 +22,16 @@ import org.eclipse.tm.internal.terminal.provisional.api.SettingsStore;
* the <a href="http://www.eclipse.org/tm/">Target Management</a> team. * the <a href="http://www.eclipse.org/tm/">Target Management</a> team.
* </p> * </p>
*/ */
public class LayeredSettingsStore extends SettingsStore { public class LayeredSettingsStore extends Settings {
private final ISettingsStore[] fStores; private final ISettings[] fStores;
/** /**
* @param stores the stores used to search the values. * @param stores the stores used to search the values.
* {@link #setProperty(String, Object)} will put the value in the * {@link #setProperty(String, Object)} will put the value in the
* first store in the list. * first store in the list.
*/ */
public LayeredSettingsStore(ISettingsStore[] stores) { public LayeredSettingsStore(ISettings[] stores) {
fStores=stores; fStores=stores;
} }
/** /**
@ -39,8 +39,8 @@ public class LayeredSettingsStore extends SettingsStore {
* @param s1 first store * @param s1 first store
* @param s2 second store * @param s2 second store
*/ */
public LayeredSettingsStore(ISettingsStore s1, ISettingsStore s2) { public LayeredSettingsStore(ISettings s1, ISettings s2) {
this(new ISettingsStore[]{s1,s2}); this(new ISettings[]{s1,s2});
} }
public Object getProperty(String key) { public Object getProperty(String key) {

View file

@ -21,7 +21,7 @@ import org.eclipse.core.runtime.Preferences;
* the <a href="http://www.eclipse.org/tm/">Target Management</a> team. * the <a href="http://www.eclipse.org/tm/">Target Management</a> team.
* </p> * </p>
*/ */
public class PreferenceSettingStore extends org.eclipse.tm.internal.terminal.provisional.api.SettingsStore { public class PreferenceSettingStore extends org.eclipse.tm.internal.terminal.provisional.api.Settings {
private final String fPrefix; private final String fPrefix;
private final Preferences fPreferences; private final Preferences fPreferences;

View file

@ -10,12 +10,12 @@
*******************************************************************************/ *******************************************************************************/
package org.eclipse.tm.internal.terminal.view; package org.eclipse.tm.internal.terminal.view;
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore; import org.eclipse.tm.internal.terminal.provisional.api.ISettings;
public class SettingStorePrefixDecorator extends org.eclipse.tm.internal.terminal.provisional.api.SettingsStore { public class SettingStorePrefixDecorator extends org.eclipse.tm.internal.terminal.provisional.api.Settings {
private final String fPrefix; private final String fPrefix;
private final ISettingsStore fStore; private final ISettings fStore;
SettingStorePrefixDecorator(ISettingsStore store,String prefix) { SettingStorePrefixDecorator(ISettings store,String prefix) {
fPrefix=prefix; fPrefix=prefix;
fStore=store; fStore=store;
} }

View file

@ -14,11 +14,11 @@ import java.util.Arrays;
import java.util.Map; import java.util.Map;
import org.eclipse.jface.dialogs.IDialogSettings; import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore; import org.eclipse.tm.internal.terminal.provisional.api.ISettings;
import org.eclipse.ui.IMemento; import org.eclipse.ui.IMemento;
/** /**
* A {@link IDialogSettings} based {@link ISettingsStore}. * A {@link IDialogSettings} based {@link ISettings}.
* *
* Setting Store based on IMemento. IMemento documentations says only alpha numeric * Setting Store based on IMemento. IMemento documentations says only alpha numeric
* values may be used as keys. Therefore the implementation converts dots (.) into * values may be used as keys. Therefore the implementation converts dots (.) into
@ -26,7 +26,7 @@ import org.eclipse.ui.IMemento;
* *
* @author Michael Scharf * @author Michael Scharf
*/ */
class SettingsStore extends org.eclipse.tm.internal.terminal.provisional.api.SettingsStore { class SettingsStore extends org.eclipse.tm.internal.terminal.provisional.api.Settings {
private static final String KEYS = "_keys_"; //$NON-NLS-1$ private static final String KEYS = "_keys_"; //$NON-NLS-1$

View file

@ -69,7 +69,7 @@ import org.eclipse.tm.internal.terminal.control.actions.TerminalActionCut;
import org.eclipse.tm.internal.terminal.control.actions.TerminalActionPaste; import org.eclipse.tm.internal.terminal.control.actions.TerminalActionPaste;
import org.eclipse.tm.internal.terminal.control.actions.TerminalActionSelectAll; import org.eclipse.tm.internal.terminal.control.actions.TerminalActionSelectAll;
import org.eclipse.tm.internal.terminal.preferences.ITerminalConstants; import org.eclipse.tm.internal.terminal.preferences.ITerminalConstants;
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore; import org.eclipse.tm.internal.terminal.provisional.api.ISettings;
import org.eclipse.tm.internal.terminal.provisional.api.ITerminalConnector; import org.eclipse.tm.internal.terminal.provisional.api.ITerminalConnector;
import org.eclipse.tm.internal.terminal.provisional.api.Logger; import org.eclipse.tm.internal.terminal.provisional.api.Logger;
import org.eclipse.tm.internal.terminal.provisional.api.TerminalConnectorExtension; import org.eclipse.tm.internal.terminal.provisional.api.TerminalConnectorExtension;
@ -400,7 +400,7 @@ public class TerminalView extends ViewPart implements ITerminalView, ITerminalVi
// sequence. // sequence.
fPageBook=new PageBook(wndParent,SWT.NONE); fPageBook=new PageBook(wndParent,SWT.NONE);
ISettingsStore s=new SettingStorePrefixDecorator(fStore,"connectionManager"); //$NON-NLS-1$ ISettings s=new SettingStorePrefixDecorator(fStore,"connectionManager"); //$NON-NLS-1$
fMultiConnectionManager.loadState(s,new ITerminalViewConnectionFactory() { fMultiConnectionManager.loadState(s,new ITerminalViewConnectionFactory() {
public ITerminalViewConnection create() { public ITerminalViewConnection create() {
return makeViewConnection(); return makeViewConnection();
@ -485,7 +485,7 @@ public class TerminalView extends ViewPart implements ITerminalView, ITerminalVi
* @param connectors loads the data from store * @param connectors loads the data from store
* @return null or the currently selected connector * @return null or the currently selected connector
*/ */
private ITerminalConnector loadSettings(ISettingsStore store, ITerminalConnector[] connectors) { private ITerminalConnector loadSettings(ISettings store, ITerminalConnector[] connectors) {
ITerminalConnector connector=null; ITerminalConnector connector=null;
String connectionType=store.getStringProperty(STORE_CONNECTION_TYPE); String connectionType=store.getStringProperty(STORE_CONNECTION_TYPE);
for (int i = 0; i < connectors.length; i++) { for (int i = 0; i < connectors.length; i++) {
@ -517,7 +517,7 @@ public class TerminalView extends ViewPart implements ITerminalView, ITerminalVi
* @param store the settings will be saved in this store * @param store the settings will be saved in this store
* @param connector the connector that will be saved. Can be null. * @param connector the connector that will be saved. Can be null.
*/ */
private void saveSettings(ISettingsStore store, ITerminalConnector connector) { private void saveSettings(ISettings store, ITerminalConnector connector) {
if(connector!=null) { if(connector!=null) {
connector.save(getStore(store, connector)); connector.save(getStore(store, connector));
// the last saved connector becomes the default // the last saved connector becomes the default
@ -535,7 +535,7 @@ public class TerminalView extends ViewPart implements ITerminalView, ITerminalVi
fMultiConnectionManager.saveState(new SettingStorePrefixDecorator(fStore,"connectionManager")); //$NON-NLS-1$ fMultiConnectionManager.saveState(new SettingStorePrefixDecorator(fStore,"connectionManager")); //$NON-NLS-1$
fStore.saveState(memento); fStore.saveState(memento);
} }
private ISettingsStore getStore(ISettingsStore store, ITerminalConnector connector) { private ISettings getStore(ISettings store, ITerminalConnector connector) {
return new SettingStorePrefixDecorator(store,connector.getId()+"."); //$NON-NLS-1$ return new SettingStorePrefixDecorator(store,connector.getId()+"."); //$NON-NLS-1$
} }

View file

@ -25,7 +25,7 @@ import org.eclipse.swt.events.MouseAdapter;
import org.eclipse.swt.events.MouseEvent; import org.eclipse.swt.events.MouseEvent;
import org.eclipse.tm.internal.terminal.control.CommandInputFieldWithHistory; import org.eclipse.tm.internal.terminal.control.CommandInputFieldWithHistory;
import org.eclipse.tm.internal.terminal.control.ITerminalViewControl; import org.eclipse.tm.internal.terminal.control.ITerminalViewControl;
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore; import org.eclipse.tm.internal.terminal.provisional.api.ISettings;
import org.eclipse.tm.internal.terminal.provisional.api.ITerminalConnector; import org.eclipse.tm.internal.terminal.provisional.api.ITerminalConnector;
import org.eclipse.tm.internal.terminal.provisional.api.Logger; import org.eclipse.tm.internal.terminal.provisional.api.Logger;
import org.eclipse.tm.internal.terminal.provisional.api.TerminalState; import org.eclipse.tm.internal.terminal.provisional.api.TerminalState;
@ -89,10 +89,10 @@ class TerminalViewConnection implements ITerminalViewConnection {
public ITerminalViewControl getCtlTerminal() { public ITerminalViewControl getCtlTerminal() {
return fCtlTerminal; return fCtlTerminal;
} }
private ISettingsStore getStore(ISettingsStore store,ITerminalConnector connector) { private ISettings getStore(ISettings store,ITerminalConnector connector) {
return new SettingStorePrefixDecorator(store,connector.getId()+"."); //$NON-NLS-1$ return new SettingStorePrefixDecorator(store,connector.getId()+"."); //$NON-NLS-1$
} }
public void loadState(ISettingsStore store) { public void loadState(ISettings store) {
fPartName=store.getStringProperty(STORE_PART_NAME); fPartName=store.getStringProperty(STORE_PART_NAME);
fSummary=store.getStringProperty(STORE_SUMMARY); fSummary=store.getStringProperty(STORE_SUMMARY);
fHistory=store.getStringProperty(STORE_COMMAND_INPUT_FIELD_HISTORY); fHistory=store.getStringProperty(STORE_COMMAND_INPUT_FIELD_HISTORY);
@ -111,7 +111,7 @@ class TerminalViewConnection implements ITerminalViewConnection {
setCommandInputField(true); setCommandInputField(true);
} }
public void saveState(ISettingsStore store) { public void saveState(ISettings store) {
store.setProperty(STORE_PART_NAME, fPartName); store.setProperty(STORE_PART_NAME, fPartName);
store.setProperty(STORE_SUMMARY,fSummary); store.setProperty(STORE_SUMMARY,fSummary);
store.setProperty(STORE_COMMAND_INPUT_FIELD_HISTORY, fHistory); store.setProperty(STORE_COMMAND_INPUT_FIELD_HISTORY, fHistory);

View file

@ -16,7 +16,7 @@ import java.util.List;
import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.Status;
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore; import org.eclipse.tm.internal.terminal.provisional.api.ISettings;
public class TerminalViewConnectionManager implements ITerminalViewConnectionManager { public class TerminalViewConnectionManager implements ITerminalViewConnectionManager {
private static final String STORE_CONNECTION_PREFIX = "connection"; //$NON-NLS-1$ private static final String STORE_CONNECTION_PREFIX = "connection"; //$NON-NLS-1$
@ -108,7 +108,7 @@ public class TerminalViewConnectionManager implements ITerminalViewConnectionMan
} }
} }
public void saveState(ISettingsStore store) { public void saveState(ISettings store) {
store.setProperty(STORE_SIZE,""+fConnections.size()); //$NON-NLS-1$ store.setProperty(STORE_SIZE,""+fConnections.size()); //$NON-NLS-1$
// save all connections // save all connections
int n=0; int n=0;
@ -124,7 +124,7 @@ public class TerminalViewConnectionManager implements ITerminalViewConnectionMan
} }
} }
public void loadState(ISettingsStore store,ITerminalViewConnectionFactory factory) { public void loadState(ISettings store,ITerminalViewConnectionFactory factory) {
int size=0; int size=0;
try { try {
size=Integer.parseInt(store.getStringProperty(STORE_SIZE)); size=Integer.parseInt(store.getStringProperty(STORE_SIZE));

View file

@ -11,7 +11,7 @@ import java.io.InputStream;
import java.io.OutputStream; import java.io.OutputStream;
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsPage; import org.eclipse.tm.internal.terminal.provisional.api.ISettingsPage;
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore; import org.eclipse.tm.internal.terminal.provisional.api.ISettings;
import org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl; import org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl;
import org.eclipse.tm.internal.terminal.provisional.api.TerminalState; import org.eclipse.tm.internal.terminal.provisional.api.TerminalState;
import org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl; import org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl;
@ -126,7 +126,7 @@ public class RemoteConnector extends TerminalConnectorImpl {
* .api.ISettingsStore) * .api.ISettingsStore)
*/ */
@Override @Override
public void load(ISettingsStore store) { public void load(ISettings store) {
fSettings.load(store); fSettings.load(store);
} }
@ -148,7 +148,7 @@ public class RemoteConnector extends TerminalConnectorImpl {
* .api.ISettingsStore) * .api.ISettingsStore)
*/ */
@Override @Override
public void save(ISettingsStore store) { public void save(ISettings store) {
fSettings.save(store); fSettings.save(store);
} }

View file

@ -7,7 +7,7 @@
*******************************************************************************/ *******************************************************************************/
package org.eclipse.tm.internal.terminal.remote; package org.eclipse.tm.internal.terminal.remote;
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore; import org.eclipse.tm.internal.terminal.provisional.api.ISettings;
import org.eclipse.tm.terminal.remote.IRemoteSettings; import org.eclipse.tm.terminal.remote.IRemoteSettings;
@SuppressWarnings("restriction") @SuppressWarnings("restriction")
@ -38,7 +38,7 @@ public class RemoteSettings implements IRemoteSettings {
/** /**
* Load information into the RemoteSettings object. * Load information into the RemoteSettings object.
*/ */
public void load(ISettingsStore store) { public void load(ISettings store) {
fRemoteServices = store.getStringProperty(REMOTE_SERVICES); fRemoteServices = store.getStringProperty(REMOTE_SERVICES);
fConnectionName = store.getStringProperty(CONNECTION_NAME); fConnectionName = store.getStringProperty(CONNECTION_NAME);
} }
@ -46,7 +46,7 @@ public class RemoteSettings implements IRemoteSettings {
/** /**
* Extract information from the RemoteSettings object. * Extract information from the RemoteSettings object.
*/ */
public void save(ISettingsStore store) { public void save(ISettings store) {
store.getStringProperty(REMOTE_SERVICES, fRemoteServices); store.getStringProperty(REMOTE_SERVICES, fRemoteServices);
store.getStringProperty(CONNECTION_NAME, fConnectionName); store.getStringProperty(CONNECTION_NAME, fConnectionName);
} }

View file

@ -11,7 +11,7 @@
*******************************************************************************/ *******************************************************************************/
package org.eclipse.tm.internal.terminal.serial; package org.eclipse.tm.internal.terminal.serial;
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore; import org.eclipse.tm.internal.terminal.provisional.api.ISettings;
public interface ISerialSettings { public interface ISerialSettings {
@ -23,6 +23,6 @@ public interface ISerialSettings {
int getFlowControl(); int getFlowControl();
int getTimeout(); int getTimeout();
String getSummary(); String getSummary();
void load(ISettingsStore store); void load(ISettings store);
void save(ISettingsStore store); void save(ISettings store);
} }

View file

@ -30,7 +30,7 @@ import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.Status;
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsPage; import org.eclipse.tm.internal.terminal.provisional.api.ISettingsPage;
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore; import org.eclipse.tm.internal.terminal.provisional.api.ISettings;
import org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl; import org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl;
import org.eclipse.tm.internal.terminal.provisional.api.Logger; import org.eclipse.tm.internal.terminal.provisional.api.Logger;
import org.eclipse.tm.internal.terminal.provisional.api.TerminalState; import org.eclipse.tm.internal.terminal.provisional.api.TerminalState;
@ -221,10 +221,10 @@ public class SerialConnector extends TerminalConnectorImpl {
public String getSettingsSummary() { public String getSettingsSummary() {
return fSettings.getSummary(); return fSettings.getSummary();
} }
public void load(ISettingsStore store) { public void load(ISettings store) {
fSettings.load(store); fSettings.load(store);
} }
public void save(ISettingsStore store) { public void save(ISettings store) {
fSettings.save(store); fSettings.save(store);
} }
} }

View file

@ -18,7 +18,7 @@ package org.eclipse.tm.internal.terminal.serial;
import gnu.io.SerialPort; import gnu.io.SerialPort;
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore; import org.eclipse.tm.internal.terminal.provisional.api.ISettings;
public class SerialSettings implements ISerialSettings { public class SerialSettings implements ISerialSettings {
protected String fSerialPort; protected String fSerialPort;
@ -153,7 +153,7 @@ public class SerialSettings implements ISerialSettings {
getFlowControlString(); getFlowControlString();
} }
public void load(ISettingsStore store) { public void load(ISettings store) {
fSerialPort = store.getStringProperty("SerialPort", fProperties.getDefaultSerialPort());//$NON-NLS-1$ fSerialPort = store.getStringProperty("SerialPort", fProperties.getDefaultSerialPort());//$NON-NLS-1$
fBaudRate = store.getStringProperty("BaudRate", fProperties.getDefaultBaudRate());//$NON-NLS-1$ fBaudRate = store.getStringProperty("BaudRate", fProperties.getDefaultBaudRate());//$NON-NLS-1$
fDataBits = store.getStringProperty("DataBits", fProperties.getDefaultDataBits());//$NON-NLS-1$ fDataBits = store.getStringProperty("DataBits", fProperties.getDefaultDataBits());//$NON-NLS-1$
@ -163,7 +163,7 @@ public class SerialSettings implements ISerialSettings {
fTimeout = store.getStringProperty("Timeout",fProperties.getDefaultTimeout()); //$NON-NLS-1$ fTimeout = store.getStringProperty("Timeout",fProperties.getDefaultTimeout()); //$NON-NLS-1$
} }
public void save(ISettingsStore store) { public void save(ISettings store) {
store.setProperty("SerialPort", fSerialPort); //$NON-NLS-1$ store.setProperty("SerialPort", fSerialPort); //$NON-NLS-1$
store.setProperty("BaudRate", fBaudRate); //$NON-NLS-1$ store.setProperty("BaudRate", fBaudRate); //$NON-NLS-1$
store.setProperty("DataBits", fDataBits); //$NON-NLS-1$ store.setProperty("DataBits", fDataBits); //$NON-NLS-1$

View file

@ -12,7 +12,7 @@
*******************************************************************************/ *******************************************************************************/
package org.eclipse.tm.internal.terminal.ssh; package org.eclipse.tm.internal.terminal.ssh;
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore; import org.eclipse.tm.internal.terminal.provisional.api.ISettings;
public interface ISshSettings { public interface ISshSettings {
/** /**
@ -68,11 +68,11 @@ public interface ISshSettings {
* Load connection data from a settings store. * Load connection data from a settings store.
* @param store the settings store to access. * @param store the settings store to access.
*/ */
void load(ISettingsStore store); void load(ISettings store);
/** /**
* Store connection data into a settings store. * Store connection data into a settings store.
* @param store the settings store to access. * @param store the settings store to access.
*/ */
void save(ISettingsStore store); void save(ISettings store);
} }

View file

@ -17,7 +17,7 @@ import java.io.InputStream;
import java.io.OutputStream; import java.io.OutputStream;
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsPage; import org.eclipse.tm.internal.terminal.provisional.api.ISettingsPage;
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore; import org.eclipse.tm.internal.terminal.provisional.api.ISettings;
import org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl; import org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl;
import org.eclipse.tm.internal.terminal.provisional.api.Logger; import org.eclipse.tm.internal.terminal.provisional.api.Logger;
import org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl; import org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl;
@ -101,10 +101,10 @@ public class SshConnector extends TerminalConnectorImpl {
public String getSettingsSummary() { public String getSettingsSummary() {
return fSettings.getSummary(); return fSettings.getSummary();
} }
public void load(ISettingsStore store) { public void load(ISettings store) {
fSettings.load(store); fSettings.load(store);
} }
public void save(ISettingsStore store) { public void save(ISettings store) {
fSettings.save(store); fSettings.save(store);
} }
protected JSch getJsch() { protected JSch getJsch() {

View file

@ -14,7 +14,7 @@
*******************************************************************************/ *******************************************************************************/
package org.eclipse.tm.internal.terminal.ssh; package org.eclipse.tm.internal.terminal.ssh;
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore; import org.eclipse.tm.internal.terminal.provisional.api.ISettings;
public class SshSettings implements ISshSettings { public class SshSettings implements ISshSettings {
protected String fHost; protected String fHost;
@ -39,7 +39,7 @@ public class SshSettings implements ISshSettings {
return settings; return settings;
} }
public void load(ISettingsStore store) { public void load(ISettings store) {
fHost = store.getStringProperty("Host");//$NON-NLS-1$ fHost = store.getStringProperty("Host");//$NON-NLS-1$
fUser = store.getStringProperty("User");//$NON-NLS-1$ fUser = store.getStringProperty("User");//$NON-NLS-1$
// ISettingsStore providers have to make sure that // ISettingsStore providers have to make sure that
@ -52,7 +52,7 @@ public class SshSettings implements ISshSettings {
} }
public void save(ISettingsStore store) { public void save(ISettings store) {
store.setProperty("Host", fHost);//$NON-NLS-1$ store.setProperty("Host", fHost);//$NON-NLS-1$
store.setProperty("User", fUser);//$NON-NLS-1$ store.setProperty("User", fUser);//$NON-NLS-1$
store.setProperty("Port", fPort);//$NON-NLS-1$ store.setProperty("Port", fPort);//$NON-NLS-1$

View file

@ -24,7 +24,4 @@ bin.includes = .,\
source.. = src/ source.. = src/
output.. = bin/ output.. = bin/
src.includes = about.html src.includes = about.html
javacTarget = 1.4
javacSource = 1.4
javacErrors.. = -assertIdentifier

View file

@ -11,13 +11,13 @@
*******************************************************************************/ *******************************************************************************/
package org.eclipse.tm.internal.terminal.telnet; package org.eclipse.tm.internal.terminal.telnet;
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore; import org.eclipse.tm.internal.terminal.provisional.api.ISettings;
public interface ITelnetSettings { public interface ITelnetSettings {
String getHost(); String getHost();
int getNetworkPort(); int getNetworkPort();
int getTimeout(); int getTimeout();
String getSummary(); String getSummary();
void load(ISettingsStore store); void load(ISettings store);
void save(ISettingsStore store); void save(ISettings store);
} }

View file

@ -26,7 +26,7 @@ import java.io.OutputStream;
import java.net.Socket; import java.net.Socket;
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsPage; import org.eclipse.tm.internal.terminal.provisional.api.ISettingsPage;
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore; import org.eclipse.tm.internal.terminal.provisional.api.ISettings;
import org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl; import org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl;
import org.eclipse.tm.internal.terminal.provisional.api.Logger; import org.eclipse.tm.internal.terminal.provisional.api.Logger;
import org.eclipse.tm.internal.terminal.provisional.api.TerminalState; import org.eclipse.tm.internal.terminal.provisional.api.TerminalState;
@ -151,10 +151,10 @@ public class TelnetConnector extends TerminalConnectorImpl {
public String getSettingsSummary() { public String getSettingsSummary() {
return fSettings.getSummary(); return fSettings.getSummary();
} }
public void load(ISettingsStore store) { public void load(ISettings store) {
fSettings.load(store); fSettings.load(store);
} }
public void save(ISettingsStore store) { public void save(ISettings store) {
fSettings.save(store); fSettings.save(store);
} }
} }

View file

@ -16,7 +16,7 @@
*******************************************************************************/ *******************************************************************************/
package org.eclipse.tm.internal.terminal.telnet; package org.eclipse.tm.internal.terminal.telnet;
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore; import org.eclipse.tm.internal.terminal.provisional.api.ISettings;
public class TelnetSettings implements ITelnetSettings { public class TelnetSettings implements ITelnetSettings {
protected String fHost; protected String fHost;
@ -51,13 +51,13 @@ public class TelnetSettings implements ITelnetSettings {
return getHost() + ":" + getNetworkPortString(); //$NON-NLS-1$ return getHost() + ":" + getNetworkPortString(); //$NON-NLS-1$
} }
public void load(ISettingsStore store) { public void load(ISettings store) {
fHost = store.getStringProperty("Host", fProperties.getDefaultHost());//$NON-NLS-1$ fHost = store.getStringProperty("Host", fProperties.getDefaultHost());//$NON-NLS-1$
fNetworkPort = store.getStringProperty("NetworkPort", fProperties.getDefaultNetworkPort());//$NON-NLS-1$ fNetworkPort = store.getStringProperty("NetworkPort", fProperties.getDefaultNetworkPort());//$NON-NLS-1$
fTimeout = store.getStringProperty("Timeout","10");//$NON-NLS-1$ //$NON-NLS-2$ fTimeout = store.getStringProperty("Timeout","10");//$NON-NLS-1$ //$NON-NLS-2$
} }
public void save(ISettingsStore store) { public void save(ISettings store) {
store.setProperty("Host", fHost);//$NON-NLS-1$ store.setProperty("Host", fHost);//$NON-NLS-1$
store.setProperty("NetworkPort", fNetworkPort);//$NON-NLS-1$ store.setProperty("NetworkPort", fNetworkPort);//$NON-NLS-1$
store.setProperty("Timeout", fTimeout);//$NON-NLS-1$ store.setProperty("Timeout", fTimeout);//$NON-NLS-1$

View file

@ -20,8 +20,6 @@ bin.includes = META-INF/,\
tm32.png,\ tm32.png,\
test.xml,\ test.xml,\
about.html about.html
javacSource=1.4
javacTarget=1.4
src.includes = .settings/,\ src.includes = .settings/,\
build.properties,\ build.properties,\
teamConfig/,\ teamConfig/,\

View file

@ -22,9 +22,9 @@ import org.eclipse.core.runtime.Platform;
import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Shell;
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsPage; import org.eclipse.tm.internal.terminal.provisional.api.ISettingsPage;
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore; import org.eclipse.tm.internal.terminal.provisional.api.ISettings;
import org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl; import org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl;
import org.eclipse.tm.internal.terminal.provisional.api.SettingsStore; import org.eclipse.tm.internal.terminal.provisional.api.Settings;
import org.eclipse.tm.internal.terminal.provisional.api.TerminalState; import org.eclipse.tm.internal.terminal.provisional.api.TerminalState;
import org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl; import org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl;
@ -85,8 +85,8 @@ public class TerminalConnectorFactoryTest extends TestCase {
public int fWidth; public int fWidth;
public int fHeight; public int fHeight;
public ITerminalControl fControl; public ITerminalControl fControl;
public ISettingsStore fSaveStore; public ISettings fSaveStore;
public ISettingsStore fLoadStore; public ISettings fLoadStore;
public boolean fDisconnect; public boolean fDisconnect;
public boolean isLocalEcho() { public boolean isLocalEcho() {
@ -112,7 +112,7 @@ public class TerminalConnectorFactoryTest extends TestCase {
return "Summary"; return "Summary";
} }
public void load(ISettingsStore store) { public void load(ISettings store) {
fLoadStore=store; fLoadStore=store;
} }
@ -133,7 +133,7 @@ public class TerminalConnectorFactoryTest extends TestCase {
}}; }};
} }
public void save(ISettingsStore store) { public void save(ISettings store) {
fSaveStore=store; fSaveStore=store;
} }
} }
@ -232,7 +232,7 @@ public class TerminalConnectorFactoryTest extends TestCase {
public void testLoad() { public void testLoad() {
ConnectorMock mock=new ConnectorMock(); ConnectorMock mock=new ConnectorMock();
TerminalConnector c = makeTerminalConnector(mock); TerminalConnector c = makeTerminalConnector(mock);
ISettingsStore s=new SettingsStore(); ISettings s=new Settings();
c.load(s); c.load(s);
// the load is called after the connect... // the load is called after the connect...
assertNull(mock.fLoadStore); assertNull(mock.fLoadStore);
@ -243,7 +243,7 @@ public class TerminalConnectorFactoryTest extends TestCase {
public void testSave() { public void testSave() {
ConnectorMock mock=new ConnectorMock(); ConnectorMock mock=new ConnectorMock();
TerminalConnector c = makeTerminalConnector(mock); TerminalConnector c = makeTerminalConnector(mock);
ISettingsStore s=new SettingsStore(); ISettings s=new Settings();
c.save(s); c.save(s);
assertNull(mock.fSaveStore); assertNull(mock.fSaveStore);
c.connect(new TerminalControlMock()); c.connect(new TerminalControlMock());

View file

@ -23,9 +23,9 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Shell;
import org.eclipse.tm.internal.terminal.connector.TerminalConnector.Factory; import org.eclipse.tm.internal.terminal.connector.TerminalConnector.Factory;
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsPage; import org.eclipse.tm.internal.terminal.provisional.api.ISettingsPage;
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore; import org.eclipse.tm.internal.terminal.provisional.api.ISettings;
import org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl; import org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl;
import org.eclipse.tm.internal.terminal.provisional.api.SettingsStore; import org.eclipse.tm.internal.terminal.provisional.api.Settings;
import org.eclipse.tm.internal.terminal.provisional.api.TerminalState; import org.eclipse.tm.internal.terminal.provisional.api.TerminalState;
import org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl; import org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl;
@ -86,8 +86,8 @@ public class TerminalConnectorTest extends TestCase {
public int fWidth; public int fWidth;
public int fHeight; public int fHeight;
public ITerminalControl fControl; public ITerminalControl fControl;
public ISettingsStore fSaveStore; public ISettings fSaveStore;
public ISettingsStore fLoadStore; public ISettings fLoadStore;
public boolean fDisconnect; public boolean fDisconnect;
public boolean isLocalEcho() { public boolean isLocalEcho() {
@ -113,7 +113,7 @@ public class TerminalConnectorTest extends TestCase {
return "Summary"; return "Summary";
} }
public void load(ISettingsStore store) { public void load(ISettings store) {
fLoadStore=store; fLoadStore=store;
} }
@ -135,7 +135,7 @@ public class TerminalConnectorTest extends TestCase {
} }
public void save(ISettingsStore store) { public void save(ISettings store) {
fSaveStore=store; fSaveStore=store;
} }
} }
@ -212,7 +212,7 @@ public class TerminalConnectorTest extends TestCase {
public void testLoad() { public void testLoad() {
ConnectorMock mock=new ConnectorMock(); ConnectorMock mock=new ConnectorMock();
TerminalConnector c=new TerminalConnector(new SimpleFactory(mock),"xID","xName", false); TerminalConnector c=new TerminalConnector(new SimpleFactory(mock),"xID","xName", false);
ISettingsStore s=new SettingsStore(); ISettings s=new Settings();
c.load(s); c.load(s);
// the load is called after the connect... // the load is called after the connect...
assertNull(mock.fLoadStore); assertNull(mock.fLoadStore);
@ -223,7 +223,7 @@ public class TerminalConnectorTest extends TestCase {
public void testSave() { public void testSave() {
ConnectorMock mock=new ConnectorMock(); ConnectorMock mock=new ConnectorMock();
TerminalConnector c=new TerminalConnector(new SimpleFactory(mock),"xID","xName", false); TerminalConnector c=new TerminalConnector(new SimpleFactory(mock),"xID","xName", false);
ISettingsStore s=new SettingsStore(); ISettings s=new Settings();
c.save(s); c.save(s);
assertNull(mock.fSaveStore); assertNull(mock.fSaveStore);
c.connect(new TerminalControlMock()); c.connect(new TerminalControlMock());

View file

@ -18,7 +18,7 @@ import java.io.InputStream;
import java.io.OutputStream; import java.io.OutputStream;
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsPage; import org.eclipse.tm.internal.terminal.provisional.api.ISettingsPage;
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore; import org.eclipse.tm.internal.terminal.provisional.api.ISettings;
import org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl; import org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl;
import org.eclipse.tm.internal.terminal.provisional.api.Logger; import org.eclipse.tm.internal.terminal.provisional.api.Logger;
import org.eclipse.tm.internal.terminal.provisional.api.TerminalState; import org.eclipse.tm.internal.terminal.provisional.api.TerminalState;
@ -86,7 +86,7 @@ public class SpeedTestConnector extends TerminalConnectorImpl {
//throw new RuntimeException("XXX problems\nSpeedTest\nXXX!"); //throw new RuntimeException("XXX problems\nSpeedTest\nXXX!");
} }
public void load(ISettingsStore store) { public void load(ISettings store) {
fSettings.load(store); fSettings.load(store);
} }
@ -94,7 +94,7 @@ public class SpeedTestConnector extends TerminalConnectorImpl {
return new SpeedTestSettingsPage(fSettings); return new SpeedTestSettingsPage(fSettings);
} }
public void save(ISettingsStore store) { public void save(ISettings store) {
fSettings.save(store); fSettings.save(store);
} }

View file

@ -11,7 +11,7 @@
package org.eclipse.tm.internal.terminal.speedtest; package org.eclipse.tm.internal.terminal.speedtest;
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore; import org.eclipse.tm.internal.terminal.provisional.api.ISettings;
public class SpeedTestSettings { public class SpeedTestSettings {
String fInputFile=""; String fInputFile="";
@ -36,12 +36,12 @@ public class SpeedTestSettings {
void setInputFile(String testFile) { void setInputFile(String testFile) {
fInputFile = testFile; fInputFile = testFile;
} }
public void load(ISettingsStore store) { public void load(ISettings store) {
fInputFile=store.getStringProperty("inputFile"); fInputFile=store.getStringProperty("inputFile");
fBufferSize=store.getStringProperty("bufferSize"); fBufferSize=store.getStringProperty("bufferSize");
fThrottle=store.getStringProperty("throttle"); fThrottle=store.getStringProperty("throttle");
} }
public void save(ISettingsStore store) { public void save(ISettings store) {
store.setProperty("inputFile", fInputFile); store.setProperty("inputFile", fInputFile);
store.setProperty("bufferSize", fBufferSize); store.setProperty("bufferSize", fBufferSize);
store.setProperty("throttle", fThrottle); store.setProperty("throttle", fThrottle);

View file

@ -34,6 +34,4 @@ source.. = src/
output.. = bin/ output.. = bin/
src.includes = schema/,\ src.includes = schema/,\
about.html about.html
javacSource=1.4
javacTarget=1.4

View file

@ -19,7 +19,7 @@ import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.Platform;
import org.eclipse.tm.internal.terminal.control.impl.TerminalMessages; import org.eclipse.tm.internal.terminal.control.impl.TerminalMessages;
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsPage; import org.eclipse.tm.internal.terminal.provisional.api.ISettingsPage;
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore; import org.eclipse.tm.internal.terminal.provisional.api.ISettings;
import org.eclipse.tm.internal.terminal.provisional.api.ITerminalConnector; import org.eclipse.tm.internal.terminal.provisional.api.ITerminalConnector;
import org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl; import org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl;
import org.eclipse.tm.internal.terminal.provisional.api.Logger; import org.eclipse.tm.internal.terminal.provisional.api.Logger;
@ -37,8 +37,8 @@ import org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnect
* provided {@link TerminalConnector.Factory} interface when needed. class, and * provided {@link TerminalConnector.Factory} interface when needed. class, and
* delegates to the actual implementation when needed. The following methods can * delegates to the actual implementation when needed. The following methods can
* be called without initializing the contributed implementation class: * be called without initializing the contributed implementation class:
* {@link #getId()}, {@link #getName()}, {@link #getSettingsSummary()},{@link #load(ISettingsStore)}, * {@link #getId()}, {@link #getName()}, {@link #getSettingsSummary()},{@link #load(ISettings)},
* {@link #setTerminalSize(int, int)}, {@link #save(ISettingsStore)}, * {@link #setTerminalSize(int, int)}, {@link #save(ISettings)},
* {@link #getAdapter(Class)} * {@link #getAdapter(Class)}
* *
* @noextend This class is not intended to be subclassed by clients. * @noextend This class is not intended to be subclassed by clients.
@ -93,7 +93,7 @@ public class TerminalConnector implements ITerminalConnector {
* The store might be set before the real connector is initialized. * The store might be set before the real connector is initialized.
* This keeps the value until the connector is created. * This keeps the value until the connector is created.
*/ */
private ISettingsStore fStore; private ISettings fStore;
/** /**
* Constructor for the terminal connector. * Constructor for the terminal connector.
* *
@ -173,7 +173,7 @@ public class TerminalConnector implements ITerminalConnector {
public boolean isLocalEcho() { public boolean isLocalEcho() {
return getConnectorImpl().isLocalEcho(); return getConnectorImpl().isLocalEcho();
} }
public void load(ISettingsStore store) { public void load(ISettings store) {
if(fConnector==null) { if(fConnector==null) {
fStore=store; fStore=store;
} else { } else {
@ -183,7 +183,7 @@ public class TerminalConnector implements ITerminalConnector {
public ISettingsPage makeSettingsPage() { public ISettingsPage makeSettingsPage() {
return getConnectorImpl().makeSettingsPage(); return getConnectorImpl().makeSettingsPage();
} }
public void save(ISettingsStore store) { public void save(ISettings store) {
// no need to save the settings: it cannot have changed // no need to save the settings: it cannot have changed
// because we are not initialized.... // because we are not initialized....
if(fConnector!=null) if(fConnector!=null)

View file

@ -1,11 +1,11 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2006, 2011 Wind River Systems, Inc. and others. * Copyright (c) 2006, 2011 Wind River Systems, Inc. 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
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* Michael Scharf (Wind River) - initial API and implementation * Michael Scharf (Wind River) - initial API and implementation
* Martin Oberhuber (Wind River) - fixed copyright headers and beautified * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
* Uwe Stieber (Wind River) - Extend API to allow storage of non-string settings * Uwe Stieber (Wind River) - Extend API to allow storage of non-string settings
@ -17,11 +17,11 @@ import java.util.Map;
import org.eclipse.core.runtime.IAdaptable; import org.eclipse.core.runtime.IAdaptable;
/** /**
* The settings store contains the state of a connection. The content of the * The settings contains the state of a connection. The content of the settings
* settings store is not the persisted state of the connection. Storing data * is not the persisted state of the connection. Storing data in the settings
* in the settings store does not make any assumption about possibly persisting * does not make any assumption about possibly persisting the connection state.
* the connection state. Connection persistence has to be implemented by the UI * Connection persistence has to be implemented by the UI container embedding
* container embedding the Terminal control. * the Terminal control.
* <p> * <p>
* <strong>EXPERIMENTAL</strong>. This class or interface has been added as * <strong>EXPERIMENTAL</strong>. This class or interface has been added as
* part of a work in progress. There is no guarantee that this API will * part of a work in progress. There is no guarantee that this API will
@ -29,8 +29,8 @@ import org.eclipse.core.runtime.IAdaptable;
* consulting with the <a href="http://www.eclipse.org/tm/">Target Management</a> team. * consulting with the <a href="http://www.eclipse.org/tm/">Target Management</a> team.
* </p> * </p>
*/ */
public interface ISettingsStore extends IAdaptable { public interface ISettings extends IAdaptable {
/** /**
* Set the properties from the given map. Calling this method * Set the properties from the given map. Calling this method
* will overwrite all previous set properties. * will overwrite all previous set properties.
@ -166,7 +166,7 @@ public interface ISettingsStore extends IAdaptable {
* *
* @param key The property key. Must not be <code>null</code>! * @param key The property key. Must not be <code>null</code>!
* @param defaultValue The default value or <code>null</code>. * @param defaultValue The default value or <code>null</code>.
* *
* @return The stored property value casted <code>java.lang.String</code> or <code>null</code>. * @return The stored property value casted <code>java.lang.String</code> or <code>null</code>.
*/ */
public String getStringProperty(String key, String defaultValue); public String getStringProperty(String key, String defaultValue);

View file

@ -124,14 +124,14 @@ public interface ITerminalConnector extends IAdaptable {
* @param store a string based data store. Short keys like "foo" can be used to * @param store a string based data store. Short keys like "foo" can be used to
* store the state of the connection. * store the state of the connection.
*/ */
void load(ISettingsStore store); void load(ISettings store);
/** /**
* When the view or dialog containing the terminal is closed, * When the view or dialog containing the terminal is closed,
* the state of the connection is saved into the settings store <code>store</code> * the state of the connection is saved into the settings store <code>store</code>
* @param store * @param store
*/ */
void save(ISettingsStore store); void save(ISettings store);
/** /**
* FIXME should not have UI related stuff in ITerminalConnector, since * FIXME should not have UI related stuff in ITerminalConnector, since
@ -140,7 +140,7 @@ public interface ITerminalConnector extends IAdaptable {
* *
* @return a new page that can be used in a dialog to setup this connection. * @return a new page that can be used in a dialog to setup this connection.
* The dialog should persist its settings with the * The dialog should persist its settings with the
* {@link #load(ISettingsStore)} and {@link #save(ISettingsStore)} * {@link #load(ISettings)} and {@link #save(ISettings)}
* methods. * methods.
*/ */
ISettingsPage makeSettingsPage(); ISettingsPage makeSettingsPage();

View file

@ -17,9 +17,9 @@ import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.PlatformObject; import org.eclipse.core.runtime.PlatformObject;
/** /**
* Terminal connection settings store implementation. * Terminal connection settings implementation.
*/ */
public class SettingsStore extends PlatformObject implements ISettingsStore { public class Settings extends PlatformObject implements ISettings {
/** /**
* A map of settings. The keys are always strings, the value might be any object. * A map of settings. The keys are always strings, the value might be any object.
*/ */
@ -28,18 +28,18 @@ public class SettingsStore extends PlatformObject implements ISettingsStore {
/** /**
* Constructor. * Constructor.
*/ */
public SettingsStore() { public Settings() {
super(); super();
} }
/* (non-Javadoc) /* (non-Javadoc)
* @see java.lang.Object#equals(java.lang.Object) * @see java.lang.Object#equals(java.lang.Object)
*/ */
@Override @Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
boolean equals = super.equals(obj); boolean equals = super.equals(obj);
if (!equals && obj instanceof SettingsStore) { if (!equals && obj instanceof Settings) {
return settings.equals(((SettingsStore)obj).settings); return settings.equals(((Settings)obj).settings);
} }
return equals; return equals;
} }
@ -66,7 +66,7 @@ public class SettingsStore extends PlatformObject implements ISettingsStore {
buffer.append("="); //$NON-NLS-1$ buffer.append("="); //$NON-NLS-1$
Object value = settings.get(key); Object value = settings.get(key);
if (value instanceof Map || value instanceof ISettingsStore) { if (value instanceof Map || value instanceof ISettings) {
buffer.append("{...}"); //$NON-NLS-1$ buffer.append("{...}"); //$NON-NLS-1$
} else { } else {
buffer.append(value); buffer.append(value);
@ -171,7 +171,7 @@ public class SettingsStore extends PlatformObject implements ISettingsStore {
return value instanceof String ? (String)value : return value instanceof String ? (String)value :
(value != null ? value.toString() : null); (value != null ? value.toString() : null);
} }
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore#getStringProperty(java.lang.String, java.lang.String) * @see org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore#getStringProperty(java.lang.String, java.lang.String)
*/ */

View file

@ -14,7 +14,7 @@ package org.eclipse.tm.internal.terminal.provisional.api.provider;
import java.io.OutputStream; import java.io.OutputStream;
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsPage; import org.eclipse.tm.internal.terminal.provisional.api.ISettingsPage;
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore; import org.eclipse.tm.internal.terminal.provisional.api.ISettings;
import org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl; import org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl;
import org.eclipse.tm.internal.terminal.provisional.api.Logger; import org.eclipse.tm.internal.terminal.provisional.api.Logger;
import org.eclipse.tm.internal.terminal.provisional.api.TerminalState; import org.eclipse.tm.internal.terminal.provisional.api.TerminalState;
@ -109,7 +109,7 @@ public abstract class TerminalConnectorImpl {
* <code>null</code> if it cannot be configured. * <code>null</code> if it cannot be configured.
* *
* The dialog should persist its settings with the * The dialog should persist its settings with the
* {@link #load(ISettingsStore)} and {@link #save(ISettingsStore)} methods. * {@link #load(ISettings)} and {@link #save(ISettings)} methods.
* *
* @return a new page that can be used in a dialog to setup this connection, * @return a new page that can be used in a dialog to setup this connection,
* or <code>null</code>. * or <code>null</code>.
@ -130,7 +130,7 @@ public abstract class TerminalConnectorImpl {
* @param store a string based data store. Short keys like "foo" can be used * @param store a string based data store. Short keys like "foo" can be used
* to store the state of the connection. * to store the state of the connection.
*/ */
public void load(ISettingsStore store) { public void load(ISettings store) {
// do nothing by default // do nothing by default
} }
@ -143,7 +143,7 @@ public abstract class TerminalConnectorImpl {
* *
* @param store the store for persisting settings. * @param store the store for persisting settings.
*/ */
public void save(ISettingsStore store) { public void save(ISettings store) {
// do nothing by default // do nothing by default
} }