I'm trying to open various .apk files in Eclipse for the purpose of viewing the source code. I'm developing for Google Glass, and I need to see how the code of the third party software I downloaded is executed. I'm able to view the code using JD-GUI and dex2jar, but I can't compile and run it on Glass. Whenever I try to import the existing code in Eclipse, it is grayed out and I can't select it: even the Google made samples like the compass and charades apps. I am new to this, so perhaps I've missed a step or something of the sort. I'd greatly appreciate any help or advice on the matter!
Thanks, Jordan
Generally you don't access the source code via the jar/apk. Those are compiled, or translated, from the source code to the code that Glass/Android actually runs. Because of this, you're probably not going to be able to view the actual source code for these projects.
If you want to get the source code (and import it into Eclipse) for the Google Projects, go to https://github.com/googleglass/?query=gdk, select one of the applications, and click the "Download ZIP" button. This will give you a .zip of the source code.
If you're feeling really brave and want to learn even more, try cloning the repository with git. The git website has a great tutorial/introduction at http://git-scm.com/book/en/Getting-Started-Git-Basics.
Related
Confluence version: 5.5.2.
I need to know how I can see the actual source code of a macro in Confluence. I tried adding macros, then right-clicking the page to view the source code, but that doesn't really help.
What I am trying to do:
With the existing macro, task list (the checkboxs), I need to modify the code in a way such that changing the value from true to false (pretty sure it is the onClick() function) or vice versa will send an e-mail to all "Watchers" of that page.
Would this even be possible? The changes I make need to be recognized on the server so that the changes don't only take place on my computer. Also, I don't even know if I can view the actual source without downloading an external plug-in (which won't work for certain reasons). Has anyone done something like this?
The source code for Confluence macros can be found either in the User Macro section of the Administration panel for inhouse macros or in the plugin code. The first port of call is bitbucket.org for Atlassian plugin code.
To view the code for Atlassian plugins you will need to access the source from Atlassian. E.g. Tasklist Plugin in BitBucket.
You can also download the jar installer for this plugin from the Atlassian Marketplace Dynamic Tasklist 2 page, change the extension from .jar to .zip and then unzip the plugin to view the plugin contents.
Found a work around. If you go into settings (under profile pic), then go to e-mail and select all the checkboxes provided, it will solve my problem. Any small cahnge made in the document will be e-mailed to all watchers.
I have read the other posts asking the same question but was unable to get my code to work. I have deleted my meta data and imported my files back in to no avail.
I have my workspace inside my dropbox folder to allow me to code from home or while away. Currently I am using my laptop which is not my primary coding machine. The project worked yesterday on this laptop however.
any help would be much obliged, I will provide any information that is required
First go to the Project menu and select "Clean...". That might solve it right off the bat.
If not, next you should right click on your "src" folder and select "Build Path" -> "Use as Source Folder". Then Clean again.
Try those two things and then report back with results.
right now we are using svn to share code for our force.com/visualforce project. It works great controllers, components, pages and static resources.
The problem is it seems the salesforce.schema file is not really a local file, its a placeholder that checks your server and tells you your current schema.
We want to baseline our schema changes/updates to a file so we can share in svn.
I found this:
http://boards.developerforce.com/t5/General-Development/Custom-Objects-in-Force-com-IDE/td-p/445363
But we cant seem to figure out what do do/how to get it to work.
So in a nutshell, we are looking for a way for Developer A to create a custom schema object in their own SF Sandbox, somehow get this info into a file in svn (ideally through the force.com ide), then check it in so developer B can check it out and apply it to their server. (the same way we do for code).
Any help would be great!
thanks
Joel
Ok, we finally figured this out through trial and error:
To make this work:
right click on project, click "Force.com/Add Remove Metadata Components"
go down to custom ojbjects, open that up, make sure all your custom objects are checked, click apply, then say "NO" to dialog
then right click on src and click "Force.com/Syncronize with Server, find your objects, and click "Apply Server to Project"
now your files will be local, check them into SVN and you are golden.
I am having tough time to figure out debugging UI parts of Eclipse. I couldn't find any information on google (or) Eclipse web site.
All I wanted to do is to find out the code that gets executed when we double-click a file in project explorer to open the file in Editor.
I tried to bring up Eclipse source code from Plug-ins view -> right click on the plugins -> import as Source Project. But, I am unsure what are all the components that constitutes to the UI part. I get some weird errors when I try to import everything that's found in plug-ins view.
Where can I find the information related to debugging Eclipse source code?
Instead of using Plug-ins->Import as Source Project, I would recommend opening the Plug-ins view, selecting all plug-ins, right click, and Add to Java Search.
Then you can use Open Type Ctrl-Shift-t to search for class names and the source will be attached so you can read it, set breakpoints, and debug.
In your case, I think you want to investigate IWorkbench, IWorkbenchWindow, and IWorkbenchPage. The openEditor(*) methods on IWorkbenchPage will be of particular interest.
You may also want to take a look at the org.eclipse.ui.editors and org.eclipse.core.contenttype.contentTypes extension points.
I created a project "Sample Code"... here I just paste sample code... much of it is snippets that won't compile.
Is there some project-specific setting I can make so that Eclipse doesn't try to compile it?
I would prefer not to have the source code littered with red error markers.
Put your code in a non-java project, ie a general project.
Downside: you will have to create package directory structure (unless you can copy and paste from somewhere else).
Upside: it won't try to compile.
MY SOLUTION
ok, this is not an exact solution to my problem... but it is another way to do it and I kinda like it now...
I simply forget about using Eclipse to store the sample java files!
I found a good program CodeBox for Mac to store code snippets and I'm sure there exist such things for Windows, Linux too...
there interesting thing is that when I choose from this program to open the java snippet file (.java) in an external editor (Eclipse), it will open in Eclipse without any Syntax checking... wohoo! no squiggly lines
Because of this, it is not full blown code highlighting... classes and variables same color... but that's ok.. still quite readable. Much more than if it was in Eclipse with syntax highlighting running on it...
So basically, if you want to get rid of these red squiggles... one way to do it is don't keep sample .java (or other language) files in a project in Eclipse... simply keep them in the filesystem or code storage app and open them with Eclipse when you want to view them.
Depending on how you prefer to structure your project:
you could put your java files into a separate folder that is not configured as a source folder. There is an entry in the eclipse help on how to configure your build path.
or you can set exclusion-patterns in the build configuration, so that specific packages or files that follow a pattern you define don't get compiled.
Yet another way to handle your snippets could be to use a Scrapbook page.
Eclipse won't highlight anything in a scrapbook page but you can select code parts inside the page and execute them isolated. That's nice if you're experimenting and don't want to set up a whole class with imports and methods just to see if a specific snippet works as expected.