From ec3c6f96da300884953908257b21d2c660c340b3 Mon Sep 17 00:00:00 2001 From: David Kocher Date: Sun, 22 Dec 2024 16:48:37 +0100 Subject: [PATCH] Formatting. --- .../toolbar/BrowserToolbarValidator.java | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/osx/src/main/java/ch/cyberduck/ui/cocoa/toolbar/BrowserToolbarValidator.java b/osx/src/main/java/ch/cyberduck/ui/cocoa/toolbar/BrowserToolbarValidator.java index b3689315e89..d0dcbc18ec9 100644 --- a/osx/src/main/java/ch/cyberduck/ui/cocoa/toolbar/BrowserToolbarValidator.java +++ b/osx/src/main/java/ch/cyberduck/ui/cocoa/toolbar/BrowserToolbarValidator.java @@ -33,8 +33,8 @@ import ch.cyberduck.core.features.Delete; import ch.cyberduck.core.features.Directory; import ch.cyberduck.core.features.Move; -import ch.cyberduck.core.features.Share; import ch.cyberduck.core.features.Restore; +import ch.cyberduck.core.features.Share; import ch.cyberduck.core.features.Symlink; import ch.cyberduck.core.features.Touch; import ch.cyberduck.core.features.Versioning; @@ -100,7 +100,7 @@ public boolean validate(final NSToolbarItem item) { case encoding: { final NSPopUpButton popup = Rococoa.cast(item.view(), NSPopUpButton.class); popup.selectItemAtIndex(popup.indexOfItemWithRepresentedObject(controller.isMounted() ? - controller.getSession().getHost().getEncoding() : PreferencesFactory.get().getProperty("browser.charset.encoding"))); + controller.getSession().getHost().getEncoding() : PreferencesFactory.get().getProperty("browser.charset.encoding"))); } case cryptomator: { final Path selected = new UploadTargetFinder(controller.workdir()).find(controller.getSelectedPath()); @@ -162,21 +162,21 @@ else if(action.equals(addbookmark.action())) { else if(action.equals(Foundation.selector("deleteBookmarkButtonClicked:"))) { if(this.isBookmarks()) { return controller.getBookmarkModel().getSource().allowsDelete() - && controller.getBookmarkTable().selectedRow().intValue() != -1; + && controller.getBookmarkTable().selectedRow().intValue() != -1; } return false; } else if(action.equals(Foundation.selector("duplicateBookmarkButtonClicked:"))) { if(this.isBookmarks()) { return controller.getBookmarkModel().getSource().allowsEdit() - && controller.getBookmarkTable().numberOfSelectedRows().intValue() == 1; + && controller.getBookmarkTable().numberOfSelectedRows().intValue() == 1; } return false; } else if(action.equals(Foundation.selector("editBookmarkButtonClicked:"))) { if(this.isBookmarks()) { return controller.getBookmarkModel().getSource().allowsEdit() - && controller.getBookmarkTable().numberOfSelectedRows().intValue() == 1; + && controller.getBookmarkTable().numberOfSelectedRows().intValue() == 1; } return false; } @@ -235,9 +235,9 @@ else if(action.equals(info.action())) { } else if(action.equals(newfolder.action())) { return this.isBrowser() && controller.isMounted() && - controller.getSession().getFeature(Directory.class).isSupported( - new UploadTargetFinder(controller.workdir()).find(controller.getSelectedPath()), StringUtils.EMPTY - ); + controller.getSession().getFeature(Directory.class).isSupported( + new UploadTargetFinder(controller.workdir()).find(controller.getSelectedPath()), StringUtils.EMPTY + ); } else if(action.equals(Foundation.selector("createEncryptedVaultButtonClicked:"))) { return this.isBrowser() && controller.isMounted() && controller.getSession().getVaultRegistry() != VaultRegistry.DISABLED && @@ -248,21 +248,21 @@ else if(action.equals(Foundation.selector("createEncryptedVaultButtonClicked:")) } else if(action.equals(Foundation.selector("createFileButtonClicked:"))) { return this.isBrowser() && controller.isMounted() && controller.getSession().getFeature(Touch.class).isSupported( - new UploadTargetFinder(controller.workdir()).find(controller.getSelectedPath()), StringUtils.EMPTY + new UploadTargetFinder(controller.workdir()).find(controller.getSelectedPath()), StringUtils.EMPTY ); } else if(action.equals(upload.action())) { return this.isBrowser() && controller.isMounted() && controller.getSession().getFeature(Touch.class).isSupported( - new UploadTargetFinder(controller.workdir()).find(controller.getSelectedPath()), - StringUtils.EMPTY); + new UploadTargetFinder(controller.workdir()).find(controller.getSelectedPath()), + StringUtils.EMPTY); } else if(action.equals(Foundation.selector("createSymlinkButtonClicked:"))) { return this.isBrowser() && controller.isMounted() && controller.getSession().getFeature(Symlink.class) != null - && controller.getSelectionCount() == 1; + && controller.getSelectionCount() == 1; } else if(action.equals(Foundation.selector("duplicateFileButtonClicked:"))) { return this.isBrowser() && controller.isMounted() && controller.getSession().getFeature(Copy.class) != null - && controller.getSelectionCount() == 1; + && controller.getSelectionCount() == 1; } else if(action.equals(Foundation.selector("renameFileButtonClicked:"))) { if(this.isBrowser() && controller.isMounted() && controller.getSelectionCount() == 1) { @@ -289,7 +289,7 @@ else if(action.equals(share.action())) { if(this.isBrowser() && controller.isMounted()) { final Path selected = null != controller.getSelectedPath() ? controller.getSelectedPath() : controller.workdir(); return controller.getSession().getFeature(Share.class) != null && - controller.getSession().getFeature(Share.class).isSupported(selected, Share.Type.download); + controller.getSession().getFeature(Share.class).isSupported(selected, Share.Type.download); } return false; } @@ -368,8 +368,8 @@ else if(action.equals(Foundation.selector("gotofolderButtonClicked:"))) { } else if(action.equals(terminal.action())) { return this.isBrowser() && controller.isMounted() - && controller.getSession().getHost().getProtocol().getType() == Protocol.Type.sftp - && TerminalServiceFactory.get() != null; + && controller.getSession().getHost().getProtocol().getType() == Protocol.Type.sftp + && TerminalServiceFactory.get() != null; } else if(action.equals(archive.action()) || action.equals(Foundation.selector("archiveMenuClicked:"))) { if(this.isBrowser() && controller.isMounted()) { @@ -417,8 +417,8 @@ else if(action.equals(cryptomator.action())) { } final AttributedList cache = controller.getCache().get(controller.workdir()); return null != cache.find(new SimplePathPredicate(Path.Type.file, - String.format("%s%s%s", controller.workdir().getAbsolute(), Path.DELIMITER, - new HostPreferences(controller.getSession().getHost()).getProperty("cryptomator.vault.masterkey.filename")))); + String.format("%s%s%s", controller.workdir().getAbsolute(), Path.DELIMITER, + new HostPreferences(controller.getSession().getHost()).getProperty("cryptomator.vault.masterkey.filename")))); } return false; }