OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2014, the Dart project authors. | 2 * Copyright (c) 2014, the Dart project authors. |
3 * | 3 * |
4 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not u
se this file except | 4 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not u
se this file except |
5 * in compliance with the License. You may obtain a copy of the License at | 5 * in compliance with the License. You may obtain a copy of the License at |
6 * | 6 * |
7 * http://www.eclipse.org/legal/epl-v10.html | 7 * http://www.eclipse.org/legal/epl-v10.html |
8 * | 8 * |
9 * Unless required by applicable law or agreed to in writing, software distribut
ed under the License | 9 * Unless required by applicable law or agreed to in writing, software distribut
ed under the License |
10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY K
IND, either express | 10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY K
IND, either express |
(...skipping 18 matching lines...) Expand all Loading... |
29 if (pageUrl == null) { | 29 if (pageUrl == null) { |
30 msg.append("Unable to get local IP address"); | 30 msg.append("Unable to get local IP address"); |
31 } else { | 31 } else { |
32 msg.append(pageUrl); | 32 msg.append(pageUrl); |
33 } | 33 } |
34 msg.append(".\n\n"); | 34 msg.append(".\n\n"); |
35 if (localhostOverUsb) { | 35 if (localhostOverUsb) { |
36 msg.append("Check port forwarding in Chrome and try again."); | 36 msg.append("Check port forwarding in Chrome and try again."); |
37 } else { | 37 } else { |
38 msg.append("Check wifi access permissions and try again.\n\n"); | 38 msg.append("Check wifi access permissions and try again.\n\n"); |
39 msg.append("Alternately, open the \"Manage Launches\" dialog,"); | 39 msg.append("Alternately, open the Launch dialog,"); |
40 msg.append(" select the mobile launch configuration,"); | 40 msg.append(" select the mobile launch configuration,"); |
41 msg.append(" and in the \"Servers\" group select \"Pub serve\".\n"); | 41 msg.append(" and in the \"Servers\" group select \"Pub serve\".\n"); |
42 } | 42 } |
43 return new Status(IStatus.ERROR, DartCore.PLUGIN_ID, 0, msg.toString(), null
); | 43 return new Status(IStatus.ERROR, DartCore.PLUGIN_ID, 0, msg.toString(), null
); |
44 } | 44 } |
45 | 45 |
46 private final String pageUrl; | 46 private final String pageUrl; |
47 | 47 |
48 private final boolean localhostOverUsb; | 48 private final boolean localhostOverUsb; |
49 | 49 |
50 public MobileUrlConnectionException(String pageUrl, boolean localhostOverUsb)
{ | 50 public MobileUrlConnectionException(String pageUrl, boolean localhostOverUsb)
{ |
51 super(newStatus(pageUrl, localhostOverUsb)); | 51 super(newStatus(pageUrl, localhostOverUsb)); |
52 this.pageUrl = pageUrl; | 52 this.pageUrl = pageUrl; |
53 this.localhostOverUsb = localhostOverUsb; | 53 this.localhostOverUsb = localhostOverUsb; |
54 } | 54 } |
55 | 55 |
56 public String getPageUrl() { | 56 public String getPageUrl() { |
57 return pageUrl; | 57 return pageUrl; |
58 } | 58 } |
59 | 59 |
60 public boolean isLocalhostOverUsb() { | 60 public boolean isLocalhostOverUsb() { |
61 return localhostOverUsb; | 61 return localhostOverUsb; |
62 } | 62 } |
63 } | 63 } |
OLD | NEW |