What SWT classes are used in the Android ADT AndroidManifest.xml screen? - android

I'd like to write an Eclipse plugin that looks like the "AndroidManifest.xml" editor page in Google's Eclipse ADT plugin - specifically, this screen. I'm new to SWT development, though, so I don't have a very good understanding of what SWT components one would use to build a screen like this.
So, specifically, I'm asking:
Is there a particular layout I should use to build a screen like this?
What class gives the collapsible headers, like "Application Attributes", with the color-gradient backgrounds?
Are there any source-code examples available for a screen like this?
Better yet, is the source code of the ADT plugin available anywhere? I haven't found it online.
Thanks for your help!

I've accepted Marc's answer, but I wanted to give a more detailed answer here, for the benefit of anyone who comes along later:
The form in question is an example of a "Managed Form". I should have read this: http://www.eclipse.org/articles/Article-Forms/article.html
For the layout, org.eclipse.swt.layout.GridData and org.eclipse.ui.forms.widgets.ColumnLayout seem to be common choices.
The collapsible headers are a feature of the org.eclipse.ui.forms.widgets.Section class.
Javadoc for the Eclipse Plugin Development Kit, including the classes named here, can be found at http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/api/overview-summary.html

Answer to this part of your question:
Better yet, is the source code of the
ADT plugin available anywhere? I
haven't found it online.
The ADT source is public. See http://tools.android.com/ for more info. Specifically, this page describes how to get and build the source. You should be able to find what you are looking for somewhere in the source tree.

Related

Where is ProperyLoader class?

I attempted to follow and old tutorial for Sending E-mail with Amazon SES Using the AWS SDK for Android here:
https://developer.amazon.com/post/TxEUZC89WLEC2Z/Sending-E-mail-with-Amazon-SES-Using-the-AWS-SDK-for-Android.html
I am having a little trouble however. PropertyLoader cannot be resolved. What jar library is this a part of? I have tried importing all of the jar libraries from the SDK into my Eclipse project. (http://aws.amazon.com/mobile/sdk/).
I also get an error on this line: SendEmailResult result = clientManager.ses().sendEmail(request); I am guessing there is another class called ClientManager to set this up with in which I am also not able to find.
Any thoughts or links would be helpful. Thanks.
From the tutorial it looks like it follows a sample. Doing a quick Google search finds me this page.
I imagine the clientManager stuff is also there.
Note that the post is very old so I'm not even sure it still works with the current version of the SDK

How to display the documentation for the support libraries inside Android Studio?

When I use the command 'Quick Documentation' in Android Studio in a class that comes from one of the support libraries (e.g. ActionBarActivity), the IDE does not show the documentation for the class. If I use it on one of the classes from, say, the Android API 19 (e.g. Activity), the IDE displays the complete documentation as is shown in the reference page on https://developer.android.com/reference/packages.html.
Is there any way to add the documentation for the support libraries to Android Studio so that they can be accessed through 'Quick Documentation' as well?
When Android Studio has opened the decompiled jar class, click on "Download..." blue link at top right, this will download jar with javadoc and save it in :
/.ideaLibSources
rebuild project if necessary, now doc is available.
Tested on android studio 2.0 preview 4.
If you are not using Gradle, this will be easier for you.
Go to File -> Project Structure. From there, on the left-hand side, select Libraries. Select the library you want to add source/java-docs to, then click the plus at the bottom and add the source and/or java-doc jars. There's a chance AS will automatically know what's what.
If you're using Gradle, more than likely in Project Structure, you won't see the Libraries tab, and I'm sorry but I don't know how to help from that point. If you use Gradle, AS detects that and takes away "unnecessary" options. Sorry to send you searching again, but I know there's something called a .properties file for jars that tell the source and java-docs, but I haven't implemented it. If I can find the page that told me that information, I'll update this.
EDIT: The answer is here. This should help you out.

What are Steps to grab the samples from AndEngine Repository

I had tried to grab the samples of AndEngine using Mercurial eclipse plugins, but that was firing some sort of error to me again and again. So, can someone please let me know what could be the easiest way to get the AndEngine examples or samples from the repository. I am working on Windows.
Thanks.
Update:
Change the Mercurial client from the built in one to TortoiseHG (in the Eclipse preferences).
Previous Answer:
Plan A: Make sure to use native Mercurial with EclipseHG (not the one which ships with the plugin). You can find the settings the preferences dialog. Last time I tried, the built-in version was broken. If it fails again, copy and paste the error message.
Plan B: Try TortoiseHG
Plan C: Give us a concrete error message. (Which should actually be Plan A ;) )
You download the zip from https://github.com/nicolasgramlich/AndEngineExamples

Where to find the source codes of the Android UI components?

I believe that all the source code in the Android framework could be found in https://android.googlesource.com, but I cannot find the source code of the UI components there, e.g., android.view.View, widgets, etc.
Can somebody tell me where the code is?
Check https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/. There are a few subdirectories for view, widget and so on.
See the Github mirror. In case this goes down or is not up to date you have to download the Android source.
The easiest way I found to browse android code is http://google.com/codesearch . Try put "android TextView" for example and you will find it very quickly. It has the added benefit of very fast and efficient search.
Note - there is even "Android" link at the left side to limit your searches just to Android. Just noticed it ;).
Disclaimer: My friend from Google, Miguel, developed big part of it ;).

How do I see the core Android classes?

I am trying to look inside a couple of Android core classes to see about overriding some methods. I have looked into getting the Android source code, but the process described on the Android dev site is all about installing and setting up some kind of development environment. This is not necessary to me. I just want to open a class or two in a text editor and look at its contents. Does anyone know if this is possible without going through the multitude of steps described on the Android dev forums?
The easiest way is to use Google Code Search. You just have to try a search like Activity.java android and you can see the source code of that class. It even has an outline inspector:
You can download the entire source with git our just look it up as a reference on the git site. Here is a link to the sdk code:
https://android.googlesource.com/platform/frameworks/base
Another option is to use http://grepcode.com/ and perform a search such as "android ViewGroup". I've really enjoyed the style of using grepcode.

Categories

Resources