mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-04 23:55:58 +01:00
Merge pull request #479 from Fishbowler/doc_updates
Various doc additions
This commit is contained in:
commit
b3e1082c09
5 changed files with 79 additions and 20 deletions
|
@ -48,3 +48,16 @@ git clone git@github.com:igniterealtime/Smack.git
|
|||
cd Smack
|
||||
gradle assemble
|
||||
```
|
||||
|
||||
IDE Config
|
||||
----------
|
||||
|
||||
### Eclipse
|
||||
|
||||
Import IDE settings from `./resources/eclipse/` to configure proper ordering of imports and correct formatting that should pass the CheckStyle rules.
|
||||
|
||||
### IntelliJ IDEA
|
||||
|
||||
Import Java Code Style settings from `./resources/intellij/smack_formatter.xml` to configure import optimisation and code formatting to pass the CheckStyle rules when building or submitting PRs.
|
||||
|
||||
_We've noticed, at time of writing, that IntelliJ often requires a restart when applying new rules - no amount of OK/Apply will do the trick._
|
||||
|
|
|
@ -162,6 +162,19 @@ The test methods can declare as many parameters as they need to, but every param
|
|||
The framework will automatically create, register and login the connections.
|
||||
After the test is finished, the connections will be unregistered with the XMPP service and terminated.
|
||||
|
||||
Debugging Integration Tests
|
||||
------------------------------
|
||||
|
||||
A test, like any other code, may not be perfect on the first attempt, and you may require more information in order to ascertain quite what's wrong.
|
||||
|
||||
### Smack Debugger options
|
||||
|
||||
As listed in the main Smack [Debugging](../debugging.md) doc, there are two built-in debuggers that could surface you more information. Using the 'enhanced' debugger config option listed above, you'll get the Smack Debug Window launching when your tests launch, and you'll get a stanza-by-stanza account of what happened on each connection, hopefully enough to diagnose what went wrong.
|
||||
|
||||
### Debugging in the IDE
|
||||
|
||||
If the output isn't enough, you may need to debug and inspect running code within the IDE. Depending on the IDE, in order to get execution to pause at your breakpoints, you may need to switch your configuration. Instead of running `gradle integrationTest`, instead run the `SmackIntegrationTestFramework` class directly with the same command-line options.
|
||||
|
||||
Running your own integration tests
|
||||
----------------------------------
|
||||
|
||||
|
|
|
@ -472,7 +472,7 @@ muc = manager.getMultiUserChat("myroom@conference.jabber.org");
|
|||
muc.create("testbot");
|
||||
// User1 (which is the room owner) configures the room as a moderated room
|
||||
Form form = muc.getConfigurationForm();
|
||||
Form answerForm = form.createAnswerForm();
|
||||
FillableForm answerForm = configForm.getFillableForm();
|
||||
answerForm.setAnswer("muc#roomconfig_moderatedroom", "1");
|
||||
muc.sendConfigurationForm(answerForm);
|
||||
|
||||
|
@ -612,7 +612,7 @@ muc = manager.getMultiUserChat("myroom@conference.jabber.org");
|
|||
muc.create("testbot");
|
||||
// User1 (which is the room owner) configures the room as a moderated room
|
||||
Form form = muc.getConfigurationForm();
|
||||
Form answerForm = form.createAnswerForm();
|
||||
FillableForm answerForm = configForm.getFillableForm();
|
||||
answerForm.setAnswer("muc#roomconfig_moderatedroom", "1");
|
||||
muc.sendConfigurationForm(answerForm);
|
||||
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
<code_scheme name="Smack" version="173">
|
||||
<JavaCodeStyleSettings>
|
||||
<option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="10000" />
|
||||
<option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="1000" />
|
||||
<option name="IMPORT_LAYOUT_TABLE">
|
||||
<value>
|
||||
<package name="" withSubpackages="true" static="true" />
|
||||
<emptyLine />
|
||||
<package name="java" withSubpackages="true" static="false" />
|
||||
<package name="javax" withSubpackages="true" static="false" />
|
||||
<emptyLine />
|
||||
<package name="org.jivesoftware" withSubpackages="true" static="false" />
|
||||
<emptyLine />
|
||||
<package name="" withSubpackages="true" static="false" />
|
||||
</value>
|
||||
</option>
|
||||
</JavaCodeStyleSettings>
|
||||
</code_scheme>
|
51
resources/intellij/smack_formatter.xml
Normal file
51
resources/intellij/smack_formatter.xml
Normal file
|
@ -0,0 +1,51 @@
|
|||
<code_scheme name="Project" version="173">
|
||||
<option name="FORMATTER_TAGS_ENABLED" value="true" />
|
||||
<JavaCodeStyleSettings>
|
||||
<option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="99" />
|
||||
<option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="99" />
|
||||
<option name="IMPORT_LAYOUT_TABLE">
|
||||
<value>
|
||||
<package name="" withSubpackages="true" static="true" />
|
||||
<emptyLine />
|
||||
<package name="java" withSubpackages="true" static="false" />
|
||||
<package name="javax" withSubpackages="true" static="false" />
|
||||
<emptyLine />
|
||||
<package name="org.jivesoftware.smack" withSubpackages="true" static="false" />
|
||||
<package name="org.jivesoftware.smackx" withSubpackages="true" static="false" />
|
||||
<emptyLine />
|
||||
<package name="" withSubpackages="true" static="false" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="JD_KEEP_EMPTY_LINES" value="false" />
|
||||
</JavaCodeStyleSettings>
|
||||
<codeStyleSettings language="JAVA">
|
||||
<option name="KEEP_LINE_BREAKS" value="false" />
|
||||
<option name="KEEP_FIRST_COLUMN_COMMENT" value="false" />
|
||||
<option name="KEEP_CONTROL_STATEMENT_IN_ONE_LINE" value="false" />
|
||||
<option name="KEEP_BLANK_LINES_IN_DECLARATIONS" value="1" />
|
||||
<option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
|
||||
<option name="KEEP_BLANK_LINES_BEFORE_RBRACE" value="1" />
|
||||
<option name="INDENT_CASE_FROM_SWITCH" value="false" />
|
||||
<option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
|
||||
<option name="ALIGN_MULTILINE_RESOURCES" value="false" />
|
||||
<option name="SPACE_WITHIN_ARRAY_INITIALIZER_BRACES" value="true" />
|
||||
<option name="SPACE_BEFORE_ARRAY_INITIALIZER_LBRACE" value="true" />
|
||||
<option name="CALL_PARAMETERS_WRAP" value="1" />
|
||||
<option name="METHOD_PARAMETERS_WRAP" value="1" />
|
||||
<option name="RESOURCE_LIST_WRAP" value="5" />
|
||||
<option name="EXTENDS_LIST_WRAP" value="1" />
|
||||
<option name="THROWS_LIST_WRAP" value="1" />
|
||||
<option name="EXTENDS_KEYWORD_WRAP" value="1" />
|
||||
<option name="THROWS_KEYWORD_WRAP" value="1" />
|
||||
<option name="BINARY_OPERATION_WRAP" value="1" />
|
||||
<option name="BINARY_OPERATION_SIGN_ON_NEXT_LINE" value="true" />
|
||||
<option name="TERNARY_OPERATION_WRAP" value="5" />
|
||||
<option name="ARRAY_INITIALIZER_WRAP" value="1" />
|
||||
<option name="METHOD_ANNOTATION_WRAP" value="0" />
|
||||
<option name="CLASS_ANNOTATION_WRAP" value="0" />
|
||||
<option name="FIELD_ANNOTATION_WRAP" value="0" />
|
||||
<indentOptions>
|
||||
<option name="CONTINUATION_INDENT_SIZE" value="16" />
|
||||
</indentOptions>
|
||||
</codeStyleSettings>
|
||||
</code_scheme>
|
Loading…
Reference in a new issue