mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-31 04:45:38 +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.
|
||||
*
|
||||
* @param connection
|
||||
* @param 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
|
||||
*
|
||||
* @param connection
|
||||
* @return
|
||||
*/
|
||||
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();
|
||||
}
|
||||
|
||||
private static IStatus openConsoleImplementation( final IRemoteConnection connection,
|
||||
final String encoding, IProgressMonitor monitor) {
|
||||
private static IStatus openConsoleImplementation(final IRemoteConnection connection, final String encoding,
|
||||
IProgressMonitor monitor) {
|
||||
IRemoteCommandShellService commandShellService = connection.getService(IRemoteCommandShellService.class);
|
||||
if (commandShellService == null) {
|
||||
return Status.CANCEL_STATUS;
|
||||
}
|
||||
try {
|
||||
IConsole ret = createConsole(connection, encoding, commandShellService, monitor);
|
||||
createConsole(connection, encoding, commandShellService, monitor);
|
||||
return Status.OK_STATUS;
|
||||
} catch (RemoteConnectionException rce) {
|
||||
return rce.getStatus();
|
||||
|
@ -63,9 +63,8 @@ public class TerminalConsoleFactory implements IConsoleFactory {
|
|||
|
||||
}
|
||||
|
||||
private static IConsole createConsole( final IRemoteConnection connection,
|
||||
final String encoding, IRemoteCommandShellService service,
|
||||
IProgressMonitor monitor) throws RemoteConnectionException {
|
||||
private static IConsole createConsole(final IRemoteConnection connection, final String encoding,
|
||||
IRemoteCommandShellService service, IProgressMonitor monitor) throws RemoteConnectionException {
|
||||
if (!connection.isOpen()) {
|
||||
connection.open(monitor);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue