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:
parent
9c55da9030
commit
d8ef37a2ce
35 changed files with 152 additions and 159 deletions
|
@ -11,7 +11,7 @@
|
|||
|
||||
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
|
||||
|
@ -40,24 +40,24 @@ public interface ILocalTerminalSettings {
|
|||
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
|
||||
*
|
||||
* @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
|
||||
*
|
||||
* @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.
|
||||
|
|
|
@ -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.LocalTerminalProcessRegistry;
|
||||
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.Logger;
|
||||
import org.eclipse.tm.internal.terminal.provisional.api.TerminalState;
|
||||
|
@ -105,9 +105,9 @@ implements IDebugEventSetListener {
|
|||
/**
|
||||
* 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
|
||||
* 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
|
||||
* (like, for example, ILaunchConfiguration) might be beneficial here.
|
||||
*/
|
||||
public void load(ISettingsStore store) {
|
||||
public void load(ISettings store) {
|
||||
|
||||
settings.load(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);
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
package org.eclipse.tm.internal.terminal.local;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
|
@ -27,7 +27,7 @@ public class LocalTerminalSettings implements ILocalTerminalSettings {
|
|||
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
|
||||
* 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
|
||||
|
@ -35,10 +35,10 @@ public class LocalTerminalSettings implements ILocalTerminalSettings {
|
|||
*
|
||||
* TODO: check for possibilities to reuse this code!
|
||||
*
|
||||
* @param store the {@link ISettingsStore}
|
||||
* @see ILocalTerminalSettings#load(ISettingsStore)
|
||||
* @param store the {@link ISettings}
|
||||
* @see ILocalTerminalSettings#load(ISettings)
|
||||
*/
|
||||
public void load(ISettingsStore store) {
|
||||
public void load(ISettings store) {
|
||||
|
||||
Field[] declaredField = getClass().getDeclaredFields();
|
||||
int numberOfFields = declaredField.length;
|
||||
|
@ -64,14 +64,14 @@ public class LocalTerminalSettings implements ILocalTerminalSettings {
|
|||
}
|
||||
|
||||
/**
|
||||
* Saves the settings to the specified {@link ISettingsStore}.
|
||||
* See {@link #load(ISettingsStore)} for further implementation notes.
|
||||
* Saves the settings to the specified {@link ISettings}.
|
||||
* 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();
|
||||
int numberOfFields = declaredField.length;
|
||||
|
|
|
@ -13,7 +13,7 @@ package org.eclipse.tm.internal.terminal.view;
|
|||
|
||||
import org.eclipse.jface.resource.ImageDescriptor;
|
||||
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;
|
||||
|
||||
/**
|
||||
|
@ -47,9 +47,9 @@ public interface ITerminalViewConnection {
|
|||
*/
|
||||
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
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
*******************************************************************************/
|
||||
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
|
||||
* when the state is read from the {@link ISettingsStore}
|
||||
* when the state is read from the {@link ISettings}
|
||||
*
|
||||
*/
|
||||
interface ITerminalViewConnectionFactory {
|
||||
|
@ -73,11 +73,11 @@ public interface ITerminalViewConnectionManager {
|
|||
void addListener(ITerminalViewConnectionListener listener);
|
||||
void removeListener(ITerminalViewConnectionListener listener);
|
||||
|
||||
void saveState(ISettingsStore store);
|
||||
void saveState(ISettings store);
|
||||
/**
|
||||
* @param store
|
||||
* @param factory used to create new {@link ITerminalViewConnection}
|
||||
*/
|
||||
void loadState(ISettingsStore store,ITerminalViewConnectionFactory factory);
|
||||
void loadState(ISettings store,ITerminalViewConnectionFactory factory);
|
||||
|
||||
}
|
|
@ -10,11 +10,11 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.tm.internal.terminal.view;
|
||||
|
||||
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore;
|
||||
import org.eclipse.tm.internal.terminal.provisional.api.SettingsStore;
|
||||
import org.eclipse.tm.internal.terminal.provisional.api.ISettings;
|
||||
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>
|
||||
* <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
|
||||
|
@ -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.
|
||||
* </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.
|
||||
* {@link #setProperty(String, Object)} will put the value in the
|
||||
* first store in the list.
|
||||
*/
|
||||
public LayeredSettingsStore(ISettingsStore[] stores) {
|
||||
public LayeredSettingsStore(ISettings[] stores) {
|
||||
fStores=stores;
|
||||
}
|
||||
/**
|
||||
|
@ -39,8 +39,8 @@ public class LayeredSettingsStore extends SettingsStore {
|
|||
* @param s1 first store
|
||||
* @param s2 second store
|
||||
*/
|
||||
public LayeredSettingsStore(ISettingsStore s1, ISettingsStore s2) {
|
||||
this(new ISettingsStore[]{s1,s2});
|
||||
public LayeredSettingsStore(ISettings s1, ISettings s2) {
|
||||
this(new ISettings[]{s1,s2});
|
||||
}
|
||||
|
||||
public Object getProperty(String key) {
|
||||
|
|
|
@ -21,7 +21,7 @@ import org.eclipse.core.runtime.Preferences;
|
|||
* the <a href="http://www.eclipse.org/tm/">Target Management</a> team.
|
||||
* </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 Preferences fPreferences;
|
||||
|
||||
|
|
|
@ -10,12 +10,12 @@
|
|||
*******************************************************************************/
|
||||
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 ISettingsStore fStore;
|
||||
SettingStorePrefixDecorator(ISettingsStore store,String prefix) {
|
||||
private final ISettings fStore;
|
||||
SettingStorePrefixDecorator(ISettings store,String prefix) {
|
||||
fPrefix=prefix;
|
||||
fStore=store;
|
||||
}
|
||||
|
|
|
@ -14,11 +14,11 @@ import java.util.Arrays;
|
|||
import java.util.Map;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
* A {@link IDialogSettings} based {@link ISettingsStore}.
|
||||
* A {@link IDialogSettings} based {@link ISettings}.
|
||||
*
|
||||
* Setting Store based on IMemento. IMemento documentations says only alpha numeric
|
||||
* values may be used as keys. Therefore the implementation converts dots (.) into
|
||||
|
@ -26,7 +26,7 @@ import org.eclipse.ui.IMemento;
|
|||
*
|
||||
* @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$
|
||||
|
||||
|
|
|
@ -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.TerminalActionSelectAll;
|
||||
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.Logger;
|
||||
import org.eclipse.tm.internal.terminal.provisional.api.TerminalConnectorExtension;
|
||||
|
@ -400,7 +400,7 @@ public class TerminalView extends ViewPart implements ITerminalView, ITerminalVi
|
|||
// sequence.
|
||||
|
||||
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() {
|
||||
public ITerminalViewConnection create() {
|
||||
return makeViewConnection();
|
||||
|
@ -485,7 +485,7 @@ public class TerminalView extends ViewPart implements ITerminalView, ITerminalVi
|
|||
* @param connectors loads the data from store
|
||||
* @return null or the currently selected connector
|
||||
*/
|
||||
private ITerminalConnector loadSettings(ISettingsStore store, ITerminalConnector[] connectors) {
|
||||
private ITerminalConnector loadSettings(ISettings store, ITerminalConnector[] connectors) {
|
||||
ITerminalConnector connector=null;
|
||||
String connectionType=store.getStringProperty(STORE_CONNECTION_TYPE);
|
||||
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 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) {
|
||||
connector.save(getStore(store, connector));
|
||||
// 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$
|
||||
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$
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ import org.eclipse.swt.events.MouseAdapter;
|
|||
import org.eclipse.swt.events.MouseEvent;
|
||||
import org.eclipse.tm.internal.terminal.control.CommandInputFieldWithHistory;
|
||||
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.Logger;
|
||||
import org.eclipse.tm.internal.terminal.provisional.api.TerminalState;
|
||||
|
@ -89,10 +89,10 @@ class TerminalViewConnection implements ITerminalViewConnection {
|
|||
public ITerminalViewControl getCtlTerminal() {
|
||||
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$
|
||||
}
|
||||
public void loadState(ISettingsStore store) {
|
||||
public void loadState(ISettings store) {
|
||||
fPartName=store.getStringProperty(STORE_PART_NAME);
|
||||
fSummary=store.getStringProperty(STORE_SUMMARY);
|
||||
fHistory=store.getStringProperty(STORE_COMMAND_INPUT_FIELD_HISTORY);
|
||||
|
@ -111,7 +111,7 @@ class TerminalViewConnection implements ITerminalViewConnection {
|
|||
setCommandInputField(true);
|
||||
}
|
||||
|
||||
public void saveState(ISettingsStore store) {
|
||||
public void saveState(ISettings store) {
|
||||
store.setProperty(STORE_PART_NAME, fPartName);
|
||||
store.setProperty(STORE_SUMMARY,fSummary);
|
||||
store.setProperty(STORE_COMMAND_INPUT_FIELD_HISTORY, fHistory);
|
||||
|
|
|
@ -16,7 +16,7 @@ import java.util.List;
|
|||
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
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 {
|
||||
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$
|
||||
// save all connections
|
||||
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;
|
||||
try {
|
||||
size=Integer.parseInt(store.getStringProperty(STORE_SIZE));
|
||||
|
|
|
@ -11,7 +11,7 @@ import java.io.InputStream;
|
|||
import java.io.OutputStream;
|
||||
|
||||
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.TerminalState;
|
||||
import org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl;
|
||||
|
@ -126,7 +126,7 @@ public class RemoteConnector extends TerminalConnectorImpl {
|
|||
* .api.ISettingsStore)
|
||||
*/
|
||||
@Override
|
||||
public void load(ISettingsStore store) {
|
||||
public void load(ISettings store) {
|
||||
fSettings.load(store);
|
||||
}
|
||||
|
||||
|
@ -148,7 +148,7 @@ public class RemoteConnector extends TerminalConnectorImpl {
|
|||
* .api.ISettingsStore)
|
||||
*/
|
||||
@Override
|
||||
public void save(ISettingsStore store) {
|
||||
public void save(ISettings store) {
|
||||
fSettings.save(store);
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*******************************************************************************/
|
||||
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;
|
||||
|
||||
@SuppressWarnings("restriction")
|
||||
|
@ -38,7 +38,7 @@ public class RemoteSettings implements IRemoteSettings {
|
|||
/**
|
||||
* Load information into the RemoteSettings object.
|
||||
*/
|
||||
public void load(ISettingsStore store) {
|
||||
public void load(ISettings store) {
|
||||
fRemoteServices = store.getStringProperty(REMOTE_SERVICES);
|
||||
fConnectionName = store.getStringProperty(CONNECTION_NAME);
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ public class RemoteSettings implements IRemoteSettings {
|
|||
/**
|
||||
* Extract information from the RemoteSettings object.
|
||||
*/
|
||||
public void save(ISettingsStore store) {
|
||||
public void save(ISettings store) {
|
||||
store.getStringProperty(REMOTE_SERVICES, fRemoteServices);
|
||||
store.getStringProperty(CONNECTION_NAME, fConnectionName);
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
*******************************************************************************/
|
||||
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 {
|
||||
|
||||
|
@ -23,6 +23,6 @@ public interface ISerialSettings {
|
|||
int getFlowControl();
|
||||
int getTimeout();
|
||||
String getSummary();
|
||||
void load(ISettingsStore store);
|
||||
void save(ISettingsStore store);
|
||||
void load(ISettings store);
|
||||
void save(ISettings store);
|
||||
}
|
|
@ -30,7 +30,7 @@ import org.eclipse.core.runtime.CoreException;
|
|||
import org.eclipse.core.runtime.IStatus;
|
||||
import org.eclipse.core.runtime.Status;
|
||||
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.Logger;
|
||||
import org.eclipse.tm.internal.terminal.provisional.api.TerminalState;
|
||||
|
@ -221,10 +221,10 @@ public class SerialConnector extends TerminalConnectorImpl {
|
|||
public String getSettingsSummary() {
|
||||
return fSettings.getSummary();
|
||||
}
|
||||
public void load(ISettingsStore store) {
|
||||
public void load(ISettings store) {
|
||||
fSettings.load(store);
|
||||
}
|
||||
public void save(ISettingsStore store) {
|
||||
public void save(ISettings store) {
|
||||
fSettings.save(store);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ package org.eclipse.tm.internal.terminal.serial;
|
|||
|
||||
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 {
|
||||
protected String fSerialPort;
|
||||
|
@ -153,7 +153,7 @@ public class SerialSettings implements ISerialSettings {
|
|||
getFlowControlString();
|
||||
}
|
||||
|
||||
public void load(ISettingsStore store) {
|
||||
public void load(ISettings store) {
|
||||
fSerialPort = store.getStringProperty("SerialPort", fProperties.getDefaultSerialPort());//$NON-NLS-1$
|
||||
fBaudRate = store.getStringProperty("BaudRate", fProperties.getDefaultBaudRate());//$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$
|
||||
}
|
||||
|
||||
public void save(ISettingsStore store) {
|
||||
public void save(ISettings store) {
|
||||
store.setProperty("SerialPort", fSerialPort); //$NON-NLS-1$
|
||||
store.setProperty("BaudRate", fBaudRate); //$NON-NLS-1$
|
||||
store.setProperty("DataBits", fDataBits); //$NON-NLS-1$
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
*******************************************************************************/
|
||||
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 {
|
||||
/**
|
||||
|
@ -68,11 +68,11 @@ public interface ISshSettings {
|
|||
* Load connection data from a settings store.
|
||||
* @param store the settings store to access.
|
||||
*/
|
||||
void load(ISettingsStore store);
|
||||
void load(ISettings store);
|
||||
|
||||
/**
|
||||
* Store connection data into a settings store.
|
||||
* @param store the settings store to access.
|
||||
*/
|
||||
void save(ISettingsStore store);
|
||||
void save(ISettings store);
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ import java.io.InputStream;
|
|||
import java.io.OutputStream;
|
||||
|
||||
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.Logger;
|
||||
import org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl;
|
||||
|
@ -101,10 +101,10 @@ public class SshConnector extends TerminalConnectorImpl {
|
|||
public String getSettingsSummary() {
|
||||
return fSettings.getSummary();
|
||||
}
|
||||
public void load(ISettingsStore store) {
|
||||
public void load(ISettings store) {
|
||||
fSettings.load(store);
|
||||
}
|
||||
public void save(ISettingsStore store) {
|
||||
public void save(ISettings store) {
|
||||
fSettings.save(store);
|
||||
}
|
||||
protected JSch getJsch() {
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
*******************************************************************************/
|
||||
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 {
|
||||
protected String fHost;
|
||||
|
@ -39,7 +39,7 @@ public class SshSettings implements ISshSettings {
|
|||
return settings;
|
||||
}
|
||||
|
||||
public void load(ISettingsStore store) {
|
||||
public void load(ISettings store) {
|
||||
fHost = store.getStringProperty("Host");//$NON-NLS-1$
|
||||
fUser = store.getStringProperty("User");//$NON-NLS-1$
|
||||
// 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("User", fUser);//$NON-NLS-1$
|
||||
store.setProperty("Port", fPort);//$NON-NLS-1$
|
||||
|
|
|
@ -24,7 +24,4 @@ bin.includes = .,\
|
|||
source.. = src/
|
||||
output.. = bin/
|
||||
src.includes = about.html
|
||||
javacTarget = 1.4
|
||||
javacSource = 1.4
|
||||
javacErrors.. = -assertIdentifier
|
||||
|
||||
|
|
|
@ -11,13 +11,13 @@
|
|||
*******************************************************************************/
|
||||
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 {
|
||||
String getHost();
|
||||
int getNetworkPort();
|
||||
int getTimeout();
|
||||
String getSummary();
|
||||
void load(ISettingsStore store);
|
||||
void save(ISettingsStore store);
|
||||
void load(ISettings store);
|
||||
void save(ISettings store);
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ import java.io.OutputStream;
|
|||
import java.net.Socket;
|
||||
|
||||
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.Logger;
|
||||
import org.eclipse.tm.internal.terminal.provisional.api.TerminalState;
|
||||
|
@ -151,10 +151,10 @@ public class TelnetConnector extends TerminalConnectorImpl {
|
|||
public String getSettingsSummary() {
|
||||
return fSettings.getSummary();
|
||||
}
|
||||
public void load(ISettingsStore store) {
|
||||
public void load(ISettings store) {
|
||||
fSettings.load(store);
|
||||
}
|
||||
public void save(ISettingsStore store) {
|
||||
public void save(ISettings store) {
|
||||
fSettings.save(store);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*******************************************************************************/
|
||||
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 {
|
||||
protected String fHost;
|
||||
|
@ -51,13 +51,13 @@ public class TelnetSettings implements ITelnetSettings {
|
|||
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$
|
||||
fNetworkPort = store.getStringProperty("NetworkPort", fProperties.getDefaultNetworkPort());//$NON-NLS-1$
|
||||
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("NetworkPort", fNetworkPort);//$NON-NLS-1$
|
||||
store.setProperty("Timeout", fTimeout);//$NON-NLS-1$
|
||||
|
|
|
@ -20,8 +20,6 @@ bin.includes = META-INF/,\
|
|||
tm32.png,\
|
||||
test.xml,\
|
||||
about.html
|
||||
javacSource=1.4
|
||||
javacTarget=1.4
|
||||
src.includes = .settings/,\
|
||||
build.properties,\
|
||||
teamConfig/,\
|
||||
|
|
|
@ -22,9 +22,9 @@ import org.eclipse.core.runtime.Platform;
|
|||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
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.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.provider.TerminalConnectorImpl;
|
||||
|
||||
|
@ -85,8 +85,8 @@ public class TerminalConnectorFactoryTest extends TestCase {
|
|||
public int fWidth;
|
||||
public int fHeight;
|
||||
public ITerminalControl fControl;
|
||||
public ISettingsStore fSaveStore;
|
||||
public ISettingsStore fLoadStore;
|
||||
public ISettings fSaveStore;
|
||||
public ISettings fLoadStore;
|
||||
public boolean fDisconnect;
|
||||
|
||||
public boolean isLocalEcho() {
|
||||
|
@ -112,7 +112,7 @@ public class TerminalConnectorFactoryTest extends TestCase {
|
|||
return "Summary";
|
||||
}
|
||||
|
||||
public void load(ISettingsStore store) {
|
||||
public void load(ISettings store) {
|
||||
fLoadStore=store;
|
||||
}
|
||||
|
||||
|
@ -133,7 +133,7 @@ public class TerminalConnectorFactoryTest extends TestCase {
|
|||
}};
|
||||
}
|
||||
|
||||
public void save(ISettingsStore store) {
|
||||
public void save(ISettings store) {
|
||||
fSaveStore=store;
|
||||
}
|
||||
}
|
||||
|
@ -232,7 +232,7 @@ public class TerminalConnectorFactoryTest extends TestCase {
|
|||
public void testLoad() {
|
||||
ConnectorMock mock=new ConnectorMock();
|
||||
TerminalConnector c = makeTerminalConnector(mock);
|
||||
ISettingsStore s=new SettingsStore();
|
||||
ISettings s=new Settings();
|
||||
c.load(s);
|
||||
// the load is called after the connect...
|
||||
assertNull(mock.fLoadStore);
|
||||
|
@ -243,7 +243,7 @@ public class TerminalConnectorFactoryTest extends TestCase {
|
|||
public void testSave() {
|
||||
ConnectorMock mock=new ConnectorMock();
|
||||
TerminalConnector c = makeTerminalConnector(mock);
|
||||
ISettingsStore s=new SettingsStore();
|
||||
ISettings s=new Settings();
|
||||
c.save(s);
|
||||
assertNull(mock.fSaveStore);
|
||||
c.connect(new TerminalControlMock());
|
||||
|
|
|
@ -23,9 +23,9 @@ import org.eclipse.swt.widgets.Composite;
|
|||
import org.eclipse.swt.widgets.Shell;
|
||||
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.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.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.provider.TerminalConnectorImpl;
|
||||
|
||||
|
@ -86,8 +86,8 @@ public class TerminalConnectorTest extends TestCase {
|
|||
public int fWidth;
|
||||
public int fHeight;
|
||||
public ITerminalControl fControl;
|
||||
public ISettingsStore fSaveStore;
|
||||
public ISettingsStore fLoadStore;
|
||||
public ISettings fSaveStore;
|
||||
public ISettings fLoadStore;
|
||||
public boolean fDisconnect;
|
||||
|
||||
public boolean isLocalEcho() {
|
||||
|
@ -113,7 +113,7 @@ public class TerminalConnectorTest extends TestCase {
|
|||
return "Summary";
|
||||
}
|
||||
|
||||
public void load(ISettingsStore store) {
|
||||
public void load(ISettings store) {
|
||||
fLoadStore=store;
|
||||
}
|
||||
|
||||
|
@ -135,7 +135,7 @@ public class TerminalConnectorTest extends TestCase {
|
|||
|
||||
}
|
||||
|
||||
public void save(ISettingsStore store) {
|
||||
public void save(ISettings store) {
|
||||
fSaveStore=store;
|
||||
}
|
||||
}
|
||||
|
@ -212,7 +212,7 @@ public class TerminalConnectorTest extends TestCase {
|
|||
public void testLoad() {
|
||||
ConnectorMock mock=new ConnectorMock();
|
||||
TerminalConnector c=new TerminalConnector(new SimpleFactory(mock),"xID","xName", false);
|
||||
ISettingsStore s=new SettingsStore();
|
||||
ISettings s=new Settings();
|
||||
c.load(s);
|
||||
// the load is called after the connect...
|
||||
assertNull(mock.fLoadStore);
|
||||
|
@ -223,7 +223,7 @@ public class TerminalConnectorTest extends TestCase {
|
|||
public void testSave() {
|
||||
ConnectorMock mock=new ConnectorMock();
|
||||
TerminalConnector c=new TerminalConnector(new SimpleFactory(mock),"xID","xName", false);
|
||||
ISettingsStore s=new SettingsStore();
|
||||
ISettings s=new Settings();
|
||||
c.save(s);
|
||||
assertNull(mock.fSaveStore);
|
||||
c.connect(new TerminalControlMock());
|
||||
|
|
|
@ -18,7 +18,7 @@ import java.io.InputStream;
|
|||
import java.io.OutputStream;
|
||||
|
||||
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.Logger;
|
||||
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!");
|
||||
}
|
||||
|
||||
public void load(ISettingsStore store) {
|
||||
public void load(ISettings store) {
|
||||
fSettings.load(store);
|
||||
}
|
||||
|
||||
|
@ -94,7 +94,7 @@ public class SpeedTestConnector extends TerminalConnectorImpl {
|
|||
return new SpeedTestSettingsPage(fSettings);
|
||||
}
|
||||
|
||||
public void save(ISettingsStore store) {
|
||||
public void save(ISettings store) {
|
||||
fSettings.save(store);
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
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 {
|
||||
String fInputFile="";
|
||||
|
@ -36,12 +36,12 @@ public class SpeedTestSettings {
|
|||
void setInputFile(String testFile) {
|
||||
fInputFile = testFile;
|
||||
}
|
||||
public void load(ISettingsStore store) {
|
||||
public void load(ISettings store) {
|
||||
fInputFile=store.getStringProperty("inputFile");
|
||||
fBufferSize=store.getStringProperty("bufferSize");
|
||||
fThrottle=store.getStringProperty("throttle");
|
||||
}
|
||||
public void save(ISettingsStore store) {
|
||||
public void save(ISettings store) {
|
||||
store.setProperty("inputFile", fInputFile);
|
||||
store.setProperty("bufferSize", fBufferSize);
|
||||
store.setProperty("throttle", fThrottle);
|
||||
|
|
|
@ -34,6 +34,4 @@ source.. = src/
|
|||
output.. = bin/
|
||||
src.includes = schema/,\
|
||||
about.html
|
||||
javacSource=1.4
|
||||
javacTarget=1.4
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ import org.eclipse.core.runtime.IAdaptable;
|
|||
import org.eclipse.core.runtime.Platform;
|
||||
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.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.ITerminalControl;
|
||||
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
|
||||
* delegates to the actual implementation when needed. The following methods can
|
||||
* be called without initializing the contributed implementation class:
|
||||
* {@link #getId()}, {@link #getName()}, {@link #getSettingsSummary()},{@link #load(ISettingsStore)},
|
||||
* {@link #setTerminalSize(int, int)}, {@link #save(ISettingsStore)},
|
||||
* {@link #getId()}, {@link #getName()}, {@link #getSettingsSummary()},{@link #load(ISettings)},
|
||||
* {@link #setTerminalSize(int, int)}, {@link #save(ISettings)},
|
||||
* {@link #getAdapter(Class)}
|
||||
*
|
||||
* @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.
|
||||
* This keeps the value until the connector is created.
|
||||
*/
|
||||
private ISettingsStore fStore;
|
||||
private ISettings fStore;
|
||||
/**
|
||||
* Constructor for the terminal connector.
|
||||
*
|
||||
|
@ -173,7 +173,7 @@ public class TerminalConnector implements ITerminalConnector {
|
|||
public boolean isLocalEcho() {
|
||||
return getConnectorImpl().isLocalEcho();
|
||||
}
|
||||
public void load(ISettingsStore store) {
|
||||
public void load(ISettings store) {
|
||||
if(fConnector==null) {
|
||||
fStore=store;
|
||||
} else {
|
||||
|
@ -183,7 +183,7 @@ public class TerminalConnector implements ITerminalConnector {
|
|||
public ISettingsPage makeSettingsPage() {
|
||||
return getConnectorImpl().makeSettingsPage();
|
||||
}
|
||||
public void save(ISettingsStore store) {
|
||||
public void save(ISettings store) {
|
||||
// no need to save the settings: it cannot have changed
|
||||
// because we are not initialized....
|
||||
if(fConnector!=null)
|
||||
|
|
|
@ -17,11 +17,11 @@ import java.util.Map;
|
|||
import org.eclipse.core.runtime.IAdaptable;
|
||||
|
||||
/**
|
||||
* The settings store contains the state of a connection. The content of the
|
||||
* settings store is not the persisted state of the connection. Storing data
|
||||
* in the settings store does not make any assumption about possibly persisting
|
||||
* the connection state. Connection persistence has to be implemented by the UI
|
||||
* container embedding the Terminal control.
|
||||
* The settings contains the state of a connection. The content of the settings
|
||||
* is not the persisted state of the connection. Storing data in the settings
|
||||
* does not make any assumption about possibly persisting the connection state.
|
||||
* Connection persistence has to be implemented by the UI container embedding
|
||||
* the Terminal control.
|
||||
* <p>
|
||||
* <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
|
||||
|
@ -29,7 +29,7 @@ import org.eclipse.core.runtime.IAdaptable;
|
|||
* consulting with the <a href="http://www.eclipse.org/tm/">Target Management</a> team.
|
||||
* </p>
|
||||
*/
|
||||
public interface ISettingsStore extends IAdaptable {
|
||||
public interface ISettings extends IAdaptable {
|
||||
|
||||
/**
|
||||
* Set the properties from the given map. Calling this method
|
|
@ -124,14 +124,14 @@ public interface ITerminalConnector extends IAdaptable {
|
|||
* @param store a string based data store. Short keys like "foo" can be used to
|
||||
* store the state of the connection.
|
||||
*/
|
||||
void load(ISettingsStore store);
|
||||
void load(ISettings store);
|
||||
|
||||
/**
|
||||
* When the view or dialog containing the terminal is closed,
|
||||
* the state of the connection is saved into the settings store <code>store</code>
|
||||
* @param store
|
||||
*/
|
||||
void save(ISettingsStore store);
|
||||
void save(ISettings store);
|
||||
|
||||
/**
|
||||
* 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.
|
||||
* The dialog should persist its settings with the
|
||||
* {@link #load(ISettingsStore)} and {@link #save(ISettingsStore)}
|
||||
* {@link #load(ISettings)} and {@link #save(ISettings)}
|
||||
* methods.
|
||||
*/
|
||||
ISettingsPage makeSettingsPage();
|
||||
|
|
|
@ -17,9 +17,9 @@ import org.eclipse.core.runtime.Assert;
|
|||
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.
|
||||
*/
|
||||
|
@ -28,7 +28,7 @@ public class SettingsStore extends PlatformObject implements ISettingsStore {
|
|||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
public SettingsStore() {
|
||||
public Settings() {
|
||||
super();
|
||||
}
|
||||
|
||||
|
@ -38,8 +38,8 @@ public class SettingsStore extends PlatformObject implements ISettingsStore {
|
|||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
boolean equals = super.equals(obj);
|
||||
if (!equals && obj instanceof SettingsStore) {
|
||||
return settings.equals(((SettingsStore)obj).settings);
|
||||
if (!equals && obj instanceof Settings) {
|
||||
return settings.equals(((Settings)obj).settings);
|
||||
}
|
||||
return equals;
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ public class SettingsStore extends PlatformObject implements ISettingsStore {
|
|||
buffer.append("="); //$NON-NLS-1$
|
||||
|
||||
Object value = settings.get(key);
|
||||
if (value instanceof Map || value instanceof ISettingsStore) {
|
||||
if (value instanceof Map || value instanceof ISettings) {
|
||||
buffer.append("{...}"); //$NON-NLS-1$
|
||||
} else {
|
||||
buffer.append(value);
|
|
@ -14,7 +14,7 @@ package org.eclipse.tm.internal.terminal.provisional.api.provider;
|
|||
import java.io.OutputStream;
|
||||
|
||||
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.Logger;
|
||||
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.
|
||||
*
|
||||
* 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,
|
||||
* 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
|
||||
* to store the state of the connection.
|
||||
*/
|
||||
public void load(ISettingsStore store) {
|
||||
public void load(ISettings store) {
|
||||
// do nothing by default
|
||||
}
|
||||
|
||||
|
@ -143,7 +143,7 @@ public abstract class TerminalConnectorImpl {
|
|||
*
|
||||
* @param store the store for persisting settings.
|
||||
*/
|
||||
public void save(ISettingsStore store) {
|
||||
public void save(ISettings store) {
|
||||
// do nothing by default
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue