Skip to content

Installation Instructions

tomerdragucki edited this page Jul 2, 2017 · 52 revisions

Install Me:

Before installing, check whether you have an older version of the plugin installed on your Eclipse (Eclipse Marketplace installation): go to the main menu and choose Help->Installation Details, search for the Spartan Refactoring plugin, if it appears there, uninstall it. Then restart Eclipse.

If you have already installed the plugin from a jar file in the past, go to eclipse/dropins folder, delete the spartanizer jar file, and restart Eclipse.

[comment]: <>(##Installing from the Eclipse MarketPlace) [comment]: <>(This is the recommended way to install the plugin.) [comment]: <>( - Installation button (drag to your eclipse workspace) Drag to your running Eclipse workspace to install Spartan Refactoring) [comment]: <>(- Just Drag&Drop to your eclipse IDE and follow the instructions that will pop) [comment]: <>(- For more info, see the plugin's [page](https://www.google.co.il/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0ahUKEwj7p7iPwL7PAhUrI8AKHW87AVsQFggaMAA&url=https%3A%2F%2Fmarketplace.eclipse.org%2Fcontent%2Fspartan-refactoring-0&usg=AFQjCNFaOBCLW8-CKYYnfLFCjakdWM1qjA&sig2=Z1zbbkq96-iECkhmMf5Qcw&bvm=bv.134495766,d.ZGg\) on eclipse marketplace))

Installing from a jar:

This is the recomended way to download the plugin.

  1. Download the jar file from the latest Release. Make sure to download a release called either Version, spartanazier or athenizer, and not a different release (such as SpartanizerJ or the desktop application).
  2. If your Eclipse is open, close it.
  3. Put the jar file in eclipse/dropins folder.
  4. Start Eclipse.

Your toolbar should have the following 4 buttons marked in red: 2.png

  • In order to find the dropins folder in macOS- right click on Eclipse logo (in Finder, Applications folder) and choose show package contents. Then go to Contents->Eclipse->dropins
  • Note that installing the plugin might slow down your IDE
  • After the installation, the spartanizer menu should be added next to the refactor menu, and a few new buttons will appear on the toolbar.

Compiling from source (i.e, as a developer)

Preconditions to installation

This installation method is for new developers in our project.

Before we clone and import the project, we'd like to set the required environment for plugin development:

  • It is assumed you have git installed on your machine

  • In Eclipse, go to Help->Install new software and under Work with: choose The Eclipse Project Updates

    Then install everything in the categories:

    • Eclipse Platform
    • Eclipse Platform SDK
    • Eclipse Java Development Tools
    • Eclipse Plugin Development Tools This part might take a few minutes
  • You are required to have the updated version of the Eclipse gradle plugin. To download go to: Help -> Install new software -> add -> Name=Gradle, Location=http://download.eclipse.org/buildship/updates/e46/releases/2.x then choose "Buildship: eclipse plugins for Gradle" and Finish.

Under Help->Installation Details make sure you have:

  • Eclipse Platform SDK and Eclipse SDK- version 4.6.2 or higher
  • Buildship: Eclipse Plug-ins for Gradle- version 2.0.2 or higher
  • Eclipse Java Development Tools- version 3.12.3 or higher
  • Eclipse PDE Plug-in Developer Resources- version 3.12.3 or higher

If not, choose Update... or look for them again in the New software section in case they don't appear here

Now we can finally import the project to Eclipse!

importing directly from eclipse

The import process assumes you don't have the project resources in Eclipse or on the file system. If you do, please delete them before starting the process.

Go to File->Import... and choose Git->Projects from Git then choose clone URI.

As the URI insert: https://github.com/SpartanRefactoring/Main.git

In the Branch Selection window choose the HEAD (currently the HEAD is mazter)

When selecting a wizard choose: Import existing Eclipse projects

In Import Projects window: uncheck the fluent.ly project (the first one), and keep the rest of the projects checked - you should have 9 checked projects. Then press Finish and the Gradle build will start - this stage might take around 20-30 minutes.

If the build has failed, you may try to right click in the project in the Project Explorer and choose Gradle->Refresh Gradle Project and also in the main menu Project->Clean... and choose to clean all projects.

importing from source code/an existing clone

First, clone the project from this repository or download the desired sources from our releases page.

Once you have the desired code downloaded, open eclipse and choose file->import. In the new window pick Gradle->Existing Gradle Project and click next. If gradle doesn't show up in the list, go back and make sure gradle is properly installed. In the next window, click browse and choose the Main directory of the code. Make sure to choose the upper most directory created by the clone/present in the source code called Main. Click on finish and wait until the project is imported. This proccess may take a few minutes as a lot of dependencies have to be downloaded by the project.

After the project is imported

When the Gradle build is done, you'll see some errors. In order for them to disappear close the il.org.spartan.intellij-spartanizer and il.org.spartan.intellij-spartanizer.test projects.

If some changes were made to files as a result of the gradle build, replace them with the HEAD version. You can see changes made to files by going to: Window->Show View->Other...->Git->Git Staging and there you can right click on a file and choose to replace with HEAD revision.

Now, in order to run the plugin:

In the package explorer, go to SpartanizerPlugin->plugin->Launch-Configurations, right click Eclipse Application.launch and choose Run As->Eclipse Application.

A new eclipse window will be opened and this is where you can debug the current version of the plugin.

In order to export the plugin to a JAR file: Go to File -> Export.... Under the Plug-in Development category, choose the Deployable plug-ins and fragments, and continue until the plug-in has been built successfully.

In Order to Use the Joystick

For mac

  1. Download Enjoyable from here

  2. Create a text file on your computer containing this, name it plugin.enjoyable

  3. Open Enjoyable while the Joystick is plugged in and choose from the menu : Mappings -> Import

  4. Import the plugin.enjoyable

  5. Press the right arrow on the main screen

For Linux

  1. Download and follow the instructions here

  2. Configure Qjoypad to support the following shortcuts:

  • ctrl - Back Button
  • Scroll Up\Down - Joystick Back\Forward
  • keys 8 \ 9 - Joystick Right\Left

Good Luck 😄

Clone this wiki locally