Skip to content

Commit

Permalink
Fixed bug in navigator to have it update on first file load.
Browse files Browse the repository at this point in the history
Fixed bug to enable internal charsets for the REPL (had the wrong default encoding)
  • Loading branch information
Eric Thor authored and Eric Thor committed Jan 8, 2010
1 parent 1eff00d commit b696475
Show file tree
Hide file tree
Showing 11 changed files with 103 additions and 32 deletions.
4 changes: 2 additions & 2 deletions src/ide-tools/src/Example/ClojureParser.java
@@ -1,7 +1,7 @@

//----------------------------------------------------
// The following code was generated by CUP v0.11a beta 20060608
// Fri Jan 08 13:37:30 EST 2010
// Fri Jan 08 14:57:29 EST 2010
//----------------------------------------------------

package Example;
Expand All @@ -13,7 +13,7 @@
import clojure.lang.*;

/** CUP v0.11a beta 20060608 generated parser.
* @version Fri Jan 08 13:37:30 EST 2010
* @version Fri Jan 08 14:57:29 EST 2010
*/
public class ClojureParser extends java_cup.runtime.lr_parser {

Expand Down
2 changes: 1 addition & 1 deletion src/ide-tools/src/Example/ClojureSym.java
@@ -1,7 +1,7 @@

//----------------------------------------------------
// The following code was generated by CUP v0.11a beta 20060608
// Fri Jan 08 13:37:30 EST 2010
// Fri Jan 08 14:57:29 EST 2010
//----------------------------------------------------

package Example;
Expand Down
10 changes: 10 additions & 0 deletions src/ide/nbproject/project.xml
Expand Up @@ -3,6 +3,9 @@
<type>org.netbeans.modules.ant.freeform</type>
<configuration>
<general-data xmlns="http://www.netbeans.org/ns/freeform-project/1">
<name>org.enclojure.ide</name>
</general-data>
<general-data xmlns="http://www.netbeans.org/ns/freeform-project/2">
<!-- Do not use Project Properties customizer when editing this file manually. -->
<name>org.enclojure.ide</name>
<properties/>
Expand All @@ -11,11 +14,18 @@
<label>src</label>
<type>java</type>
<location>src</location>
<encoding>UTF-8</encoding>
</source-folder>
<source-folder>
<label>test</label>
<type>java</type>
<location>test</location>
<encoding>UTF-8</encoding>
</source-folder>
<source-folder>
<label>org.enclojure.ide</label>
<location>.</location>
<encoding>UTF-8</encoding>
</source-folder>
</folders>
<ide-actions>
Expand Down
@@ -1 +1 @@
user.properties.file=/Users/ericthor/.netbeans/6.8/build.properties
user.properties.file=/Users/ericthor/Dev/enclojure/src/plugins/netbeans/enclojure.plugin.netbeans/build/testuserdir/build.properties
Expand Up @@ -37,8 +37,9 @@ public class ClojureEditorKit extends NbEditorKit {

public static synchronized ClojureEditorKit create(Map<?,?> args) throws Exception {
Object mimetype = args.get("mime-type");
if(mimetype == null || !((String)mimetype).contains("text/x-clojure"))
if(mimetype == null || !((String)mimetype).contains("text/x-clojure")) {
throw new Exception("mime-type passed must contain 'text/x-clojure' in the string");
}
return new ClojureEditorKit((String)mimetype);
}

Expand Down
Expand Up @@ -21,6 +21,7 @@
[org.enclojure.ide.navigator.token-nav :as token-nav]
[org.enclojure.ide.nb.editor.completion.file-mapping :as file-mapping]
clojure.inspector clojure.set
[org.enclojure.ide.nb.editor.completion.symbol-caching :as symbol-caching]
[org.enclojure.commons.c-slf4j :as logger])
(:import
(java.util.logging Level)
Expand All @@ -44,7 +45,10 @@
(when (and (= oldValue true) (= newValue false))
(let [f (-> data-object .getPrimaryEntry .getFile)]
(logger/info "data-object-listener updating file " f)
(file-mapping/refresh-completion-cache-data (FileUtil/toFile f)))))
(file-mapping/refresh-completion-cache-data (FileUtil/toFile f))
; This needs to be called explicitly here only the first time.
; On first load the navigator window gets called before the symbols are loaded
(symbol-caching/get-nav-data-for (FileUtil/toFile f)))))

(defn get-property-listener [obj]
(proxy [PropertyChangeListener] []
Expand Down
Expand Up @@ -11,7 +11,7 @@ Platform_settings_At_One_Platform_Msg=Cannot remove all platforms. At least one

Settings_default_settings_for_repls_label=Default settings for REPLs

Settings_for_standalone_repl_label=Setting for stand-alone REPL
Settings_for_standalone_repl_label=Enable IDE REPL

Settings_hint_use_platform_manager_label=(Use the clojure platform manager to add more classpaths if required)

Expand Down
Expand Up @@ -43,7 +43,7 @@
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
<AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,-69,0,0,4,-69"/>
<AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,-47,0,0,4,-69"/>
</AuxValues>

<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
Expand Down Expand Up @@ -102,6 +102,8 @@
<Component id="jLabel13" min="-2" max="-2" attributes="0"/>
<EmptySpace type="separate" max="-2" attributes="0"/>
<Component id="clojurePlatformsComboBox" min="-2" pref="251" max="-2" attributes="0"/>
<EmptySpace type="separate" max="-2" attributes="0"/>
<Component id="includeAllClasspathsCheckBox" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
</Group>
Expand Down Expand Up @@ -168,10 +170,6 @@
</Group>
</Group>
</Group>
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="includeAllClasspathsCheckBox" min="-2" max="-2" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="1" max="-2" attributes="0">
Expand All @@ -186,6 +184,16 @@
</Group>
<EmptySpace min="-2" pref="244" max="-2" attributes="0"/>
</Group>
<Group type="102" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="jSeparator3" pref="682" max="32767" attributes="0"/>
<EmptySpace min="-2" pref="488" max="-2" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="enableIDEReplCheckBox" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="1044" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
Expand Down Expand Up @@ -247,7 +255,7 @@
</Group>
</Group>
</Group>
<EmptySpace pref="9" max="32767" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="jLabel15" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="jvmAdditionArgsTextField" alignment="3" min="-2" max="-2" attributes="0"/>
Expand All @@ -263,10 +271,13 @@
<Group type="103" groupAlignment="3" attributes="0">
<Component id="jLabel13" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="clojurePlatformsComboBox" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="includeAllClasspathsCheckBox" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="includeAllClasspathsCheckBox" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="36" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="jSeparator3" min="-2" pref="10" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="enableIDEReplCheckBox" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="39" max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
Expand Down Expand Up @@ -569,6 +580,22 @@
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="1"/>
</AuxValues>
</Component>
<Component class="javax.swing.JSeparator" name="jSeparator3">
</Component>
<Component class="javax.swing.JCheckBox" name="enableIDEReplCheckBox">
<Properties>
<Property name="selected" type="boolean" value="true"/>
<Property name="text" type="java.lang.String" value="Enable IDE Repl"/>
<Property name="toolTipText" type="java.lang.String" value="Enable the IDE REPL in the Window Menu"/>
<Property name="actionCommand" type="java.lang.String" value="*print-stack-trace-on-error*"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="enableIDEReplCheckBoxActionPerformed"/>
</Events>
<AuxValues>
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="1"/>
</AuxValues>
</Component>
</SubComponents>
</Container>
<Container class="javax.swing.JPanel" name="jPanelSettings">
Expand Down Expand Up @@ -645,7 +672,7 @@
<Component id="addPlatformButton" alignment="0" max="32767" attributes="1"/>
</Group>
</Group>
<Component id="jSeparator1" alignment="0" pref="377" max="32767" attributes="0"/>
<Component id="jSeparator1" alignment="0" pref="399" max="32767" attributes="0"/>
<Group type="102" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="errorLabel" min="-2" pref="23" max="-2" attributes="0"/>
Expand All @@ -658,7 +685,7 @@
<EmptySpace max="-2" attributes="0"/>
<Component id="jLabel7" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="4" max="-2" attributes="0"/>
<Component id="jScrollPane1" pref="232" max="32767" attributes="0"/>
<Component id="jScrollPane1" pref="254" max="32767" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="addClasspathButton" alignment="3" min="-2" max="-2" attributes="0"/>
Expand Down

0 comments on commit b696475

Please sign in to comment.