OSDN Git Service

Turn on skip-postcompile-on-save, change asset set name
authorTor Norbye <tnorbye@google.com>
Wed, 24 Aug 2011 19:31:49 +0000 (12:31 -0700)
committerTor Norbye <tnorbye@google.com>
Wed, 24 Aug 2011 19:49:36 +0000 (12:49 -0700)
This changeset contains a couple of minor but unrelated changes:

(1) Turn on the "Skip packaging and dexing until export or launch"
    option. This option was added in ADT 12 by off by default. This
    turns it on at least for the preview build of ADT 14.

(2) Change the name of the Asset Set (which opens the asset studio
    wizard) to "Android Icon Set" to make it more obvious what it is.

(3) Tweaks some default collection sizes to avoid unnecessary growth
    copies when an SDK is loaded.

Change-Id: Ib2c575c247bbfb45345d0b067e3ea944f8a72d82

eclipse/plugins/com.android.ide.eclipse.adt/plugin.xml
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/descriptors/LayoutDescriptors.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/preferences/AdtPrefs.java

index 48f9966..63d0f2a 100644 (file)
             hasPages="true"
             icon="icons/new_asset_set.png"
             id="com.android.ide.eclipse.adt.internal.assetstudio.CreateAssetSetWizard"
-            name="Asset Set"
+            name="Android Icon Set"
             preferredPerspectives="org.eclipse.jdt.ui.JavaPerspective"
             project="false" />
     </extension>
index ca0475d..1ae463f 100644 (file)
@@ -175,7 +175,7 @@ public final class LayoutDescriptors implements IDescriptorProvider {
         HashMap<ViewClassInfo, ViewElementDescriptor> infoDescMap =
             new HashMap<ViewClassInfo, ViewElementDescriptor>();
 
-        ArrayList<ViewElementDescriptor> newViews = new ArrayList<ViewElementDescriptor>();
+        ArrayList<ViewElementDescriptor> newViews = new ArrayList<ViewElementDescriptor>(40);
         if (views != null) {
             for (ViewClassInfo info : views) {
                 ViewElementDescriptor desc = convertView(info, infoDescMap);
@@ -188,7 +188,7 @@ public final class LayoutDescriptors implements IDescriptorProvider {
         // Note: ViewStub is already described by attrs.xml
         insertInclude(newViews);
 
-        List<ViewElementDescriptor> newLayouts = new ArrayList<ViewElementDescriptor>();
+        List<ViewElementDescriptor> newLayouts = new ArrayList<ViewElementDescriptor>(30);
         if (layouts != null) {
             for (ViewClassInfo info : layouts) {
                 ViewElementDescriptor desc = convertView(info, infoDescMap);
@@ -206,7 +206,7 @@ public final class LayoutDescriptors implements IDescriptorProvider {
             newViews.add(fragmentTag);
         }
 
-        List<ElementDescriptor> newDescriptors = new ArrayList<ElementDescriptor>();
+        List<ElementDescriptor> newDescriptors = new ArrayList<ElementDescriptor>(80);
         newDescriptors.addAll(newLayouts);
         newDescriptors.addAll(newViews);
 
@@ -268,7 +268,8 @@ public final class LayoutDescriptors implements IDescriptorProvider {
         }
         String tooltip = info.getJavaDoc();
 
-        ArrayList<AttributeDescriptor> attributes = new ArrayList<AttributeDescriptor>();
+        // Average is around 90, max (in 3.2) is 145
+        ArrayList<AttributeDescriptor> attributes = new ArrayList<AttributeDescriptor>(120);
 
         // All views and groups have an implicit "style" attribute which is a reference.
         AttributeInfo styleInfo = new AttributeInfo(
index 095c67a..6df5fb1 100644 (file)
@@ -374,7 +374,7 @@ public final class AdtPrefs extends AbstractPreferenceInitializer {
     public void initializeStoreWithDefaults(IPreferenceStore store) {
         store.setDefault(PREFS_BUILD_RES_AUTO_REFRESH, true);
         store.setDefault(PREFS_BUILD_FORCE_ERROR_ON_NATIVELIB_IN_JAR, true);
-        store.setDefault(PREFS_BUILD_SKIP_POST_COMPILE_ON_FILE_SAVE, false);
+        store.setDefault(PREFS_BUILD_SKIP_POST_COMPILE_ON_FILE_SAVE, true);
 
         store.setDefault(PREFS_BUILD_VERBOSITY, BuildVerbosity.ALWAYS.name());