Skip to content

Experience in Installation of the Spartan Refactoring Plugin

OriRoth edited this page Jun 30, 2017 · 3 revisions

Spartanizer

After installing the Spartan Refactoring plugin, you should be able to see a marker on the following code:

public class C {
	boolean are13(int a, int b) {
		String i = new Integer(a + b).toString();
		return i.equals("13");
	}
}

Like so:

[TODO: insert picture with the code above and marker]

If you cannot see the marker, try enabling the Spartanizer on the current project by clicking ctrl+4 or enabling all tippers by right clicking project then Refactor -> Spartanization preferences -> Select all -> OK.

Applying the tip [TODO: insert link to appropriate wiki] should result in:

public class C {
	boolean are13(int a, int b) {
		return "13".equals(Integer.valueOf(a + b) + "");
	}
}

Athenizer

Now we will demonstrate the usage of the zoom-by-wheel feature of the Athenizer, in order to validate the plugin. First, check the zooming is active (zooming button is toggled):

[TODO: enter picture of toolbar with zooming toggled]

Next, try zooming the following code snippet:

public class C {
	int f(int a, int b) {
		return f(f(f(2, 6) + 1, 5), 8);
	}
}

By pressing ctrl + mouse wheel, you should be able to navigate between the packed layout of the code (above) and the unpacked one:

public class C {
	int f(int a, int b) {
		int i1;
		int i2;
		int i3;
		int i4;
		i4 = f(2, 6);
		i3 = i4 + 1;
		i2 = f(i3, 5);
		i1 = f(i2, 8);
		return i1;
	}
}

Widget

[TODO: demonstrate the widget]

Clone this wiki locally