Revision 591 org.gvsig.scripting/trunk/org.gvsig.scripting/org.gvsig.scripting.swing/org.gvsig.scripting.swing.impl/src/main/java/org/gvsig/scripting/swing/impl/composer/EditorHelper.java
EditorHelper.java | ||
---|---|---|
5 | 5 |
import java.awt.event.ActionListener; |
6 | 6 |
import java.awt.event.KeyEvent; |
7 | 7 |
import java.awt.event.KeyListener; |
8 |
import javax.swing.JOptionPane; |
|
8 | 9 |
import javax.swing.JPanel; |
9 | 10 |
import javax.swing.JTextArea; |
10 | 11 |
import javax.swing.text.BadLocationException; |
... | ... | |
16 | 17 |
import org.gvsig.scripting.swing.api.SyntaxtHighlightTextComponent; |
17 | 18 |
import org.gvsig.scripting.swing.impl.JDialogContent; |
18 | 19 |
import org.gvsig.scripting.swing.impl.composer.DefaultJScriptingComposer.JMyTabbedPane; |
20 |
import org.gvsig.tools.ToolsLocator; |
|
21 |
import org.gvsig.tools.i18n.I18nManager; |
|
19 | 22 |
import org.slf4j.Logger; |
20 | 23 |
import org.slf4j.LoggerFactory; |
21 | 24 |
|
... | ... | |
65 | 68 |
|
66 | 69 |
public void getSuggestions(final JTextArea editor, final String text) { |
67 | 70 |
SuggestionController suggestion = new SuggestionController(uimanager.getManager().getHelpManager(), editor, text); |
68 |
suggestion.showSuggestion(); |
|
71 |
if( suggestion.isEmpty() ) { |
|
72 |
I18nManager I18nManager = ToolsLocator.getI18nManager(); |
|
73 |
JOptionPane.showMessageDialog( |
|
74 |
editor, |
|
75 |
I18nManager.getTranslation("_cant_show_suggestions") |
|
76 |
+"\n" |
|
77 |
+ I18nManager.getTranslation("_No_suggestions_found_installed_in_the_system") |
|
78 |
+"\n" |
|
79 |
+"\n" |
|
80 |
+ I18nManager.getTranslation("_Try_installing_a_package_of_documentation_for_scripting_with_javadocs"), |
|
81 |
I18nManager.getTranslation("_information"), |
|
82 |
JOptionPane.INFORMATION_MESSAGE |
|
83 |
); |
|
84 |
} else { |
|
85 |
suggestion.showSuggestion(); |
|
86 |
} |
|
69 | 87 |
} |
70 | 88 |
|
71 | 89 |
public JDialogContent getHelpPopup(final JTextArea editor, final String text) { |
Also available in: Unified diff