1 11 package org.eclipse.help.internal.browser.macosx; 12 13 import java.io.*; 14 15 import org.eclipse.help.browser.*; 16 import org.eclipse.help.internal.base.*; 17 18 public class DefaultBrowserAdapter implements IBrowser { 19 20 private static DefaultBrowserAdapter fgInstance; 21 22 static DefaultBrowserAdapter getInstance() { 23 if (fgInstance == null) 24 fgInstance = new DefaultBrowserAdapter(); 25 return fgInstance; 26 } 27 28 31 public void close() { 32 } 33 34 37 public void displayURL(String url) { 38 41 try { 42 Runtime.getRuntime().exec(new String [] { "/usr/bin/osascript", "-e", "open location \"" + url + "\"" }); } catch (IOException ioe) { 46 HelpBasePlugin.logError("Launching \"osascript\" has failed.", ioe); } 48 } 49 50 53 public boolean isCloseSupported() { 54 return false; 55 } 56 57 60 public boolean isSetLocationSupported() { 61 return false; 62 } 63 64 67 public boolean isSetSizeSupported() { 68 return false; 69 } 70 71 74 public void setLocation(int x, int y) { 75 } 76 77 80 public void setSize(int width, int height) { 81 } 82 } 83 | Popular Tags |