Skip to content

Commit

Permalink
Merge pull request #3794 from thelsing/feature-htmltokennotes
Browse files Browse the repository at this point in the history
Feature htmltokennotes
  • Loading branch information
Phergus authored Dec 27, 2022
2 parents 4375a75 + f267e5a commit 7f944a6
Show file tree
Hide file tree
Showing 9 changed files with 1,061 additions and 565 deletions.
10 changes: 4 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,6 @@ repositories {
mavenLocal()
mavenCentral()
maven { url = 'https://maptool.craigs-stuff.net/repo/' }
maven { url = 'https://nerps.net/repo/' }
maven { url = 'https://jitpack.io' }
maven { url "https://www.jetbrains.com/intellij-repository/releases" }
}
Expand Down Expand Up @@ -319,7 +318,6 @@ dependencies {
implementation 'commons-cli:commons-cli:1.4'

// RPTool Libs
implementation 'net.rptools.decktool:decktool:1.0.b1'
implementation 'com.github.RPTools:maptool-resources:1.6.0'
implementation 'com.github.RPTools:parser:1.8.3'
implementation 'net.rptools.dicelib:dicelib:1.8.6'
Expand Down Expand Up @@ -357,7 +355,6 @@ dependencies {
implementation 'ca.odell.renderpack:renderpack:1.2004'
implementation 'net.tsc.servicediscovery:servicediscovery:1.0.b5'
implementation 'net.sbbi.upnp:upnplib:1.0.9-nodebug'
implementation 'com.withay:withay-util:1.0'
implementation 'xmlpull:xmlpull:1.1.3.1'
implementation 'xpp3:xpp3_min:1.1.4c'
implementation 'com.thoughtworks.xstream:xstream:1.4.19'
Expand All @@ -384,9 +381,10 @@ dependencies {
implementation 'com.github.gotson:webp-imageio:0.2.1' // webp support https://search.maven.org/artifact/com.github.gotson/webp-imageio/0.2.1/jar

// For syntax highlighting in macro editor
implementation group: 'com.fifesoft', name: 'rsyntaxtextarea', version: '3.1.3' // https://mvnrepository.com/artifact/com.fifesoft/rsyntaxtextarea
implementation group: 'com.fifesoft', name: 'rstaui', version: '3.1.2' // https://mvnrepository.com/artifact/com.fifesoft/rstaui
implementation group: 'com.fifesoft', name: 'autocomplete', version: '3.1.2' // https://mvnrepository.com/artifact/com.fifesoft/autocomplete
implementation "com.fifesoft:rsyntaxtextarea:3.3.0" // https://mvnrepository.com/artifact/com.fifesoft/rsyntaxtextarea
implementation "com.fifesoft:rstaui:3.3.0" // https://mvnrepository.com/artifact/com.fifesoft/rstaui
implementation "com.fifesoft:autocomplete:3.3.0" // https://mvnrepository.com/artifact/com.fifesoft/autocomplete
implementation "com.fifesoft:languagesupport:3.3.0"

// For simple xml work in Hero Lab integration
implementation group: 'com.jcabi', name: 'jcabi-xml', version: '0.23.1' // https://mvnrepository.com/artifact/com.jcabi/jcabi-xml
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/*
* This software Copyright by the RPTools.net development team, and
* licensed under the Affero GPL Version 3 or, at your option, any later
* version.
*
* MapTool Source Code is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* You should have received a copy of the GNU Affero General Public
* License * along with this source Code. If not, please visit
* <http://www.gnu.org/licenses/> and specifically the Affero license
* text at <http://www.gnu.org/licenses/agpl.html>.
*/
package net.rptools.maptool.client.swing.htmleditorsplit;

import com.intellij.uiDesigner.core.GridConstraints;
import com.intellij.uiDesigner.core.GridLayoutManager;
import java.awt.*;
import java.beans.JavaBean;
import javax.swing.*;

@JavaBean(defaultProperty = "UI", description = "HTML-Editor that also displays sourcecode")
public class HtmlEditorSplit extends JPanel {
private HtmlEditorSplitGui gui = new HtmlEditorSplitGui();

public HtmlEditorSplit() {
setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
add(
gui.$$$getRootComponent$$$(),
new GridConstraints(
0,
0,
1,
1,
GridConstraints.ANCHOR_CENTER,
GridConstraints.FILL_BOTH,
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
null,
null,
null,
0,
false));
}

public String getText() {
return gui.getText();
}

public void setText(String text) {
gui.setText(text);
}

public String getSelectedText() {
return gui.getSelectedText();
}

@Override
public void setEnabled(boolean enabled) {
super.setEnabled(enabled);
gui.setEnabled(enabled);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
<?xml version="1.0" encoding="UTF-8"?>
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="net.rptools.maptool.client.swing.htmleditorsplit.HtmlEditorSplitGui">
<grid id="27dc6" binding="rootPanel" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<xy x="20" y="20" width="500" height="400"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<tabbedpane id="297f1" binding="tabPanel">
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false">
<preferred-size width="200" height="200"/>
</grid>
</constraints>
<properties>
<name value=""/>
<tabPlacement value="3"/>
</properties>
<border type="none"/>
<children>
<grid id="d2e47" binding="htmlTab" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="2" left="2" bottom="6" right="2"/>
<constraints>
<tabbedpane title-resource-bundle="net/rptools/maptool/language/i18n" title-key="EditTokenDialog.tab.hero.html"/>
</constraints>
<properties>
<name value=""/>
</properties>
<border type="none"/>
<children>
<component id="fe9a4" class="javafx.embed.swing.JFXPanel" binding="jfxPanel">
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
</component>
</children>
</grid>
<grid id="2ed87" binding="textTab" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="4" right="0"/>
<constraints>
<tabbedpane title-resource-bundle="net/rptools/maptool/language/i18n" title-key="EditTokenDialog.tab.hero.text"/>
</constraints>
<properties>
<name value=""/>
</properties>
<border type="none"/>
<children>
<grid id="1396b" class="org.fife.rsta.ui.CollapsibleSectionPanel" binding="sectionPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<name value=""/>
</properties>
<border type="none"/>
<children>
<scrollpane id="be0cb" class="org.fife.ui.rtextarea.RTextScrollPane" binding="textScrollPane">
<constraints border-constraint="Center"/>
<properties>
<foldIndicatorEnabled value="true"/>
<iconRowHeaderEnabled value="true"/>
<lineNumbersEnabled value="true"/>
</properties>
<border type="none"/>
<children>
<component id="d7e53" class="org.fife.ui.rsyntaxtextarea.RSyntaxTextArea" binding="sourceTextArea">
<constraints/>
<properties>
<codeFoldingEnabled value="true"/>
<lineWrap value="true"/>
<markOccurrences value="true"/>
<name value=""/>
<selectionEnd value="0"/>
<selectionStart value="0"/>
<syntaxEditingStyle value="text/html"/>
<text value=""/>
</properties>
</component>
</children>
</scrollpane>
</children>
</grid>
</children>
</grid>
</children>
</tabbedpane>
</children>
</grid>
</form>
Loading

0 comments on commit 7f944a6

Please sign in to comment.