diff --git a/app/src/processing/app/Base.java b/app/src/processing/app/Base.java index fc0573266..0a0257b09 100644 --- a/app/src/processing/app/Base.java +++ b/app/src/processing/app/Base.java @@ -46,9 +46,9 @@ import processing.mode.java.JavaMode; public class Base { // Added accessors for 0218 because the UpdateCheck class was not properly // updating the values, due to javac inlining the static final values. - static private final int REVISION = 232; + static private final int REVISION = 233; /** This might be replaced by main() if there's a lib/version.txt file. */ - static private String VERSION_NAME = "0232"; //$NON-NLS-1$ + static private String VERSION_NAME = "0233"; //$NON-NLS-1$ /** Set true if this a proper release rather than a numbered revision. */ // static private boolean RELEASE = false; @@ -2360,8 +2360,8 @@ public class Base { static public File getLibFile(String filename) throws IOException { return new File(getContentFile("lib"), filename); } - - + + /** * Return an InputStream for a file inside the Processing lib folder. */ diff --git a/app/src/processing/app/PreferencesFrame.java b/app/src/processing/app/PreferencesFrame.java index 7064e3e6e..070c2343f 100644 --- a/app/src/processing/app/PreferencesFrame.java +++ b/app/src/processing/app/PreferencesFrame.java @@ -71,7 +71,7 @@ public class PreferencesFrame { JCheckBox warningsCheckerBox; JCheckBox codeCompletionBox; JCheckBox importSuggestionsBox; - JCheckBox codeCompletionTriggerBox; + //JCheckBox codeCompletionTriggerBox; JComboBox displaySelectionBox; JComboBox languageSelectionBox; @@ -398,29 +398,29 @@ public class PreferencesFrame { // [ ] Enable Code Completion - PDE X codeCompletionBox = - new JCheckBox(Language.text("preferences.code_completion")); + new JCheckBox(Language.text("preferences.code_completion") + " Ctrl-" + Language.text("preferences.cmd_space")); pain.add(codeCompletionBox); d = codeCompletionBox.getPreferredSize(); codeCompletionBox.setBounds(left, top, d.width + 10, d.height); - codeCompletionBox.addActionListener(new ActionListener() { +// codeCompletionBox.addActionListener(new ActionListener() { +// +// @Override +// public void actionPerformed(ActionEvent e) { +// // Disble code completion trigger option if completion is disabled +// codeCompletionTriggerBox.setEnabled(codeCompletionBox.isSelected()); +// } +// }); - @Override - public void actionPerformed(ActionEvent e) { - // Disble code completion trigger option if completion is disabled - codeCompletionTriggerBox.setEnabled(codeCompletionBox.isSelected()); - } - }); +// int toggleLeft = left + d.width; - int toggleLeft = left + d.width; + // [ ] Toggle Code Completion Trigger - PDE X. No longer needed (Manindra) - // [ ] Toggle Code Completion Trigger - PDE X - - codeCompletionTriggerBox = - new JCheckBox(Language.text("preferences.trigger_with")+" Ctrl-"+Language.text("preferences.cmd_space")); - pain.add(codeCompletionTriggerBox); - d = codeCompletionTriggerBox.getPreferredSize(); - codeCompletionTriggerBox.setBounds(toggleLeft, top, d.width + 10, d.height); - right = Math.max(right, toggleLeft + d.width); +// codeCompletionTriggerBox = +// new JCheckBox(Language.text("preferences.trigger_with")+" Ctrl-"+Language.text("preferences.cmd_space")); +// pain.add(codeCompletionTriggerBox); +// d = codeCompletionTriggerBox.getPreferredSize(); +// codeCompletionTriggerBox.setBounds(toggleLeft, top, d.width + 10, d.height); +// right = Math.max(right, toggleLeft + d.width); top += d.height + GUI_BETWEEN; // [ ] Show import suggestions - PDE X @@ -764,7 +764,7 @@ public class PreferencesFrame { Preferences.setBoolean("pdex.errorCheckEnabled", errorCheckerBox.isSelected()); Preferences.setBoolean("pdex.warningsEnabled", warningsCheckerBox.isSelected()); Preferences.setBoolean("pdex.completion", codeCompletionBox.isSelected()); - Preferences.setBoolean("pdex.completion.trigger", codeCompletionTriggerBox.isSelected()); + //Preferences.setBoolean("pdex.completion.trigger", codeCompletionTriggerBox.isSelected()); Preferences.setBoolean("pdex.importSuggestEnabled", importSuggestionsBox.isSelected()); for (Editor editor : base.getEditors()) { @@ -779,8 +779,8 @@ public class PreferencesFrame { errorCheckerBox.setSelected(Preferences.getBoolean("pdex.errorCheckEnabled")); warningsCheckerBox.setSelected(Preferences.getBoolean("pdex.warningsEnabled")); codeCompletionBox.setSelected(Preferences.getBoolean("pdex.completion")); - codeCompletionTriggerBox.setSelected(Preferences.getBoolean("pdex.completion.trigger")); - codeCompletionTriggerBox.setEnabled(codeCompletionBox.isSelected()); + //codeCompletionTriggerBox.setSelected(Preferences.getBoolean("pdex.completion.trigger")); + //codeCompletionTriggerBox.setEnabled(codeCompletionBox.isSelected()); importSuggestionsBox.setSelected(Preferences.getBoolean("pdex.importSuggestEnabled")); deletePreviousBox. setSelected(Preferences.getBoolean("export.delete_target_folder")); //$NON-NLS-1$ diff --git a/build/build.xml b/build/build.xml index 0e98bff88..7e64fa3f0 100755 --- a/build/build.xml +++ b/build/build.xml @@ -490,6 +490,14 @@ + + + + + + + diff --git a/build/shared/lib/defaults.txt b/build/shared/lib/defaults.txt index d8ae69110..4e7ad7536 100644 --- a/build/shared/lib/defaults.txt +++ b/build/shared/lib/defaults.txt @@ -350,5 +350,7 @@ pdex.errorCheckEnabled=true pdex.warningsEnabled=true pdex.writeErrorLogs=false +# Enable auto-completion when hitting ctrl-space pdex.completion = false +# Trigger happy version of completion that fires more often pdex.completion.trigger = false diff --git a/build/shared/lib/languages/PDE.properties b/build/shared/lib/languages/PDE.properties index ab3f4caf9..961212cc4 100644 --- a/build/shared/lib/languages/PDE.properties +++ b/build/shared/lib/languages/PDE.properties @@ -167,7 +167,7 @@ preferences.enable_complex_text_input = Enable complex text input preferences.enable_complex_text_input_example = i.e. Japanese preferences.continuously_check = Continuously check for errors preferences.show_warnings = Show warnings -preferences.code_completion = Code completion +preferences.code_completion = Code completion with preferences.trigger_with = Trigger with preferences.cmd_space = space preferences.suggest_imports = Suggest import statements diff --git a/build/shared/revisions.txt b/build/shared/revisions.txt index 28d565493..3ff4e1e29 100644 --- a/build/shared/revisions.txt +++ b/build/shared/revisions.txt @@ -1,7 +1,9 @@ PROCESSING 3.0a5 (REV 0232) - 16 November 2014 -Hello from the University of Denver! This release has tons of bug fixing -and incorporating various pull requests. +Hello from the University of Denver! I'm here with Casey, Dan, Andres, +and Manindra working on 3.0. Chris Coleman and Laleh Mehran have been +hosting us on behalf of the EDP program. It all looks a bit like this: +https://twitter.com/digitalcoleman/status/533784122179596288 [ changes ] @@ -38,6 +40,9 @@ and incorporating various pull requests. https://github.com/processing/processing/issues/2873 https://github.com/processing/processing-docs/issues/167 ++ Change code completion preferences a bit. It's still turned off by + default, but enable it and help us test! + [ bug fixes ] diff --git a/core/done.txt b/core/done.txt index c6fb29dd3..ee3febb8c 100644 --- a/core/done.txt +++ b/core/done.txt @@ -1,3 +1,67 @@ +0232 core (3.0a5) +X detect CMYK JPEG images and return null +X https://community.oracle.com/thread/1272045?start=0&tstart=0 +X show a warning when calling getVertexCount() on GROUP or PRIMITIVE shapes +X https://github.com/processing/processing/issues/2873 +X https://github.com/processing/processing-docs/issues/167 +X replace is3D(boolean) with set3D() + +data +X fix XML.getString() with a default when no attrs are present at all +X was causing a NullPointerException +X also fixes getInt() et al +X fix how dict works to not return '0' values +X add optional second param +X fixed for FloatDict and IntDict +X StringDict won't throw an exception, but optional second param added +X add insert() with a single item to StringList, IntList, FloatList + +table +X fix how nulls are handled with Table.replace() +X add (simple) ODS writer to Table +X add addRows(Table) method (more efficient, one resize) +X support "header" option with ODS files + +pulls +X Fix check in loadShader() +X https://github.com/processing/processing/pull/2867 +X Refined PShader uniform missing message fixes +X https://github.com/processing/processing/pull/2869 +X Use correct parameter types in FloatList methods +X https://github.com/processing/processing/pull/2902 +X Pass correct offset to glCopyTexSubImage2D +X https://github.com/processing/processing/pull/2898 +X beginShape(POINTS) not working for PShape +X https://github.com/processing/processing/issues/2912 +X https://github.com/processing/processing/pull/2915 +X Multiple blending fixes & improvements +X https://github.com/processing/processing/pull/2921 +X https://github.com/processing/processing/issues/2807 +X https://github.com/processing/processing/issues/1224 +o https://github.com/processing/processing/pull/2601 +o Sort out blending differences with P2D/P3D +o might be that compatible images not setting alpha mode correctly +o image = gc.createCompatibleVolatileImage(source.width, source.height, Transparency.TRANSLUCENT); +o https://github.com/processing/processing/issues/1844 +X Prevent lerpColor from always rounding down +X https://github.com/processing/processing/issues/2812 +X https://github.com/processing/processing/pull/2813 +X Allow mask() with PGraphicsJava2D +X https://github.com/processing/processing/pull/2910 +X OpenGL renderers ignore vertex winding in contours +X https://github.com/processing/processing/issues/2665 +X https://github.com/processing/processing/pull/2927 +X NPE when calling Client.ip() after the connection has been closed +X https://github.com/processing/processing/issues/2576 +X https://github.com/processing/processing/pull/2922 + +andres +A Confusing message: The shader doesn't have a uniform called "foo" +A https://github.com/processing/processing/issues/2593 +A Exceptions in P3D / P2D not showing up properly +A https://github.com/processing/processing/issues/2930 + + 0231 core (3.0a4) X RuntimeException thrown for open arcs under specific parameters in P2D X https://github.com/processing/processing/issues/2854 diff --git a/core/todo.txt b/core/todo.txt index 7074d7c9f..6d769a68a 100644 --- a/core/todo.txt +++ b/core/todo.txt @@ -1,69 +1,6 @@ -0232 core (3.0a5) -X detect CMYK JPEG images and return null -X https://community.oracle.com/thread/1272045?start=0&tstart=0 -X show a warning when calling getVertexCount() on GROUP or PRIMITIVE shapes -X https://github.com/processing/processing/issues/2873 -X https://github.com/processing/processing-docs/issues/167 -X replace is3D(boolean) with set3D() - -data -X fix XML.getString() with a default when no attrs are present at all -X was causing a NullPointerException -X also fixes getInt() et al -X fix how dict works to not return '0' values -X add optional second param -X fixed for FloatDict and IntDict -X StringDict won't throw an exception, but optional second param added -X add insert() with a single item to StringList, IntList, FloatList - -table -X fix how nulls are handled with Table.replace() -X add (simple) ODS writer to Table -X add addRows(Table) method (more efficient, one resize) -X support "header" option with ODS files - -pulls -X Fix check in loadShader() -X https://github.com/processing/processing/pull/2867 -X Refined PShader uniform missing message fixes -X https://github.com/processing/processing/pull/2869 -X Use correct parameter types in FloatList methods -X https://github.com/processing/processing/pull/2902 -X Pass correct offset to glCopyTexSubImage2D -X https://github.com/processing/processing/pull/2898 -X beginShape(POINTS) not working for PShape -X https://github.com/processing/processing/issues/2912 -X https://github.com/processing/processing/pull/2915 -X Multiple blending fixes & improvements -X https://github.com/processing/processing/pull/2921 -X https://github.com/processing/processing/issues/2807 -X https://github.com/processing/processing/issues/1224 -o https://github.com/processing/processing/pull/2601 -o Sort out blending differences with P2D/P3D -o might be that compatible images not setting alpha mode correctly -o image = gc.createCompatibleVolatileImage(source.width, source.height, Transparency.TRANSLUCENT); -o https://github.com/processing/processing/issues/1844 -X Prevent lerpColor from always rounding down -X https://github.com/processing/processing/issues/2812 -X https://github.com/processing/processing/pull/2813 -X Allow mask() with PGraphicsJava2D -X https://github.com/processing/processing/pull/2910 -X OpenGL renderers ignore vertex winding in contours -X https://github.com/processing/processing/issues/2665 -X https://github.com/processing/processing/pull/2927 -X NPE when calling Client.ip() after the connection has been closed -X https://github.com/processing/processing/issues/2576 -X https://github.com/processing/processing/pull/2922 - -andres -A Confusing message: The shader doesn't have a uniform called "foo" -A https://github.com/processing/processing/issues/2593 -A Exceptions in P3D / P2D not showing up properly -A https://github.com/processing/processing/issues/2930 - - 0233 (3.0a6) + graphics X roll back full screen changes X https://github.com/processing/processing/issues/2641 diff --git a/done.txt b/done.txt index cb033569f..c84a5c398 100644 --- a/done.txt +++ b/done.txt @@ -1,3 +1,71 @@ +0232 pde (3.0a5) +X remove debug message printed to the console when the ctrl key is down in PDE X +X size(640,360 , P3D) doesn't work properly +X https://github.com/processing/processing/issues/2924 +X https://github.com/processing/processing/pull/2925 +X remove sound library, have it installed separately like video +X Fix the shortcut keybindings in editor tab popup menu +X https://github.com/processing/processing/issues/179 +X https://github.com/processing/processing/pull/2821 +X answer deb questions +X https://github.com/processing/processing/issues/114 +X change how languages are loaded +X add local override (needs documentation) +X figure out copyDir() problems before pull +o moving window to a new location is broken due to the pull +X update to use new 7u72 version of JRE (and JDK) stuff +X `return` keyword not treated as such when followed by a bracket +X https://github.com/processing/processing/issues/2099 +X https://github.com/processing/processing/pull/2958 +X ToolTipManager error fix from Manindra +X https://github.com/processing/processing/issues/2926 +X Change code completion preferences a bit + +pulls +X Cmd + H runs sketch instead of hiding the PDE (OS X) +X https://github.com/processing/processing/issues/2881 +X Migrate to unsynchronized data structures +X https://github.com/processing/processing/pull/2863 +X improve contrib manager localization +X https://github.com/processing/processing/pull/2870 +X Fix typo in spanish translation +X https://github.com/processing/processing/pull/2906 +X Update ECJ, use 1.7 as source and target Java version +X https://github.com/processing/processing/pull/2907 +X Fix infinite recursion in sound library +X https://github.com/processing/processing/pull/2897 +X Add missing generic type parameters +X https://github.com/processing/processing/pull/2899 +X Remove unused Base.builtOnce instance variable +X https://github.com/processing/processing/pull/2864 +X miscellaneous fixes +X https://github.com/processing/processing/pull/2865 +X moved the language stuff to the settings folder +X https://github.com/processing/processing/pull/2941 +X Some minor UpdateChecker refactorings +X https://github.com/processing/processing/pull/2830 +X Minor improvements to the Contribution Manager's updates check +X https://github.com/processing/processing/pull/2861 +X make Cut and Copy in the edit menu active only if some text is selected +X https://github.com/processing/processing/pull/2834 +X Fix renaming from RGB to Rgb.java and others +X https://github.com/processing/processing/pull/2825 +X sketches should only write to the console of their editor window +X https://github.com/processing/processing/issues/153 +X https://github.com/processing/processing/issues/2858 +X https://github.com/processing/processing/pull/2827 +X extend translations and update German language +X https://github.com/processing/processing/pull/2949 + +pulls (net) +X NullPointerException message when Server writes to a disconnected client +X https://github.com/processing/processing/issues/2577 +X https://github.com/processing/processing/pull/2578 +X Implement the active() method for Serial and Server +X https://github.com/processing/processing/issues/2364 +X https://github.com/processing/processing/pull/2588 + + 0231 pde (3.0a4) X add new download redirect for contribs.txt X https://github.com/processing/processing/issues/2850 diff --git a/pdex/src/processing/mode/experimental/ASTGenerator.java b/pdex/src/processing/mode/experimental/ASTGenerator.java index 3df3e7f8e..aaadb4683 100644 --- a/pdex/src/processing/mode/experimental/ASTGenerator.java +++ b/pdex/src/processing/mode/experimental/ASTGenerator.java @@ -771,8 +771,7 @@ public class ASTGenerator { ArrayList newCandidate = new ArrayList(); newWord = newWord.toLowerCase(); for (CompletionCandidate comp : candidates) { - if(comp.toString().toLowerCase().startsWith(newWord)){ - // log("Adding " + comp); + if(comp.getNoHtmlLabel().toLowerCase().startsWith(newWord)){ newCandidate.add(comp); } } @@ -988,9 +987,12 @@ public class ASTGenerator { continue; matchedClass = matchedClass.substring(d + 1); //class name - candidates.add(new CompletionCandidate(matchedClass, - matchedClass + " : " - + matchedClass2.substring(0, d) , matchedClass, CompletionCandidate.PREDEF_CLASS)); // display package name in grey + candidates + .add(new CompletionCandidate(matchedClass, "" + + matchedClass + " : " + + matchedClass2.substring(0, d) + "", + matchedClass, + CompletionCandidate.PREDEF_CLASS)); // display package name in grey //log("-> " + className); } } @@ -1081,10 +1083,14 @@ public class ASTGenerator { || candidates.get(i).getType() == CompletionCandidate.PREDEF_METHOD) { CompletionCandidate cc = candidates.get(i - 1); String label = cc.getLabel(); - log(label); int x = label.lastIndexOf(')'); - cc.setLabel((cc.getLabel().contains("") ? "" : "") - + cc.getElementName() + "(...)" + label.substring(x + 1)); + if(candidates.get(i).getType() == CompletionCandidate.PREDEF_METHOD) { + cc.setLabel((cc.getLabel().contains("") ? "" : "") + + cc.getElementName() + "(...)" + label.substring(x + 1)); + } + else { + cc.setLabel(cc.getElementName() + "(...)" + label.substring(x + 1)); + } cc.setCompletionString(cc.getElementName() + "("); ignoredSome = true; continue; diff --git a/pdex/src/processing/mode/experimental/CompletionCandidate.java b/pdex/src/processing/mode/experimental/CompletionCandidate.java index fe1a292ab..6fa4e030e 100644 --- a/pdex/src/processing/mode/experimental/CompletionCandidate.java +++ b/pdex/src/processing/mode/experimental/CompletionCandidate.java @@ -29,7 +29,7 @@ public class CompletionCandidate implements Comparable{ public CompletionCandidate(Method method) { method.getDeclaringClass().getName(); elementName = method.getName(); - StringBuilder label = new StringBuilder(method.getName() + "("); + StringBuilder label = new StringBuilder(""+method.getName() + "("); StringBuilder cstr = new StringBuilder(method.getName() + "("); for (int i = 0; i < method.getParameterTypes().length; i++) { label.append(method.getParameterTypes()[i].getSimpleName()); @@ -44,7 +44,7 @@ public class CompletionCandidate implements Comparable{ label.append(")"); if(method.getReturnType() != null) label.append(" : " + method.getReturnType().getSimpleName()); - label.append(" - " + method.getDeclaringClass().getSimpleName()); + label.append(" - " + method.getDeclaringClass().getSimpleName() + ""); cstr.append(")"); this.label = label.toString(); this.completionString = cstr.toString(); @@ -121,8 +121,8 @@ public class CompletionCandidate implements Comparable{ // + matchedClass + " : " + "" // + matchedClass2.substring(0, d) + "", matchedClass // + "" - label = f.getName() + " : " + f.getType().getSimpleName() - + " - " + f.getDeclaringClass().getSimpleName(); + label = "" + f.getName() + " : " + f.getType().getSimpleName() + + " - " + f.getDeclaringClass().getSimpleName() + ""; completionString = elementName; wrappedObject = f; } @@ -160,6 +160,23 @@ public class CompletionCandidate implements Comparable{ public String getLabel() { return label; } + + public String getNoHtmlLabel(){ + if(!label.contains("")) { + return label; + } + else { + StringBuilder ans = new StringBuilder(label); + while(ans.indexOf("<") > -1) { + int a = ans.indexOf("<"), b = ans.indexOf(">"); + if(a > b) break; + ans.replace(a, b+1, ""); +// System.out.println(ans.replace(a, b+1, "")); +// System.out.println(ans + "--"); + } + return ans.toString(); + } + } public void setLabel(String label) { this.label = label; @@ -202,7 +219,7 @@ public class CompletionCandidate implements Comparable{ } else if (wrappedObject instanceof Method) { Method method = (Method)wrappedObject; - StringBuilder label = new StringBuilder(method.getName() + "("); + StringBuilder label = new StringBuilder("" + method.getName() + "("); StringBuilder cstr = new StringBuilder(method.getName() + "("); for (int i = 0; i < method.getParameterTypes().length; i++) { label.append(method.getParameterTypes()[i].getSimpleName()); @@ -217,10 +234,28 @@ public class CompletionCandidate implements Comparable{ label.append(")"); if(method.getReturnType() != null) label.append(" : " + method.getReturnType().getSimpleName()); - label.append(" - " + method.getDeclaringClass().getSimpleName()); + label.append(" - " + method.getDeclaringClass().getSimpleName() + ""); cstr.append(")"); this.label = label.toString(); this.completionString = cstr.toString(); + /* + * StringBuilder label = new StringBuilder(""+method.getName() + "("); + StringBuilder cstr = new StringBuilder(method.getName() + "("); + for (int i = 0; i < method.getParameterTypes().length; i++) { + label.append(method.getParameterTypes()[i].getSimpleName()); + if (i < method.getParameterTypes().length - 1) { + label.append(","); + cstr.append(","); + } + } + if(method.getParameterTypes().length == 1) { + cstr.append(' '); + } + label.append(")"); + if(method.getReturnType() != null) + label.append(" : " + method.getReturnType().getSimpleName()); + label.append(" - " + method.getDeclaringClass().getSimpleName() + ""); + * */ } } diff --git a/pdex/src/processing/mode/experimental/ErrorMessageSimplifier.java b/pdex/src/processing/mode/experimental/ErrorMessageSimplifier.java index 7ad7909b2..5e3b22844 100644 --- a/pdex/src/processing/mode/experimental/ErrorMessageSimplifier.java +++ b/pdex/src/processing/mode/experimental/ErrorMessageSimplifier.java @@ -7,7 +7,7 @@ import java.util.TreeMap; import org.eclipse.jdt.core.compiler.IProblem; import org.eclipse.jdt.internal.compiler.problem.DefaultProblem; - +import static processing.mode.experimental.ExperimentalMode.log; public class ErrorMessageSimplifier { /** @@ -78,14 +78,7 @@ public class ErrorMessageSimplifier { switch (iprob.getID()) { case IProblem.ParsingError: if (args.length > 0) { - if (problem.getMessage().endsWith("expected")) { - result = "Probably a \"" + args[args.length - 1] - + "\" should go here"; - } - else { - result = "Error on \"" + args[0] - + "\""; - } + result = "Error on \"" + args[0] + "\""; } break; case IProblem.ParsingErrorDeleteToken: @@ -118,6 +111,9 @@ public class ErrorMessageSimplifier { result = "Error on \"" + args[0] + "\""; } } + else { + result = "Error on \"" + args[0] + "\""; + } } break; case IProblem.ParsingErrorInsertTokenAfter: diff --git a/pdex/src/processing/mode/experimental/ExperimentalMode.java b/pdex/src/processing/mode/experimental/ExperimentalMode.java index 8b8992bae..6715010f9 100755 --- a/pdex/src/processing/mode/experimental/ExperimentalMode.java +++ b/pdex/src/processing/mode/experimental/ExperimentalMode.java @@ -140,13 +140,13 @@ public class ExperimentalMode extends JavaMode { debugOutputEnabled = false, errorLogsEnabled = false, autoSaveEnabled = true, autoSavePromptEnabled = true, defaultAutoSaveEnabled = true, // ,untitledAutoSaveEnabled; - ccTriggerEnabled = true, importSuggestEnabled = true; + ccTriggerEnabled = false, importSuggestEnabled = true; public static int autoSaveInterval = 3; //in minutes /** * After how many typed characters, code completion is triggered */ - volatile public static int codeCompletionTriggerLength = 2; + volatile public static int codeCompletionTriggerLength = 1; static public final String prefErrorCheck = "pdex.errorCheckEnabled"; static public final String prefWarnings = "pdex.warningsEnabled"; diff --git a/pdex/src/processing/mode/experimental/TextArea.java b/pdex/src/processing/mode/experimental/TextArea.java index a17cd2dee..baa8d56bf 100644 --- a/pdex/src/processing/mode/experimental/TextArea.java +++ b/pdex/src/processing/mode/experimental/TextArea.java @@ -228,18 +228,17 @@ public class TextArea extends JEditTextArea { final KeyEvent evt2 = evt; if (keyChar == '.') { - if (ExperimentalMode.codeCompletionsEnabled && ExperimentalMode.ccTriggerEnabled) { + if (ExperimentalMode.codeCompletionsEnabled) { log("[KeyEvent]" + KeyEvent.getKeyText(evt2.getKeyCode()) + " |Prediction started"); log("Typing: " + fetchPhrase(evt2)); } } else if (keyChar == ' ') { // Trigger on Ctrl-Space - if (!Base.isMacOS() && ExperimentalMode.ccTriggerEnabled && + if (!Base.isMacOS() && ExperimentalMode.codeCompletionsEnabled && (evt.isControlDown() || evt.isMetaDown())) { SwingWorker worker = new SwingWorker() { protected Object doInBackground() throws Exception { // Provide completions only if it's enabled - if (ExperimentalMode.codeCompletionsEnabled - && ExperimentalMode.ccTriggerEnabled) { + if (ExperimentalMode.codeCompletionsEnabled) { getDocument().remove(getCaretPosition() - 1, 1); // Remove the typed space log("[KeyEvent]" + evt2.getKeyChar() + " |Prediction started"); log("Typing: " + fetchPhrase(evt2)); @@ -252,7 +251,9 @@ public class TextArea extends JEditTextArea { hideSuggestion(); // hide on spacebar } } else { - prepareSuggestions(evt2); + if(ExperimentalMode.codeCompletionsEnabled) { + prepareSuggestions(evt2); + } } } // #2699 - Special case for OS X, where Ctrl-Space is not detected as Key_Typed -_- @@ -262,8 +263,7 @@ public class TextArea extends JEditTextArea { SwingWorker worker = new SwingWorker() { protected Object doInBackground() throws Exception { // Provide completions only if it's enabled - if (ExperimentalMode.codeCompletionsEnabled - && ExperimentalMode.ccTriggerEnabled) { + if (ExperimentalMode.codeCompletionsEnabled) { log("[KeyEvent]" + KeyEvent.getKeyText(evt2.getKeyCode()) + " |Prediction started"); log("Typing: " + fetchPhrase(evt2)); } @@ -283,7 +283,7 @@ public class TextArea extends JEditTextArea { protected Object doInBackground() throws Exception { // Provide completions only if it's enabled if (ExperimentalMode.codeCompletionsEnabled - && (!ExperimentalMode.ccTriggerEnabled || suggestion.isVisible())) { + && (ExperimentalMode.ccTriggerEnabled || suggestion.isVisible())) { log("[KeyEvent]" + evt.getKeyChar() + " |Prediction started"); log("Typing: " + fetchPhrase(evt)); } diff --git a/todo.txt b/todo.txt index 20b1988eb..92f574e55 100644 --- a/todo.txt +++ b/todo.txt @@ -1,72 +1,6 @@ -0232 pde (3.0a5) -X remove debug message printed to the console when the ctrl key is down in PDE X -X size(640,360 , P3D) doesn't work properly -X https://github.com/processing/processing/issues/2924 -X https://github.com/processing/processing/pull/2925 -X remove sound library, have it installed separately like video -X Fix the shortcut keybindings in editor tab popup menu -X https://github.com/processing/processing/issues/179 -X https://github.com/processing/processing/pull/2821 -X answer deb questions -X https://github.com/processing/processing/issues/114 -X change how languages are loaded -X add local override (needs documentation) -X figure out copyDir() problems before pull -o moving window to a new location is broken due to the pull -X update to use new 7u72 version of JRE (and JDK) stuff -X `return` keyword not treated as such when followed by a bracket -X https://github.com/processing/processing/issues/2099 -X https://github.com/processing/processing/pull/2958 -X ToolTipManager error fix from Manindra -X https://github.com/processing/processing/issues/2926 - -pulls -X Cmd + H runs sketch instead of hiding the PDE (OS X) -X https://github.com/processing/processing/issues/2881 -X Migrate to unsynchronized data structures -X https://github.com/processing/processing/pull/2863 -X improve contrib manager localization -X https://github.com/processing/processing/pull/2870 -X Fix typo in spanish translation -X https://github.com/processing/processing/pull/2906 -X Update ECJ, use 1.7 as source and target Java version -X https://github.com/processing/processing/pull/2907 -X Fix infinite recursion in sound library -X https://github.com/processing/processing/pull/2897 -X Add missing generic type parameters -X https://github.com/processing/processing/pull/2899 -X Remove unused Base.builtOnce instance variable -X https://github.com/processing/processing/pull/2864 -X miscellaneous fixes -X https://github.com/processing/processing/pull/2865 -X moved the language stuff to the settings folder -X https://github.com/processing/processing/pull/2941 -X Some minor UpdateChecker refactorings -X https://github.com/processing/processing/pull/2830 -X Minor improvements to the Contribution Manager's updates check -X https://github.com/processing/processing/pull/2861 -X make Cut and Copy in the edit menu active only if some text is selected -X https://github.com/processing/processing/pull/2834 -X Fix renaming from RGB to Rgb.java and others -X https://github.com/processing/processing/pull/2825 -X sketches should only write to the console of their editor window -X https://github.com/processing/processing/issues/153 -X https://github.com/processing/processing/issues/2858 -X https://github.com/processing/processing/pull/2827 -X extend translations and update German language -X https://github.com/processing/processing/pull/2949 - -pulls (net) -X NullPointerException message when Server writes to a disconnected client -X https://github.com/processing/processing/issues/2577 -X https://github.com/processing/processing/pull/2578 -X Implement the active() method for Serial and Server -X https://github.com/processing/processing/issues/2364 -X https://github.com/processing/processing/pull/2588 - - 0233 (3.0a6) + _ any problems with new code signing crap? _ issues raised around the symlink (just replace with a copy of the binary?) _ https://developer.apple.com/library/prerelease/mac/technotes/tn2206/_index.html#//apple_ref/doc/uid/DTS40007919-CH1-TNTAG205