Added all missing @Override annotations

This commit is contained in:
Cristian Maglie 2016-09-29 20:03:48 +02:00
parent 46dfd7603c
commit ec2e9a642a
24 changed files with 65 additions and 0 deletions

View File

@ -516,6 +516,7 @@ public class Compiler implements MessageConsumer {
* out from the compiler. The errors are parsed for their contents
* and line number, which is then reported back to Editor.
*/
@Override
public void message(String s) {
int i;

View File

@ -64,6 +64,7 @@ public class MyStreamPumper implements Runnable {
* Copies data from the input stream to the output stream. Terminates as
* soon as the input stream is closed or an error occurs.
*/
@Override
public void run() {
synchronized (this) {
// Just in case this object is reused in the future

View File

@ -49,6 +49,7 @@ public class GPGDetachedSignatureVerifier extends SignatureVerifier {
this.keyId = keyId;
}
@Override
protected boolean verify(File signedFile, File signature, File publicKey) throws IOException {
FileInputStream signatureInputStream = null;
FileInputStream signedFileInputStream = null;

View File

@ -44,6 +44,7 @@ public abstract class ContributedPlatform extends DownloadableContribution {
public abstract String getArchitecture();
@Override
public abstract String getChecksum();
public abstract List<ContributedToolReference> getToolsDependencies();

View File

@ -162,6 +162,7 @@ public class CustomProxySelector {
}
Authenticator.setDefault(
new Authenticator() {
@Override
public PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(username, actualPassword.toCharArray());
}

View File

@ -152,6 +152,7 @@ public abstract class Uploader implements MessageConsumer {
return error;
}
@Override
public void message(String s) {
// selectively suppress a bunch of avrdude output for AVR109/Caterina that should already be quelled but isn't
if (!verbose && StringUtils.stringContainsOneOf(s, STRINGS_TO_SUPPRESS)) {

View File

@ -52,6 +52,7 @@ public class SerialDiscovery implements Discovery {
return getSerialBoardPorts(false);
}
@Override
public List<BoardPort> listDiscoveredBoards(boolean complete) {
return getSerialBoardPorts(complete);
}

View File

@ -39,26 +39,32 @@ public class NoInteractionUserInfo implements UserInfo {
this.password = password;
}
@Override
public String getPassword() {
return password;
}
@Override
public boolean promptYesNo(String str) {
return true;
}
@Override
public String getPassphrase() {
return password;
}
@Override
public boolean promptPassphrase(String message) {
return true;
}
@Override
public boolean promptPassword(String message) {
return true;
}
@Override
public void showMessage(String message) {
}

View File

@ -43,6 +43,7 @@ public class SSHConfigFileSetup implements SSHClientSetupChainRing {
this.nextChainRing = nextChainRing;
}
@Override
public Session setup(BoardPort port, JSch jSch) throws JSchException, IOException {
String ipAddress = port.getAddress();
String hostname = port.getBoardName().contains(".local") ? port.getBoardName() : port.getBoardName() + ".local";

View File

@ -46,6 +46,7 @@ public class GenericNetworkUploader extends Uploader {
this.port = port;
}
@Override
public boolean requiresAuthorization() {
return this.port.getPrefs().get("auth_upload").contentEquals("yes");
}
@ -55,6 +56,7 @@ public class GenericNetworkUploader extends Uploader {
return "runtime.pwd." + this.port.getAddress();
}
@Override
public boolean uploadUsingPreferences(File sourcePath, String buildPath, String className, boolean usingProgrammer, List<String> warningsAccumulator) throws Exception {
TargetPlatform targetPlatform = BaseNoGui.getTargetPlatform();
PreferencesMap prefs = PreferencesData.getMap();

View File

@ -63,6 +63,7 @@ public class SSHUploader extends Uploader {
this.port = port;
}
@Override
public boolean requiresAuthorization() {
return true;
}

View File

@ -61,6 +61,7 @@ public class SerialUploader extends Uploader {
super(noUploadPort);
}
@Override
public boolean uploadUsingPreferences(File sourcePath, String buildPath, String className, boolean usingProgrammer, List<String> warningsAccumulator) throws Exception {
// FIXME: Preferences should be reorganized
TargetPlatform targetPlatform = BaseNoGui.getTargetPlatform();
@ -347,6 +348,7 @@ public class SerialUploader extends Uploader {
}
}
@Override
public boolean burnBootloader() throws Exception {
TargetPlatform targetPlatform = BaseNoGui.getTargetPlatform();

View File

@ -148,6 +148,7 @@ public class Serial implements SerialPortEventListener {
}
}
@Override
public synchronized void serialEvent(SerialPortEvent serialEvent) {
if (serialEvent.isRXCHAR()) {
try {

View File

@ -242,6 +242,7 @@ public class SketchFile {
return false;
}
@Override
public boolean equals(Object o) {
return (o instanceof SketchFile) && file.equals(((SketchFile) o).file);
}

View File

@ -63,6 +63,7 @@ public class MessageSiphon implements Runnable {
}
@Override
public void run() {
try {
// process data until we hit EOF; this will happily block

View File

@ -75,6 +75,7 @@ public class RunnerException extends Exception {
* Override getMessage() in Throwable, so that I can set
* the message text outside the constructor.
*/
@Override
public String getMessage() {
return message;
}
@ -151,6 +152,7 @@ public class RunnerException extends Exception {
*/
@Override
public void printStackTrace() {
if (showStackTrace) {
super.printStackTrace();

View File

@ -96,6 +96,7 @@ public class Sizer implements MessageConsumer {
return new long[] { textSize, dataSize, eepromSize };
}
@Override
public void message(String s) {
if (firstLine == null)
firstLine = s;

View File

@ -9,6 +9,7 @@ public class BasicUserNotifier extends UserNotifier {
* This is an error that can't be recovered. Use showWarning()
* for errors that allow P5 to continue running.
*/
@Override
public void showError(String title, String message, Throwable e, int exit_code) {
if (title == null) title = tr("Error");
@ -18,6 +19,7 @@ public class BasicUserNotifier extends UserNotifier {
System.exit(exit_code);
}
@Override
public void showMessage(String title, String message) {
if (title == null) title = tr("Message");
@ -27,6 +29,7 @@ public class BasicUserNotifier extends UserNotifier {
/**
* Non-fatal error message with optional stack trace side dish.
*/
@Override
public void showWarning(String title, String message, Exception e) {
if (title == null) title = tr("Warning");

View File

@ -32,6 +32,7 @@ import java.io.FilenameFilter;
*/
public class OnlyDirs implements FilenameFilter {
@Override
public boolean accept(File dir, String name) {
if (name.charAt(0) == '.')
return false;

View File

@ -32,6 +32,7 @@ public class OnlyFilesWithExtension implements FilenameFilter {
this.extensions = ext;
}
@Override
public boolean accept(File dir, String name) {
for (String ext : extensions) {
if (name.endsWith(ext)) {

View File

@ -36,17 +36,20 @@ public class Platform extends processing.app.Platform {
// TODO Need to be smarter here since KDE people ain't gonna like that GTK.
// It may even throw a weird exception at 'em for their trouble.
@Override
public void setLookAndFeel() throws Exception {
GTKLookAndFeelFixer.installGtkPopupBugWorkaround();
}
@Override
public File getDefaultSketchbookFolder() throws Exception {
File home = new File(System.getProperty("user.home"));
return new File(home, "Arduino");
}
@Override
public void openURL(String url) throws Exception {
if (openFolderAvailable()) {
String launcher = PreferencesData.get("launcher");
@ -57,6 +60,7 @@ public class Platform extends processing.app.Platform {
}
@Override
public boolean openFolderAvailable() {
if (PreferencesData.get("launcher") != null) {
return true;
@ -91,6 +95,7 @@ public class Platform extends processing.app.Platform {
}
@Override
public void openFolder(File file) throws Exception {
if (openFolderAvailable()) {
String launcher = PreferencesData.get("launcher");

View File

@ -49,6 +49,7 @@ public class Platform extends processing.app.Platform {
private String osArch;
@Override
public void setLookAndFeel() throws Exception {
}
@ -58,6 +59,7 @@ public class Platform extends processing.app.Platform {
Toolkit.getDefaultToolkit();
}
@Override
public void init() throws Exception {
super.init();
@ -76,11 +78,13 @@ public class Platform extends processing.app.Platform {
}
@Override
public File getSettingsFolder() throws Exception {
return new File(getLibraryFolder(), "Arduino15");
}
@Override
public File getDefaultSketchbookFolder() throws Exception {
return new File(getDocumentsFolder(), "Arduino");
/*
@ -98,6 +102,7 @@ public class Platform extends processing.app.Platform {
}
@Override
public void openURL(String url) throws Exception {
Desktop desktop = Desktop.getDesktop();
if (url.startsWith("http") || url.startsWith("file:")) {
@ -108,11 +113,13 @@ public class Platform extends processing.app.Platform {
}
@Override
public boolean openFolderAvailable() {
return true;
}
@Override
public void openFolder(File file) throws Exception {
//openURL(file.getAbsolutePath()); // handles char replacement, etc
PApplet.open(file.getAbsolutePath());

View File

@ -41,6 +41,7 @@ public class Platform extends processing.app.Platform {
private File settingsFolder;
private File defaultSketchbookFolder;
@Override
public void init() throws Exception {
super.init();
@ -108,15 +109,18 @@ public class Platform extends processing.app.Platform {
}
}
@Override
public File getSettingsFolder() {
return settingsFolder;
}
@Override
public File getDefaultSketchbookFolder() throws Exception {
return defaultSketchbookFolder;
}
@Override
public void openURL(String url) throws Exception {
// this is not guaranteed to work, because who knows if the
// path will always be c:\progra~1 et al. also if the user has
@ -148,11 +152,13 @@ public class Platform extends processing.app.Platform {
}
@Override
public boolean openFolderAvailable() {
return true;
}
@Override
public void openFolder(File file) throws Exception {
String folder = file.getAbsolutePath();
@ -180,12 +186,14 @@ public class Platform extends processing.app.Platform {
//noop
}
@Override
public List<File> postInstallScripts(File folder) {
List<File> scripts = new LinkedList<>();
scripts.add(new File(folder, "post_install.bat"));
return scripts;
}
@Override
public List<File> preUninstallScripts(File folder) {
List<File> scripts = new LinkedList<>();
scripts.add(new File(folder, "pre_uninstall.bat"));
@ -195,9 +203,11 @@ public class Platform extends processing.app.Platform {
public void symlink(File something, File somewhere) throws IOException, InterruptedException {
}
@Override
public void link(File something, File somewhere) throws IOException, InterruptedException {
}
@Override
public void chmod(File file, int mode) throws IOException, InterruptedException {
}

View File

@ -16,40 +16,49 @@ public class ArduinoDNSTaskStarter implements DNSTaskStarter.Factory.ClassDelega
return new DNSTaskStarter() {
@Override
public void purgeTimer() {
delegate.purgeTimer();
timer.purge();
}
@Override
public void purgeStateTimer() {
delegate.purgeStateTimer();
}
@Override
public void cancelTimer() {
delegate.cancelTimer();
timer.cancel();
}
@Override
public void cancelStateTimer() {
delegate.cancelStateTimer();
}
@Override
public void startProber() {
delegate.startProber();
}
@Override
public void startAnnouncer() {
delegate.startAnnouncer();
}
@Override
public void startRenewer() {
delegate.startRenewer();
}
@Override
public void startCanceler() {
delegate.startCanceler();
}
@Override
public void startReaper() {
new RecordReaper(jmDNSImpl) {
@Override
@ -61,18 +70,22 @@ public class ArduinoDNSTaskStarter implements DNSTaskStarter.Factory.ClassDelega
}.start(timer);
}
@Override
public void startServiceInfoResolver(ServiceInfoImpl info) {
delegate.startServiceInfoResolver(info);
}
@Override
public void startTypeResolver() {
delegate.startTypeResolver();
}
@Override
public void startServiceResolver(String type) {
delegate.startServiceResolver(type);
}
@Override
public void startResponder(DNSIncoming in, int port) {
delegate.startResponder(in, port);
}