mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-01 21:35:40 +02:00
Fix warnings and static method access.
Change-Id: Ic3d4eda4ca1e982984787bd638e082489ae3b63b Signed-off-by: Greg Watson <g.watson@computer.org>
This commit is contained in:
parent
ce6a031731
commit
2340a50b07
2 changed files with 18 additions and 17 deletions
|
@ -31,19 +31,21 @@ public class TerminalConsoleUtility {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Open a specific IRemoteConnection and encoding combination.
|
* Open a specific IRemoteConnection and encoding combination.
|
||||||
|
*
|
||||||
* @param connection
|
* @param connection
|
||||||
* @param encoding
|
* @param encoding
|
||||||
*/
|
*/
|
||||||
public static void openConsole(final IRemoteConnection connection, final String encoding) {
|
public static void openConsole(final IRemoteConnection connection, final String encoding) {
|
||||||
new TerminalConsoleFactory().openConsole(connection, encoding);
|
TerminalConsoleFactory.openConsole(connection, encoding);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find an existing console for the given IRemoteConnection
|
* Find an existing console for the given IRemoteConnection
|
||||||
|
*
|
||||||
* @param connection
|
* @param connection
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public static List<IConsole> findConsole(IRemoteConnection connection) {
|
public static List<IConsole> findConsole(IRemoteConnection connection) {
|
||||||
return new TerminalConsoleFactory().findConsole(connection);
|
return TerminalConsoleFactory.findConsole(connection);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,14 +48,14 @@ public class TerminalConsoleFactory implements IConsoleFactory {
|
||||||
j.schedule();
|
j.schedule();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static IStatus openConsoleImplementation( final IRemoteConnection connection,
|
private static IStatus openConsoleImplementation(final IRemoteConnection connection, final String encoding,
|
||||||
final String encoding, IProgressMonitor monitor) {
|
IProgressMonitor monitor) {
|
||||||
IRemoteCommandShellService commandShellService = connection.getService(IRemoteCommandShellService.class);
|
IRemoteCommandShellService commandShellService = connection.getService(IRemoteCommandShellService.class);
|
||||||
if (commandShellService == null) {
|
if (commandShellService == null) {
|
||||||
return Status.CANCEL_STATUS;
|
return Status.CANCEL_STATUS;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
IConsole ret = createConsole(connection, encoding, commandShellService, monitor);
|
createConsole(connection, encoding, commandShellService, monitor);
|
||||||
return Status.OK_STATUS;
|
return Status.OK_STATUS;
|
||||||
} catch (RemoteConnectionException rce) {
|
} catch (RemoteConnectionException rce) {
|
||||||
return rce.getStatus();
|
return rce.getStatus();
|
||||||
|
@ -63,9 +63,8 @@ public class TerminalConsoleFactory implements IConsoleFactory {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static IConsole createConsole( final IRemoteConnection connection,
|
private static IConsole createConsole(final IRemoteConnection connection, final String encoding,
|
||||||
final String encoding, IRemoteCommandShellService service,
|
IRemoteCommandShellService service, IProgressMonitor monitor) throws RemoteConnectionException {
|
||||||
IProgressMonitor monitor) throws RemoteConnectionException {
|
|
||||||
if (!connection.isOpen()) {
|
if (!connection.isOpen()) {
|
||||||
connection.open(monitor);
|
connection.open(monitor);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue