Skip to content

Commit

Permalink
Fixed minor display glitches
Browse files Browse the repository at this point in the history
  • Loading branch information
DanNegrea committed Jun 18, 2018
1 parent d03a74f commit cd1ba48
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
3 changes: 1 addition & 2 deletions src/tokenJar/GettingStartedDialog.form
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@
<Component class="javax.swing.JTextPane" name="jTextPane1">
<Properties>
<Property name="contentType" type="java.lang.String" value="text/html" noResource="true"/>
<Property name="text" type="java.lang.String" value="&lt;html&gt;&#xa;&lt;h3&gt;Useful for ...&lt;/h3&gt;&#xa;extracting tokens from responses and embedding them in requests. Further proccessing is posible through javascript code.&#xa;&lt;br/&gt;&lt;br/&gt;&#xa;&#xa;&lt;h3&gt;Configure: Start from right to left by ...&lt;/h3&gt;&#xa;&#xa;&lt;b&gt;I. Extracting the token value&lt;/b&gt;&lt;br/&gt;&#xa;&lt;b&gt;Path&lt;/b&gt;- a URL that limits the location from where the token is extracted (reponse)&lt;br/&gt;&#xa;&lt;b&gt;Regex&lt;/b&gt;- expression that identifies the desired value. Must have at least one matching group.&lt;br/&gt;&#xa;&lt;b&gt;Eval&lt;/b&gt;- javascript code for transforming the value. grp[1], grp[2], ... return the matched group 1, 2, ...&lt;br/&gt;&#xa;&lt;br/&gt;&#xa;&#xa;&lt;b&gt;II. Storing the token&lt;/b&gt;&lt;br/&gt;&#xa;&lt;b&gt;Value&lt;/b&gt; - an optional initial value for the first run&lt;br/&gt;&#xa;&lt;br/&gt;&#xa;&#xa;&lt;b&gt;III. Apply the token&lt;/b&gt;&lt;br/&gt;&#xa;&lt;b&gt;Name&lt;/b&gt;- token name as it appears in request&lt;br/&gt;&#xa;&lt;b&gt;header, url, body, ...&lt;/b&gt;- token position in request. Multiple choises are possible.&lt;br/&gt;&#xa;&lt;i&gt;header&lt;/i&gt; - a custom header contains the token. Token name is without colon &quot;:&quot; &lt;br/&gt;&#xa;&lt;i&gt;url&lt;/i&gt; - the URL query contains the token as parameter &lt;br/&gt;&#xa;&lt;i&gt;body&lt;/i&gt; - the token is an usual POST parameter &lt;br/&gt;&#xa;&lt;i&gt;cookie&lt;/i&gt; - one of the cookies contains the token &lt;br/&gt;&#xa;&lt;i&gt;other&lt;/i&gt; - for tokens inside json, xml, xml attribute, multi-part attribute &lt;br/&gt;&#xa;&#xa;&lt;h3&gt;Debug: When further help is required ...&lt;/h3&gt;&#xa;enable the debugging. Run the request once again through TokenJar and consult the Output window (Extender &gt;Extensions &gt;select TokenJar &gt;Output).&#xa;Information about the request / response is listed: &lt;br/&gt;&#xa;&lt;i&gt;&lt;b&gt;Request:&lt;/b&gt;&lt;/i&gt;&lt;br/&gt;&#xa;&lt;i&gt;parameters&lt;/i&gt; - name and type. Case sensitivity matters! &lt;br/&gt;&#xa;&lt;i&gt;headers&lt;/i&gt; - name and current value &lt;br/&gt;&#xa;&lt;i&gt;tokens&lt;/i&gt; - that have been processed &lt;br/&gt;&#xa;&lt;i&gt;request&lt;/i&gt; - full final request (after processing was done) &lt;br/&gt;&#xa;&lt;i&gt;&lt;b&gt;Request:&lt;/b&gt;&lt;/i&gt;&lt;br/&gt;&#xa;&lt;i&gt;path&lt;/i&gt; - the processed URL&lt;br/&gt;&#xa;&lt;i&gt;regex&lt;/i&gt; - the expression that matched&lt;br/&gt;&#xa;&lt;i&gt;groups&lt;/i&gt; - the values captured in each group &lt;br/&gt;&#xa;&#xa;&lt;h3&gt;Tips: For making your job easy ...&lt;/h3&gt;&#xa;- use the Regex button to test your reqular expression. &lt;br/&gt;&#xa;- enable all token locations (header, url, body, ..) if not sure what to use and when this does not matter. &lt;br/&gt;&#xa;It matters only when multiple parameters have the same name. Still the performance might be impacted.&lt;br/&gt;&#xa;&lt;/html&gt;&#xa;"/>
<Property name="caretPosition" type="int" value="0"/>
<Property name="text" type="java.lang.String" value="&lt;html&gt;&#xa;&lt;h3&gt;Useful for ...&lt;/h3&gt;&#xa;extracting tokens from responses and embedding them in requests. Further proccessing is posible through javascript code.&#xa;&lt;br/&gt;&lt;br/&gt;&#xa;&#xa;&lt;h3&gt;Configure: Start from right to left by ...&lt;/h3&gt;&#xa;&#xa;&lt;b&gt;I. Extracting the token value&lt;/b&gt;&lt;br/&gt;&#xa;&lt;b&gt;Path&lt;/b&gt;- a URL that limits the location from where the token is extracted (reponse)&lt;br/&gt;&#xa;&lt;b&gt;Regex&lt;/b&gt;- expression that identifies the desired value. Must have at least one matching group.&lt;br/&gt;&#xa;&lt;b&gt;Eval&lt;/b&gt;- javascript code for transforming the value. grp[1], grp[2], ... return the matched group 1, 2, ...&lt;br/&gt;&#xa;&lt;br/&gt;&#xa;&#xa;&lt;b&gt;II. Storing the token&lt;/b&gt;&lt;br/&gt;&#xa;&lt;b&gt;Value&lt;/b&gt; - an optional initial value for the first run&lt;br/&gt;&#xa;&lt;br/&gt;&#xa;&#xa;&lt;b&gt;III. Apply the token&lt;/b&gt;&lt;br/&gt;&#xa;&lt;b&gt;Name&lt;/b&gt;- token name as it appears in request&lt;br/&gt;&#xa;&lt;b&gt;header, url, body, ...&lt;/b&gt;- token position in request. Multiple choises are possible.&lt;br/&gt;&#xa;&lt;i&gt;header&lt;/i&gt; - a custom header contains the token. Token name is without colon &quot;:&quot; &lt;br/&gt;&#xa;&lt;i&gt;url&lt;/i&gt; - the URL query contains the token as parameter &lt;br/&gt;&#xa;&lt;i&gt;body&lt;/i&gt; - the token is an usual POST parameter &lt;br/&gt;&#xa;&lt;i&gt;cookie&lt;/i&gt; - one of the cookies contains the token &lt;br/&gt;&#xa;&lt;i&gt;other&lt;/i&gt; - for tokens inside json, xml, xml attribute, multi-part attribute &lt;br/&gt;&#xa;&#xa;&lt;h3&gt;Debug: When further help is required ...&lt;/h3&gt;&#xa;enable the debugging. Run the request once again through TokenJar and consult the Output window (Extender &gt;Extensions &gt;select TokenJar &gt;Output).&#xa;Information about the request / response is listed: &lt;br/&gt;&#xa;&lt;i&gt;&lt;b&gt;Request:&lt;/b&gt;&lt;/i&gt;&lt;br/&gt;&#xa;&lt;i&gt;parameters&lt;/i&gt; - name and type. Case sensitivity matters! &lt;br/&gt;&#xa;&lt;i&gt;headers&lt;/i&gt; - name and current value &lt;br/&gt;&#xa;&lt;i&gt;tokens&lt;/i&gt; - that have been processed &lt;br/&gt;&#xa;&lt;i&gt;request&lt;/i&gt; - full final request (after processing was done) &lt;br/&gt;&#xa;&lt;i&gt;&lt;b&gt;Response:&lt;/b&gt;&lt;/i&gt;&lt;br/&gt;&#xa;&lt;i&gt;path&lt;/i&gt; - the processed URL&lt;br/&gt;&#xa;&lt;i&gt;regex&lt;/i&gt; - the expression that matched&lt;br/&gt;&#xa;&lt;i&gt;groups&lt;/i&gt; - the values captured in each group &lt;br/&gt;&#xa;&#xa;&lt;h3&gt;Tips: For making your job easy ...&lt;/h3&gt;&#xa;- use the Regex button to test your reqular expression. &lt;br/&gt;&#xa;- enable all token locations (header, url, body, ..) if not sure what to use and when this does not matter. &lt;br/&gt;&#xa;It matters only when multiple parameters have the same name. Still the performance might be impacted.&lt;br/&gt;&#xa;&lt;/html&gt;&#xa;"/>
</Properties>
</Component>
</SubComponents>
Expand Down
3 changes: 1 addition & 2 deletions src/tokenJar/GettingStartedDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@ private void initComponents() {
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

jTextPane1.setContentType("text/html"); // NOI18N
jTextPane1.setText("<html>\n<h3>Useful for ...</h3>\nextracting tokens from responses and embedding them in requests. Further proccessing is posible through javascript code.\n<br/><br/>\n\n<h3>Configure: Start from right to left by ...</h3>\n\n<b>I. Extracting the token value</b><br/>\n<b>Path</b>- a URL that limits the location from where the token is extracted (reponse)<br/>\n<b>Regex</b>- expression that identifies the desired value. Must have at least one matching group.<br/>\n<b>Eval</b>- javascript code for transforming the value. grp[1], grp[2], ... return the matched group 1, 2, ...<br/>\n<br/>\n\n<b>II. Storing the token</b><br/>\n<b>Value</b> - an optional initial value for the first run<br/>\n<br/>\n\n<b>III. Apply the token</b><br/>\n<b>Name</b>- token name as it appears in request<br/>\n<b>header, url, body, ...</b>- token position in request. Multiple choises are possible.<br/>\n<i>header</i> - a custom header contains the token. Token name is without colon \":\" <br/>\n<i>url</i> - the URL query contains the token as parameter <br/>\n<i>body</i> - the token is an usual POST parameter <br/>\n<i>cookie</i> - one of the cookies contains the token <br/>\n<i>other</i> - for tokens inside json, xml, xml attribute, multi-part attribute <br/>\n\n<h3>Debug: When further help is required ...</h3>\nenable the debugging. Run the request once again through TokenJar and consult the Output window (Extender >Extensions >select TokenJar >Output).\nInformation about the request / response is listed: <br/>\n<i><b>Request:</b></i><br/>\n<i>parameters</i> - name and type. Case sensitivity matters! <br/>\n<i>headers</i> - name and current value <br/>\n<i>tokens</i> - that have been processed <br/>\n<i>request</i> - full final request (after processing was done) <br/>\n<i><b>Request:</b></i><br/>\n<i>path</i> - the processed URL<br/>\n<i>regex</i> - the expression that matched<br/>\n<i>groups</i> - the values captured in each group <br/>\n\n<h3>Tips: For making your job easy ...</h3>\n- use the Regex button to test your reqular expression. <br/>\n- enable all token locations (header, url, body, ..) if not sure what to use and when this does not matter. <br/>\nIt matters only when multiple parameters have the same name. Still the performance might be impacted.<br/>\n</html>\n");
jTextPane1.setCaretPosition(0);
jTextPane1.setText("<html>\n<h3>Useful for ...</h3>\nextracting tokens from responses and embedding them in requests. Further proccessing is posible through javascript code.\n<br/><br/>\n\n<h3>Configure: Start from right to left by ...</h3>\n\n<b>I. Extracting the token value</b><br/>\n<b>Path</b>- a URL that limits the location from where the token is extracted (reponse)<br/>\n<b>Regex</b>- expression that identifies the desired value. Must have at least one matching group.<br/>\n<b>Eval</b>- javascript code for transforming the value. grp[1], grp[2], ... return the matched group 1, 2, ...<br/>\n<br/>\n\n<b>II. Storing the token</b><br/>\n<b>Value</b> - an optional initial value for the first run<br/>\n<br/>\n\n<b>III. Apply the token</b><br/>\n<b>Name</b>- token name as it appears in request<br/>\n<b>header, url, body, ...</b>- token position in request. Multiple choises are possible.<br/>\n<i>header</i> - a custom header contains the token. Token name is without colon \":\" <br/>\n<i>url</i> - the URL query contains the token as parameter <br/>\n<i>body</i> - the token is an usual POST parameter <br/>\n<i>cookie</i> - one of the cookies contains the token <br/>\n<i>other</i> - for tokens inside json, xml, xml attribute, multi-part attribute <br/>\n\n<h3>Debug: When further help is required ...</h3>\nenable the debugging. Run the request once again through TokenJar and consult the Output window (Extender >Extensions >select TokenJar >Output).\nInformation about the request / response is listed: <br/>\n<i><b>Request:</b></i><br/>\n<i>parameters</i> - name and type. Case sensitivity matters! <br/>\n<i>headers</i> - name and current value <br/>\n<i>tokens</i> - that have been processed <br/>\n<i>request</i> - full final request (after processing was done) <br/>\n<i><b>Response:</b></i><br/>\n<i>path</i> - the processed URL<br/>\n<i>regex</i> - the expression that matched<br/>\n<i>groups</i> - the values captured in each group <br/>\n\n<h3>Tips: For making your job easy ...</h3>\n- use the Regex button to test your reqular expression. <br/>\n- enable all token locations (header, url, body, ..) if not sure what to use and when this does not matter. <br/>\nIt matters only when multiple parameters have the same name. Still the performance might be impacted.<br/>\n</html>\n");
jScrollPane1.setViewportView(jTextPane1);

closeButton.setText("Close");
Expand Down
4 changes: 2 additions & 2 deletions src/tokenJar/Tab.form
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
<Component id="masterRepeater" min="-2" max="-2" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="masterDebug" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="29" max="-2" attributes="0"/>
<Component id="jLabelNewHere" min="-2" pref="123" max="-2" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="jLabelNewHere" min="-2" pref="146" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="13" max="-2" attributes="0"/>
</Group>
<Component id="jScrollPane2" max="32767" attributes="0"/>
Expand Down
4 changes: 2 additions & 2 deletions src/tokenJar/Tab.java
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,8 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
.addComponent(masterRepeater)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(masterDebug)
.addGap(29, 29, 29)
.addComponent(jLabelNewHere, javax.swing.GroupLayout.PREFERRED_SIZE, 123, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jLabelNewHere, javax.swing.GroupLayout.PREFERRED_SIZE, 146, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(13, 13, 13))
.addComponent(jScrollPane2))
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
Expand Down

0 comments on commit cd1ba48

Please sign in to comment.