Commit 08034aa0 authored by František Haas's avatar František Haas

added eclipse formatter, importorder and cleanup profile

parent 54ef2e8d
eclipse.preferences.version=1
encoding/<project>=UTF-8
eclipse.preferences.version=1
line.separator=\n
This diff is collapsed.
cleanup.add_default_serial_version_id=true
cleanup.add_generated_serial_version_id=false
cleanup.add_missing_annotations=true
cleanup.add_missing_deprecated_annotations=true
cleanup.add_missing_methods=false
cleanup.add_missing_nls_tags=false
cleanup.add_missing_override_annotations=true
cleanup.add_missing_override_annotations_interface_methods=true
cleanup.add_serial_version_id=false
cleanup.always_use_blocks=true
cleanup.always_use_parentheses_in_expressions=false
cleanup.always_use_this_for_non_static_field_access=false
cleanup.always_use_this_for_non_static_method_access=false
cleanup.convert_to_enhanced_for_loop=false
cleanup.correct_indentation=true
cleanup.format_source_code=true
cleanup.format_source_code_changes_only=false
cleanup.make_local_variable_final=true
cleanup.make_parameters_final=false
cleanup.make_private_fields_final=true
cleanup.make_type_abstract_if_missing_method=false
cleanup.make_variable_declarations_final=false
cleanup.never_use_blocks=false
cleanup.never_use_parentheses_in_expressions=true
cleanup.organize_imports=true
cleanup.qualify_static_field_accesses_with_declaring_class=false
cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
cleanup.qualify_static_member_accesses_with_declaring_class=false
cleanup.qualify_static_method_accesses_with_declaring_class=false
cleanup.remove_private_constructors=true
cleanup.remove_trailing_whitespaces=true
cleanup.remove_trailing_whitespaces_all=true
cleanup.remove_trailing_whitespaces_ignore_empty=false
cleanup.remove_unnecessary_casts=false
cleanup.remove_unnecessary_nls_tags=false
cleanup.remove_unused_imports=true
cleanup.remove_unused_local_variables=false
cleanup.remove_unused_private_fields=true
cleanup.remove_unused_private_members=false
cleanup.remove_unused_private_methods=true
cleanup.remove_unused_private_types=true
cleanup.sort_members=false
cleanup.sort_members_all=false
cleanup.use_blocks=true
cleanup.use_blocks_only_for_return_and_throw=false
cleanup.use_parentheses_in_expressions=false
cleanup.use_this_for_non_static_field_access=false
cleanup.use_this_for_non_static_field_access_only_if_necessary=true
cleanup.use_this_for_non_static_method_access=false
cleanup.use_this_for_non_static_method_access_only_if_necessary=true
cleanup_profile=_DiSLcleanup
cleanup_settings_version=2
eclipse.preferences.version=1
editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
formatter_profile=_DiSLformatter
formatter_settings_version=12
org.eclipse.jdt.ui.ignorelowercasenames=true
org.eclipse.jdt.ui.importorder=java;javax;org;com;
org.eclipse.jdt.ui.ondemandthreshold=99
org.eclipse.jdt.ui.staticondemandthreshold=99
sp_cleanup.add_default_serial_version_id=true
sp_cleanup.add_generated_serial_version_id=false
sp_cleanup.add_missing_annotations=true
sp_cleanup.add_missing_deprecated_annotations=true
sp_cleanup.add_missing_methods=false
sp_cleanup.add_missing_nls_tags=false
sp_cleanup.add_missing_override_annotations=true
sp_cleanup.add_missing_override_annotations_interface_methods=true
sp_cleanup.add_serial_version_id=false
sp_cleanup.always_use_blocks=true
sp_cleanup.always_use_parentheses_in_expressions=false
sp_cleanup.always_use_this_for_non_static_field_access=false
sp_cleanup.always_use_this_for_non_static_method_access=false
sp_cleanup.convert_to_enhanced_for_loop=false
sp_cleanup.correct_indentation=false
sp_cleanup.format_source_code=true
sp_cleanup.format_source_code_changes_only=false
sp_cleanup.make_local_variable_final=false
sp_cleanup.make_parameters_final=false
sp_cleanup.make_private_fields_final=true
sp_cleanup.make_type_abstract_if_missing_method=false
sp_cleanup.make_variable_declarations_final=true
sp_cleanup.never_use_blocks=false
sp_cleanup.never_use_parentheses_in_expressions=true
sp_cleanup.on_save_use_additional_actions=false
sp_cleanup.organize_imports=true
sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
sp_cleanup.remove_private_constructors=true
sp_cleanup.remove_trailing_whitespaces=false
sp_cleanup.remove_trailing_whitespaces_all=true
sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
sp_cleanup.remove_unnecessary_casts=true
sp_cleanup.remove_unnecessary_nls_tags=false
sp_cleanup.remove_unused_imports=false
sp_cleanup.remove_unused_local_variables=false
sp_cleanup.remove_unused_private_fields=true
sp_cleanup.remove_unused_private_members=false
sp_cleanup.remove_unused_private_methods=true
sp_cleanup.remove_unused_private_types=true
sp_cleanup.sort_members=false
sp_cleanup.sort_members_all=false
sp_cleanup.use_blocks=false
sp_cleanup.use_blocks_only_for_return_and_throw=false
sp_cleanup.use_parentheses_in_expressions=false
sp_cleanup.use_this_for_non_static_field_access=false
sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
sp_cleanup.use_this_for_non_static_method_access=false
sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<profiles version="2">
<profile kind="CleanUpProfile" name="DiSLcleanup" version="2">
<setting id="cleanup.remove_unused_private_fields" value="true"/>
<setting id="cleanup.always_use_parentheses_in_expressions" value="false"/>
<setting id="cleanup.never_use_blocks" value="false"/>
<setting id="cleanup.add_missing_deprecated_annotations" value="true"/>
<setting id="cleanup.remove_unused_private_methods" value="true"/>
<setting id="cleanup.convert_to_enhanced_for_loop" value="false"/>
<setting id="cleanup.remove_unnecessary_nls_tags" value="false"/>
<setting id="cleanup.sort_members" value="false"/>
<setting id="cleanup.remove_unused_local_variables" value="false"/>
<setting id="cleanup.remove_unused_private_members" value="false"/>
<setting id="cleanup.never_use_parentheses_in_expressions" value="true"/>
<setting id="cleanup.remove_unnecessary_casts" value="false"/>
<setting id="cleanup.make_parameters_final" value="false"/>
<setting id="cleanup.use_this_for_non_static_field_access" value="false"/>
<setting id="cleanup.use_blocks" value="true"/>
<setting id="cleanup.remove_private_constructors" value="true"/>
<setting id="cleanup.always_use_this_for_non_static_method_access" value="false"/>
<setting id="cleanup.remove_trailing_whitespaces_all" value="true"/>
<setting id="cleanup.always_use_this_for_non_static_field_access" value="false"/>
<setting id="cleanup.use_this_for_non_static_field_access_only_if_necessary" value="true"/>
<setting id="cleanup.add_default_serial_version_id" value="true"/>
<setting id="cleanup.make_type_abstract_if_missing_method" value="false"/>
<setting id="cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class" value="true"/>
<setting id="cleanup.make_variable_declarations_final" value="false"/>
<setting id="cleanup.add_missing_nls_tags" value="false"/>
<setting id="cleanup.format_source_code" value="true"/>
<setting id="cleanup.add_missing_override_annotations" value="true"/>
<setting id="cleanup.qualify_static_method_accesses_with_declaring_class" value="false"/>
<setting id="cleanup.remove_unused_private_types" value="true"/>
<setting id="cleanup.make_local_variable_final" value="true"/>
<setting id="cleanup.add_missing_methods" value="false"/>
<setting id="cleanup.add_missing_override_annotations_interface_methods" value="true"/>
<setting id="cleanup.correct_indentation" value="true"/>
<setting id="cleanup.remove_unused_imports" value="true"/>
<setting id="cleanup.remove_trailing_whitespaces_ignore_empty" value="false"/>
<setting id="cleanup.make_private_fields_final" value="true"/>
<setting id="cleanup.add_generated_serial_version_id" value="false"/>
<setting id="cleanup.organize_imports" value="true"/>
<setting id="cleanup.sort_members_all" value="false"/>
<setting id="cleanup.remove_trailing_whitespaces" value="true"/>
<setting id="cleanup.use_blocks_only_for_return_and_throw" value="false"/>
<setting id="cleanup.use_parentheses_in_expressions" value="false"/>
<setting id="cleanup.add_missing_annotations" value="true"/>
<setting id="cleanup.qualify_static_field_accesses_with_declaring_class" value="false"/>
<setting id="cleanup.use_this_for_non_static_method_access_only_if_necessary" value="true"/>
<setting id="cleanup.use_this_for_non_static_method_access" value="false"/>
<setting id="cleanup.qualify_static_member_accesses_through_instances_with_declaring_class" value="true"/>
<setting id="cleanup.add_serial_version_id" value="false"/>
<setting id="cleanup.always_use_blocks" value="true"/>
<setting id="cleanup.qualify_static_member_accesses_with_declaring_class" value="false"/>
<setting id="cleanup.format_source_code_changes_only" value="false"/>
</profile>
</profiles>
This diff is collapsed.
#Organize Import Order
#Tue May 08 10:03:40 CEST 2012
3=com
2=org
1=javax
0=java
package ch.usi.dag.disl.test2.suite.after.app;
public class TargetClass {
public void print(boolean flag) {
try {
System.out.println("app: TargetClass.print(..) - try:begin");
if (flag) {
String float_one = "1.0";
int int_one = Integer.valueOf(float_one);
System.out.println("app: UNREACHABLE " + int_one);
}
public void print(boolean flag) {
try {
System.out.println("app: TargetClass.print(..) - try:begin");
System.out.println("app: TargetClass.print(..) - try:end");
} finally {
System.out.println("app: TargetClass.print(..) - finally");
}
}
// FIXME
// this main breaks the test on class not found exception of this class
/*
public static void main(String[] args) {
try {
TargetClass t = new TargetClass();
System.out.println("app: TargetClass.main(..) - .print(false)");
t.print(false);
System.out.println("app: TargetClass.main(..) - .print(true)");
t.print(true);
} catch (Throwable e) {
System.out.println("app: TargetClass.main(..) - catch");
}
}*/
public static void main(String[] args) {
TargetClass t = new TargetClass();
System.out.println("app: TargetClass.main(..) - .print(false)");
t.print(false);
System.out.println("app: TargetClass.main(..) - .print(true)");
t.print(true);
}
if (flag) {
String float_one = "1.0";
Integer int_one = Integer.valueOf(float_one);
System.out.println("app: UNREACHABLE " + int_one);
}
System.out.println("app: TargetClass.print(..) - try:end");
} finally {
System.out.println("app: TargetClass.print(..) - finally");
}
}
// FIXME
// this main breaks the test on class not found exception of this class
/*
* public static void main(String[] args) { try { TargetClass t = new
* TargetClass();
* System.out.println("app: TargetClass.main(..) - .print(false)");
* t.print(false);
* System.out.println("app: TargetClass.main(..) - .print(true)");
* t.print(true); } catch (Throwable e) {
* System.out.println("app: TargetClass.main(..) - catch"); } }
*/
public static void main(String[] args) {
TargetClass t = new TargetClass();
System.out.println("app: TargetClass.main(..) - .print(false)");
t.print(false);
System.out.println("app: TargetClass.main(..) - .print(true)");
t.print(true);
}
}
......@@ -5,14 +5,14 @@ import ch.usi.dag.disl.annotation.AfterThrowing;
import ch.usi.dag.disl.marker.BodyMarker;
public class DiSLClass {
@After(marker = BodyMarker.class, scope = "TargetClass.print(boolean)", order = 0)
public static void after() {
System.out.println("disl: after");
}
@AfterThrowing(marker = BodyMarker.class, scope = "TargetClass.print(boolean)", order = 1)
public static void afterThrowning() {
System.out.println("disl: afterThrowning");
}
@After(marker = BodyMarker.class, scope = "TargetClass.print(boolean)", order = 0)
public static void after() {
System.out.println("disl: after");
}
@AfterThrowing(marker = BodyMarker.class, scope = "TargetClass.print(boolean)", order = 1)
public static void afterThrowning() {
System.out.println("disl: afterThrowning");
}
}
......@@ -7,34 +7,35 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import ch.usi.dag.disl.test2.utils.*;
import ch.usi.dag.disl.test2.utils.ClientServerRunner;
@RunWith(JUnit4.class)
public class AfterTest {
ClientServerRunner r = new ClientServerRunner(this.getClass());
@Test
public void test()
throws Exception {
// FIXME
fail("FIXME");
// see app TargetClass
r.start();
r.waitFor();
r.assertIsFinished();
if(Boolean.parseBoolean(System.getProperty("disl.test.verbose"))) { r.destroyIfRunningAndFlushOutputs(); }
//r.assertIsSuccessfull();
r.assertClientOut("client.out.resource");
//r.assertClientErrNull();
r.assertServerOutNull();
r.assertServerErrNull();
}
@After
public void cleanup() {
r.destroy();
}
}
ClientServerRunner r = new ClientServerRunner(this.getClass());
@Test
public void test(int i)
throws Exception {
// FIXME
fail("FIXME");
// see app TargetClass
r.start();
r.waitFor();
r.assertIsFinished();
if (Boolean.parseBoolean(System.getProperty("disl.test.verbose"))) {
r.destroyIfRunningAndFlushOutputs();
}
// r.assertIsSuccessfull();
r.assertClientOut("client.out.resource");
// r.assertClientErrNull();
r.assertServerOutNull();
r.assertServerErrNull();
}
@After
public void cleanup() {
r.destroy();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment