aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build/tools.atree6
-rw-r--r--ddms/app/Android.mk6
-rw-r--r--ddms/app/README2
-rw-r--r--ddms/app/etc/manifest.txt2
-rw-r--r--ddms/libs/ddmuilib/Android.mk6
-rw-r--r--ddms/libs/ddmuilib/etc/manifest.txt2
-rw-r--r--ddms/libs/ddmuilib/tests/Android.mk6
-rw-r--r--hierarchyviewer2/app/Android.mk4
-rw-r--r--hierarchyviewer2/app/etc/manifest.txt2
-rw-r--r--hierarchyviewer2/libs/hierarchyviewerlib/manifest.txt2
-rw-r--r--hierarchyviewer2/libs/hierarchyviewerlib/src/Android.mk4
-rw-r--r--sdkmanager/app/Android.mk6
-rw-r--r--sdkmanager/app/etc/manifest.txt2
-rw-r--r--sdkmanager/libs/sdkuilib/Android.mk6
-rw-r--r--sdkstats/src/Android.mk6
-rw-r--r--swtmenubar/Android.mk2
-rwxr-xr-xswtmenubar/src-darwin/com/android/menubar/internal/MenuBarEnhancerCarbon.java134
-rw-r--r--swtmenubar/src/com/android/menubar/MenuBarEnhancer.java4
-rw-r--r--traceview/src/Android.mk6
19 files changed, 172 insertions, 36 deletions
diff --git a/build/tools.atree b/build/tools.atree
index 89401e2..54164a9 100644
--- a/build/tools.atree
+++ b/build/tools.atree
@@ -121,9 +121,9 @@ external/emma/lib/emma_ant.jar tools/lib/emma_ant
framework/jcommon-1.0.12.jar tools/lib/jcommon-1.0.12.jar
framework/jfreechart-1.0.9.jar tools/lib/jfreechart-1.0.9.jar
framework/jfreechart-1.0.9-swt.jar tools/lib/jfreechart-1.0.9-swt.jar
-framework/org.eclipse.core.commands_3.6.0.I20100512-1500.jar tools/lib/org.eclipse.core.commands_3.6.0.I20100512-1500.jar
-framework/org.eclipse.equinox.common_3.6.0.v20100503.jar tools/lib/org.eclipse.equinox.common_3.6.0.v20100503.jar
-framework/org.eclipse.jface_3.6.2.M20110210-1200.jar tools/lib/org.eclipse.jface_3.6.2.M20110210-1200.jar
+framework/org.eclipse.core.commands_3.4.0.I20080509-2000.jar tools/lib/org.eclipse.core.commands_3.4.0.I20080509-2000.jar
+framework/org.eclipse.equinox.common_3.4.0.v20080421-2006.jar tools/lib/org.eclipse.equinox.common_3.4.0.v20080421-2006.jar
+framework/org.eclipse.jface_3.4.2.M20090107-0800.jar tools/lib/org.eclipse.jface_3.4.2.M20090107-0800.jar
framework/osgi.jar tools/lib/osgi.jar
framework/swing-worker-1.1.jar tools/lib/swing-worker-1.1.jar
prebuilts/tools/common/asm-tools/asm-4.0.jar tools/lib/asm-4.0.jar
diff --git a/ddms/app/Android.mk b/ddms/app/Android.mk
index 74d0f6f..d1e4a52 100644
--- a/ddms/app/Android.mk
+++ b/ddms/app/Android.mk
@@ -18,9 +18,9 @@ LOCAL_JAVA_LIBRARIES := \
ddmuilib \
swt \
swtmenubar \
- org.eclipse.jface_3.6.2.M20110210-1200 \
- org.eclipse.equinox.common_3.6.0.v20100503 \
- org.eclipse.core.commands_3.6.0.I20100512-1500
+ org.eclipse.jface_3.4.2.M20090107-0800 \
+ org.eclipse.equinox.common_3.4.0.v20080421-2006 \
+ org.eclipse.core.commands_3.4.0.I20080509-2000
LOCAL_MODULE := ddms
include $(BUILD_HOST_JAVA_LIBRARY)
diff --git a/ddms/app/README b/ddms/app/README
index 0d9bbc4..42efb7b 100644
--- a/ddms/app/README
+++ b/ddms/app/README
@@ -45,7 +45,7 @@ In order to compile the project:
- Create a new user library named ANDROID_OSGI
- Add the following JAR file:
- - prebuilt/common/eclipse/org.eclipse.osgi_3.*.jar
+ - prebuilt/common/osgi/osgi.jar
-------
diff --git a/ddms/app/etc/manifest.txt b/ddms/app/etc/manifest.txt
index 3907767..8c6ab23 100644
--- a/ddms/app/etc/manifest.txt
+++ b/ddms/app/etc/manifest.txt
@@ -1,3 +1,3 @@
Main-Class: com.android.ddms.Main
-Class-Path: androidprefs.jar sdkstats.jar ddmlib.jar ddmuilib.jar swtmenubar.jar org.eclipse.jface_3.6.2.M20110210-1200.jar org.eclipse.equinox.common_3.6.0.v20100503.jar org.eclipse.core.commands_3.6.0.I20100512-1500.jar jcommon-1.0.12.jar jfreechart-1.0.9.jar jfreechart-1.0.9-swt.jar osgi.jar
+Class-Path: androidprefs.jar sdkstats.jar ddmlib.jar ddmuilib.jar swtmenubar.jar org.eclipse.jface_3.4.2.M20090107-0800.jar org.eclipse.equinox.common_3.4.0.v20080421-2006.jar org.eclipse.core.commands_3.4.0.I20080509-2000.jar jcommon-1.0.12.jar jfreechart-1.0.9.jar jfreechart-1.0.9-swt.jar osgi.jar
diff --git a/ddms/libs/ddmuilib/Android.mk b/ddms/libs/ddmuilib/Android.mk
index 4b34500..d35b861 100644
--- a/ddms/libs/ddmuilib/Android.mk
+++ b/ddms/libs/ddmuilib/Android.mk
@@ -15,9 +15,9 @@ LOCAL_JAR_MANIFEST := etc/manifest.txt
LOCAL_JAVA_LIBRARIES := \
ddmlib \
swt \
- org.eclipse.jface_3.6.2.M20110210-1200 \
- org.eclipse.equinox.common_3.6.0.v20100503 \
- org.eclipse.core.commands_3.6.0.I20100512-1500 \
+ org.eclipse.jface_3.4.2.M20090107-0800 \
+ org.eclipse.equinox.common_3.4.0.v20080421-2006 \
+ org.eclipse.core.commands_3.4.0.I20080509-2000 \
jcommon-1.0.12 \
jfreechart-1.0.9 \
jfreechart-1.0.9-swt
diff --git a/ddms/libs/ddmuilib/etc/manifest.txt b/ddms/libs/ddmuilib/etc/manifest.txt
index b74fd14..1db70de 100644
--- a/ddms/libs/ddmuilib/etc/manifest.txt
+++ b/ddms/libs/ddmuilib/etc/manifest.txt
@@ -1 +1 @@
-Class-Path: ddmlib.jar org.eclipse.jface_3.6.2.M20110210-1200.jar org.eclipse.equinox.common_3.6.0.v20100503.jar org.eclipse.core.commands_3.6.0.I20100512-1500.jar jcommon-1.0.12.jar jfreechart-1.0.9.jar jfreechart-1.0.9-swt.jar
+Class-Path: ddmlib.jar org.eclipse.jface_3.4.2.M20090107-0800.jar org.eclipse.equinox.common_3.4.0.v20080421-2006.jar org.eclipse.core.commands_3.4.0.I20080509-2000.jar jcommon-1.0.12.jar jfreechart-1.0.9.jar jfreechart-1.0.9-swt.jar \ No newline at end of file
diff --git a/ddms/libs/ddmuilib/tests/Android.mk b/ddms/libs/ddmuilib/tests/Android.mk
index 6bbff34..dc187ec 100644
--- a/ddms/libs/ddmuilib/tests/Android.mk
+++ b/ddms/libs/ddmuilib/tests/Android.mk
@@ -26,9 +26,9 @@ LOCAL_JAVA_LIBRARIES := \
ddmlib \
ddmuilib \
swt \
- org.eclipse.jface_3.6.2.M20110210-1200 \
- org.eclipse.equinox.common_3.6.0.v20100503 \
- org.eclipse.core.commands_3.6.0.I20100512-1500 \
+ org.eclipse.jface_3.4.2.M20090107-0800 \
+ org.eclipse.equinox.common_3.4.0.v20080421-2006 \
+ org.eclipse.core.commands_3.4.0.I20080509-2000 \
junit
include $(BUILD_HOST_JAVA_LIBRARY)
diff --git a/hierarchyviewer2/app/Android.mk b/hierarchyviewer2/app/Android.mk
index 076e32b..0e00273 100644
--- a/hierarchyviewer2/app/Android.mk
+++ b/hierarchyviewer2/app/Android.mk
@@ -25,8 +25,8 @@ LOCAL_JAVA_LIBRARIES := \
ddmuilib \
hierarchyviewerlib \
swt \
- org.eclipse.jface_3.6.2.M20110210-1200 \
- org.eclipse.core.commands_3.6.0.I20100512-1500 \
+ org.eclipse.jface_3.4.2.M20090107-0800 \
+ org.eclipse.core.commands_3.4.0.I20080509-2000 \
sdklib \
swtmenubar
diff --git a/hierarchyviewer2/app/etc/manifest.txt b/hierarchyviewer2/app/etc/manifest.txt
index 0caa3c2..52759c9 100644
--- a/hierarchyviewer2/app/etc/manifest.txt
+++ b/hierarchyviewer2/app/etc/manifest.txt
@@ -1,2 +1,2 @@
Main-Class: com.android.hierarchyviewer.HierarchyViewerApplication
-Class-Path: ddmlib.jar ddmuilib.jar hierarchyviewerlib.jar sdklib.jar org.eclipse.jface_3.6.2.M20110210-1200.jar org.eclipse.core.commands_3.6.0.I20100512-1500.jar org.eclipse.equinox.common_3.6.0.v20100503.jar
+Class-Path: ddmlib.jar ddmuilib.jar hierarchyviewerlib.jar sdklib.jar org.eclipse.jface_3.4.2.M20090107-0800.jar org.eclipse.core.commands_3.4.0.I20080509-2000.jar org.eclipse.equinox.common_3.4.0.v20080421-2006.jar
diff --git a/hierarchyviewer2/libs/hierarchyviewerlib/manifest.txt b/hierarchyviewer2/libs/hierarchyviewerlib/manifest.txt
index 3805b59..ac6ab55 100644
--- a/hierarchyviewer2/libs/hierarchyviewerlib/manifest.txt
+++ b/hierarchyviewer2/libs/hierarchyviewerlib/manifest.txt
@@ -1 +1 @@
-Class-Path: ddmlib.jar ddmuilib.jar hierarchyviewerlib.jar org.eclipse.jface_3.6.2.M20110210-1200.jar org.eclipse.core.commands_3.6.0.I20100512-1500.jar org.eclipse.equinox.common_3.6.0.v20100503.jar
+Class-Path: ddmlib.jar ddmuilib.jar hierarchyviewerlib.jar org.eclipse.jface_3.4.2.M20090107-0800.jar org.eclipse.core.commands_3.4.0.I20080509-2000.jar org.eclipse.equinox.common_3.4.0.v20080421-2006.jar
diff --git a/hierarchyviewer2/libs/hierarchyviewerlib/src/Android.mk b/hierarchyviewer2/libs/hierarchyviewerlib/src/Android.mk
index 1afbc92..3ca63dd 100644
--- a/hierarchyviewer2/libs/hierarchyviewerlib/src/Android.mk
+++ b/hierarchyviewer2/libs/hierarchyviewerlib/src/Android.mk
@@ -23,8 +23,8 @@ LOCAL_JAR_MANIFEST := ../manifest.txt
LOCAL_JAVA_LIBRARIES := ddmlib \
ddmuilib \
swt \
- org.eclipse.jface_3.6.2.M20110210-1200 \
- org.eclipse.core.commands_3.6.0.I20100512-1500
+ org.eclipse.jface_3.4.2.M20090107-0800 \
+ org.eclipse.core.commands_3.4.0.I20080509-2000
LOCAL_MODULE := hierarchyviewerlib
diff --git a/sdkmanager/app/Android.mk b/sdkmanager/app/Android.mk
index 6431695..d7b630e 100644
--- a/sdkmanager/app/Android.mk
+++ b/sdkmanager/app/Android.mk
@@ -20,9 +20,9 @@ LOCAL_JAVA_LIBRARIES := \
sdklib \
sdkuilib \
swt \
- org.eclipse.jface_3.6.2.M20110210-1200 \
- org.eclipse.equinox.common_3.6.0.v20100503 \
- org.eclipse.core.commands_3.6.0.I20100512-1500
+ org.eclipse.jface_3.4.2.M20090107-0800 \
+ org.eclipse.equinox.common_3.4.0.v20080421-2006 \
+ org.eclipse.core.commands_3.4.0.I20080509-2000
LOCAL_MODULE := sdkmanager
diff --git a/sdkmanager/app/etc/manifest.txt b/sdkmanager/app/etc/manifest.txt
index 12d22e5..bb2e8c4 100644
--- a/sdkmanager/app/etc/manifest.txt
+++ b/sdkmanager/app/etc/manifest.txt
@@ -1,2 +1,2 @@
Main-Class: com.android.sdkmanager.Main
-Class-Path: androidprefs.jar common.jar sdklib.jar sdkuilib.jar swtmenubar.jar org.eclipse.jface_3.6.2.M20110210-1200.jar org.eclipse.equinox.common_3.6.0.v20100503.jar org.eclipse.core.commands_3.6.0.I20100512-1500.jar
+Class-Path: androidprefs.jar common.jar sdklib.jar sdkuilib.jar swtmenubar.jar org.eclipse.jface_3.4.2.M20090107-0800.jar org.eclipse.equinox.common_3.4.0.v20080421-2006.jar org.eclipse.core.commands_3.4.0.I20080509-2000.jar
diff --git a/sdkmanager/libs/sdkuilib/Android.mk b/sdkmanager/libs/sdkuilib/Android.mk
index 3ce5c95..740615e 100644
--- a/sdkmanager/libs/sdkuilib/Android.mk
+++ b/sdkmanager/libs/sdkuilib/Android.mk
@@ -29,9 +29,9 @@ LOCAL_JAVA_LIBRARIES := \
androidprefs \
swtmenubar \
swt \
- org.eclipse.jface_3.6.2.M20110210-1200 \
- org.eclipse.equinox.common_3.6.0.v20100503 \
- org.eclipse.core.commands_3.6.0.I20100512-1500
+ org.eclipse.jface_3.4.2.M20090107-0800 \
+ org.eclipse.equinox.common_3.4.0.v20080421-2006 \
+ org.eclipse.core.commands_3.4.0.I20080509-2000
LOCAL_MODULE := sdkuilib
diff --git a/sdkstats/src/Android.mk b/sdkstats/src/Android.mk
index b7100b4..e95e67a 100644
--- a/sdkstats/src/Android.mk
+++ b/sdkstats/src/Android.mk
@@ -7,9 +7,9 @@ LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_JAVA_LIBRARIES := \
androidprefs \
swt \
- org.eclipse.jface_3.6.2.M20110210-1200 \
- org.eclipse.equinox.common_3.6.0.v20100503 \
- org.eclipse.core.commands_3.6.0.I20100512-1500
+ org.eclipse.jface_3.4.2.M20090107-0800 \
+ org.eclipse.equinox.common_3.4.0.v20080421-2006 \
+ org.eclipse.core.commands_3.4.0.I20080509-2000
LOCAL_MODULE := sdkstats
include $(BUILD_HOST_JAVA_LIBRARY)
diff --git a/swtmenubar/Android.mk b/swtmenubar/Android.mk
index 321a78a..25e80da 100644
--- a/swtmenubar/Android.mk
+++ b/swtmenubar/Android.mk
@@ -29,7 +29,7 @@ LOCAL_MODULE_TAGS := optional
LOCAL_JAVA_LIBRARIES := \
swt \
- org.eclipse.jface_3.6.2.M20110210-1200
+ org.eclipse.jface_3.4.2.M20090107-0800
include $(BUILD_HOST_JAVA_LIBRARY)
diff --git a/swtmenubar/src-darwin/com/android/menubar/internal/MenuBarEnhancerCarbon.java b/swtmenubar/src-darwin/com/android/menubar/internal/MenuBarEnhancerCarbon.java
new file mode 100755
index 0000000..45dacfb
--- /dev/null
+++ b/swtmenubar/src-darwin/com/android/menubar/internal/MenuBarEnhancerCarbon.java
@@ -0,0 +1,134 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Eclipse Public License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.eclipse.org/org/documents/epl-v10.php
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.menubar.internal;
+
+import com.android.menubar.IMenuBarCallback;
+import com.android.menubar.IMenuBarEnhancer;
+
+import org.eclipse.swt.internal.Callback;
+import org.eclipse.swt.internal.carbon.HICommand;
+import org.eclipse.swt.internal.carbon.OS;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Menu;
+
+
+/**
+ * Implementation of IMenuBarEnhancer for MacOS Carbon SWT.
+ */
+public final class MenuBarEnhancerCarbon implements IMenuBarEnhancer {
+
+ private static final int kHICommandPreferences = ('p'<<24) + ('r'<<16) + ('e'<<8) + 'f';
+ private static final int kHICommandAbout = ('a'<<24) + ('b'<<16) + ('o'<<8) + 'u';
+ private static final int kHICommandServices = ('s'<<24) + ('e'<<16) + ('r'<<8) + 'v';
+
+ public MenuBarEnhancerCarbon() {
+ }
+
+ public MenuBarMode getMenuBarMode() {
+ return MenuBarMode.MAC_OS;
+ }
+
+ public void setupMenu(
+ String appName,
+ Display display,
+ final IMenuBarCallback callbacks) {
+
+ // Callback target
+ Object target = new Object() {
+ @SuppressWarnings("unused")
+ int commandProc(int nextHandler, int theEvent, int userData) {
+ if (OS.GetEventKind(theEvent) == OS.kEventProcessCommand) {
+ HICommand command = new HICommand();
+ OS.GetEventParameter(
+ theEvent,
+ OS.kEventParamDirectObject,
+ OS.typeHICommand,
+ null,
+ HICommand.sizeof,
+ null,
+ command);
+ switch (command.commandID) {
+ case kHICommandPreferences:
+ callbacks.onPreferencesMenuSelected();
+ return OS.eventNotHandledErr; // TODO wrong
+ case kHICommandAbout:
+ callbacks.onAboutMenuSelected();
+ return OS.eventNotHandledErr;// TODO wrong
+ default:
+ break;
+ }
+ }
+ return OS.eventNotHandledErr;
+ }
+ };
+
+ final Callback commandCallback= new Callback(target, "commandProc", 3); //$NON-NLS-1$
+ int commandProc = commandCallback.getAddress();
+ if (commandProc == 0) {
+ commandCallback.dispose();
+ log(callbacks, "%1$s: commandProc hook failed.", getClass().getSimpleName()); //$NON-NLS-1$
+ return; // give up
+ }
+
+ // Install event handler for commands
+ int[] mask = new int[] {
+ OS.kEventClassCommand, OS.kEventProcessCommand
+ };
+ OS.InstallEventHandler(
+ OS.GetApplicationEventTarget(), commandProc, mask.length / 2, mask, 0, null);
+
+ // create About Eclipse menu command
+ int[] outMenu = new int[1];
+ short[] outIndex = new short[1];
+ if (OS.GetIndMenuItemWithCommandID(
+ 0, kHICommandPreferences, 1, outMenu, outIndex) == OS.noErr && outMenu[0] != 0) {
+ int menu = outMenu[0];
+
+ // add About menu item (which isn't present by default)
+ String about = "About " + appName;
+ int l = about.length();
+ char buffer[] = new char[l];
+ about.getChars(0, l, buffer, 0);
+ int str = OS.CFStringCreateWithCharacters(OS.kCFAllocatorDefault, buffer, l);
+ OS.InsertMenuItemTextWithCFString(menu, str, (short) 0, 0, kHICommandAbout);
+ OS.CFRelease(str);
+
+ // add separator between About & Preferences
+ OS.InsertMenuItemTextWithCFString(menu, 0, (short) 1, OS.kMenuItemAttrSeparator, 0);
+
+ // enable pref menu
+ OS.EnableMenuCommand(menu, kHICommandPreferences);
+
+ // disable services menu
+ OS.DisableMenuCommand(menu, kHICommandServices);
+ }
+
+ // schedule disposal of callback object
+ display.disposeExec(
+ new Runnable() {
+ public void run() {
+ commandCallback.dispose();
+ }
+ }
+ );
+ }
+
+ private void log(IMenuBarCallback callbacks, String format, Object... args) {
+ callbacks.printError(format , args);
+ }
+
+}
diff --git a/swtmenubar/src/com/android/menubar/MenuBarEnhancer.java b/swtmenubar/src/com/android/menubar/MenuBarEnhancer.java
index 7ca6471..eb3e817 100644
--- a/swtmenubar/src/com/android/menubar/MenuBarEnhancer.java
+++ b/swtmenubar/src/com/android/menubar/MenuBarEnhancer.java
@@ -191,7 +191,9 @@ public final class MenuBarEnhancer {
IMenuBarEnhancer enhancer = null;
String p = SWT.getPlatform();
String className = null;
- if ("cocoa".equals(p)) { //$NON-NLS-1$
+ if ("carbon".equals(p)) { //$NON-NLS-1$
+ className = "com.android.menubar.internal.MenuBarEnhancerCarbon"; //$NON-NLS-1$
+ } else if ("cocoa".equals(p)) { //$NON-NLS-1$
className = "com.android.menubar.internal.MenuBarEnhancerCocoa"; //$NON-NLS-1$
}
diff --git a/traceview/src/Android.mk b/traceview/src/Android.mk
index cd63141..fd901f1 100644
--- a/traceview/src/Android.mk
+++ b/traceview/src/Android.mk
@@ -11,9 +11,9 @@ LOCAL_JAVA_LIBRARIES := \
androidprefs \
sdkstats \
swt \
- org.eclipse.jface_3.6.2.M20110210-1200 \
- org.eclipse.equinox.common_3.6.0.v20100503 \
- org.eclipse.core.commands_3.6.0.I20100512-1500
+ org.eclipse.jface_3.4.2.M20090107-0800 \
+ org.eclipse.equinox.common_3.4.0.v20080421-2006 \
+ org.eclipse.core.commands_3.4.0.I20080509-2000
LOCAL_MODULE := traceview
include $(BUILD_HOST_JAVA_LIBRARY)