1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-07 17:15:25 +02:00

[cleanup] compiler warnings

This commit is contained in:
Martin Oberhuber 2007-01-30 17:59:31 +00:00
parent 931cae4e5d
commit a90292215f
3 changed files with 9 additions and 11 deletions

View file

@ -46,7 +46,7 @@ class SshConnection extends Thread {
private final SshConnector fConn; private final SshConnector fConn;
private Channel fChannel; private Channel fChannel;
protected SshConnection(SshConnector conn,ITerminalControl control) { protected SshConnection(SshConnector conn,ITerminalControl control) {
super("SshConnection-"+fgNo++); super("SshConnection-"+fgNo++); //$NON-NLS-1$
fControl = control; fControl = control;
fConn = conn; fConn = conn;
fControl.setState(TerminalState.CONNECTING); fControl.setState(TerminalState.CONNECTING);
@ -293,7 +293,7 @@ class SshConnection extends Thread {
if((n=in.read(bytes))==-1) if((n=in.read(bytes))==-1)
return; return;
// we assume we get ASCII UTF8 bytes // we assume we get ASCII UTF8 bytes
fControl.writeToTerminal(new String(bytes,0,n,"UTF8")); fControl.writeToTerminal(new String(bytes,0,n,"UTF8")); //$NON-NLS-1$
} }
} }

View file

@ -29,7 +29,7 @@ import org.eclipse.ui.IMemento;
*/ */
class SettingsStore implements ISettingsStore { class SettingsStore implements ISettingsStore {
private static final String KEYS = "_keys_"; private static final String KEYS = "_keys_"; //$NON-NLS-1$
final private Map fMap=new HashMap(); final private Map fMap=new HashMap();
public SettingsStore(IMemento memento) { public SettingsStore(IMemento memento) {
if(memento==null) if(memento==null)
@ -37,12 +37,12 @@ class SettingsStore implements ISettingsStore {
// load all keys ever used from the memento // load all keys ever used from the memento
String keys=memento.getString(KEYS); String keys=memento.getString(KEYS);
if(keys!=null) { if(keys!=null) {
String[] keyNames=keys.split(","); String[] keyNames=keys.split(","); //$NON-NLS-1$
for (int i = 0; i < keyNames.length; i++) { for (int i = 0; i < keyNames.length; i++) {
String key=keyNames[i]; String key=keyNames[i];
if(!KEYS.equals(key)) { if(!KEYS.equals(key)) {
// get the dot separated elements // get the dot separated elements
String[] path=key.split("\\."); String[] path=key.split("\\."); //$NON-NLS-1$
IMemento m=memento; IMemento m=memento;
// iterate over all but the last segment and get the children... // iterate over all but the last segment and get the children...
for(int iPath=0; m!=null && iPath+1<path.length; iPath++) { for(int iPath=0; m!=null && iPath+1<path.length; iPath++) {
@ -69,8 +69,8 @@ class SettingsStore implements ISettingsStore {
} }
public void put(String key, String value) { public void put(String key, String value) {
if(!key.matches("^[\\w.]+$")) if(!key.matches("^[\\w.]+$")) //$NON-NLS-1$
throw new IllegalArgumentException("Key '"+key+"' is not alpha numeric or '.'!"); throw new IllegalArgumentException("Key '"+key+"' is not alpha numeric or '.'!"); //$NON-NLS-1$ //$NON-NLS-2$
// null values remove the key from the map // null values remove the key from the map
if ((value == null) || (value.equals(""))) //$NON-NLS-1$ if ((value == null) || (value.equals(""))) //$NON-NLS-1$
fMap.remove(key); fMap.remove(key);
@ -87,7 +87,7 @@ class SettingsStore implements ISettingsStore {
StringBuffer buffer=new StringBuffer(); StringBuffer buffer=new StringBuffer();
for (int i = 0; i < keyNames.length; i++) { for (int i = 0; i < keyNames.length; i++) {
String key=keyNames[i]; String key=keyNames[i];
String[] path=key.split("\\."); String[] path=key.split("\\."); //$NON-NLS-1$
IMemento m=memento; IMemento m=memento;
// iterate over all but the last segment and get the children... // iterate over all but the last segment and get the children...
for(int iPath=0; iPath+1<path.length; iPath++) { for(int iPath=0; iPath+1<path.length; iPath++) {
@ -101,7 +101,7 @@ class SettingsStore implements ISettingsStore {
m.putString(path[path.length-1], (String) fMap.get(key)); m.putString(path[path.length-1], (String) fMap.get(key));
// construct the string for the keys // construct the string for the keys
if(i>0) if(i>0)
buffer.append(","); buffer.append(","); //$NON-NLS-1$
buffer.append(key); buffer.append(key);
} }
// save the keys we have used. // save the keys we have used.

View file

@ -61,8 +61,6 @@ import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.PartInitException; import org.eclipse.ui.PartInitException;
import org.eclipse.ui.actions.ActionFactory; import org.eclipse.ui.actions.ActionFactory;
import org.eclipse.ui.actions.RetargetAction; import org.eclipse.ui.actions.RetargetAction;
import org.eclipse.ui.contexts.IContextActivation;
import org.eclipse.ui.contexts.IContextService;
import org.eclipse.ui.internal.WorkbenchWindow; import org.eclipse.ui.internal.WorkbenchWindow;
import org.eclipse.ui.part.ViewPart; import org.eclipse.ui.part.ViewPart;