diff --git a/ConversationCompiler/build.xml b/ConversationCompiler/build.xml
new file mode 100644
index 0000000..ea549b7
--- /dev/null
+++ b/ConversationCompiler/build.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+ Builds, tests, and runs the project com.projectswg.tools.csc.compiler.
+
+
diff --git a/ConversationCompiler/manifest.mf b/ConversationCompiler/manifest.mf
new file mode 100644
index 0000000..c928f8f
--- /dev/null
+++ b/ConversationCompiler/manifest.mf
@@ -0,0 +1,5 @@
+Manifest-Version: 1.0
+OpenIDE-Module: com.projectswg.tools.csc.compiler
+OpenIDE-Module-Localizing-Bundle: com/projectswg/tools/csc/compiler/Bundle.properties
+OpenIDE-Module-Specification-Version: 1.0
+
diff --git a/ConversationCompiler/nbproject/build-impl.xml b/ConversationCompiler/nbproject/build-impl.xml
new file mode 100644
index 0000000..6e6aa5e
--- /dev/null
+++ b/ConversationCompiler/nbproject/build-impl.xml
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ You must set 'suite.dir' to point to your containing module suite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ConversationCompiler/nbproject/genfiles.properties b/ConversationCompiler/nbproject/genfiles.properties
new file mode 100644
index 0000000..29e95dc
--- /dev/null
+++ b/ConversationCompiler/nbproject/genfiles.properties
@@ -0,0 +1,8 @@
+build.xml.data.CRC32=beb6af21
+build.xml.script.CRC32=16594606
+build.xml.stylesheet.CRC32=a56c6a5b@2.66.1
+# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
+# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
+nbproject/build-impl.xml.data.CRC32=beb6af21
+nbproject/build-impl.xml.script.CRC32=bd99f65f
+nbproject/build-impl.xml.stylesheet.CRC32=238281d1@2.66.1
diff --git a/ConversationCompiler/nbproject/private/private.xml b/ConversationCompiler/nbproject/private/private.xml
new file mode 100644
index 0000000..f882026
--- /dev/null
+++ b/ConversationCompiler/nbproject/private/private.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+ file:/C:/Users/Wave/Documents/NetBeansProjects/ConversationScriptCreator/ConversationCompiler/src/com/projectswg/tools/csc/compiler/Compiler.java
+
+
+
diff --git a/ConversationCompiler/nbproject/project.properties b/ConversationCompiler/nbproject/project.properties
new file mode 100644
index 0000000..6baf44e
--- /dev/null
+++ b/ConversationCompiler/nbproject/project.properties
@@ -0,0 +1,2 @@
+javac.source=1.7
+javac.compilerargs=-Xlint -Xlint:-serial
diff --git a/ConversationCompiler/nbproject/project.xml b/ConversationCompiler/nbproject/project.xml
new file mode 100644
index 0000000..b082702
--- /dev/null
+++ b/ConversationCompiler/nbproject/project.xml
@@ -0,0 +1,69 @@
+
+
+ org.netbeans.modules.apisupport.project
+
+
+ com.projectswg.tools.csc.compiler
+
+
+
+ com.projectswg.tools.csc.conversationeditor
+
+
+
+ 1.0
+
+
+
+ org.netbeans.api.visual
+
+
+
+ 2.42.1
+
+
+
+ org.openide.awt
+
+
+
+ 7.61.2
+
+
+
+ org.openide.dialogs
+
+
+
+ 7.36.1
+
+
+
+ org.openide.nodes
+
+
+
+ 7.38.1
+
+
+
+ org.openide.util
+
+
+
+ 8.37.1
+
+
+
+ org.openide.windows
+
+
+
+ 6.70.1
+
+
+
+
+
+
+
diff --git a/ConversationCompiler/nbproject/suite.properties b/ConversationCompiler/nbproject/suite.properties
new file mode 100644
index 0000000..29d7cc9
--- /dev/null
+++ b/ConversationCompiler/nbproject/suite.properties
@@ -0,0 +1 @@
+suite.dir=${basedir}/..
diff --git a/ConversationCompiler/src/com/projectswg/tools/csc/compiler/Bundle.properties b/ConversationCompiler/src/com/projectswg/tools/csc/compiler/Bundle.properties
new file mode 100644
index 0000000..99a6c2f
--- /dev/null
+++ b/ConversationCompiler/src/com/projectswg/tools/csc/compiler/Bundle.properties
@@ -0,0 +1 @@
+OpenIDE-Module-Name=Conversation Compiler
diff --git a/ConversationCompiler/src/com/projectswg/tools/csc/compiler/Compiler.java b/ConversationCompiler/src/com/projectswg/tools/csc/compiler/Compiler.java
new file mode 100644
index 0000000..8ad9c91
--- /dev/null
+++ b/ConversationCompiler/src/com/projectswg/tools/csc/compiler/Compiler.java
@@ -0,0 +1,179 @@
+package com.projectswg.tools.csc.compiler;
+
+import com.projectswg.tools.csc.conversationeditor.ConversationNode;
+import com.projectswg.tools.csc.conversationeditor.ConversationWidget;
+import com.projectswg.tools.csc.conversationeditor.EditorTopComponent;
+import com.projectswg.tools.csc.conversationeditor.SceneView;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import javax.swing.JOptionPane;
+import org.netbeans.api.visual.widget.ConnectionWidget;
+import org.netbeans.api.visual.widget.Widget;
+import org.openide.windows.TopComponent;
+import org.openide.windows.WindowManager;
+
+public class Compiler {
+
+ private final File file;
+
+ public Compiler(File file) {
+ this.file = file;
+ }
+
+ public void compile() throws IOException {
+
+ TopComponent component = WindowManager.getDefault().findTopComponent("EditorTopComponent");
+ if (component == null || !(component instanceof EditorTopComponent))
+ return;
+
+ EditorTopComponent editor = (EditorTopComponent) component;
+ SceneView scene = editor.getScene();
+
+ if (scene == null) {
+ JOptionPane.showMessageDialog(null, "The scene was null! You must restart the editor in order to compile :(",
+ "Conversation Script Creator", JOptionPane.ERROR_MESSAGE);
+ return;
+ }
+
+ try (BufferedWriter bw = new BufferedWriter(new FileWriter(file.getAbsolutePath()))) {
+ createBaseFile(bw);
+
+ List connectedNodes = scene.getConnectionLayer().getChildren();
+ LinkedHashMap> conversationLinks = new LinkedHashMap<>();
+
+ for (Widget widget : connectedNodes) {
+ ConnectionWidget connection = (ConnectionWidget) widget;
+
+ ConversationWidget source = (ConversationWidget) connection.getSourceAnchor().getRelatedWidget();
+ ConversationNode sNode = source.getAttachedNode();
+
+ if (!conversationLinks.containsKey(sNode)) {
+ conversationLinks.put(sNode, new ArrayList());
+ }
+
+ ConversationWidget target = (ConversationWidget) connection.getTargetAnchor().getRelatedWidget();
+ ConversationNode tNode = target.getAttachedNode();
+
+ if (conversationLinks.containsKey(sNode))
+ conversationLinks.get(sNode).add(tNode);
+ else
+ System.out.println("No key for node " + sNode.getStf());
+
+ //System.out.println("This connection widget came from " + sNode.getStf() + " and is pointing to " + tNode.getStf());
+ //compiler.compileTarget(tNode);
+ }
+
+ for (Map.Entry> entry : conversationLinks.entrySet()) {
+ /*System.out.println("Handling for node " + entry.getKey().getStf());
+ for (ConversationNode node : entry.getValue()) {
+ System.out.println("Node: " + node.getStf());
+ }*/
+ if (entry.getKey().isStartNode()) {
+ createOptionsAndHandler(bw, entry.getKey(), entry.getValue(), 1, conversationLinks);
+ break;
+ }
+ }
+ }
+ }
+
+ private void createBaseFile(BufferedWriter bw) throws IOException {
+ bw.write("# Base file generated using Conversation Script Creator for ProjectSWG\n");
+
+ bw.write("from resources.common import ConversationOption\n" +
+ "from resources.common import OutOfBand\n" +
+ "from resources.common import ProsePackage\n" +
+ "from java.util import Vector\n");
+ bw.newLine();
+ bw.write("import sys\n");
+ bw.newLine();
+ bw.write("def startConversation(core, actor, npc):\n");
+ }
+
+ private void createResponseHandler(BufferedWriter bw, ArrayList options, int handleNum,
+ LinkedHashMap> conversationLinks) throws IOException {
+
+ LinkedHashMap> handleFuncs = new LinkedHashMap<>();
+
+ bw.write("def handleOptionScreen" + handleNum + "(core, actor, npc, selection):\n");
+ bw.newLine();
+ int count = handleNum + 1;
+ for (ConversationNode selectedOption : options) {
+ bw.write(" " + (options.indexOf(selectedOption) > 0 ? "elif" : "if") + " selection == " + options.indexOf(selectedOption) + ":\n");
+ if (conversationLinks.containsKey(selectedOption)) {
+ bw.write(" #Handler for Option " + selectedOption.getStf() + "\n");
+ for (ConversationNode handleNode : conversationLinks.get(selectedOption)) {
+ if (!handleNode.isOption()) {
+ if (conversationLinks.get(handleNode) == null) {
+ bw.write(" core.conversationService.sendStopConversation(actor, npc, 'conversation/c_newbie_secondchance', 's_136')\n");
+ } else {
+ createOptions(bw, conversationLinks.get(handleNode), count++, " ");
+ bw.write(" core.conversationService.sendConversationMessage(actor, npc, OutOfBand.ProsePackage('@" + handleNode.getStf() + "')\n");
+ handleFuncs.put(handleNode, conversationLinks.get(handleNode)); // Put these nodes in list so we can create the handlers later.
+ }
+ }
+ }
+ }
+ bw.write(" return\n");
+ bw.newLine();
+ }
+ bw.write(" return\n");
+
+ bw.newLine();
+
+ int currentHandler = handleNum + 1;
+ for (Map.Entry> handleNode : handleFuncs.entrySet()) {
+ createResponseHandler(bw, handleNode.getValue(), currentHandler++, conversationLinks);
+ }
+ }
+
+ private void createOptionsAndHandler(BufferedWriter bw, ConversationNode response, ArrayList options, int handleScreenNum,
+ LinkedHashMap> conversationLinks) throws IOException {
+
+ bw.write(" options = new Vector()\n");
+
+ if (options.size() > 1) {
+ ArrayList orderedOptions = new ArrayList<>();
+ for (ConversationNode unOrdered : options) {
+ orderedOptions.add(unOrdered.getOptionId(), unOrdered);
+ }
+ for (ConversationNode option : orderedOptions) {
+ bw.write(" options.add(ConversationOption(OutOfBand.ProsePackage('@" + option.getStf() +"'), " + options.indexOf(option) + ")\n");
+ }
+ } else {
+ for (ConversationNode option : options) {
+ bw.write(" options.add(ConversationOption(OutOfBand.ProsePackage('@" + option.getStf() +"'), " + options.indexOf(option) + ")\n");
+ }
+ }
+
+ bw.write(" core.conversationService.sendConversationOptions(actor, npc, handleOptionScreen" + String.valueOf(handleScreenNum) + ")\n");
+ bw.write(" core.conversationService.sendConversationMessage(actor, npc, OutOfBand.ProsePackage('@" + response.getStf() + "'))\n");
+ bw.write(" return\n");
+ bw.newLine();
+ createResponseHandler(bw, options, handleScreenNum, conversationLinks);
+ }
+
+ private void createOptions(BufferedWriter bw, ArrayList options, int handleScreenNum, String space) throws IOException {
+ bw.write(space + "options = new Vector()\n");
+
+ if (options.size() > 1) {
+ ArrayList orderedOptions = new ArrayList<>();
+ for (ConversationNode unOrdered : options) {
+ orderedOptions.add(unOrdered.getOptionId(), unOrdered);
+ }
+ for (ConversationNode option : orderedOptions) {
+ bw.write(space + "options.add(ConversationOption(OutOfBand.ProsePackage('@" + option.getStf() +"'), " + options.indexOf(option) + ")\n");
+ }
+ } else {
+ for (ConversationNode option : options) {
+ bw.write(space + "options.add(ConversationOption(OutOfBand.ProsePackage('@" + option.getStf() +"'), " + options.indexOf(option) + ")\n");
+ }
+ }
+ bw.write(space + "core.conversationService.sendConversationOptions(actor, npc, handleOptionScreen" + String.valueOf(handleScreenNum) + ")\n");
+ }
+}
diff --git a/ConversationCompiler/src/com/projectswg/tools/csc/compiler/wizard/Bundle.properties b/ConversationCompiler/src/com/projectswg/tools/csc/compiler/wizard/Bundle.properties
new file mode 100644
index 0000000..21a26e1
--- /dev/null
+++ b/ConversationCompiler/src/com/projectswg/tools/csc/compiler/wizard/Bundle.properties
@@ -0,0 +1,9 @@
+CompileVisualPanel1.jLabel1.text=Location
+CompileVisualPanel1.jLabel2.text=Please select the location where you wish to build the script to.
+CompileVisualPanel1.btnBrowse.text=Browse
+CompileVisualPanel1.txtLocation.text=
+CompileVisualPanel1.jLabel3.text=Script Name
+CompileVisualPanel1.txtName.text=conversation_script
+CompileVisualPanel1.jLabel4.text=Enter a name for the compiled script. This should not include any extensions (ex: .py)
+CompileVisualPanel1.jLabel5.text=Script will be built to:
+CompileVisualPanel1.txtBuildLoc.text=
diff --git a/ConversationCompiler/src/com/projectswg/tools/csc/compiler/wizard/CompileVisualPanel1.form b/ConversationCompiler/src/com/projectswg/tools/csc/compiler/wizard/CompileVisualPanel1.form
new file mode 100644
index 0000000..b8e3267
--- /dev/null
+++ b/ConversationCompiler/src/com/projectswg/tools/csc/compiler/wizard/CompileVisualPanel1.form
@@ -0,0 +1,158 @@
+
+
+
diff --git a/ConversationCompiler/src/com/projectswg/tools/csc/compiler/wizard/CompileVisualPanel1.java b/ConversationCompiler/src/com/projectswg/tools/csc/compiler/wizard/CompileVisualPanel1.java
new file mode 100644
index 0000000..27c3692
--- /dev/null
+++ b/ConversationCompiler/src/com/projectswg/tools/csc/compiler/wizard/CompileVisualPanel1.java
@@ -0,0 +1,155 @@
+/*
+ * To change this license header, choose License Headers in Project Properties.
+ * To change this template file, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package com.projectswg.tools.csc.compiler.wizard;
+
+import javax.swing.JFileChooser;
+import javax.swing.JPanel;
+
+public final class CompileVisualPanel1 extends JPanel {
+
+ /**
+ * Creates new form CompileVisualPanel1
+ */
+ public CompileVisualPanel1() {
+ initComponents();
+ }
+
+ @Override
+ public String getName() {
+ return "Select Location";
+ }
+
+ /**
+ * This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
+ */
+ // //GEN-BEGIN:initComponents
+ private void initComponents() {
+
+ jLabel1 = new javax.swing.JLabel();
+ txtLocation = new javax.swing.JTextField();
+ btnBrowse = new javax.swing.JButton();
+ jLabel2 = new javax.swing.JLabel();
+ jLabel3 = new javax.swing.JLabel();
+ txtName = new javax.swing.JTextField();
+ jLabel4 = new javax.swing.JLabel();
+ jLabel5 = new javax.swing.JLabel();
+ txtBuildLoc = new javax.swing.JTextField();
+
+ org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(CompileVisualPanel1.class, "CompileVisualPanel1.jLabel1.text")); // NOI18N
+
+ txtLocation.setEditable(false);
+ txtLocation.setText(org.openide.util.NbBundle.getMessage(CompileVisualPanel1.class, "CompileVisualPanel1.txtLocation.text")); // NOI18N
+
+ org.openide.awt.Mnemonics.setLocalizedText(btnBrowse, org.openide.util.NbBundle.getMessage(CompileVisualPanel1.class, "CompileVisualPanel1.btnBrowse.text")); // NOI18N
+ btnBrowse.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ btnBrowseActionPerformed(evt);
+ }
+ });
+
+ jLabel2.setLabelFor(txtLocation);
+ org.openide.awt.Mnemonics.setLocalizedText(jLabel2, org.openide.util.NbBundle.getMessage(CompileVisualPanel1.class, "CompileVisualPanel1.jLabel2.text")); // NOI18N
+
+ org.openide.awt.Mnemonics.setLocalizedText(jLabel3, org.openide.util.NbBundle.getMessage(CompileVisualPanel1.class, "CompileVisualPanel1.jLabel3.text")); // NOI18N
+
+ txtName.setText(org.openide.util.NbBundle.getMessage(CompileVisualPanel1.class, "CompileVisualPanel1.txtName.text")); // NOI18N
+ txtName.addKeyListener(new java.awt.event.KeyAdapter() {
+ public void keyTyped(java.awt.event.KeyEvent evt) {
+ txtNameKeyTyped(evt);
+ }
+ });
+
+ jLabel4.setLabelFor(txtName);
+ org.openide.awt.Mnemonics.setLocalizedText(jLabel4, org.openide.util.NbBundle.getMessage(CompileVisualPanel1.class, "CompileVisualPanel1.jLabel4.text")); // NOI18N
+
+ org.openide.awt.Mnemonics.setLocalizedText(jLabel5, org.openide.util.NbBundle.getMessage(CompileVisualPanel1.class, "CompileVisualPanel1.jLabel5.text")); // NOI18N
+
+ txtBuildLoc.setEditable(false);
+ txtBuildLoc.setText(org.openide.util.NbBundle.getMessage(CompileVisualPanel1.class, "CompileVisualPanel1.txtBuildLoc.text")); // NOI18N
+
+ javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
+ this.setLayout(layout);
+ layout.setHorizontalGroup(
+ layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(layout.createSequentialGroup()
+ .addContainerGap()
+ .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(layout.createSequentialGroup()
+ .addComponent(jLabel3)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
+ .addComponent(txtName))
+ .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(layout.createSequentialGroup()
+ .addComponent(jLabel5)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(txtBuildLoc))
+ .addGroup(layout.createSequentialGroup()
+ .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(layout.createSequentialGroup()
+ .addComponent(jLabel1)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
+ .addComponent(txtLocation, javax.swing.GroupLayout.PREFERRED_SIZE, 266, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(btnBrowse, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addComponent(jLabel2)
+ .addComponent(jLabel4))
+ .addGap(0, 0, Short.MAX_VALUE))))
+ .addContainerGap())
+ );
+ layout.setVerticalGroup(
+ layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(layout.createSequentialGroup()
+ .addContainerGap()
+ .addComponent(jLabel2)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+ .addComponent(btnBrowse)
+ .addComponent(txtLocation, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(jLabel1))
+ .addGap(14, 14, 14)
+ .addComponent(jLabel4)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+ .addComponent(jLabel3)
+ .addComponent(txtName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addGap(48, 48, 48)
+ .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+ .addComponent(jLabel5)
+ .addComponent(txtBuildLoc, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addContainerGap(124, Short.MAX_VALUE))
+ );
+ }// //GEN-END:initComponents
+
+ private void btnBrowseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBrowseActionPerformed
+ JFileChooser chooser = new JFileChooser();
+ chooser.setDialogTitle("Select Location");
+ chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
+ int returnVal = chooser.showDialog(this, "Select");
+ if (returnVal == JFileChooser.APPROVE_OPTION) {
+ txtLocation.setText(chooser.getSelectedFile().getPath());
+ txtBuildLoc.setText(txtLocation.getText() + "\\" + txtName.getText() + ".py");
+ }
+ }//GEN-LAST:event_btnBrowseActionPerformed
+
+ private void txtNameKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtNameKeyTyped
+ txtBuildLoc.setText(txtLocation.getText() + "\\" + txtName.getText() + ".py");
+ }//GEN-LAST:event_txtNameKeyTyped
+
+ public String getBuildLocation() {
+ return txtBuildLoc.getText();
+ }
+ // Variables declaration - do not modify//GEN-BEGIN:variables
+ private javax.swing.JButton btnBrowse;
+ private javax.swing.JLabel jLabel1;
+ private javax.swing.JLabel jLabel2;
+ private javax.swing.JLabel jLabel3;
+ private javax.swing.JLabel jLabel4;
+ private javax.swing.JLabel jLabel5;
+ private javax.swing.JTextField txtBuildLoc;
+ private javax.swing.JTextField txtLocation;
+ private javax.swing.JTextField txtName;
+ // End of variables declaration//GEN-END:variables
+}
diff --git a/ConversationCompiler/src/com/projectswg/tools/csc/compiler/wizard/CompileWizardAction.java b/ConversationCompiler/src/com/projectswg/tools/csc/compiler/wizard/CompileWizardAction.java
new file mode 100644
index 0000000..9ee66cc
--- /dev/null
+++ b/ConversationCompiler/src/com/projectswg/tools/csc/compiler/wizard/CompileWizardAction.java
@@ -0,0 +1,72 @@
+/*
+ * To change this license header, choose License Headers in Project Properties.
+ * To change this template file, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package com.projectswg.tools.csc.compiler.wizard;
+
+import com.projectswg.tools.csc.compiler.Compiler;
+import java.awt.Component;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.io.File;
+import java.io.IOException;
+import java.text.MessageFormat;
+import java.util.ArrayList;
+import java.util.List;
+import javax.swing.JComponent;
+import org.openide.DialogDisplayer;
+import org.openide.NotifyDescriptor;
+import org.openide.WizardDescriptor;
+import org.openide.awt.ActionID;
+import org.openide.awt.ActionReference;
+import org.openide.awt.ActionRegistration;
+import org.openide.util.Exceptions;
+import org.openide.util.ImageUtilities;
+
+@ActionID(category="...", id="com.projectswg.tools.csc.compiler.wizard.CompileWizardAction")
+@ActionRegistration(displayName="Create Script")
+@ActionReference(path="Menu/File")
+public final class CompileWizardAction implements ActionListener {
+
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ List> panels = new ArrayList<>();
+ CompileWizardPanel1 compilePanel = new CompileWizardPanel1();
+ panels.add(compilePanel);
+ String[] steps = new String[panels.size()];
+ for (int i = 0; i < panels.size(); i++) {
+ Component c = panels.get(i).getComponent();
+ // Default step name to component name of panel.
+ steps[i] = c.getName();
+ if (c instanceof JComponent) { // assume Swing components
+ JComponent jc = (JComponent) c;
+ jc.putClientProperty(WizardDescriptor.PROP_CONTENT_SELECTED_INDEX, i);
+ jc.putClientProperty(WizardDescriptor.PROP_CONTENT_DATA, steps);
+ jc.putClientProperty(WizardDescriptor.PROP_AUTO_WIZARD_STYLE, true);
+ jc.putClientProperty(WizardDescriptor.PROP_CONTENT_DISPLAYED, true);
+ jc.putClientProperty(WizardDescriptor.PROP_CONTENT_NUMBERED, true);
+ }
+ }
+ WizardDescriptor wiz = new WizardDescriptor(new WizardDescriptor.ArrayIterator<>(panels));
+ // {0} will be replaced by WizardDesriptor.Panel.getComponent().getName()
+ wiz.setTitleFormat(new MessageFormat("{0}"));
+ wiz.setTitle("Compile Conversation Script");
+ wiz.putProperty(WizardDescriptor.PROP_IMAGE, ImageUtilities.loadImage("com/projectswg/tools/csc/compiler/wizard/csc_wizard_bg.png"));
+
+ if (DialogDisplayer.getDefault().notify(wiz) == WizardDescriptor.FINISH_OPTION) {
+ File file = new File(compilePanel.getComponent().getBuildLocation());
+
+ if (file.exists()) {
+ DialogDisplayer.getDefault().notify(new NotifyDescriptor.Message("Script already exists: " + file.getAbsolutePath(), NotifyDescriptor.ERROR_MESSAGE));
+ } else {
+ Compiler compiler = new Compiler(file);
+ try {
+ compiler.compile();
+ } catch (IOException ex) {
+ Exceptions.printStackTrace(ex);
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/ConversationCompiler/src/com/projectswg/tools/csc/compiler/wizard/CompileWizardPanel1.java b/ConversationCompiler/src/com/projectswg/tools/csc/compiler/wizard/CompileWizardPanel1.java
new file mode 100644
index 0000000..f755e24
--- /dev/null
+++ b/ConversationCompiler/src/com/projectswg/tools/csc/compiler/wizard/CompileWizardPanel1.java
@@ -0,0 +1,63 @@
+/*
+ * To change this license header, choose License Headers in Project Properties.
+ * To change this template file, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package com.projectswg.tools.csc.compiler.wizard;
+
+import javax.swing.event.ChangeListener;
+import org.openide.WizardDescriptor;
+import org.openide.util.HelpCtx;
+
+public class CompileWizardPanel1 implements WizardDescriptor.Panel {
+
+ private CompileVisualPanel1 component;
+
+ // Get the visual component for the panel. In this template, the component
+ // is kept separate. This can be more efficient: if the wizard is created
+ // but never displayed, or not all panels are displayed, it is better to
+ // create only those which really need to be visible.
+ @Override
+ public CompileVisualPanel1 getComponent() {
+ if (component == null) {
+ component = new CompileVisualPanel1();
+ }
+ return component;
+ }
+
+ @Override
+ public HelpCtx getHelp() {
+ // Show no Help button for this panel:
+ return HelpCtx.DEFAULT_HELP;
+ // If you have context help:
+ // return new HelpCtx("help.key.here");
+ }
+
+ @Override
+ public boolean isValid() {
+ // If it is always OK to press Next or Finish, then:
+ return true;
+ // If it depends on some condition (form filled out...) and
+ // this condition changes (last form field filled in...) then
+ // use ChangeSupport to implement add/removeChangeListener below.
+ // WizardDescriptor.ERROR/WARNING/INFORMATION_MESSAGE will also be useful.
+ }
+
+ @Override
+ public void addChangeListener(ChangeListener l) {
+ }
+
+ @Override
+ public void removeChangeListener(ChangeListener l) {
+ }
+
+ @Override
+ public void readSettings(WizardDescriptor wiz) {
+ // use wiz.getProperty to retrieve previous panel state
+ }
+
+ @Override
+ public void storeSettings(WizardDescriptor wiz) {
+ // use wiz.putProperty to remember current panel state
+ }
+}
diff --git a/ConversationCompiler/src/com/projectswg/tools/csc/compiler/wizard/csc_wizard_bg.png b/ConversationCompiler/src/com/projectswg/tools/csc/compiler/wizard/csc_wizard_bg.png
new file mode 100644
index 0000000..75c76d6
Binary files /dev/null and b/ConversationCompiler/src/com/projectswg/tools/csc/compiler/wizard/csc_wizard_bg.png differ
diff --git a/ConversationEditor/build.xml b/ConversationEditor/build.xml
new file mode 100644
index 0000000..90f8abf
--- /dev/null
+++ b/ConversationEditor/build.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+ Builds, tests, and runs the project com.projectswg.tools.csc.conversationeditor.
+
+
diff --git a/ConversationEditor/manifest.mf b/ConversationEditor/manifest.mf
new file mode 100644
index 0000000..d317c66
--- /dev/null
+++ b/ConversationEditor/manifest.mf
@@ -0,0 +1,7 @@
+Manifest-Version: 1.0
+OpenIDE-Module: com.projectswg.tools.csc.conversationeditor
+OpenIDE-Module-Layer: com/projectswg/tools/csc/conversationeditor/layer.xml
+OpenIDE-Module-Localizing-Bundle: com/projectswg/tools/csc/conversationeditor/Bundle.properties
+OpenIDE-Module-Requires: org.openide.windows.WindowManager
+OpenIDE-Module-Specification-Version: 1.0
+
diff --git a/ConversationEditor/nbproject/build-impl.xml b/ConversationEditor/nbproject/build-impl.xml
new file mode 100644
index 0000000..576d29c
--- /dev/null
+++ b/ConversationEditor/nbproject/build-impl.xml
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ You must set 'suite.dir' to point to your containing module suite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ConversationEditor/nbproject/genfiles.properties b/ConversationEditor/nbproject/genfiles.properties
new file mode 100644
index 0000000..0a07a29
--- /dev/null
+++ b/ConversationEditor/nbproject/genfiles.properties
@@ -0,0 +1,8 @@
+build.xml.data.CRC32=90d565b1
+build.xml.script.CRC32=af729615
+build.xml.stylesheet.CRC32=a56c6a5b@2.66.1
+# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
+# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
+nbproject/build-impl.xml.data.CRC32=90d565b1
+nbproject/build-impl.xml.script.CRC32=b2a11926
+nbproject/build-impl.xml.stylesheet.CRC32=238281d1@2.66.1
diff --git a/ConversationEditor/nbproject/private/private.xml b/ConversationEditor/nbproject/private/private.xml
new file mode 100644
index 0000000..aabcfea
--- /dev/null
+++ b/ConversationEditor/nbproject/private/private.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+ file:/C:/Users/Wave/Documents/NetBeansProjects/ConversationScriptCreator/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/ConversationConnectProvider.java
+ file:/C:/Users/Wave/Documents/NetBeansProjects/ConversationScriptCreator/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/ConversationNode.java
+ file:/C:/Users/Wave/Documents/NetBeansProjects/ConversationScriptCreator/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/ConversationWidget.java
+ file:/C:/Users/Wave/Documents/NetBeansProjects/ConversationScriptCreator/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/actions/NewConvEnd.java
+
+
+
diff --git a/ConversationEditor/nbproject/project.properties b/ConversationEditor/nbproject/project.properties
new file mode 100644
index 0000000..6baf44e
--- /dev/null
+++ b/ConversationEditor/nbproject/project.properties
@@ -0,0 +1,2 @@
+javac.source=1.7
+javac.compilerargs=-Xlint -Xlint:-serial
diff --git a/ConversationEditor/nbproject/project.xml b/ConversationEditor/nbproject/project.xml
new file mode 100644
index 0000000..3611d1e
--- /dev/null
+++ b/ConversationEditor/nbproject/project.xml
@@ -0,0 +1,90 @@
+
+
+ org.netbeans.modules.apisupport.project
+
+
+ com.projectswg.tools.csc.conversationeditor
+
+
+
+ org.netbeans.api.visual
+
+
+
+ 2.42.1
+
+
+
+ org.netbeans.modules.options.api
+
+
+
+ 1
+ 1.39.1
+
+
+
+ org.netbeans.modules.settings
+
+
+
+ 1
+ 1.44.1
+
+
+
+ org.openide.awt
+
+
+
+ 7.61.2
+
+
+
+ org.openide.explorer
+
+
+
+ 6.56.1
+
+
+
+ org.openide.nodes
+
+
+
+ 7.38.1
+
+
+
+ org.openide.util
+
+
+
+ 8.37.1
+
+
+
+ org.openide.util.lookup
+
+
+
+ 8.24.1
+
+
+
+ org.openide.windows
+
+
+
+ 6.70.1
+
+
+
+
+ com.projectswg.tools.csc.conversationeditor
+ com.projectswg.tools.csc.conversationeditor.actions
+
+
+
+
diff --git a/ConversationEditor/nbproject/suite.properties b/ConversationEditor/nbproject/suite.properties
new file mode 100644
index 0000000..29d7cc9
--- /dev/null
+++ b/ConversationEditor/nbproject/suite.properties
@@ -0,0 +1 @@
+suite.dir=${basedir}/..
diff --git a/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/Bundle.properties b/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/Bundle.properties
new file mode 100644
index 0000000..71fa881
--- /dev/null
+++ b/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/Bundle.properties
@@ -0,0 +1,8 @@
+OpenIDE-Module-Display-Category=Tools
+OpenIDE-Module-Long-Description=\
+ This is the visual editor that allows a visual representation of conversations in SWG based off of supported scripting formats.
+OpenIDE-Module-Name=Conversation Editor
+OpenIDE-Module-Short-Description=Visual editor for SWG conversations
+GeneralPanel.jLabel1.text=Compile Location
+GeneralPanel.jTextField1.text=C:/conversation_script.py
+GeneralPanel.jButton1.text=Browse
diff --git a/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/ConversationConnectProvider.java b/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/ConversationConnectProvider.java
new file mode 100644
index 0000000..b45a820
--- /dev/null
+++ b/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/ConversationConnectProvider.java
@@ -0,0 +1,58 @@
+package com.projectswg.tools.csc.conversationeditor;
+
+import java.awt.Point;
+import javax.swing.JOptionPane;
+import org.netbeans.api.visual.action.ConnectProvider;
+import org.netbeans.api.visual.action.ConnectorState;
+import org.netbeans.api.visual.anchor.AnchorFactory;
+import org.netbeans.api.visual.anchor.AnchorShape;
+import org.netbeans.api.visual.widget.ConnectionWidget;
+import org.netbeans.api.visual.widget.Scene;
+import org.netbeans.api.visual.widget.Widget;
+
+public class ConversationConnectProvider implements ConnectProvider {
+
+ private final SceneView scene;
+
+ public ConversationConnectProvider(SceneView scene) {
+ this.scene = scene;
+ }
+
+ @Override
+ public boolean isSourceWidget(Widget source) {
+ return source instanceof ConversationWidget;
+ }
+
+ @Override
+ public ConnectorState isTargetWidget(Widget source, Widget target) {
+ return source != target && target instanceof ConversationWidget ? ConnectorState.ACCEPT : ConnectorState.REJECT;
+ }
+
+ @Override
+ public boolean hasCustomTargetWidgetResolver(Scene scene) {
+ return false;
+ }
+
+ @Override
+ public Widget resolveTargetWidget(Scene scene, Point point) {
+ return null;
+ }
+
+ @Override
+ public void createConnection(Widget source, Widget target) {
+ if (source instanceof ConversationWidget && target instanceof ConversationWidget) {
+ if (((ConversationWidget)source).getAttachedNode().isEndNode()) {
+ JOptionPane.showMessageDialog(null, "Cannot attach end conversation node to responses/options!", "Conversation Script Creator", JOptionPane.INFORMATION_MESSAGE);
+ return;
+ }
+ ConnectionWidget conn = new ConnectionWidget(scene);
+ conn.setTargetAnchorShape(AnchorShape.TRIANGLE_FILLED);
+ conn.setTargetAnchor(AnchorFactory.createRectangularAnchor(target));
+ conn.setSourceAnchor(AnchorFactory.createRectangularAnchor(source));
+ scene.getConnectionLayer().addChild(conn);
+
+ ((ConversationWidget)source).getAttachedNode().setCompiled(false);
+ ((ConversationWidget)target).getAttachedNode().setCompiled(false);
+ }
+ }
+}
diff --git a/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/ConversationLookFeel.java b/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/ConversationLookFeel.java
new file mode 100644
index 0000000..e9b54f2
--- /dev/null
+++ b/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/ConversationLookFeel.java
@@ -0,0 +1,95 @@
+package com.projectswg.tools.csc.conversationeditor;
+
+import java.awt.Color;
+import java.awt.Paint;
+import org.netbeans.api.visual.border.Border;
+import org.netbeans.api.visual.border.BorderFactory;
+import org.netbeans.api.visual.laf.LookFeel;
+import org.netbeans.api.visual.model.ObjectState;
+
+public class ConversationLookFeel extends LookFeel{
+ private static final Color COLOR_SELECTED = new Color (0x447BCD);
+ private static final Color COLOR_HIGHLIGHTED = COLOR_SELECTED.darker ();
+ private static final Color COLOR_HOVERED = new Color (0x52E544);
+ private static final Color LINE_COLOR = new Color (0x466f16);
+ private static final int MARGIN = 3;
+ private static final int ARC = 10;
+ private static final int MINI_THICKNESS = 1;
+
+ private static final Border BORDER_NORMAL = BorderFactory.createEmptyBorder (MARGIN, MARGIN);
+ private static final Border BORDER_HOVERED = BorderFactory.createRoundedBorder (ARC, ARC, MARGIN, MARGIN, COLOR_HOVERED, COLOR_HOVERED.darker ());
+ private static final Border BORDER_SELECTED = BorderFactory.createRoundedBorder (ARC, ARC, MARGIN, MARGIN, COLOR_SELECTED, COLOR_SELECTED.darker ());
+
+ private static final Border MINI_BORDER_NORMAL = BorderFactory.createEmptyBorder (MINI_THICKNESS);
+ private static final Border MINI_BORDER_HOVERED = BorderFactory.createRoundedBorder (MINI_THICKNESS, MINI_THICKNESS, MINI_THICKNESS, MINI_THICKNESS, COLOR_HOVERED, COLOR_HOVERED.darker ());
+ private static final Border MINI_BORDER_SELECTED = BorderFactory.createRoundedBorder (MINI_THICKNESS, MINI_THICKNESS, MINI_THICKNESS, MINI_THICKNESS, COLOR_SELECTED, COLOR_SELECTED.darker ());
+
+ @Override
+ public Paint getBackground() {
+ return Color.BLACK;
+ }
+
+ @Override
+ public Color getForeground() {
+ return Color.BLACK;
+ }
+
+ @Override
+ public Border getBorder(ObjectState state) {
+ if (state.isHovered ())
+ return BORDER_HOVERED;
+ if (state.isSelected ())
+ return BORDER_SELECTED;
+ if (state.isFocused ())
+ return BORDER_HOVERED;
+ return BORDER_NORMAL;
+ }
+
+ @Override
+ public Border getMiniBorder (ObjectState state) {
+ if (state.isHovered ())
+ return MINI_BORDER_HOVERED;
+ if (state.isSelected ())
+ return MINI_BORDER_SELECTED;
+ if (state.isFocused ())
+ return MINI_BORDER_HOVERED;
+ return MINI_BORDER_NORMAL;
+ }
+
+ @Override
+ public boolean getOpaque (ObjectState state) {
+ return state.isHovered () || state.isSelected ();
+ }
+
+ @Override
+ public Color getLineColor (ObjectState state) {
+ if (state.isHovered ())
+ return COLOR_HOVERED;
+ if (state.isSelected ())
+ return COLOR_SELECTED;
+ if (state.isHighlighted () || state.isFocused ())
+ return COLOR_HIGHLIGHTED;
+ return Color.BLACK;
+ }
+
+ @Override
+ public Paint getBackground (ObjectState state) {
+ if (state.isHovered ())
+ return COLOR_HOVERED;
+ if (state.isSelected ())
+ return COLOR_SELECTED;
+ if (state.isHighlighted () || state.isFocused ())
+ return COLOR_HIGHLIGHTED;
+ return Color.WHITE;
+ }
+
+ @Override
+ public Color getForeground (ObjectState state) { // Determines LabelWidget's color
+ return state.isSelected () ? Color.BLACK : Color.WHITE;
+ }
+
+ @Override
+ public int getMargin () {
+ return MARGIN;
+ }
+}
diff --git a/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/ConversationNode.java b/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/ConversationNode.java
new file mode 100644
index 0000000..9025bda
--- /dev/null
+++ b/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/ConversationNode.java
@@ -0,0 +1,248 @@
+package com.projectswg.tools.csc.conversationeditor;
+
+import java.lang.reflect.InvocationTargetException;
+import org.openide.nodes.AbstractNode;
+import org.openide.nodes.Children;
+import org.openide.nodes.PropertySupport;
+import org.openide.nodes.Sheet;
+import org.openide.util.Lookup;
+
+public class ConversationNode extends AbstractNode implements Lookup.Provider {
+ private final int id;
+ private int optionId;
+ private String displayText;
+ private String stf;
+ private boolean option;
+ private boolean locked;
+ private boolean compiled;
+ private boolean endNode;
+ private boolean startNode;
+
+ public ConversationNode(String stf, boolean isOption, int id, boolean isEndNode, boolean isStartNode, int optionId) {
+ super(Children.LEAF);
+
+ this.stf = stf;
+ this.option = isOption;
+ this.displayText = "";
+ this.id = id;
+ this.endNode = isEndNode;
+ this.startNode = isStartNode;
+ this.optionId = optionId;
+
+ // Properties Window
+ if (!isStartNode)
+ setDisplayName("Conversation " + ((isOption) ? "Option " + String.valueOf(id) : ((isEndNode) ? "End" : "Response " + String.valueOf(id))));
+ else
+ setDisplayName("Begin Conversation Node");
+
+ setShortDescription("Properties for this Conversation Node");
+ }
+
+ public String getStf() {
+ return stf;
+ }
+
+ public void setStf(String stf) {
+ firePropertyChange("stf", this.stf, stf);
+ this.stf = stf;
+ }
+
+ public String getDisplayText() {
+ return displayText;
+ }
+
+ public void setDisplayText(String displayText) {
+ firePropertyChange("display", this.displayText, displayText);
+ this.displayText = displayText;
+ }
+
+ public boolean isOption() {
+ return option;
+ }
+
+ public void setOption(boolean option) {
+ this.option = option;
+ }
+
+ public boolean isLocked() {
+ return locked;
+ }
+
+ public void setLocked(boolean locked) {
+ this.locked = locked;
+ }
+
+ public int getId() {
+ return id;
+ }
+
+ public boolean isCompiled() {
+ return compiled;
+ }
+
+ public void setCompiled(boolean compiled) {
+ this.compiled = compiled;
+ }
+
+ public boolean isEndNode() {
+ return endNode;
+ }
+
+ public void setEndNode(boolean endNode) {
+ this.endNode = endNode;
+ }
+
+ public boolean isStartNode() {
+ return this.startNode;
+ }
+
+ public void setStartNode(boolean startNode) {
+ this.startNode = startNode;
+ }
+
+ public int getOptionId() {
+ return this.optionId;
+ }
+
+ public void setOptionId(int optionId) {
+ this.optionId = optionId;
+ }
+
+ @Override
+ protected Sheet createSheet() {
+ Sheet sheet = super.createSheet();
+ Sheet.Set set = Sheet.createPropertiesSet();
+
+ set.put(new IdProperty(this));
+ set.put(new StfProperty(this));
+ set.put(new DisplayProperty(this));
+ if (!endNode) {
+ set.put(new TypeProperty(this));
+
+ if (option) {
+ set.put(new OptionIdProperty(this));
+ }
+ }
+ set.put(new LockedProperty(this));
+
+ sheet.put(set);
+ return sheet;
+ }
+}
+
+class OptionIdProperty extends PropertySupport.ReadWrite {
+
+ private final ConversationNode node;
+
+ public OptionIdProperty(ConversationNode node) {
+ super("optionId", Integer.class, "Option ID", "ID used for displaying the order of this option in relation to the response (what option should show first in"
+ + "list of options)");
+ this.node = node;
+ }
+
+ @Override
+ public Integer getValue() throws IllegalAccessException, InvocationTargetException {
+ return node.getOptionId();
+ }
+
+ @Override
+ public void setValue(Integer val) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException {
+ node.setOptionId(val);
+ }
+
+}
+
+class IdProperty extends PropertySupport.ReadOnly {
+ private final ConversationNode node;
+
+ public IdProperty(ConversationNode node) {
+ super("id", Integer.class, "Id", "Conversation Node Id");
+ this.node = node;
+ }
+
+ @Override
+ public Integer getValue() throws IllegalAccessException, InvocationTargetException {
+ return node.getId();
+ }
+
+}
+class StfProperty extends PropertySupport.ReadWrite {
+
+ private final ConversationNode node;
+
+ public StfProperty(ConversationNode node) {
+ super("stf", String.class, "STF", "STF file for this conversation node. Ex: conversation/c_newbie_mentor:s_109");
+ this.setValue("oneline", true);
+ this.node = node;
+ }
+
+ @Override
+ public String getValue() throws IllegalAccessException, InvocationTargetException {
+ return node.getStf();
+ }
+
+ @Override
+ public void setValue(String val) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException {
+ node.setStf(String.valueOf(val));
+ }
+}
+
+class TypeProperty extends PropertySupport.ReadOnly {
+
+ private final ConversationNode node;
+
+ public TypeProperty(ConversationNode node) {
+ super("option", Boolean.class, "Option", "The conversation node is a response or a option");
+ this.node = node;
+ }
+
+ @Override
+ public Boolean getValue() throws IllegalAccessException, InvocationTargetException {
+ return node.isOption();
+ }
+
+ @Override
+ public void setValue(Boolean val) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException {
+ node.setOption(val);
+ }
+}
+
+class DisplayProperty extends PropertySupport.ReadWrite {
+ private final ConversationNode node;
+
+ public DisplayProperty(ConversationNode node) {
+ super ("display", String.class, "Text", "Optional text. This won't affect anything and can be left blank.\n" +
+ "You can use this for entering the value of a key from the coresponding STF for quick reference.");
+ this.node = node;
+ }
+
+ @Override
+ public String getValue() throws IllegalAccessException, InvocationTargetException {
+ return node.getDisplayText();
+ }
+
+ @Override
+ public void setValue(String val) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException {
+ node.setDisplayText(val);
+ }
+}
+
+class LockedProperty extends PropertySupport.ReadWrite {
+ private final ConversationNode node;
+
+ public LockedProperty(ConversationNode node) {
+ super("locked", Boolean.class, "Locked", "Determines if this node can be moved.");
+ this.node = node;
+ }
+
+ @Override
+ public Boolean getValue() throws IllegalAccessException, InvocationTargetException {
+ return node.isLocked();
+ }
+
+ @Override
+ public void setValue(Boolean val) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException {
+ node.setLocked(val);
+ }
+
+}
diff --git a/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/ConversationWidget.java b/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/ConversationWidget.java
new file mode 100644
index 0000000..1b7d18b
--- /dev/null
+++ b/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/ConversationWidget.java
@@ -0,0 +1,105 @@
+package com.projectswg.tools.csc.conversationeditor;
+
+import java.awt.Point;
+import java.beans.PropertyVetoException;
+import org.netbeans.api.visual.action.ActionFactory;
+import org.netbeans.api.visual.action.MoveStrategy;
+import org.netbeans.api.visual.action.SelectProvider;
+import org.netbeans.api.visual.layout.LayoutFactory;
+import org.netbeans.api.visual.widget.LabelWidget;
+import org.netbeans.api.visual.widget.Widget;
+import org.netbeans.api.visual.widget.general.IconNodeWidget;
+import org.openide.explorer.ExplorerManager;
+import org.openide.util.Exceptions;
+import org.openide.util.ImageUtilities;
+import org.openide.util.LookupEvent;
+import org.openide.util.LookupListener;
+
+public class ConversationWidget extends IconNodeWidget implements LookupListener {
+ private final ConversationNode attachedNode;
+ private final ExplorerManager mgr;
+
+ public ConversationWidget(SceneView scene, final ExplorerManager mgr, final ConversationNode node, boolean endConversation) {
+ super(scene.getScene());
+
+ this.attachedNode = node;
+ this.mgr = mgr;
+
+ if (node.isEndNode()) {
+ setLabel(node.getStf());
+ setImage(ImageUtilities.loadImage("com/projectswg/tools/csc/conversationeditor/conversation_end.png"));
+ } else {
+ setLabel(node.getStf());
+
+ if (node.isStartNode()) {
+ setImage(ImageUtilities.loadImage("com/projectswg/tools/csc/conversationeditor/conversation_begin.png"));
+ } else {
+ setImage(node.isOption() ? ImageUtilities.loadImage("com/projectswg/tools/csc/conversationeditor/conversation_option.png")
+ : ImageUtilities.loadImage("com/projectswg/tools/csc/conversationeditor/conversation_response.png"));
+ }
+ }
+
+ // Alignment/pos/ori
+ getLabelWidget().setAlignment(LabelWidget.Alignment.CENTER);
+ setLayout(LayoutFactory.createOverlayLayout());
+
+ // Add Actions
+ getActions().addAction(ActionFactory.createExtendedConnectAction(scene.getConnectionLayer(), new ConversationConnectProvider(scene)));
+ getActions().addAction(ActionFactory.createMoveAction(new MoveStrategy() {
+ @Override
+ public Point locationSuggested(Widget widget, Point originalLocation, Point suggestedLocation) {
+ if (!(widget instanceof ConversationWidget))
+ return suggestedLocation;
+
+ if (((ConversationWidget) widget).getAttachedNode().isLocked())
+ return originalLocation;
+
+ return suggestedLocation;
+ }
+ }, ActionFactory.createDefaultMoveProvider()));
+ getActions().addAction(ActionFactory.createSelectAction(new SelectProvider() {
+
+ @Override
+ public boolean isAimingAllowed(Widget widget, Point point, boolean bln) {
+ return true;
+ }
+
+ @Override
+ public boolean isSelectionAllowed(Widget widget, Point point, boolean bln) {
+ return true;
+ }
+
+ @Override
+ public void select(Widget widget, Point point, boolean bln) {
+ if (!(widget instanceof ConversationWidget))
+ return;
+
+ ConversationWidget convWidget = (ConversationWidget) widget;
+ ConversationNode convNode = convWidget.getAttachedNode();
+ convWidget.getExpManager().setRootContext(convNode);
+
+ ConversationNode[] nodes = new ConversationNode[1];
+ nodes[0] = node;
+ try {
+ convWidget.getExpManager().setSelectedNodes(nodes);
+ } catch (PropertyVetoException ex) {
+ Exceptions.printStackTrace(ex);
+ }
+ }
+ }, true));
+
+ }
+
+ public ConversationNode getAttachedNode() {
+ return attachedNode;
+ }
+
+ public ExplorerManager getExpManager() {
+ return mgr;
+ }
+
+ @Override
+ public void resultChanged(LookupEvent ev) {
+ throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+ }
+}
diff --git a/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/EditorTopComponent.form b/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/EditorTopComponent.form
new file mode 100644
index 0000000..605be9b
--- /dev/null
+++ b/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/EditorTopComponent.form
@@ -0,0 +1,34 @@
+
+
+
diff --git a/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/EditorTopComponent.java b/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/EditorTopComponent.java
new file mode 100644
index 0000000..3d09681
--- /dev/null
+++ b/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/EditorTopComponent.java
@@ -0,0 +1,120 @@
+package com.projectswg.tools.csc.conversationeditor;
+
+import org.netbeans.api.settings.ConvertAsProperties;
+import org.openide.awt.ActionID;
+import org.openide.awt.ActionReference;
+import org.openide.explorer.ExplorerManager;
+import org.openide.explorer.ExplorerUtils;
+import org.openide.util.NbBundle.Messages;
+import org.openide.windows.TopComponent;
+
+/**
+ * Top component which displays something.
+ */
+@ConvertAsProperties(
+ dtd = "-//com.projectswg.tools.csc.conversationeditor//Editor//EN",
+ autostore = false
+)
+@TopComponent.Description(
+ preferredID = "EditorTopComponent",
+ //iconBase="SET/PATH/TO/ICON/HERE",
+ persistenceType = TopComponent.PERSISTENCE_ALWAYS
+)
+@TopComponent.Registration(mode = "editor", openAtStartup = true)
+@ActionID(category = "Window", id = "com.projectswg.tools.csc.conversationeditor.EditorTopComponent")
+@ActionReference(path = "Menu/Window" /*, position = 333 */)
+@TopComponent.OpenActionRegistration(
+ displayName = "Conversastion Editor",
+ preferredID = "EditorTopComponent"
+)
+@Messages({
+ "CTL_EditorAction=Conversation Editor",
+ "CTL_EditorTopComponent=Conversation Editor",
+ "HINT_EditorTopComponent=Conversation Editor window"
+})
+public final class EditorTopComponent extends TopComponent implements ExplorerManager.Provider {
+
+ private final ExplorerManager mgr = new ExplorerManager();
+ private final SceneView scene;
+
+ public EditorTopComponent() {
+ initComponents();
+ setName(Bundle.CTL_EditorTopComponent());
+ setToolTipText(Bundle.HINT_EditorTopComponent());
+
+ SceneView scene = new SceneView(mgr);
+ scrollPane.setViewportView(scene.createView());
+
+ scene.addNode(new ConversationNode("Begin Conversation", false, 1, false, true, 0));
+ scene.addNode(new ConversationNode("", false, 1, true, false, 0));
+ /*
+ // Testing widgets!
+ Widget n1 = scene.addNode(new ConversationNode("conversation/c_newbie_mentor:s_1063", false, 1, false));
+ n1.setPreferredLocation(new Point(10, 100));
+
+ Widget n2 = scene.addNode(new ConversationNode("conversation/c_newbie_mentor:s_109", true, 2, false));
+ n2.setPreferredLocation(new Point(480, 100));
+
+ Widget n3 = scene.addNode(new ConversationNode("conversation/c_newbie_mentor:s_1067", true, 3, false));
+ n3.setPreferredLocation(new Point(480, 150));*/
+
+ associateLookup(ExplorerUtils.createLookup(mgr, getActionMap()));
+ this.scene = scene;
+ }
+
+ /**
+ * This method is called from within the constructor to initialize the form.
+ * WARNING: Do NOT modify this code. The content of this method is always
+ * regenerated by the Form Editor.
+ */
+ // //GEN-BEGIN:initComponents
+ private void initComponents() {
+
+ scrollPane = new javax.swing.JScrollPane();
+
+ javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
+ this.setLayout(layout);
+ layout.setHorizontalGroup(
+ layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addComponent(scrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE)
+ );
+ layout.setVerticalGroup(
+ layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addComponent(scrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE)
+ );
+ }// //GEN-END:initComponents
+
+ // Variables declaration - do not modify//GEN-BEGIN:variables
+ private javax.swing.JScrollPane scrollPane;
+ // End of variables declaration//GEN-END:variables
+ @Override
+ public void componentOpened() {
+ // TODO add custom code on component opening
+ }
+
+ @Override
+ public void componentClosed() {
+ // TODO add custom code on component closing
+ }
+
+ void writeProperties(java.util.Properties p) {
+ // better to version settings since initial version as advocated at
+ // http://wiki.apidesign.org/wiki/PropertyFiles
+ p.setProperty("version", "1.0");
+ // TODO store your settings
+ }
+
+ void readProperties(java.util.Properties p) {
+ String version = p.getProperty("version");
+ // TODO read your settings according to their version
+ }
+
+ @Override
+ public ExplorerManager getExplorerManager() {
+ return mgr;
+ }
+
+ public SceneView getScene() {
+ return scene;
+ }
+}
diff --git a/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/EditorTopComponentWstcref.xml b/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/EditorTopComponentWstcref.xml
new file mode 100644
index 0000000..b6a0cb2
--- /dev/null
+++ b/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/EditorTopComponentWstcref.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/SceneView.java b/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/SceneView.java
new file mode 100644
index 0000000..b3a8b6d
--- /dev/null
+++ b/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/SceneView.java
@@ -0,0 +1,94 @@
+package com.projectswg.tools.csc.conversationeditor;
+
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import javax.swing.JOptionPane;
+import org.netbeans.api.visual.action.ActionFactory;
+import org.netbeans.api.visual.graph.GraphScene;
+import org.netbeans.api.visual.widget.LayerWidget;
+import org.netbeans.api.visual.widget.Widget;
+import org.openide.explorer.ExplorerManager;
+import org.openide.windows.TopComponent;
+import org.openide.windows.WindowManager;
+
+public class SceneView extends GraphScene{
+ private final LayerWidget backgroundLayer;
+ private final LayerWidget mainLayer;
+ private final LayerWidget connectionLayer;
+ private final ExplorerManager mgr;
+
+ public SceneView(ExplorerManager mgr) {
+ setLookFeel(new ConversationLookFeel());
+
+ backgroundLayer = new LayerWidget(this);
+ addChild(backgroundLayer);
+
+ mainLayer = new LayerWidget(this);
+ addChild(mainLayer);
+
+ getActions().addAction(ActionFactory.createZoomAction());
+ getActions().addAction(ActionFactory.createWheelPanAction());
+ connectionLayer = new LayerWidget(this);
+ addChild(connectionLayer);
+
+ this.mgr = mgr;
+
+ }
+
+ @Override
+ protected Widget attachNodeWidget(ConversationNode n) {
+ final ConversationWidget widget = new ConversationWidget(this, mgr, n, n.isEndNode());
+ widget.getActions().addAction(createObjectHoverAction());
+
+ n.addPropertyChangeListener(new PropertyChangeListener() {
+
+ @Override
+ public void propertyChange(PropertyChangeEvent evt) {
+ TopComponent component = WindowManager.getDefault().findTopComponent("EditorTopComponent");
+ if (component == null || !(component instanceof EditorTopComponent))
+ return;
+
+ EditorTopComponent editor = (EditorTopComponent) component;
+ SceneView scene = editor.getScene();
+
+ if (scene == null)
+ return;
+
+ switch(evt.getPropertyName()) {
+ case "stf":
+ widget.getLabelWidget().setLabel((String) evt.getNewValue());
+ widget.repaint();
+
+ scene.validate();
+ break;
+ }
+ }
+ });
+ mainLayer.addChild(widget);
+ return widget;
+ }
+
+ @Override
+ protected Widget attachEdgeWidget(String e) {
+ JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(),
+ "Edge widget attachments is not support yet.", "Conversation Script Editor", JOptionPane.WARNING_MESSAGE);
+ return null;
+ }
+
+ @Override
+ protected void attachEdgeSourceAnchor(String e, ConversationNode n, ConversationNode n1) {
+ JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(),
+ "Edge widget attachments is not support yet.", "Conversation Script Editor", JOptionPane.WARNING_MESSAGE);
+ }
+
+ @Override
+ protected void attachEdgeTargetAnchor(String e, ConversationNode n, ConversationNode n1) {
+ JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(),
+ "Edge widget attachments is not support yet.", "Conversation Script Editor", JOptionPane.WARNING_MESSAGE);
+ }
+
+ public LayerWidget getConnectionLayer() {
+ return connectionLayer;
+ }
+
+}
\ No newline at end of file
diff --git a/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/actions/NewConvEnd.java b/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/actions/NewConvEnd.java
new file mode 100644
index 0000000..0ca1c4f
--- /dev/null
+++ b/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/actions/NewConvEnd.java
@@ -0,0 +1,53 @@
+/*
+ * To change this license header, choose License Headers in Project Properties.
+ * To change this template file, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package com.projectswg.tools.csc.conversationeditor.actions;
+
+import com.projectswg.tools.csc.conversationeditor.ConversationNode;
+import com.projectswg.tools.csc.conversationeditor.EditorTopComponent;
+import com.projectswg.tools.csc.conversationeditor.SceneView;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import org.openide.awt.ActionID;
+import org.openide.awt.ActionReference;
+import org.openide.awt.ActionReferences;
+import org.openide.awt.ActionRegistration;
+import org.openide.util.NbBundle.Messages;
+import org.openide.windows.TopComponent;
+import org.openide.windows.WindowManager;
+
+@ActionID(
+ category = "Edit",
+ id = "com.projectswg.tools.csc.conversationeditor.actions.NewConvEnd"
+)
+@ActionRegistration(
+ iconBase = "com/projectswg/tools/csc/conversationeditor/actions/conversation_tb_end.png",
+ displayName = "#CTL_NewConvEnd"
+)
+@ActionReferences({
+ @ActionReference(path = "Menu/Edit", position = 1362),
+ @ActionReference(path = "Toolbars/Edit", position = 450)
+})
+@Messages("CTL_NewConvEnd=New End Conversation")
+public final class NewConvEnd implements ActionListener {
+
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ TopComponent component = WindowManager.getDefault().findTopComponent("EditorTopComponent");
+ if (component == null || !(component instanceof EditorTopComponent))
+ return;
+
+ EditorTopComponent editor = (EditorTopComponent) component;
+ SceneView scene = editor.getScene();
+
+ if (scene == null)
+ return;
+
+ int id = scene.getNodes().size() + 1;
+ scene.addNode(new ConversationNode("New End Conversation " + String.valueOf(id), false, id, true, false, 0));
+
+ scene.validate();
+ }
+}
diff --git a/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/actions/NewConvOption.java b/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/actions/NewConvOption.java
new file mode 100644
index 0000000..763bf25
--- /dev/null
+++ b/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/actions/NewConvOption.java
@@ -0,0 +1,48 @@
+package com.projectswg.tools.csc.conversationeditor.actions;
+
+import com.projectswg.tools.csc.conversationeditor.ConversationNode;
+import com.projectswg.tools.csc.conversationeditor.EditorTopComponent;
+import com.projectswg.tools.csc.conversationeditor.SceneView;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import org.openide.awt.ActionID;
+import org.openide.awt.ActionReference;
+import org.openide.awt.ActionReferences;
+import org.openide.awt.ActionRegistration;
+import org.openide.util.NbBundle.Messages;
+import org.openide.windows.TopComponent;
+import org.openide.windows.WindowManager;
+
+@ActionID(
+ category = "File",
+ id = "com.projectswg.tools.csc.conversationeditor.actions.NewConvOption"
+)
+@ActionRegistration(
+ iconBase = "com/projectswg/tools/csc/conversationeditor/actions/conversation_tb_option.png",
+ displayName = "New Option"
+)
+@ActionReferences({
+ @ActionReference(path = "Menu/Edit", position = 1250),
+ @ActionReference(path = "Toolbars/Edit", position = 250)
+})
+@Messages("CTL_NewConvOption=New Option")
+public final class NewConvOption implements ActionListener {
+
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ TopComponent component = WindowManager.getDefault().findTopComponent("EditorTopComponent");
+ if (component == null || !(component instanceof EditorTopComponent))
+ return;
+
+ EditorTopComponent editor = (EditorTopComponent) component;
+ SceneView scene = editor.getScene();
+
+ if (scene == null)
+ return;
+
+ int id = scene.getNodes().size() + 1;
+ scene.addNode(new ConversationNode("New Conversation Option " + String.valueOf(id), true, id, false, false, 0));
+
+ scene.validate();
+ }
+}
diff --git a/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/actions/NewConvResponse.java b/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/actions/NewConvResponse.java
new file mode 100644
index 0000000..634a4ae
--- /dev/null
+++ b/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/actions/NewConvResponse.java
@@ -0,0 +1,52 @@
+/*
+ * To change this license header, choose License Headers in Project Properties.
+ * To change this template file, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package com.projectswg.tools.csc.conversationeditor.actions;
+
+import com.projectswg.tools.csc.conversationeditor.ConversationNode;
+import com.projectswg.tools.csc.conversationeditor.EditorTopComponent;
+import com.projectswg.tools.csc.conversationeditor.SceneView;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import org.openide.awt.ActionID;
+import org.openide.awt.ActionReference;
+import org.openide.awt.ActionReferences;
+import org.openide.awt.ActionRegistration;
+import org.openide.util.NbBundle.Messages;
+import org.openide.windows.TopComponent;
+import org.openide.windows.WindowManager;
+
+@ActionID(
+ category = "File",
+ id = "com.projectswg.tools.csc.conversationeditor.actions.NewConvResponse"
+)
+@ActionRegistration(
+ iconBase = "com/projectswg/tools/csc/conversationeditor/actions/conversation_tb_response.png",
+ displayName = "New Response"
+)
+@ActionReferences({
+ @ActionReference(path = "Menu/Edit", position = 1350, separatorAfter = 1375),
+ @ActionReference(path = "Toolbars/Edit", position = 350)
+})
+@Messages("CTL_NewConvResponse=New Response")
+public final class NewConvResponse implements ActionListener {
+
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ TopComponent component = WindowManager.getDefault().findTopComponent("EditorTopComponent");
+ if (component == null || !(component instanceof EditorTopComponent))
+ return;
+
+ EditorTopComponent editor = (EditorTopComponent) component;
+ SceneView scene = editor.getScene();
+
+ if (scene == null)
+ return;
+
+ int id = scene.getNodes().size() + 1;
+ scene.addNode(new ConversationNode("New Conversation Response " + String.valueOf(id), false, id, false, false, 0));
+ scene.validate();
+ }
+}
diff --git a/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/actions/conversation_tb_end.png b/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/actions/conversation_tb_end.png
new file mode 100644
index 0000000..d804b07
Binary files /dev/null and b/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/actions/conversation_tb_end.png differ
diff --git a/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/actions/conversation_tb_end24.png b/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/actions/conversation_tb_end24.png
new file mode 100644
index 0000000..59061ad
Binary files /dev/null and b/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/actions/conversation_tb_end24.png differ
diff --git a/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/actions/conversation_tb_option.png b/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/actions/conversation_tb_option.png
new file mode 100644
index 0000000..072e17c
Binary files /dev/null and b/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/actions/conversation_tb_option.png differ
diff --git a/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/actions/conversation_tb_option24.png b/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/actions/conversation_tb_option24.png
new file mode 100644
index 0000000..385d642
Binary files /dev/null and b/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/actions/conversation_tb_option24.png differ
diff --git a/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/actions/conversation_tb_response.png b/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/actions/conversation_tb_response.png
new file mode 100644
index 0000000..82fe201
Binary files /dev/null and b/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/actions/conversation_tb_response.png differ
diff --git a/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/actions/conversation_tb_response24.png b/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/actions/conversation_tb_response24.png
new file mode 100644
index 0000000..fd02fdc
Binary files /dev/null and b/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/actions/conversation_tb_response24.png differ
diff --git a/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/conversation_begin.png b/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/conversation_begin.png
new file mode 100644
index 0000000..4825acf
Binary files /dev/null and b/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/conversation_begin.png differ
diff --git a/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/conversation_end.png b/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/conversation_end.png
new file mode 100644
index 0000000..84a55c4
Binary files /dev/null and b/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/conversation_end.png differ
diff --git a/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/conversation_option.png b/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/conversation_option.png
new file mode 100644
index 0000000..15b95ed
Binary files /dev/null and b/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/conversation_option.png differ
diff --git a/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/conversation_response.png b/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/conversation_response.png
new file mode 100644
index 0000000..874120e
Binary files /dev/null and b/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/conversation_response.png differ
diff --git a/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/csc_logo.png b/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/csc_logo.png
new file mode 100644
index 0000000..7cc71c8
Binary files /dev/null and b/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/csc_logo.png differ
diff --git a/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/layer.xml b/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/layer.xml
new file mode 100644
index 0000000..47258db
--- /dev/null
+++ b/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/layer.xml
@@ -0,0 +1,88 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/propertiesWsmode.xml b/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/propertiesWsmode.xml
new file mode 100644
index 0000000..fdbed37
--- /dev/null
+++ b/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/propertiesWsmode.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/propertiesWstcref.xml b/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/propertiesWstcref.xml
new file mode 100644
index 0000000..a706bb6
--- /dev/null
+++ b/ConversationEditor/src/com/projectswg/tools/csc/conversationeditor/propertiesWstcref.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
diff --git a/build.xml b/build.xml
new file mode 100644
index 0000000..9a75610
--- /dev/null
+++ b/build.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+ Builds the module suite ConversationScriptCreator.
+
+
diff --git a/nbproject/build-impl.xml b/nbproject/build-impl.xml
new file mode 100644
index 0000000..0c8e1b3
--- /dev/null
+++ b/nbproject/build-impl.xml
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/nbproject/genfiles.properties b/nbproject/genfiles.properties
new file mode 100644
index 0000000..ba706a6
--- /dev/null
+++ b/nbproject/genfiles.properties
@@ -0,0 +1,11 @@
+build.xml.data.CRC32=351e2a03
+build.xml.script.CRC32=bfbbd184
+build.xml.stylesheet.CRC32=eaf9f76a@2.66.1
+# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
+# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
+nbproject/build-impl.xml.data.CRC32=351e2a03
+nbproject/build-impl.xml.script.CRC32=e2a68411
+nbproject/build-impl.xml.stylesheet.CRC32=0f381476@2.66.1
+nbproject/platform.xml.data.CRC32=351e2a03
+nbproject/platform.xml.script.CRC32=6dcbd131
+nbproject/platform.xml.stylesheet.CRC32=4e1f53d4@2.66.1
diff --git a/nbproject/platform.properties b/nbproject/platform.properties
new file mode 100644
index 0000000..89fdfd8
--- /dev/null
+++ b/nbproject/platform.properties
@@ -0,0 +1,18 @@
+branding.token=conversationscriptcreator
+cluster.path=\
+ ${nbplatform.active.dir}/platform
+disabled.modules=\
+ org.jdesktop.layout,\
+ org.netbeans.core.execution,\
+ org.netbeans.libs.jsr223,\
+ org.netbeans.modules.autoupdate.cli,\
+ org.netbeans.modules.autoupdate.services,\
+ org.netbeans.modules.autoupdate.ui,\
+ org.netbeans.modules.core.kit,\
+ org.netbeans.modules.favorites,\
+ org.netbeans.modules.templates,\
+ org.openide.compat,\
+ org.openide.execution,\
+ org.openide.options,\
+ org.openide.util.enumerations
+nbplatform.active=default
diff --git a/nbproject/platform.xml b/nbproject/platform.xml
new file mode 100644
index 0000000..020ab53
--- /dev/null
+++ b/nbproject/platform.xml
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/nbproject/private/platform-private.properties b/nbproject/private/platform-private.properties
new file mode 100644
index 0000000..b0eb319
--- /dev/null
+++ b/nbproject/private/platform-private.properties
@@ -0,0 +1 @@
+user.properties.file=C:\\Users\\Wave\\AppData\\Roaming\\NetBeans\\8.0\\build.properties
diff --git a/nbproject/private/private.xml b/nbproject/private/private.xml
new file mode 100644
index 0000000..6807a2b
--- /dev/null
+++ b/nbproject/private/private.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/nbproject/project.properties b/nbproject/project.properties
new file mode 100644
index 0000000..1d0b7a5
--- /dev/null
+++ b/nbproject/project.properties
@@ -0,0 +1,15 @@
+app.icon=branding/core/core.jar/org/netbeans/core/startup/frame48.gif
+app.name=${branding.token}
+app.title=Conversation Script Creator
+auxiliary.org-netbeans-modules-apisupport-installer.license-type=no
+auxiliary.org-netbeans-modules-apisupport-installer.os-linux=false
+auxiliary.org-netbeans-modules-apisupport-installer.os-macosx=false
+auxiliary.org-netbeans-modules-apisupport-installer.os-solaris=false
+auxiliary.org-netbeans-modules-apisupport-installer.os-windows=true
+auxiliary.org-netbeans-modules-apisupport-installer.pack200-enabled=false
+auxiliary.org-netbeans-spi-editor-hints-projects.perProjectHintSettingsFile=nbproject/cfg_hints.xml
+modules=\
+ ${project.com.projectswg.tools.csc.conversationeditor}:\
+ ${project.com.projectswg.tools.csc.compiler}
+project.com.projectswg.tools.csc.compiler=ConversationCompiler
+project.com.projectswg.tools.csc.conversationeditor=ConversationEditor
diff --git a/nbproject/project.xml b/nbproject/project.xml
new file mode 100644
index 0000000..6bee55b
--- /dev/null
+++ b/nbproject/project.xml
@@ -0,0 +1,9 @@
+
+
+ org.netbeans.modules.apisupport.project.suite
+
+
+ ConversationScriptCreator
+
+
+