mAvdPage.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1));\r
}\r
\r
+ @SuppressWarnings("unused") // MenuBarWrapper works using side effects\r
private void createMenuBar() {\r
\r
if (mContext != AvdInvocationContext.STANDALONE) {\r
import org.eclipse.swt.widgets.TreeColumn;
import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
}
}
+ @SuppressWarnings("unused")
private void createContents(Composite parent) {
GridLayoutBuilder.create(parent).noMargins().columns(2);
element = ((PkgItem) element).getMainPackage();
}
if (element instanceof IDescription) {
- return ((IDescription) element).getLongDescription();
+ String s = ((IDescription) element).getLongDescription();
+ if (element instanceof Package) {
+ SdkSource src = ((Package) element).getParentSource();
+ if (src != null) {
+ try {
+ URL url = new URL(src.getUrl());
+ String host = url.getHost();
+ if (((Package) element).isLocal()) {
+ s += String.format("\nInstalled from %1$s", host);
+ } else {
+ s += String.format("\nProvided by %1$s", host);
+ }
+ } catch (MalformedURLException ignore) {
+ }
+ }
+ }
+ return s;
}
return super.getToolTipText(element);
}