Difference between revisions of "Atlas Shell"

From AtlasWiki
Jump to: navigation, search
(Step 1) Import Shell Project)
Line 4: Line 4:
  
 
== Step 1) Import Shell Project ==
 
== Step 1) Import Shell Project ==
TODO
+
 
 +
To open an Atlas Shell you need to have an Atlas Shell project imported into the workspace or installed into Eclipse as a plugin.  A typical setup is to have the Shell project imported into the workspace. We provide a starter Shell project for you that can be used in this tutorial as well as your own projects! For more details see the Starter Toolbox Github repository at https://github.com/EnSoftCorp/Starter-Toolbox.
 +
 
 +
On your command line change your current directory to the <code>git</code> folder we made in the [[Installing Atlas]] section.  Next, clone a copy of the repository by running the following command on your command line.
 +
 
 +
<pre>cd <my_path>/Atlas/git
 +
git clone https://github.com/EnSoftCorp/Starter-Toolbox.git</pre>
 +
 
 +
If you need to install Git on your system visit http://git-scm.com/downloads. Alternatively you could download a zip file of the latest StarterToolbox repository archive here https://github.com/EnSoftCorp/Starter-Toolbox/archive/master.zip.
 +
 
 +
The starter Atlas Shell project has a project you just downloaded has dependency on a Toolbox project (which we will discuss more in the next section).  For this tutorial import both the Shell project (<code>toolbox.shell</code>) and the Toolbox project (<code>toolbox.analysis</code>) into the workspace.
 +
 
 +
Import the Atlas Shell and Toolbox projects into the workspace by navigating to <code>File</code> &gt; <code>Import</code> &gt; <code>General</code> &gt; <code>Existing Projects into Workspace</code> and browsing to the folder containing the <code>toolbox.shell</code> and <code>toolbox.analysis</code> projects.  If the projects are in a zip archive, you will want to check the <code>Select archive file</code> radio button, otherwise check the <code>Select root directory</code> radio button.  Click <code>Finish</code> to import the projects into the workspace.
  
 
== Step 2) Configure shellInit.scala ==
 
== Step 2) Configure shellInit.scala ==

Revision as of 13:47, 2 February 2015

That Atlas Shell (shown below) is a Scala interpreter with the Atlas classpath and query language imports pre-configured for you. Scala is a programming language that runs in the JVM, which means that Scala and Java stacks can be freely mixed for seamless integration. If you are not familiar with Scala, one notable difference in the program syntax is that several characters such as ., (, ), and ; can be implicit. In Scala type declarations begin with "var" or "val" instead of the class name. While the Atlas Shell is wonderful for writing and running quick one-off queries, you could write all of your program analysis queries in Java and simply invoke the Java code from the Atlas Shell. For now let's just use the Atlas Shell to write a few quick queries.

AtlasShell.png

Step 1) Import Shell Project

To open an Atlas Shell you need to have an Atlas Shell project imported into the workspace or installed into Eclipse as a plugin. A typical setup is to have the Shell project imported into the workspace. We provide a starter Shell project for you that can be used in this tutorial as well as your own projects! For more details see the Starter Toolbox Github repository at https://github.com/EnSoftCorp/Starter-Toolbox.

On your command line change your current directory to the git folder we made in the Installing Atlas section. Next, clone a copy of the repository by running the following command on your command line.

cd <my_path>/Atlas/git
git clone https://github.com/EnSoftCorp/Starter-Toolbox.git

If you need to install Git on your system visit http://git-scm.com/downloads. Alternatively you could download a zip file of the latest StarterToolbox repository archive here https://github.com/EnSoftCorp/Starter-Toolbox/archive/master.zip.

The starter Atlas Shell project has a project you just downloaded has dependency on a Toolbox project (which we will discuss more in the next section). For this tutorial import both the Shell project (toolbox.shell) and the Toolbox project (toolbox.analysis) into the workspace.

Import the Atlas Shell and Toolbox projects into the workspace by navigating to File > Import > General > Existing Projects into Workspace and browsing to the folder containing the toolbox.shell and toolbox.analysis projects. If the projects are in a zip archive, you will want to check the Select archive file radio button, otherwise check the Select root directory radio button. Click Finish to import the projects into the workspace.

Step 2) Configure shellInit.scala

TODO

Step 3) Index Workspace

TODO

Step 4) Refresh Shell

TODO

Step 5) Running Queries

TODO

Tips and Tricks

TODO


← Indexing Workspace | Learning Atlas | Toolbox Projects →