mirror of
https://github.com/peterdell/wudsn-ide.git
synced 2024-05-31 17:41:28 +00:00
Adapt messages to use "CompilerDefinition.getText()" for
"assembler/compiler", adapt EN, DE and PL texts accordingly
This commit is contained in:
parent
d91abbf3e1
commit
a3d6cd75c8
|
@ -19,7 +19,7 @@
|
|||
package com.wudsn.ide.lng;
|
||||
|
||||
/**
|
||||
* Enum for the hardware platforms.
|
||||
* Enum for the language.
|
||||
*
|
||||
* @author Peter Dell
|
||||
*
|
||||
|
|
|
@ -18,6 +18,8 @@
|
|||
*/
|
||||
package com.wudsn.ide.lng;
|
||||
|
||||
import com.wudsn.ide.base.common.EnumUtility;
|
||||
|
||||
/**
|
||||
* Utility class for languages
|
||||
*
|
||||
|
@ -32,17 +34,28 @@ public final class LanguageUtility {
|
|||
*/
|
||||
private LanguageUtility() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the text for a language.
|
||||
*
|
||||
* @param language The language, not <code>null</code>.
|
||||
* @return The text, title case, not empty and not <code>null</code>.
|
||||
*/
|
||||
public static String getText(Language language) {
|
||||
return EnumUtility.getText(language);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the text for type of compilers for a language.
|
||||
*
|
||||
* @param language The language, not <code>null</code>.
|
||||
* @return The text, not empty and not <code>null</code>.
|
||||
*/
|
||||
public static String getCompilerTextLower(Language language) {
|
||||
public static String getCompilerTextLower(Language language) {
|
||||
switch (language) {
|
||||
case ASM:
|
||||
return "assembler";
|
||||
return "assembler"; // TODO: Have translation, so lower/upper is correct in German
|
||||
|
||||
case PAS:
|
||||
return "compiler";
|
||||
|
|
|
@ -21,22 +21,6 @@ package com.wudsn.ide.lng;
|
|||
|
||||
import org.eclipse.osgi.util.NLS;
|
||||
|
||||
// TODO: Make thse constants dynamic per language / compiler vs. assembler
|
||||
//COMPILER_HYPERLINK_DETECTOR_OPEN_SOURCE_WITH_LANGUAGE_EDITOR=Öffnen mit {0} Editor
|
||||
//LANGUAGE_BREAKPOINT_TOGGLE_TYPE_MENU_TEXT={0} Breakpoints
|
||||
//
|
||||
//MESSAGE_E100=Path to '{0}' {1} executable is not set in the '{2}' preferences.
|
||||
//MESSAGE_E101=The {0} '{1}' does not specify default parameters.
|
||||
//MESSAGE_E102=The {1} '{1}' does not specify a help file path.
|
||||
//MESSAGE_E103=Path to '{0}' {1} executable in the preferences points to non-existing file '{1}'.
|
||||
//MESSAGE_E104=Output file extension must be set in the preferences of {0} '{1}' or via the annotation '{2}'.
|
||||
//MESSAGE_E105=Cannot execute {0} process '{1}' in working directory '{2}'. System error: {3}
|
||||
//MESSAGE_E127={0} process ended with return code {1}. Check the error messages and the console log.
|
||||
//MESSAGE_E130=Help for the '{0}' {1} cannot be displayed because the path to the compiler executable is not set in the preferences.
|
||||
//MESSAGE_E131=Help for the '{0}' {1} cannot be displayed because no help file was found in the paths '{2}' relative to the compiler executable path '{3}'.
|
||||
//
|
||||
// TODO then adapt the German texts
|
||||
|
||||
/**
|
||||
* Class which holds the localized text constants.
|
||||
*
|
||||
|
|
|
@ -39,7 +39,7 @@ COMPILER_HYPERLINK_DETECTOR_OPEN_IDENTIFIER_IN_INCLUDE={0} {1} in line {2} of {3
|
|||
COMPILER_HYPERLINK_FILE_NOT_EXISTS=Target file '{0}' not exists. Do you want to create the file now?
|
||||
|
||||
LANGUAGE_BREAKPOINT_MARKER_MESSAGE={0} [line: {1}] - {2}
|
||||
LANGUAGE_BREAKPOINT_TOGGLE_TYPE_MENU_TEXT={0} Breakpoints
|
||||
LANGUAGE_BREAKPOINT_TOGGLE_TYPE_MENU_TEXT={0} Breakpoints
|
||||
|
||||
COMPILER_SYMBOLS_VIEW_FILTER_TOOLTIP=Type one or more substrings separated by spaces to filter the result list
|
||||
COMPILER_SYMBOLS_VIEW_SOURCE_LABEL=Source:
|
||||
|
@ -179,7 +179,7 @@ MESSAGE_I110=Symbols file '{0}' created with {1} symbols.
|
|||
MESSAGE_E111=Cannot open symbols file '{0}' for output. System error: {1}
|
||||
MESSAGE_E112=Path to application executable is not set in the preferences of application '{0}'.
|
||||
MESSAGE_E113=Cannot execute application '{0}' process '{1}' in working directory '{2}'. System error: {3}
|
||||
MESSAGE_E114=Path to '{0}' application executable in the preferences points to non-existing file '{1}'.
|
||||
MESSAGE_E114=Path to {0} '{1}' application executable in the preferences points to non-existing file '{2}'.
|
||||
MESSAGE_E115=Cannot open output file '{0}' with the standard application since no application is registered for the file extension '{1}'.
|
||||
MESSAGE_E116=Definition for application '{0}' from the preferences of hardware '{1}' is not registered.
|
||||
MESSAGE_E117=Cannot delete empty symbols file '{0}'.
|
||||
|
@ -195,8 +195,8 @@ MESSAGE_E126=Output file created but empty. Check the error messages and the con
|
|||
MESSAGE_E127={0} process ended with return code {1}. Check the error messages and the console log.
|
||||
MESSAGE_E128=Hardware not specified. Specify one of the following valid values '{0}'.
|
||||
MESSAGE_E129=Main source file specifies or defaults to hardware '{0}' while include file specifies or defaults to hardware '{1}'.
|
||||
MESSAGE_E130=Help for the '{0}' {1} cannot be displayed because the path to the executable is not set in the '{2}' preferences.
|
||||
MESSAGE_E131=Help for the '{0}' {1} cannot be displayed because no help file was found in the paths relative to the executable path '{2}'.
|
||||
MESSAGE_E130=Help for the {0} '{1}' cannot be displayed because the path to the executable is not set in the '{2}' preferences.
|
||||
MESSAGE_E131=Help for the {0} '{1}' cannot be displayed because no help file was found in the paths relative to the executable path '{2}'.
|
||||
MESSAGE_E132=Disk image file '{0}' does not exist. Create a bootable disk image where the output file '{1}' can be stored.
|
||||
MESSAGE_E133=Disk image file '{0}' is not writeable. Make the disk image file is writeable, so the output file '{1}' can be stored.
|
||||
MESSAGE_E134=Disk image file '{0}' cannot be opened for reading. System error: {1}
|
||||
|
|
|
@ -165,10 +165,10 @@ TOC_TARGET_OPCODE_LABEL=Opcode
|
|||
|
||||
MESSAGE_E100=Pfad zur ausführbaren Datei des {0}s '{1}' ist in den '{2}' Voreinstellungen nicht angegeben.
|
||||
MESSAGE_E101=Der {0} '{1}' definiert keine Standardparameter.
|
||||
MESSAGE_E102=Der {0} '{1}' definiert keine Hilfedokumentes.
|
||||
MESSAGE_E103=Pfad zur ausführbaren Datei des {0}s '{1}' in den Voreinstellungen verweist auf die nicht existierende Datei '{2}'.
|
||||
MESSAGE_E104=Ausgabe-Dateierweiterung muss in den Voreinstellungen des Kompilers '{0}' oder mit der Annotation '{1}' angegeben werden.
|
||||
MESSAGE_E105=Kompilerprozess '{0}' kann im Arbeitsverzeichnis '{1}' nicht ausgeführt werden. Systemfehler: {2}
|
||||
MESSAGE_E102=Der {0} '{1}' definiert keine Hilfedokumente.
|
||||
MESSAGE_E103=Pfad zur ausführbaren Datei des {0}s '{1}' in den '{2}' Voreinstellungen verweist auf die nicht existierende Datei '{3}'.
|
||||
MESSAGE_E104=Ausgabe-Dateierweiterung muss in den Voreinstellungen des {0} '{1}' oder mit der Annotation '{2}' angegeben werden.
|
||||
MESSAGE_E105={0}prozess '{1}' kann im Arbeitsverzeichnis '{2}' nicht ausgeführt werden. Systemfehler: {3}
|
||||
MESSAGE_E106=Ausgabe-Datei '{0}' kann nicht zum Schreiben geöffnet werden. Beenden Sie alle Anwendungen welche die Datei geöffnet haben könnten.
|
||||
MESSAGE_E107=Ausgabe-Datei wurde nicht erzeugt. Prüfen Sie die Fehlermeldungen und die Konsolenausgabe.
|
||||
MESSAGE_E108=Ausgabe-Datei wurde nicht aktualisiert. Prüfen Sie die Fehlermeldungen und die Konsolenausgabe.
|
||||
|
@ -190,11 +190,11 @@ MESSAGE_E123=Unterbrechungspunkte-Datei '{0}' ist leer, aber kann nicht gel
|
|||
MESSAGE_E124=Unbekannte Hardware '{0}'. Geben Sie einen der folgenden gültigen Werte an '{1}'.
|
||||
MESSAGE_E125=Haupt-Quell-Datei '{0}' existiert nicht.
|
||||
MESSAGE_E126=Ausgabe-Datei erzeugt is aber leer. Prüfen Sie die Fehlermeldungen und die Konsolenausgabe.
|
||||
MESSAGE_E127=Kompilerprozess endete mit dem Rückgabewert {0}. Prüfen Sie die Fehlermeldungen und die Konsolenausgabe.
|
||||
MESSAGE_E127={0}prozess endete mit dem Rückgabewert {1}. Prüfen Sie die Fehlermeldungen und die Konsolenausgabe.
|
||||
MESSAGE_E128=Hardware nicht angegeben. Gültige Werte sind '{0}'.
|
||||
MESSAGE_E129=Haupt-Quell-Datei spezifiziert oder verwendet die Hardware '{0}' während die Include-Quell-Datei die Hardware '{1}' spezifiziert oder verwendet.
|
||||
MESSAGE_E130=Handbuch zum {0} '{1}' kann nicht angezeigt werden, da der Pfad zur ausführbaren Datei des Kompilers in den Voreinstellungen nicht angegeben ist.
|
||||
MESSAGE_E131=Handbuch zum {0} '{1}' kann nicht angezeigt werden, da keine Hilfe-Datei in den Pfaden relativ zur ausführbaren Datei '{2}' des Kompilers gefunden wurde.
|
||||
MESSAGE_E130=Handbuch zum {0} '{1}' kann nicht angezeigt werden, da der Pfad zur ausführbaren Datei in den '{2}' Voreinstellungen nicht angegeben ist.
|
||||
MESSAGE_E131=Handbuch zum {0} '{1}' kann nicht angezeigt werden, da keine Hilfe-Datei in den Pfaden relativ zur ausführbaren Datei '{2}' gefunden wurde.
|
||||
MESSAGE_E132=Disketten-Image-Datei '{0}' existiert nicht. Lege ein bootfähiges Disketten-Image an, auf dem die Ausgabe-Datei '{1}' gespeichert werden kann.
|
||||
MESSAGE_E133=Disketten-Image-Datei '{0}' ist nicht schreibbar. Mache das Diskettenimage schreibbbar, damit die Ausgabe-Datei '{1}' gespeichert werden kann.
|
||||
MESSAGE_E134=Disketten-Image-Datei '{0}' kann not nicht zum Lesen geöffnet werden. Systemfehler: {1}
|
||||
|
|
|
@ -39,7 +39,7 @@ COMPILER_HYPERLINK_DETECTOR_OPEN_IDENTIFIER_IN_INCLUDE={0} {1} in line {2} of {3
|
|||
COMPILER_HYPERLINK_FILE_NOT_EXISTS=Target file '{0}' not exists. Do you want to create the file now?
|
||||
|
||||
LANGUAGE_BREAKPOINT_MARKER_MESSAGE={0} [line: {1}] - {2}
|
||||
LANGUAGE_BREAKPOINT_TOGGLE_TYPE_MENU_TEXT={0} Breakpoints
|
||||
LANGUAGE_BREAKPOINT_TOGGLE_TYPE_MENU_TEXT={0} Breakpoints
|
||||
|
||||
COMPILER_SYMBOLS_VIEW_FILTER_TOOLTIP=Type one or more substrings separated by spaces to filter the result list
|
||||
COMPILER_SYMBOLS_VIEW_SOURCE_LABEL=Source:
|
||||
|
@ -196,8 +196,8 @@ MESSAGE_E126=Output file created but empty. Check the error messages and the con
|
|||
MESSAGE_E127={0} process ended with return code {1}. Check the error messages and the console log.
|
||||
MESSAGE_E128=Hardware not specified. Specify one of the following valid values '{0}'.
|
||||
MESSAGE_E129=Main source file specifies or defaults to hardware '{0}' while include file specifies or defaults to hardware '{1}'.
|
||||
MESSAGE_E130=Help for the '{0}' {1} cannot be displayed because the path to the executable is not set in the '{2}' preferences.
|
||||
MESSAGE_E131=Help for the '{0}' {1} cannot be displayed because no help file was found in the paths relative to the executable path '{2}'.
|
||||
MESSAGE_E130=Help for the {0} '{1}' cannot be displayed because the path to the executable is not set in the '{2}' preferences.
|
||||
MESSAGE_E131=Help for the {0} '{1}' cannot be displayed because no help file was found in the paths relative to the executable path '{2}'.
|
||||
MESSAGE_E132=Disk image file '{0}' does not exist. Create a bootable disk image where the output file '{1}' can be stored.
|
||||
MESSAGE_E133=Disk image file '{0}' is not writeable. Make the disk image file is writeable, so the output file '{1}' can be stored.
|
||||
MESSAGE_E134=Disk image file '{0}' cannot be opened for reading. System error: {1}
|
||||
|
|
|
@ -28,7 +28,10 @@ import org.eclipse.debug.ui.actions.IToggleBreakpointsTargetFactory;
|
|||
import org.eclipse.jface.viewers.ISelection;
|
||||
import org.eclipse.ui.IWorkbenchPart;
|
||||
|
||||
import com.wudsn.ide.base.common.EnumUtility;
|
||||
import com.wudsn.ide.base.common.TextUtility;
|
||||
import com.wudsn.ide.lng.Language;
|
||||
import com.wudsn.ide.lng.LanguageUtility;
|
||||
import com.wudsn.ide.lng.Texts;
|
||||
import com.wudsn.ide.lng.editor.LanguageEditor;
|
||||
|
||||
|
@ -41,12 +44,12 @@ import com.wudsn.ide.lng.editor.LanguageEditor;
|
|||
*/
|
||||
public final class LanguageBreakpointAdapterFactory implements IToggleBreakpointsTargetFactory {
|
||||
|
||||
private String TARGET_ID = LanguageBreakpointsTarget.class.getName();
|
||||
private String TARGET_ID_PREFIX = LanguageBreakpointsTarget.class.getName() + ".";
|
||||
private Set<String> defaultSet;
|
||||
|
||||
public LanguageBreakpointAdapterFactory() {
|
||||
defaultSet = new HashSet<String>();
|
||||
defaultSet.add(TARGET_ID);
|
||||
defaultSet.add(TARGET_ID_PREFIX);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -60,14 +63,15 @@ public final class LanguageBreakpointAdapterFactory implements IToggleBreakpoint
|
|||
@Override
|
||||
public String getDefaultToggleTarget(IWorkbenchPart part, ISelection selection) {
|
||||
if (part instanceof LanguageEditor) {
|
||||
return TARGET_ID;
|
||||
LanguageEditor languageEditor = (LanguageEditor) part;
|
||||
return TARGET_ID_PREFIX + languageEditor.getLanguage().name();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IToggleBreakpointsTarget createToggleTarget(String targetID) {
|
||||
if (TARGET_ID.equals(targetID)) {
|
||||
if (targetID.startsWith(TARGET_ID_PREFIX)) {
|
||||
return new LanguageBreakpointsTarget();
|
||||
}
|
||||
return null;
|
||||
|
@ -75,12 +79,15 @@ public final class LanguageBreakpointAdapterFactory implements IToggleBreakpoint
|
|||
|
||||
@Override
|
||||
public String getToggleTargetName(String targetID) {
|
||||
return TextUtility.format( Texts.LANGUAGE_BREAKPOINT_TOGGLE_TYPE_MENU_TEXT, "TODO: 2121");// TODO
|
||||
String languageName = targetID.substring(TARGET_ID_PREFIX.length());
|
||||
Language language = Language.valueOf(languageName);
|
||||
// INFO: {0} Breakpoints
|
||||
return TextUtility.format(Texts.LANGUAGE_BREAKPOINT_TOGGLE_TYPE_MENU_TEXT, LanguageUtility.getText(language));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getToggleTargetDescription(String targetID) {
|
||||
return TARGET_ID;
|
||||
return targetID;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -152,6 +152,15 @@ public final class CompilerDefinition implements Comparable<CompilerDefinition>
|
|||
return language;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the text for type of compilers for a language.
|
||||
*
|
||||
* @return he text, not empty and not <code>null</code>.
|
||||
*/
|
||||
public final String getTextLower() {
|
||||
return LanguageUtility.getCompilerTextLower(getLanguage());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the id of the compiler. Called by {@link CompilerRegistry} only.
|
||||
*
|
||||
|
@ -302,18 +311,17 @@ public final class CompilerDefinition implements Comparable<CompilerDefinition>
|
|||
if (compilerExecutablePath == null) {
|
||||
throw new IllegalArgumentException("Parameter 'compilerExecutablePath' must not be null.");
|
||||
}
|
||||
String compilerText = LanguageUtility.getCompilerTextLower(language);
|
||||
if (!hasHelpDocuments()) {
|
||||
// INFO: The {0} '{1}' does not specify help documents.
|
||||
throw new CoreException(new Status(IStatus.INFO, LanguagePlugin.ID,
|
||||
TextUtility.format(Texts.MESSAGE_E102, compilerText, name)));
|
||||
TextUtility.format(Texts.MESSAGE_E102, getTextLower(), getName())));
|
||||
}
|
||||
String compilerPreferencesText = LanguageUtility.getCompilerPreferencesText(language);
|
||||
if (StringUtility.isEmpty(compilerExecutablePath)) {
|
||||
// ERROR: Help for the '{0}' {1} cannot be displayed because the path to the
|
||||
// compiler executable is not set in the {2} preferences.
|
||||
throw new CoreException(new Status(IStatus.ERROR, LanguagePlugin.ID,
|
||||
TextUtility.format(Texts.MESSAGE_E130, name, compilerText, compilerPreferencesText)));
|
||||
TextUtility.format(Texts.MESSAGE_E130, getTextLower(), getName(), compilerPreferencesText)));
|
||||
}
|
||||
|
||||
return CompilerHelp.getInstalledHelpDocuments(getHelpDocuments(), compilerExecutablePath);
|
||||
|
@ -372,10 +380,10 @@ public final class CompilerDefinition implements Comparable<CompilerDefinition>
|
|||
// No local file specified or found and no URIs found.
|
||||
if (result == null) {
|
||||
|
||||
// ERROR: Help for the '{0}' {1} cannot be displayed because no help file was
|
||||
// ERROR: Help for the {0} '{1}' cannot be displayed because no help file was
|
||||
// found in the paths relative to the executable path '{2}'.
|
||||
throw new CoreException(new Status(IStatus.ERROR, LanguagePlugin.ID, TextUtility.format(Texts.MESSAGE_E131,
|
||||
name, LanguageUtility.getCompilerTextLower(language), compilerExecutablePath)));
|
||||
throw new CoreException(new Status(IStatus.ERROR, LanguagePlugin.ID,
|
||||
TextUtility.format(Texts.MESSAGE_E131, getTextLower(), getName(), compilerExecutablePath)));
|
||||
}
|
||||
return result;
|
||||
|
||||
|
|
|
@ -54,6 +54,7 @@ import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
|
|||
import com.wudsn.ide.base.common.Profiler;
|
||||
import com.wudsn.ide.base.common.ResourceBundleUtility;
|
||||
import com.wudsn.ide.base.hardware.Hardware;
|
||||
import com.wudsn.ide.lng.Language;
|
||||
import com.wudsn.ide.lng.LanguagePlugin;
|
||||
import com.wudsn.ide.lng.LanguageProperties;
|
||||
import com.wudsn.ide.lng.LanguageProperties.InvalidLanguagePropertyException;
|
||||
|
@ -153,6 +154,15 @@ public abstract class LanguageEditor extends TextEditor {
|
|||
}
|
||||
return plugin;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the language.
|
||||
*
|
||||
* @return The language, not <code>null</code>.
|
||||
*/
|
||||
public final Language getLanguage() {
|
||||
return getCompilerDefinition().getLanguage();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the language preferences.
|
||||
|
@ -160,7 +170,7 @@ public abstract class LanguageEditor extends TextEditor {
|
|||
* @return The language preferences, not <code>null</code>.
|
||||
*/
|
||||
public final LanguagePreferences getLanguagePreferences() {
|
||||
return plugin.getLanguagePreferences(getCompilerDefinition().getLanguage());
|
||||
return plugin.getLanguagePreferences(getLanguage());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -247,22 +247,22 @@ final class LanguageEditorCompileCommand {
|
|||
}
|
||||
|
||||
// Get and check path to compiler executable.
|
||||
String compilerDefinitionText = LanguageUtility.getCompilerTextLower(compilerDefinition.getLanguage());
|
||||
String compilerPreferencesText = LanguageUtility.getCompilerPreferencesText(compilerDefinition.getLanguage());
|
||||
|
||||
String compilerExecutablePath = languageEditor.getCompilerPreferences().getCompilerExecutablePathOrDefault();
|
||||
if (StringUtility.isEmpty(compilerExecutablePath)) {
|
||||
// ERROR: Path to {0} '{1}' executable is not set in the '{2}' preferences.
|
||||
createMainSourceFileMessage(files, IMarker.SEVERITY_ERROR, Texts.MESSAGE_E100, compilerDefinitionText,
|
||||
compilerDefinition.getName(), compilerPreferencesText);
|
||||
createMainSourceFileMessage(files, IMarker.SEVERITY_ERROR, Texts.MESSAGE_E100,
|
||||
compilerDefinition.getTextLower(), compilerDefinition.getName(), compilerPreferencesText);
|
||||
return false;
|
||||
}
|
||||
File compilerExecutableFile = new File(compilerExecutablePath);
|
||||
if (!compilerExecutableFile.exists()) {
|
||||
// ERROR: Path to {0} '{1}' executable in the '{2}' preferences points to
|
||||
// non-existing file '{3}'.
|
||||
createMainSourceFileMessage(files, IMarker.SEVERITY_ERROR, Texts.MESSAGE_E103, compilerDefinitionText,
|
||||
compilerDefinition.getName(), compilerPreferencesText, compilerExecutablePath);
|
||||
createMainSourceFileMessage(files, IMarker.SEVERITY_ERROR, Texts.MESSAGE_E103,
|
||||
compilerDefinition.getTextLower(), compilerDefinition.getName(), compilerPreferencesText,
|
||||
compilerExecutablePath);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -281,10 +281,9 @@ final class LanguageEditorCompileCommand {
|
|||
compilerParameters = compilerParameters.trim();
|
||||
String compilerParameterArray[] = compilerParameters.split(" ");
|
||||
if (compilerParameterArray.length == 0) {
|
||||
// ERROR: The {0} '{1}' does not specify default
|
||||
// parameters.
|
||||
createMainSourceFileMessage(files, IMarker.SEVERITY_ERROR, Texts.MESSAGE_E101, compilerDefinitionText,
|
||||
compilerDefinition.getId());
|
||||
// ERROR: The {0} '{1}' does not specify default parameters.
|
||||
createMainSourceFileMessage(files, IMarker.SEVERITY_ERROR, Texts.MESSAGE_E101,
|
||||
compilerDefinition.getTextLower(), compilerDefinition.getName());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -322,11 +321,11 @@ final class LanguageEditorCompileCommand {
|
|||
try {
|
||||
compilerProcess.exec(System.out, System.err, true);
|
||||
} catch (IOException ex) {
|
||||
// ERROR: Cannot execute compiler process '{0}' in working directory
|
||||
// '{1}'. System error: {2}
|
||||
// ERROR: Cannot execute {0} process '{1}' in working directory '{2}'. System
|
||||
// error: {3}
|
||||
createMainSourceFileMessage(files, IMarker.SEVERITY_ERROR, Texts.MESSAGE_E105,
|
||||
compilerProcess.getCommandArrayString(), compilerProcess.getWorkingDirectory().getPath(),
|
||||
ex.getMessage());
|
||||
compilerDefinition.getTextLower(), compilerProcess.getCommandArrayString(),
|
||||
compilerProcess.getWorkingDirectory().getPath(), ex.getMessage());
|
||||
}
|
||||
|
||||
// Refresh the output and the symbols file resource.
|
||||
|
@ -402,9 +401,10 @@ final class LanguageEditorCompileCommand {
|
|||
// value is not already contained in the error messages.
|
||||
boolean errorFound = parseLogs(languageEditor, files, compilerProcess);
|
||||
if (!compilerSuccess && !errorFound) {
|
||||
// ERROR: Compiler process ended with error code {0}. Check the
|
||||
// error messages and the console log.
|
||||
// ERROR: {0} process ended with return code {1}. Check the error messages and
|
||||
// the console log.
|
||||
createMainSourceFileMessage(files, IMarker.SEVERITY_ERROR, Texts.MESSAGE_E127,
|
||||
compilerDefinition.getTextLower(),
|
||||
NumberUtility.getLongValueDecimalString(compilerProcess.getExitValue()));
|
||||
}
|
||||
|
||||
|
|
|
@ -38,6 +38,7 @@ import com.wudsn.ide.base.common.StringUtility;
|
|||
import com.wudsn.ide.base.hardware.Hardware;
|
||||
import com.wudsn.ide.lng.LanguagePlugin;
|
||||
import com.wudsn.ide.lng.LanguageProperties;
|
||||
import com.wudsn.ide.lng.LanguageUtility;
|
||||
import com.wudsn.ide.lng.Texts;
|
||||
import com.wudsn.ide.lng.LanguageProperties.LanguageProperty;
|
||||
import com.wudsn.ide.lng.LanguageProperties.InvalidLanguagePropertyException;
|
||||
|
@ -300,10 +301,11 @@ public final class LanguageEditorFilesLogic {
|
|||
}
|
||||
CompilerDefinition compilerDefinition = languageEditor.getCompilerDefinition();
|
||||
if (StringUtility.isEmpty(files.outputFileExtension)) {
|
||||
// ERROR: Output file extension must be set in the preferences of
|
||||
// compiler '{0}' or via the annotation '{1}'.
|
||||
// ERROR: Output file extension must be set in the preferences of {0} '{1}' or
|
||||
// via the annotation '{2}'.
|
||||
createMainSourceFileMessage(files, files.outputFileExtensionProperty, IMarker.SEVERITY_ERROR,
|
||||
Texts.MESSAGE_E104, compilerDefinition.getName(), LanguageProperties.OUTPUT_FILE_EXTENSION);
|
||||
Texts.MESSAGE_E104, compilerDefinition.getTextLower(), compilerDefinition.getName(),
|
||||
LanguageProperties.OUTPUT_FILE_EXTENSION);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -35,10 +35,12 @@ import org.eclipse.jface.text.hyperlink.IHyperlink;
|
|||
import org.eclipse.ui.IEditorSite;
|
||||
import org.eclipse.ui.IWorkbenchPage;
|
||||
|
||||
import com.wudsn.ide.base.common.EnumUtility;
|
||||
import com.wudsn.ide.base.common.NumberUtility;
|
||||
import com.wudsn.ide.base.common.TextUtility;
|
||||
import com.wudsn.ide.gfx.editor.GraphicsConversionEditor;
|
||||
import com.wudsn.ide.hex.HexEditor;
|
||||
import com.wudsn.ide.lng.LanguageUtility;
|
||||
import com.wudsn.ide.lng.Texts;
|
||||
import com.wudsn.ide.lng.compiler.parser.CompilerSourceFile;
|
||||
import com.wudsn.ide.lng.compiler.parser.CompilerSourceParser;
|
||||
|
@ -206,7 +208,9 @@ public final class LanguageHyperlinkDetector extends AbstractHyperlinkDetector {
|
|||
case CompilerSourceParserFileReferenceType.SOURCE:
|
||||
hyperlinks.add(new LanguageHyperlink(linkRegion, workbenchPage, absoluteFilePath, uri,
|
||||
languageEditor.getClass().getName(), 0, TextUtility
|
||||
.format(Texts.COMPILER_HYPERLINK_DETECTOR_OPEN_SOURCE_WITH_LANGUAGE_EDITOR, "TODO"))); // TODO
|
||||
// INFO: Open with {0} Editor
|
||||
.format(Texts.COMPILER_HYPERLINK_DETECTOR_OPEN_SOURCE_WITH_LANGUAGE_EDITOR,
|
||||
LanguageUtility.getText(languageEditor.getLanguage()))));
|
||||
break;
|
||||
case CompilerSourceParserFileReferenceType.BINARY:
|
||||
hyperlinks.add(new LanguageHyperlink(linkRegion, workbenchPage, absoluteFilePath, uri, HexEditor.ID, 0,
|
||||
|
|
|
@ -49,6 +49,7 @@ import com.wudsn.ide.base.hardware.Hardware;
|
|||
import com.wudsn.ide.base.hardware.HardwareUtility;
|
||||
import com.wudsn.ide.lng.Language;
|
||||
import com.wudsn.ide.lng.LanguagePlugin;
|
||||
import com.wudsn.ide.lng.LanguageUtility;
|
||||
import com.wudsn.ide.lng.Target;
|
||||
import com.wudsn.ide.lng.TargetUtility;
|
||||
import com.wudsn.ide.lng.Texts;
|
||||
|
@ -689,7 +690,7 @@ public final class LanguageHelpContentProducer implements IHelpContentProducer {
|
|||
writer.beginTable();
|
||||
writer.writeTableRow(Texts.TOC_TARGET_NAME_LABEL, EnumUtility.getText(target));
|
||||
Language language = TargetUtility.getLanguage(target);
|
||||
writer.writeTableRow(Texts.TOC_TARGET_LANGUAGE_LABEL, EnumUtility.getText(language));
|
||||
writer.writeTableRow(Texts.TOC_TARGET_LANGUAGE_LABEL, LanguageUtility.getText(language));
|
||||
writer.end();
|
||||
|
||||
writer.begin("br", null);
|
||||
|
|
|
@ -42,6 +42,7 @@ import com.wudsn.ide.base.common.TextUtility;
|
|||
import com.wudsn.ide.base.hardware.Hardware;
|
||||
import com.wudsn.ide.lng.Language;
|
||||
import com.wudsn.ide.lng.LanguagePlugin;
|
||||
import com.wudsn.ide.lng.LanguageUtility;
|
||||
import com.wudsn.ide.lng.Target;
|
||||
import com.wudsn.ide.lng.Texts;
|
||||
import com.wudsn.ide.lng.compiler.CompilerDefinition;
|
||||
|
@ -224,9 +225,9 @@ public final class LanguageTocProvider extends AbstractTocProvider {
|
|||
List<CompilerDefinition> compilerDefinitions = compilerRegistry.getCompilerDefinitions(language);
|
||||
|
||||
List<ITopic> compilerTopics = createCompilersTopics(compilerDefinitions);
|
||||
topics.add(
|
||||
createTopic("", TextUtility.format(Texts.TOC_COMPILERS_TOPIC_LABEL, EnumUtility.getText(language)),
|
||||
"", createTopicsArray(compilerTopics)));
|
||||
topics.add(createTopic("",
|
||||
TextUtility.format(Texts.TOC_COMPILERS_TOPIC_LABEL, LanguageUtility.getText(language)), "",
|
||||
createTopicsArray(compilerTopics)));
|
||||
}
|
||||
return topics;
|
||||
}
|
||||
|
|
|
@ -441,9 +441,8 @@ public abstract class LanguagePreferencesCompilersPage extends FieldEditorPrefer
|
|||
label = new Label(disabledControl, SWT.NONE);
|
||||
|
||||
// ERROR: Path to {0} '{1}' executable is not set in the '{2}' preferences.
|
||||
String compilerDefinitionText = LanguageUtility.getCompilerTextLower(compilerDefinition.getLanguage());
|
||||
String compilerPreferencesText = LanguageUtility.getCompilerPreferencesText(compilerDefinition.getLanguage());
|
||||
label.setText(TextUtility.format(Texts.MESSAGE_E100, compilerDefinitionText, compilerDefinition.getName(),
|
||||
label.setText(TextUtility.format(Texts.MESSAGE_E100, compilerDefinition.getTextLower(), compilerDefinition.getName(),
|
||||
compilerPreferencesText));
|
||||
Tab tab = new Tab(compilerDefinition, tabs.size(), tabItem, tabContent, disabledControl, controlDecorations);
|
||||
tabs.put(compilerId, tab);
|
||||
|
|
Loading…
Reference in New Issue
Block a user