com.android.ide.eclipse.base_22.6.2.v201403212031-1085508

16:34:10.605 INFO  jd.cli.Main - Decompiling com.android.ide.eclipse.base_22.6.2.v201403212031-1085508.jar
package com.android.ide.eclipse.base;

import org.eclipse.core.runtime.Platform;
import org.osgi.framework.Bundle;
import org.osgi.framework.Version;

public class InstallDetails
{
  private static final String ADT_PLUGIN_ID = "com.android.ide.eclipse.adt";
  private static final String ECLIPSE_PLATFORM_PLUGIN_ID = "org.eclipse.platform";
  
  public static boolean isAdtInstalled()
  {
    Bundle b = Platform.getBundle("com.android.ide.eclipse.adt");
    return b != null;
  }
  
  public static Version getPlatformVersion()
  {
    Bundle b = Platform.getBundle("org.eclipse.platform");
    return b == null ? Version.emptyVersion : b.getVersion();
  }
}

/* Location:
 * Qualified Name:     com.android.ide.eclipse.base.InstallDetails
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.android.ide.eclipse.base.internal.preferences;

import com.android.sdkstats.SdkStatsPermissionDialog;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;

class UsagePreferencePage$1
  extends SelectionAdapter
{
  UsagePreferencePage$1(UsagePreferencePage paramUsagePreferencePage) {}
  
  public void widgetSelected(SelectionEvent event)
  {
    SdkStatsPermissionDialog.openUrl(text);
  }
}

/* Location:
 * Qualified Name:     com.android.ide.eclipse.base.internal.preferences.UsagePreferencePage.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.android.ide.eclipse.base.internal.preferences;

import com.android.sdkstats.DdmsPreferenceStore;
import com.android.sdkstats.SdkStatsPermissionDialog;
import org.eclipse.jface.preference.BooleanFieldEditor;
import org.eclipse.jface.preference.PreferencePage;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Link;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;

public class UsagePreferencePage
  extends PreferencePage
  implements IWorkbenchPreferencePage
{
  private static final int WRAP_WIDTH_PX = 200;
  private BooleanFieldEditor mOptInCheckBox;
  private DdmsPreferenceStore mStore = new DdmsPreferenceStore();
  
  public void init(IWorkbench workbench) {}
  
  protected Control createContents(Composite parent)
  {
    Composite top = new Composite(parent, 0);
    top.setLayout(new GridLayout(1, false));
    top.setLayoutData(new GridData(768));
    
    Label l = new Label(top, 64);
    l.setText("By choosing to send certain usage statistics to Google, you can help us improve the Android SDK. These usage statistics lets us measure things like active usage of the SDK, and let us know things like which versions of the SDK are in use and which tools are the most popular with developers. This limited data is not associated with personal information about you, and is examined on an aggregate basis, and is maintained in accordance with the Google Privacy Policy.");
    GridData gd = new GridData(768);
    widthHint = 200;
    l.setLayoutData(gd);
    
    Link privacyPolicyLink = new Link(top, 64);
    gd = new GridData(768);
    widthHint = 200;
    privacyPolicyLink.setLayoutData(gd);
    privacyPolicyLink.setText("<a href=\"http://www.google.com/intl/en/privacy.html\">Google Privacy Policy</a>");
    
    privacyPolicyLink.addSelectionListener(new SelectionAdapter()
    {
      public void widgetSelected(SelectionEvent event)
      {
        SdkStatsPermissionDialog.openUrl(text);
      }
    });
    mOptInCheckBox = new BooleanFieldEditor("pingOptIn", 
      "Send usage statistics to Google.", top);
    mOptInCheckBox.setPage(this);
    mOptInCheckBox.setPreferenceStore(mStore.getPreferenceStore());
    mOptInCheckBox.load();
    
    return top;
  }
  
  public boolean performCancel()
  {
    mOptInCheckBox.load();
    return super.performCancel();
  }
  
  protected void performDefaults()
  {
    mOptInCheckBox.loadDefault();
    super.performDefaults();
  }
  
  public boolean performOk()
  {
    save();
    return super.performOk();
  }
  
  protected void performApply()
  {
    save();
    super.performApply();
  }
  
  private void save()
  {
    mStore.setPingOptIn(mOptInCheckBox.getBooleanValue());
  }
}

/* Location:
 * Qualified Name:     com.android.ide.eclipse.base.internal.preferences.UsagePreferencePage
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
1

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2017. Infinite Loop Ltd