diff --git a/app/src/processing/app/contrib/ContributionManagerDialog.java b/app/src/processing/app/contrib/ContributionManagerDialog.java
index 85ce796b5..14377a0a0 100644
--- a/app/src/processing/app/contrib/ContributionManagerDialog.java
+++ b/app/src/processing/app/contrib/ContributionManagerDialog.java
@@ -44,7 +44,6 @@ public class ContributionManagerDialog {
static final String ANY_CATEGORY = Language.text("contrib.all");
JFrame dialog;
- String title;
ContributionFilter filter;
JComboBox categoryChooser;
JScrollPane scrollPane;
@@ -98,9 +97,9 @@ public class ContributionManagerDialog {
Editor ed = iter.next();
if (ed.getSketch().isModified()) {
int option = Base
- .showYesNoQuestion(editor, title,
- Language.text("contrib.unsaved_changes"),
- Language.text("contrib.unsaved_changes.prompt"));
+ .showYesNoQuestion(editor, Language.text("contributions"),
+ Language.text("contributions.unsaved_changes"),
+ Language.text("contributions.unsaved_changes.prompt"));
if (option == JOptionPane.NO_OPTION)
return;
diff --git a/app/src/processing/app/languages/PDE_nl.properties b/app/src/processing/app/languages/PDE_nl.properties
index 23c182c2b..61931278c 100644
--- a/app/src/processing/app/languages/PDE_nl.properties
+++ b/app/src/processing/app/languages/PDE_nl.properties
@@ -14,6 +14,7 @@ menu.file = Bestand
menu.file.new = Nieuw
menu.file.open = Openen...
menu.file.sketchbook = Schetsboek
+menu.file.sketchbook.empty = Leeg Schetsboek
menu.file.recent = Recent
menu.file.examples = Voorbeelden...
menu.file.close = Sluiten
@@ -117,11 +118,20 @@ preferences = Instellingen
preferences.button.width = 90
preferences.requires_restart = herstart van Processing vereist
preferences.sketchbook_location = Schetsboek locatie
+preferences.sketchbook_location.popup = Schetsboek locatie
preferences.language = Taal
preferences.editor_and_console_font = Editor en Console lettertype
+preferences.editor_and_console_font.tip = \
+Selecteer het gebruikte lettertype in de Editor en de Console. \
+Alleen monospace lettertypes (dezelfde breedte voor elk karakter) \
+mogen gebruikt worden, ook al is de lijst wellicht niet geheel correct.
preferences.editor_font_size = Editor lettergrootte
preferences.console_font_size = Console lettergrootte
preferences.background_color = Achtergrond kleur in Presenteer modus
+preferences.background_color.tip = \
+Selecteer de achtergrond kleur in Presenteer modus. \
+De Presenteer modus (te vinden in het Schets menu) wordt gebruikt \
+om een schets op het volledige scherm te tonen.
preferences.use_smooth_text = Gebruik duidelijke tekst in Editor venster
preferences.enable_complex_text_input = Complexe tekstkarakters mogelijk maken
preferences.enable_complex_text_input_example = i.e. Japans
@@ -149,6 +159,13 @@ preferences.file.hint = alleen aanpassen wanneer Processing niet actief is
# Sketchbook Location (Frame)
sketchbook_location = Selecteer nieuwe schetsboek locatie
+# Sketchbook (Frame)
+sketchbook = Schetsboek
+sketchbook.tree = Schetsboek
+
+# examples (Frame)
+examples = Examples
+
# Export (Frame)
export = Exporteer Opties
export.platforms = Platforms
@@ -213,9 +230,80 @@ editor.header.next_tab = Volgende Tabblad
editor.header.delete.warning.title = Waarschuwing
editor.header.delete.warning.text = U kunt het laatste tabblad van de laatst geopende schets niet verwijderen.
+# Tabs
+editor.tab.new = Nieuwe Naam
+editor.tab.new.description = Naam voor nieuw bestand
+editor.tab.rename = Nieuwe Naam
+editor.tab.rename.description = Nieuwe naam voor bestand
+
+# Sketch
+editor.sketch.rename.description = Nieuwe naam voor schets
+
+editor.status.autoformat.no_changes = Geen wijzigingen nodig voor Automatische Opmaak.
+editor.status.autoformat.finished = Automatische Opmaak gereed.
+editor.status.find_reference.select_word_first = Selecteer eerst een woord om te zoeken in de handleiding.
+editor.status.find_reference.not_available = Geen handleiding beschikbaar voor "%s".
+editor.status.drag_and_drop.files_added.0 = Er zijn geen bestanden toegevoegd aan de schets.
+editor.status.drag_and_drop.files_added.1 = Een bestand toegevoegd aan de schets.
+editor.status.drag_and_drop.files_added.n = %d bestanden toegevoegd aan de schets.
+editor.status.saving = Bezig met opslaan...
+editor.status.saving.done = Opslaan gereed.
+editor.status.saving.canceled = Opslaan geannuleerd.
+editor.status.printing = Bezig met afdrukken...
+editor.status.printing.done = Afdrukken gereed.
+editor.status.printing.error = Fout tijdens het afdrukken.
+editor.status.printing.canceled = Afdrukken geannuleerd.
+
# ---------------------------------------
# Contribution Panel
+contrib = Bijdragen Manager
contrib.category = Categorie:
contrib.filter_your_search = Filter zoekresultaten...
+contrib.restart = Processing herstarten
+contrib.unsaved_changes = Niet opgeslagen wijzigingen gevonden
+contrib.unsaved_changes.prompt = Weet u zeker dat u Processing wil herstarten zonder eerst op te slaan?
+contrib.messages.remove_restart = Herstart Processing om het verwijderen van dit item te voltooien.
+contrib.messages.install_restart = Herstart Processing om het installeren van dit item te voltooien.
+contrib.messages.update_restart = Herstart Processing om het updaten van dit item te voltooien.
+contrib.errors.list_download = De lijst met beschikbare bijdragen kon niet worden gedownload.
+contrib.errors.list_download.timeout = Verbinding time out bij het downloaden van de lijst met bijdragen.
+contrib.errors.download_and_install = Fout bij het downloaden en installeren.
+contrib.errors.description_unavailable = Beschrijving niet beschikbaar.
+contrib.errors.malformed_url = "De van Processing.org verkregen link is niet correct.\nU kunt nog steeds de bibliotheek handmatig installeren door\nde website van de bibliotheek te bezoeken
+contrib.errors.needs_repackage = %s moet opnieuw worden ingepakt volgens de %s richtlijnen.
+contrib.errors.no_contribution_found = Kan geen %s vinden in het gedownloade bestand.
+contrib.errors.overwriting_properties = Fout bij het overschrijven van het .properties bestand.
+contrib.errors.install_failed = Installatie mislukt.
+contrib.errors.update_on_restart_failed = Update bij herstart van %s mislukt.
+contrib.errors.temporary_directory = Kan niet schrijven naar een tijdelijke map.
+contrib.all = Alles
+contrib.undo = Ongedaan maken
+contrib.remove = Verwijderen
+contrib.install = Installeren
+contrib.progress.installing = Bezig met installeren
+contrib.progress.starting = Bezig met starten
+contrib.progress.downloading = Bezig met downloaden
+contrib.download_error = Fout bij het downloaden van de bijdrage.
+contrib.unsupported_operating_system = Uw besturingssyteem wordt schijnbaar niet ondersteund. U kunt de website van de %s bibliotheek bezoeken voor meer informatie.
+
+
+# ---------------------------------------
+# Warnings
+
+warn.delete = Verwijderen
+warn.delete.sketch = Weet u zeker dat u deze schets wil verwijderen?
+warn.delete.file = Weet u zeker dat u "%s" wil verwijderen?
+
+
+# ---------------------------------------
+# Update Check
+update_check = Update
+update_check.updates_available.core = Een nieuwe versie van Processing is beschikbaar,\nwilt u de Processing download pagina bezoeken?
+update_check.updates_available.contributions = Er zijn updates beschikbaar voor sommige van de door u geïnstalleerde bijdragen,\nwilt u nu de Bijdragen Manager openen?
+
+
+# ---------------------------------------
+# Color Chooser
+color_chooser = Kies een kleur...
diff --git a/pdex/src/processing/mode/experimental/ASTGenerator.java b/pdex/src/processing/mode/experimental/ASTGenerator.java
index 723ba302c..f830dd0a2 100644
--- a/pdex/src/processing/mode/experimental/ASTGenerator.java
+++ b/pdex/src/processing/mode/experimental/ASTGenerator.java
@@ -629,7 +629,7 @@ public class ASTGenerator {
/*The type wasn't found in local code, so it might be something like
* System.console()., or maybe belonging to super class, etc.
*/
- Class tehClass = findClassIfExists(((SimpleName)mi.getExpression()).toString());
+ Class> tehClass = findClassIfExists(((SimpleName)mi.getExpression()).toString());
if (tehClass != null) {
// Method Expression is a simple name and wasn't located locally, but found in a class
// so look for method in this class.
@@ -643,7 +643,7 @@ public class ASTGenerator {
ASTNode typeDec = findDeclaration2(stp.getName(),nearestNode);
if(typeDec == null){
log(stp.getName() + " couldn't be found locally..");
- Class tehClass = findClassIfExists(stp.getName().toString());
+ Class> tehClass = findClassIfExists(stp.getName().toString());
if (tehClass != null) {
// Method Expression is a simple name and wasn't located locally, but found in a class
// so look for method in this class.
@@ -684,7 +684,7 @@ public class ASTGenerator {
/*The type wasn't found in local code, so it might be something like
* log(), or maybe belonging to super class, etc.
*/
- Class tehClass = findClassIfExists(qn.getQualifier().toString());
+ Class> tehClass = findClassIfExists(qn.getQualifier().toString());
if (tehClass != null) {
// note how similar thing is called on line 690. Check check.
return definedIn3rdPartyClass(new ClassMember(tehClass), qn
@@ -699,7 +699,7 @@ public class ASTGenerator {
if(typeDec == null){
log(stp.getName() + " couldn't be found locally..");
- Class tehClass = findClassIfExists(stp.getName().toString());
+ Class> tehClass = findClassIfExists(stp.getName().toString());
if (tehClass != null) {
// note how similar thing is called on line 690. Check check.
return definedIn3rdPartyClass(new ClassMember(tehClass), qn
@@ -1045,13 +1045,14 @@ public class ASTGenerator {
if (sketchOutline.isVisible()) return;
Collections.sort(candidates);
// CompletionCandidate[][] candi = new CompletionCandidate[candidates.size()][1];
- DefaultListModel defListModel = new DefaultListModel();
-
- for (int i = 0; i < candidates.size(); i++) {
-// candi[i][0] = candidates.get(i);
- defListModel.addElement(candidates.get(i));
- }
- log("Total preds = " + candidates.size());
+// DefaultListModel defListModel = new DefaultListModel();
+//
+// for (int i = 0; i < candidates.size(); i++) {
+//// candi[i][0] = candidates.get(i);
+// defListModel.addElement(candidates.get(i));
+// }
+// log("Total preds = " + candidates.size());
+ DefaultListModel defListModel = filterPredictions();
// DefaultTableModel tm = new DefaultTableModel(candi,
// new String[] { "Suggestions" });
// if (tableAuto.isVisible()) {
@@ -1063,6 +1064,44 @@ public class ASTGenerator {
.showSuggestion(defListModel, word);
}
+ private DefaultListModel filterPredictions(){
+ DefaultListModel defListModel = new DefaultListModel();
+ if (candidates.isEmpty())
+ return defListModel;
+ // check if first & last CompCandidate are the same methods, only then show all overloaded methods
+ if (candidates.get(0).getElementName()
+ .equals(candidates.get(candidates.size() - 1).getElementName())) {
+ log("All CC are methods only: " + candidates.get(0).getElementName());
+ for (int i = 0; i < candidates.size(); i++) {
+ candidates.get(i).regenerateCompletionString();
+ defListModel.addElement(candidates.get(i));
+ }
+ }
+ else {
+ boolean ignoredSome = false;
+ for (int i = 0; i < candidates.size(); i++) {
+ if(i > 0 && (candidates.get(i).getElementName()
+ .equals(candidates.get(i - 1).getElementName()))){
+ if (candidates.get(i).getType() == CompletionCandidate.LOCAL_METHOD
+ || candidates.get(i).getType() == CompletionCandidate.PREDEF_METHOD) {
+ CompletionCandidate cc = candidates.get(i - 1);
+ String label = cc.getLabel();
+ int x = label.lastIndexOf(')');
+ cc.setLabel(cc.getElementName() + "(...)" + label.substring(x + 1));
+ cc.setCompletionString(cc.getElementName());
+ ignoredSome = true;
+ continue;
+ }
+ }
+ defListModel.addElement(candidates.get(i));
+ }
+ if (ignoredSome) {
+ log("Some suggestions hidden");
+ }
+ }
+ return defListModel;
+ }
+
/**
* Loads classes from .jar files in sketch classpath
*
@@ -1256,11 +1295,11 @@ public class ASTGenerator {
* @param className
* @return
*/
- protected Class findClassIfExists(String className){
+ protected Class> findClassIfExists(String className){
if(className == null){
return null;
}
- Class tehClass = null;
+ Class> tehClass = null;
// First, see if the classname is a fully qualified name and loads straightaway
tehClass = loadClass(className);
@@ -1328,8 +1367,8 @@ public class ASTGenerator {
return tehClass;
}
- protected Class loadClass(String className){
- Class tehClass = null;
+ protected Class> loadClass(String className){
+ Class> tehClass = null;
if (className != null) {
try {
tehClass = Class.forName(className, false,
@@ -1843,7 +1882,7 @@ public class ASTGenerator {
@Override
public void valueChanged(TreeSelectionEvent e) {
log(e);
- SwingWorker worker = new SwingWorker() {
+ SwingWorker