mirror of
https://github.com/peterdell/wudsn-ide.git
synced 2025-01-02 20:29:43 +00:00
Transform string helpDocumentsPath to sequence of element helpDocument
This commit is contained in:
parent
fedec9d2f0
commit
457f773b53
@ -55,7 +55,6 @@
|
|||||||
class="com.wudsn.ide.lng.asm.compiler.acme.AcmeCompiler"
|
class="com.wudsn.ide.lng.asm.compiler.acme.AcmeCompiler"
|
||||||
defaultHardware="C64"
|
defaultHardware="C64"
|
||||||
defaultParameters="-f cbm -o ${outputFilePath} ${sourceFilePath} "
|
defaultParameters="-f cbm -o ${outputFilePath} ${sourceFilePath} "
|
||||||
helpDocumentPaths="./docs"
|
|
||||||
homePageURL="https://sourceforge.net/projects/acme-crossass"
|
homePageURL="https://sourceforge.net/projects/acme-crossass"
|
||||||
id="acme"
|
id="acme"
|
||||||
language="ASM"
|
language="ASM"
|
||||||
@ -73,13 +72,16 @@
|
|||||||
<supportedTarget
|
<supportedTarget
|
||||||
target="MOS65816">
|
target="MOS65816">
|
||||||
</supportedTarget>
|
</supportedTarget>
|
||||||
|
<helpDocument
|
||||||
|
language="*"
|
||||||
|
path="./docs">
|
||||||
|
</helpDocument>
|
||||||
|
|
||||||
</compiler>
|
</compiler>
|
||||||
<compiler
|
<compiler
|
||||||
class="com.wudsn.ide.lng.asm.compiler.asm6.Asm6Compiler"
|
class="com.wudsn.ide.lng.asm.compiler.asm6.Asm6Compiler"
|
||||||
defaultHardware="NES"
|
defaultHardware="NES"
|
||||||
defaultParameters=" ${sourceFilePath} ${outputFilePath}"
|
defaultParameters=" ${sourceFilePath} ${outputFilePath}"
|
||||||
helpDocumentPaths="./README.TXT"
|
|
||||||
homePageURL="http://3dscapture.com/NES/asm6.zip"
|
homePageURL="http://3dscapture.com/NES/asm6.zip"
|
||||||
id="asm6"
|
id="asm6"
|
||||||
language="ASM"
|
language="ASM"
|
||||||
@ -91,12 +93,15 @@
|
|||||||
<supportedTarget
|
<supportedTarget
|
||||||
target="MOS6502_ILLEGAL">
|
target="MOS6502_ILLEGAL">
|
||||||
</supportedTarget>
|
</supportedTarget>
|
||||||
|
<helpDocument
|
||||||
|
language="*"
|
||||||
|
path="./README.TXT">
|
||||||
|
</helpDocument>
|
||||||
</compiler>
|
</compiler>
|
||||||
<compiler
|
<compiler
|
||||||
class="com.wudsn.ide.lng.asm.compiler.atasm.AtasmCompiler"
|
class="com.wudsn.ide.lng.asm.compiler.atasm.AtasmCompiler"
|
||||||
defaultHardware="ATARI8BIT"
|
defaultHardware="ATARI8BIT"
|
||||||
defaultParameters="-s -o${outputFilePath} -l${outputFilePathWithoutExtension}.lab ${sourceFilePath}"
|
defaultParameters="-s -o${outputFilePath} -l${outputFilePathWithoutExtension}.lab ${sourceFilePath}"
|
||||||
helpDocumentPaths="./docs/atasm.pdf"
|
|
||||||
homePageURL="http://atari.miribilist.com/atasm"
|
homePageURL="http://atari.miribilist.com/atasm"
|
||||||
id="atasm"
|
id="atasm"
|
||||||
language="ASM"
|
language="ASM"
|
||||||
@ -108,12 +113,15 @@
|
|||||||
<supportedTarget
|
<supportedTarget
|
||||||
target="MOS6502_ILLEGAL">
|
target="MOS6502_ILLEGAL">
|
||||||
</supportedTarget>
|
</supportedTarget>
|
||||||
|
<helpDocument
|
||||||
|
language="*"
|
||||||
|
path="./docs/atasm.pdf">
|
||||||
|
</helpDocument>
|
||||||
</compiler>
|
</compiler>
|
||||||
<compiler
|
<compiler
|
||||||
class="com.wudsn.ide.lng.asm.compiler.dasm.DasmCompiler"
|
class="com.wudsn.ide.lng.asm.compiler.dasm.DasmCompiler"
|
||||||
defaultHardware="ATARI2600"
|
defaultHardware="ATARI2600"
|
||||||
defaultParameters="${sourceFilePath} -o${outputFilePath} -f3 -v5 -s${outputFilePathWithoutExtension}.sym -l${outputFilePathWithoutExtension}.lst"
|
defaultParameters="${sourceFilePath} -o${outputFilePath} -f3 -v5 -s${outputFilePathWithoutExtension}.sym -l${outputFilePathWithoutExtension}.lst"
|
||||||
helpDocumentPaths="../doc/dasm.TXT"
|
|
||||||
homePageURL="http://dasm-dillon.sourceforge.net"
|
homePageURL="http://dasm-dillon.sourceforge.net"
|
||||||
id="dasm"
|
id="dasm"
|
||||||
language="ASM"
|
language="ASM"
|
||||||
@ -125,12 +133,15 @@
|
|||||||
<supportedTarget
|
<supportedTarget
|
||||||
target="MOS6502_ILLEGAL">
|
target="MOS6502_ILLEGAL">
|
||||||
</supportedTarget>
|
</supportedTarget>
|
||||||
|
<helpDocument
|
||||||
|
language="*"
|
||||||
|
path="../doc/DASM.TXT">
|
||||||
|
</helpDocument>
|
||||||
</compiler>
|
</compiler>
|
||||||
<compiler
|
<compiler
|
||||||
class="com.wudsn.ide.lng.asm.compiler.kickass.KickAssCompiler"
|
class="com.wudsn.ide.lng.asm.compiler.kickass.KickAssCompiler"
|
||||||
defaultHardware="C64"
|
defaultHardware="C64"
|
||||||
defaultParameters="-o ${outputFilePath} ${sourceFilePath} "
|
defaultParameters="-o ${outputFilePath} ${sourceFilePath} "
|
||||||
helpDocumentPaths="./KickAssembler.pdf"
|
|
||||||
homePageURL="http://www.theweb.dk/KickAssembler"
|
homePageURL="http://www.theweb.dk/KickAssembler"
|
||||||
id="kickass"
|
id="kickass"
|
||||||
language="ASM"
|
language="ASM"
|
||||||
@ -145,12 +156,15 @@
|
|||||||
<supportedTarget
|
<supportedTarget
|
||||||
target="MOS6502_DTV">
|
target="MOS6502_DTV">
|
||||||
</supportedTarget>
|
</supportedTarget>
|
||||||
|
<helpDocument
|
||||||
|
language="*"
|
||||||
|
path="./KickAssembler.pdf">
|
||||||
|
</helpDocument>
|
||||||
</compiler>
|
</compiler>
|
||||||
<compiler
|
<compiler
|
||||||
class="com.wudsn.ide.lng.asm.compiler.mads.MadsCompiler"
|
class="com.wudsn.ide.lng.asm.compiler.mads.MadsCompiler"
|
||||||
defaultHardware="ATARI8BIT"
|
defaultHardware="ATARI8BIT"
|
||||||
defaultParameters=" ${sourceFilePath} -o:${outputFilePath} -p -t:${outputFilePathWithoutExtension}.lab -l:${outputFilePathWithoutExtension}.lst "
|
defaultParameters=" ${sourceFilePath} -o:${outputFilePath} -p -t:${outputFilePathWithoutExtension}.lab -l:${outputFilePathWithoutExtension}.lst "
|
||||||
helpDocumentPaths="./doc/mads-eng.html, ./doc/mads-en.html (en), ./doc/mads.html (pl)"
|
|
||||||
homePageURL="http://mads.atari8.info"
|
homePageURL="http://mads.atari8.info"
|
||||||
id="mads"
|
id="mads"
|
||||||
language="ASM"
|
language="ASM"
|
||||||
@ -165,12 +179,23 @@
|
|||||||
<supportedTarget
|
<supportedTarget
|
||||||
target="MOS65816">
|
target="MOS65816">
|
||||||
</supportedTarget>
|
</supportedTarget>
|
||||||
|
<helpDocument
|
||||||
|
language="*"
|
||||||
|
path="./doc/mads-eng.html">
|
||||||
|
</helpDocument>
|
||||||
|
<helpDocument
|
||||||
|
language="en"
|
||||||
|
path="./doc/mads-en.html">
|
||||||
|
</helpDocument>
|
||||||
|
<helpDocument
|
||||||
|
language="pl"
|
||||||
|
path="./doc/mads.html">
|
||||||
|
</helpDocument>
|
||||||
</compiler>
|
</compiler>
|
||||||
<compiler
|
<compiler
|
||||||
class="com.wudsn.ide.lng.asm.compiler.merlin32.Merlin32Compiler"
|
class="com.wudsn.ide.lng.asm.compiler.merlin32.Merlin32Compiler"
|
||||||
defaultHardware="APPLE2"
|
defaultHardware="APPLE2"
|
||||||
defaultParameters="-V ${sourceFilePath}"
|
defaultParameters="-V ${sourceFilePath}"
|
||||||
helpDocumentPaths="../Documentation/Merlin32.pdf"
|
|
||||||
homePageURL="http://www.brutaldeluxe.fr/products/crossdevtools/merlin/index.html"
|
homePageURL="http://www.brutaldeluxe.fr/products/crossdevtools/merlin/index.html"
|
||||||
id="merlin32"
|
id="merlin32"
|
||||||
language="ASM"
|
language="ASM"
|
||||||
@ -185,12 +210,15 @@
|
|||||||
<supportedTarget
|
<supportedTarget
|
||||||
target="MOS65816">
|
target="MOS65816">
|
||||||
</supportedTarget>
|
</supportedTarget>
|
||||||
|
<helpDocument
|
||||||
|
language="*"
|
||||||
|
path="../Documentation/Merlin32.pdf">
|
||||||
|
</helpDocument>
|
||||||
</compiler>
|
</compiler>
|
||||||
<compiler
|
<compiler
|
||||||
class="com.wudsn.ide.lng.asm.compiler.tass.TassCompiler"
|
class="com.wudsn.ide.lng.asm.compiler.tass.TassCompiler"
|
||||||
defaultHardware="C64"
|
defaultHardware="C64"
|
||||||
defaultParameters="-o ${outputFilePath} ${sourceFilePath} "
|
defaultParameters="-o ${outputFilePath} ${sourceFilePath} "
|
||||||
helpDocumentPaths="./README"
|
|
||||||
homePageURL="http://tass64.sourceforge.net"
|
homePageURL="http://tass64.sourceforge.net"
|
||||||
id="tass"
|
id="tass"
|
||||||
language="ASM"
|
language="ASM"
|
||||||
@ -205,13 +233,16 @@
|
|||||||
<supportedTarget
|
<supportedTarget
|
||||||
target="MOS65C02">
|
target="MOS65C02">
|
||||||
</supportedTarget>
|
</supportedTarget>
|
||||||
|
<helpDocument
|
||||||
|
language="*"
|
||||||
|
path="./README">
|
||||||
|
</helpDocument>
|
||||||
|
|
||||||
</compiler>
|
</compiler>
|
||||||
<compiler
|
<compiler
|
||||||
class="com.wudsn.ide.lng.asm.compiler.xasm.XasmCompiler"
|
class="com.wudsn.ide.lng.asm.compiler.xasm.XasmCompiler"
|
||||||
defaultHardware="ATARI8BIT"
|
defaultHardware="ATARI8BIT"
|
||||||
defaultParameters="/o:${outputFilePath} /p /t:${outputFilePathWithoutExtension}.lab /l:${outputFilePathWithoutExtension}.lst ${sourceFilePath}"
|
defaultParameters="/o:${outputFilePath} /p /t:${outputFilePathWithoutExtension}.lab /l:${outputFilePathWithoutExtension}.lst ${sourceFilePath}"
|
||||||
helpDocumentPaths="./xasm.html"
|
|
||||||
homePageURL="https://github.com/pfusik/xasm"
|
homePageURL="https://github.com/pfusik/xasm"
|
||||||
id="xasm"
|
id="xasm"
|
||||||
language="ASM"
|
language="ASM"
|
||||||
@ -220,6 +251,10 @@
|
|||||||
<supportedTarget
|
<supportedTarget
|
||||||
target="MOS6502">
|
target="MOS6502">
|
||||||
</supportedTarget>
|
</supportedTarget>
|
||||||
|
<helpDocument
|
||||||
|
language="*"
|
||||||
|
path="./xasm.html">
|
||||||
|
</helpDocument>
|
||||||
</compiler>
|
</compiler>
|
||||||
|
|
||||||
</extension>
|
</extension>
|
||||||
|
@ -2,46 +2,104 @@
|
|||||||
<!-- Schema file written by PDE -->
|
<!-- Schema file written by PDE -->
|
||||||
<schema targetNamespace="com.wudsn.ide.lng" xmlns="http://www.w3.org/2001/XMLSchema">
|
<schema targetNamespace="com.wudsn.ide.lng" xmlns="http://www.w3.org/2001/XMLSchema">
|
||||||
<annotation>
|
<annotation>
|
||||||
<appInfo>
|
<appinfo>
|
||||||
<meta.schema plugin="com.wudsn.ide.lng" id="compilers" name="Compilers"/>
|
<meta.schema plugin="com.wudsn.ide.lng" id="compilers" name="Compilers"/>
|
||||||
</appInfo>
|
</appinfo>
|
||||||
<documentation>
|
<documentation>
|
||||||
This extension point allows for adding new assemblers and compilers to the WUDSN IDE.
|
This extension point allows for adding new assemblers and compilers to the WUDSN IDE.
|
||||||
</documentation>
|
</documentation>
|
||||||
</annotation>
|
</annotation>
|
||||||
|
|
||||||
<element name="extension">
|
<element name="supportedTarget">
|
||||||
<annotation>
|
|
||||||
<appInfo>
|
|
||||||
<meta.element />
|
|
||||||
</appInfo>
|
|
||||||
</annotation>
|
|
||||||
<complexType>
|
<complexType>
|
||||||
<sequence minOccurs="1" maxOccurs="unbounded">
|
<attribute name="target" use="required">
|
||||||
<element ref="compiler"/>
|
|
||||||
</sequence>
|
|
||||||
<attribute name="point" type="string" use="required">
|
|
||||||
<annotation>
|
<annotation>
|
||||||
<documentation>
|
<documentation>
|
||||||
|
|
||||||
</documentation>
|
</documentation>
|
||||||
</annotation>
|
</annotation>
|
||||||
|
<simpleType>
|
||||||
|
<restriction base="string">
|
||||||
|
<enumeration value="MOS6502">
|
||||||
|
</enumeration>
|
||||||
|
<enumeration value="MOS6502_ILLEGAL">
|
||||||
|
</enumeration>
|
||||||
|
<enumeration value="MOS65C02">
|
||||||
|
</enumeration>
|
||||||
|
<enumeration value="MOS6502_DTV">
|
||||||
|
</enumeration>
|
||||||
|
<enumeration value="MOS65816">
|
||||||
|
</enumeration>
|
||||||
|
<enumeration value="PASCAL">
|
||||||
|
</enumeration>
|
||||||
|
</restriction>
|
||||||
|
</simpleType>
|
||||||
</attribute>
|
</attribute>
|
||||||
<attribute name="id" type="string">
|
</complexType>
|
||||||
|
</element>
|
||||||
|
|
||||||
|
<element name="helpDocument">
|
||||||
|
<complexType>
|
||||||
|
<attribute name="path" type="string" use="required">
|
||||||
<annotation>
|
<annotation>
|
||||||
<documentation>
|
<documentation>
|
||||||
|
Relative path of the help document or help folder, relative to the folder of the executables.
|
||||||
|
Or absolute URL starting with "http://" or "https://".
|
||||||
</documentation>
|
</documentation>
|
||||||
</annotation>
|
</annotation>
|
||||||
</attribute>
|
</attribute>
|
||||||
<attribute name="name" type="string">
|
<attribute name="language" type="string">
|
||||||
<annotation>
|
<annotation>
|
||||||
<documentation>
|
<documentation>
|
||||||
|
The 2 letter "de" or 5 letter "de_DE" representation of the language of the document.
|
||||||
|
Use "*" is the entry is valid for all languages
|
||||||
|
</documentation>
|
||||||
|
</annotation>
|
||||||
|
</attribute>
|
||||||
|
</complexType>
|
||||||
|
</element>
|
||||||
|
|
||||||
|
<element name="executable">
|
||||||
|
<complexType>
|
||||||
|
<attribute name="os" use="required">
|
||||||
|
<annotation>
|
||||||
|
<documentation>
|
||||||
|
OSGI OS value as described in org.eclipse.core.runtime.Platform
|
||||||
|
</documentation>
|
||||||
|
</annotation>
|
||||||
|
<simpleType>
|
||||||
|
<restriction base="string">
|
||||||
|
<enumeration value="OS_MACOSX">
|
||||||
|
</enumeration>
|
||||||
|
<enumeration value="OS_LINUX">
|
||||||
|
</enumeration>
|
||||||
|
<enumeration value="OS_WIN32">
|
||||||
|
</enumeration>
|
||||||
|
</restriction>
|
||||||
|
</simpleType>
|
||||||
|
</attribute>
|
||||||
|
<attribute name="osArch" use="required">
|
||||||
|
<annotation>
|
||||||
|
<documentation>
|
||||||
|
OSGI OS archiecture value as described in org.eclipse.core.runtime.Platform
|
||||||
|
</documentation>
|
||||||
|
</annotation>
|
||||||
|
<simpleType>
|
||||||
|
<restriction base="string">
|
||||||
|
<enumeration value="ARCH_X86">
|
||||||
|
</enumeration>
|
||||||
|
<enumeration value="ARCH_X86_64">
|
||||||
|
</enumeration>
|
||||||
|
<enumeration value="ARCH_PPC">
|
||||||
|
</enumeration>
|
||||||
|
</restriction>
|
||||||
|
</simpleType>
|
||||||
|
</attribute>
|
||||||
|
<attribute name="path" type="string" use="required">
|
||||||
|
<annotation>
|
||||||
|
<documentation>
|
||||||
|
Relative path of the executable inside the base folder
|
||||||
</documentation>
|
</documentation>
|
||||||
<appInfo>
|
|
||||||
<meta.attribute translatable="true"/>
|
|
||||||
</appInfo>
|
|
||||||
</annotation>
|
</annotation>
|
||||||
</attribute>
|
</attribute>
|
||||||
</complexType>
|
</complexType>
|
||||||
@ -54,6 +112,10 @@
|
|||||||
<element ref="supportedTarget" minOccurs="1" maxOccurs="unbounded"/>
|
<element ref="supportedTarget" minOccurs="1" maxOccurs="unbounded"/>
|
||||||
</sequence>
|
</sequence>
|
||||||
<sequence>
|
<sequence>
|
||||||
|
<element ref="helpDocument" minOccurs="0" maxOccurs="unbounded"/>
|
||||||
|
</sequence>
|
||||||
|
<sequence>
|
||||||
|
<element ref="executable" minOccurs="0" maxOccurs="unbounded"/>
|
||||||
</sequence>
|
</sequence>
|
||||||
</choice>
|
</choice>
|
||||||
<attribute name="language" use="required">
|
<attribute name="language" use="required">
|
||||||
@ -83,9 +145,9 @@
|
|||||||
<documentation>
|
<documentation>
|
||||||
Translatable name of the compiler. Typically contains only upper case letters.
|
Translatable name of the compiler. Typically contains only upper case letters.
|
||||||
</documentation>
|
</documentation>
|
||||||
<appInfo>
|
<appinfo>
|
||||||
<meta.attribute translatable="true"/>
|
<meta.attribute translatable="true"/>
|
||||||
</appInfo>
|
</appinfo>
|
||||||
</annotation>
|
</annotation>
|
||||||
</attribute>
|
</attribute>
|
||||||
<attribute name="class" type="string" use="required">
|
<attribute name="class" type="string" use="required">
|
||||||
@ -93,9 +155,9 @@
|
|||||||
<documentation>
|
<documentation>
|
||||||
The name of the compiler class.
|
The name of the compiler class.
|
||||||
</documentation>
|
</documentation>
|
||||||
<appInfo>
|
<appinfo>
|
||||||
<meta.attribute kind="java" basedOn="com.wudsn.ide.lng.compiler.Compiler:"/>
|
<meta.attribute kind="java" basedOn="com.wudsn.ide.lng.compiler.Compiler:"/>
|
||||||
</appInfo>
|
</appinfo>
|
||||||
</annotation>
|
</annotation>
|
||||||
</attribute>
|
</attribute>
|
||||||
<attribute name="version" type="string" use="required">
|
<attribute name="version" type="string" use="required">
|
||||||
@ -112,17 +174,6 @@
|
|||||||
</documentation>
|
</documentation>
|
||||||
</annotation>
|
</annotation>
|
||||||
</attribute>
|
</attribute>
|
||||||
<attribute name="helpDocumentPaths" type="string">
|
|
||||||
<annotation>
|
|
||||||
<documentation>
|
|
||||||
The relative paths to the local help documents.
|
|
||||||
Multiple paths are separated by comma.
|
|
||||||
Adding a language constraint in parentheses like "./doc-de.html (de)" acts as filter.
|
|
||||||
Each file path is evluated based on the absolute path of the compiler executable in the preferences.
|
|
||||||
Alternatively abolute URLs to web sites can be specified. They are used, if not file paths match.
|
|
||||||
</documentation>
|
|
||||||
</annotation>
|
|
||||||
</attribute>
|
|
||||||
<attribute name="defaultParameters" type="string" use="required">
|
<attribute name="defaultParameters" type="string" use="required">
|
||||||
<annotation>
|
<annotation>
|
||||||
<documentation>
|
<documentation>
|
||||||
@ -158,38 +209,47 @@ Alternatively abolute URLs to web sites can be specified. They are used, if not
|
|||||||
</complexType>
|
</complexType>
|
||||||
</element>
|
</element>
|
||||||
|
|
||||||
<element name="supportedTarget">
|
<element name="extension">
|
||||||
|
<annotation>
|
||||||
|
<appinfo>
|
||||||
|
<meta.element />
|
||||||
|
</appinfo>
|
||||||
|
</annotation>
|
||||||
<complexType>
|
<complexType>
|
||||||
<attribute name="target">
|
<sequence minOccurs="1" maxOccurs="unbounded">
|
||||||
|
<element ref="compiler"/>
|
||||||
|
</sequence>
|
||||||
|
<attribute name="point" type="string" use="required">
|
||||||
<annotation>
|
<annotation>
|
||||||
<documentation>
|
<documentation>
|
||||||
|
|
||||||
</documentation>
|
</documentation>
|
||||||
</annotation>
|
</annotation>
|
||||||
<simpleType>
|
</attribute>
|
||||||
<restriction base="string">
|
<attribute name="id" type="string">
|
||||||
<enumeration value="MOS6502">
|
<annotation>
|
||||||
</enumeration>
|
<documentation>
|
||||||
<enumeration value="MOS6502_ILLEGAL">
|
|
||||||
</enumeration>
|
</documentation>
|
||||||
<enumeration value="MOS65C02">
|
</annotation>
|
||||||
</enumeration>
|
</attribute>
|
||||||
<enumeration value="MOS6502_DTV">
|
<attribute name="name" type="string">
|
||||||
</enumeration>
|
<annotation>
|
||||||
<enumeration value="MOS65816">
|
<documentation>
|
||||||
</enumeration>
|
|
||||||
<enumeration value="PASCAL">
|
</documentation>
|
||||||
</enumeration>
|
<appinfo>
|
||||||
</restriction>
|
<meta.attribute translatable="true"/>
|
||||||
</simpleType>
|
</appinfo>
|
||||||
|
</annotation>
|
||||||
</attribute>
|
</attribute>
|
||||||
</complexType>
|
</complexType>
|
||||||
</element>
|
</element>
|
||||||
|
|
||||||
<annotation>
|
<annotation>
|
||||||
<appInfo>
|
<appinfo>
|
||||||
<meta.section type="since"/>
|
<meta.section type="since"/>
|
||||||
</appInfo>
|
</appinfo>
|
||||||
<documentation>
|
<documentation>
|
||||||
WUDSN IDE 1.1.0
|
WUDSN IDE 1.1.0
|
||||||
</documentation>
|
</documentation>
|
||||||
@ -197,9 +257,9 @@ Alternatively abolute URLs to web sites can be specified. They are used, if not
|
|||||||
|
|
||||||
|
|
||||||
<annotation>
|
<annotation>
|
||||||
<appInfo>
|
<appinfo>
|
||||||
<meta.section type="apiinfo"/>
|
<meta.section type="apiinfo"/>
|
||||||
</appInfo>
|
</appinfo>
|
||||||
<documentation>
|
<documentation>
|
||||||
To implement this extension point, you have to create a sub-class of com.wudsn.ide.lng.compiler.Compiler, a sub-class of com.wudsn.ide.lng.compiler.parser.CompilerSourceParser and a sub-class of com.wudsn.ide.lng.compiler.CompilerLogParser. In the constructor of the compiler you have to set the source parser instance. In the "createLogParser" method of the compiler you have to create a new instance of the corresponding log parser.
|
To implement this extension point, you have to create a sub-class of com.wudsn.ide.lng.compiler.Compiler, a sub-class of com.wudsn.ide.lng.compiler.parser.CompilerSourceParser and a sub-class of com.wudsn.ide.lng.compiler.CompilerLogParser. In the constructor of the compiler you have to set the source parser instance. In the "createLogParser" method of the compiler you have to create a new instance of the corresponding log parser.
|
||||||
</documentation>
|
</documentation>
|
||||||
@ -207,9 +267,9 @@ Alternatively abolute URLs to web sites can be specified. They are used, if not
|
|||||||
|
|
||||||
|
|
||||||
<annotation>
|
<annotation>
|
||||||
<appInfo>
|
<appinfo>
|
||||||
<meta.section type="copyright"/>
|
<meta.section type="copyright"/>
|
||||||
</appInfo>
|
</appinfo>
|
||||||
<documentation>
|
<documentation>
|
||||||
(c) 2009 Peter Dell
|
(c) 2009 Peter Dell
|
||||||
</documentation>
|
</documentation>
|
||||||
|
@ -167,7 +167,7 @@ TOC_TARGET_OPCODE_LABEL=Opcode
|
|||||||
|
|
||||||
MESSAGE_E100=Path to '{0}' {1} executable is not set in the '{2}' preferences.
|
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_E101=The {0} '{1}' does not specify default parameters.
|
||||||
MESSAGE_E102=The {0} '{1}' does not specify help document paths.
|
MESSAGE_E102=The {0} '{1}' does not specify help documents.
|
||||||
MESSAGE_E103=Path to '{0}' {1} executable in the '{2}' preferences points to non-existing file '{3}'.
|
MESSAGE_E103=Path to '{0}' {1} executable in the '{2}' preferences points to non-existing file '{3}'.
|
||||||
MESSAGE_E104=Output file extension must be set in the preferences of {0} '{1}' or via the annotation '{2}'.
|
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_E105=Cannot execute {0} process '{1}' in working directory '{2}'. System error: {3}
|
||||||
@ -196,7 +196,7 @@ MESSAGE_E127={0} process ended with return code {1}. Check the error messages an
|
|||||||
MESSAGE_E128=Hardware not specified. Specify one of the following valid values '{0}'.
|
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_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_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 '{2}' relative to the executable path '{3}'.
|
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_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_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}
|
MESSAGE_E134=Disk image file '{0}' cannot be opened for reading. System error: {1}
|
||||||
|
@ -165,7 +165,7 @@ TOC_TARGET_OPCODE_LABEL=Opcode
|
|||||||
|
|
||||||
MESSAGE_E100=Pfad zur ausführbaren Datei des Kompilers '{0}' ist in den '{1}' Voreinstellungen nicht angegeben.
|
MESSAGE_E100=Pfad zur ausführbaren Datei des Kompilers '{0}' ist in den '{1}' Voreinstellungen nicht angegeben.
|
||||||
MESSAGE_E101=Der {0} '{1}' definiert keine Standardparameter.
|
MESSAGE_E101=Der {0} '{1}' definiert keine Standardparameter.
|
||||||
MESSAGE_E102=Der {0} '{1}' definiert keine Pfade zu Hilfedokumenten.
|
MESSAGE_E102=Der {0} '{1}' definiert keine Hilfedokumentes.
|
||||||
MESSAGE_E103=Pfad zur ausführbaren Datei des Kompilers '{0}' in den Voreinstellungen verweist auf die nicht existierende Datei '{1}'.
|
MESSAGE_E103=Pfad zur ausführbaren Datei des Kompilers '{0}' in den Voreinstellungen verweist auf die nicht existierende Datei '{1}'.
|
||||||
MESSAGE_E104=Ausgabe-Dateierweiterung muss in den Voreinstellungen des Kompilers '{0}' oder mit der Annotation '{1}' angegeben werden.
|
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_E105=Kompilerprozess '{0}' kann im Arbeitsverzeichnis '{1}' nicht ausgeführt werden. Systemfehler: {2}
|
||||||
@ -193,8 +193,8 @@ MESSAGE_E126=Ausgabe-Datei erzeugt is aber leer. Pr
|
|||||||
MESSAGE_E127=Kompilerprozess endete mit dem Rückgabewert {0}. 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_E128=Hardware nicht angegeben. Gültige Werte sind '{0}'.
|
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_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 Kompiler '{0}' kann nicht angezeigt werden, da der Pfad zur ausführbaren Datei des Kompilers in den Voreinstellungen nicht angegeben ist.
|
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 Kompiler '{0}' kann nicht angezeigt werden, da keine Hilfe-Datei in den Pfaden '{1}' relativ zur ausführbaren Datei '{2}' des Kompilers gefunden wurde.
|
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_E132=Disketten-Image-Datei '{0}' existiert nicht. Lege ein bootfähiges Disketten-Image an, auf dem die Ausgabe-Datei '{1}' gespeichert werden kann.
|
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_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}
|
MESSAGE_E134=Disketten-Image-Datei '{0}' kann not nicht zum Lesen geöffnet werden. Systemfehler: {1}
|
||||||
|
@ -34,7 +34,7 @@ import com.wudsn.ide.lng.LanguagePlugin;
|
|||||||
import com.wudsn.ide.lng.LanguageUtility;
|
import com.wudsn.ide.lng.LanguageUtility;
|
||||||
import com.wudsn.ide.lng.Target;
|
import com.wudsn.ide.lng.Target;
|
||||||
import com.wudsn.ide.lng.Texts;
|
import com.wudsn.ide.lng.Texts;
|
||||||
import com.wudsn.ide.lng.compiler.CompilerHelp.HelpDocument;
|
import com.wudsn.ide.lng.compiler.CompilerHelp.InstalledHelpDocument;
|
||||||
import com.wudsn.ide.lng.compiler.CompilerPaths.CompilerPath;
|
import com.wudsn.ide.lng.compiler.CompilerPaths.CompilerPath;
|
||||||
import com.wudsn.ide.lng.compiler.syntax.CompilerSyntax;
|
import com.wudsn.ide.lng.compiler.syntax.CompilerSyntax;
|
||||||
|
|
||||||
@ -47,6 +47,27 @@ import com.wudsn.ide.lng.compiler.syntax.CompilerSyntax;
|
|||||||
*/
|
*/
|
||||||
public final class CompilerDefinition implements Comparable<CompilerDefinition> {
|
public final class CompilerDefinition implements Comparable<CompilerDefinition> {
|
||||||
|
|
||||||
|
public final static class HelpDocument {
|
||||||
|
|
||||||
|
public final String path;
|
||||||
|
public final String language;
|
||||||
|
|
||||||
|
HelpDocument(String path, String language) {
|
||||||
|
if (path == null) {
|
||||||
|
throw new IllegalArgumentException("Parameter 'path' must not be null.");
|
||||||
|
}
|
||||||
|
if (language == null) {
|
||||||
|
throw new IllegalArgumentException("Parameter 'language' must not be null.");
|
||||||
|
}
|
||||||
|
this.path = path;
|
||||||
|
this.language = language;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isURL() {
|
||||||
|
return path.startsWith("http://") || path.startsWith("https://");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Language
|
// Language
|
||||||
private Language language;
|
private Language language;
|
||||||
|
|
||||||
@ -56,7 +77,7 @@ public final class CompilerDefinition implements Comparable<CompilerDefinition>
|
|||||||
private String className;
|
private String className;
|
||||||
|
|
||||||
// Installation and use.
|
// Installation and use.
|
||||||
private String helpDocumentPaths;
|
private List<HelpDocument> helpDocuments;
|
||||||
private String homePageURL;
|
private String homePageURL;
|
||||||
|
|
||||||
// Editing and source parsing.
|
// Editing and source parsing.
|
||||||
@ -240,40 +261,18 @@ public final class CompilerDefinition implements Comparable<CompilerDefinition>
|
|||||||
return homePageURL;
|
return homePageURL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
final void setHelpDocuments(List<HelpDocument> helpDocuments) {
|
||||||
* Sets the help file paths to locate the help file for the compiler. Called by
|
if (helpDocuments == null) {
|
||||||
* {@link CompilerRegistry} only.
|
throw new IllegalArgumentException("Parameter 'helpDocuments' must not be null.");
|
||||||
*
|
|
||||||
* @param helpDocumentPaths The relative file path starting with "." to locate
|
|
||||||
* the help file for the compiler based on the folder
|
|
||||||
* of the executable. ".". ".." and "/" may be used to
|
|
||||||
* specify the file path. Alternatively the path can be
|
|
||||||
* an absolute URL. A path may end with a language in
|
|
||||||
* the form "(en)". Multiple paths are separated by
|
|
||||||
* ",". May be empty or <code>null</code>.
|
|
||||||
*/
|
|
||||||
final void setHelpDocumentPaths(String helpDocumentPaths) {
|
|
||||||
if (helpDocumentPaths == null) {
|
|
||||||
helpDocumentPaths = "";
|
|
||||||
}
|
}
|
||||||
this.helpDocumentPaths = helpDocumentPaths;
|
this.helpDocuments = helpDocuments;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public List<HelpDocument> getHelpDocuments() {
|
||||||
* Gets the help file paths to locate the help file for the compiler.
|
if (helpDocuments == null) {
|
||||||
*
|
throw new IllegalStateException("Field 'helpDocuments' must not be null.");
|
||||||
* @return The relative file path starting with "." to locate the help file for
|
|
||||||
* the compiler based on the folder of the executable. ".". ".." and "/"
|
|
||||||
* may be used to specify the file path. Alternatively the path can be
|
|
||||||
* an absolute URL. A path may end with a language in the form "(en)".
|
|
||||||
* Multiple paths are separated by ",". May be empty or
|
|
||||||
* <code>null</code>.
|
|
||||||
*/
|
|
||||||
public final String getHelpDocumentPaths() {
|
|
||||||
if (helpDocumentPaths == null) {
|
|
||||||
throw new IllegalStateException("Field 'helpDocumentPaths' must not be null.");
|
|
||||||
}
|
}
|
||||||
return helpDocumentPaths;
|
return helpDocuments;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -282,8 +281,8 @@ public final class CompilerDefinition implements Comparable<CompilerDefinition>
|
|||||||
* @return <code>true</code> if this compiler offers a help file,
|
* @return <code>true</code> if this compiler offers a help file,
|
||||||
* <code>false</code> otherwise.
|
* <code>false</code> otherwise.
|
||||||
*/
|
*/
|
||||||
public final boolean hasHelpDocumentPaths() {
|
public final boolean hasHelpDocuments() {
|
||||||
return StringUtility.isSpecified(helpDocumentPaths);
|
return !helpDocuments.isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -298,13 +297,14 @@ public final class CompilerDefinition implements Comparable<CompilerDefinition>
|
|||||||
* does not specify a help path or no help file can be
|
* does not specify a help path or no help file can be
|
||||||
* found.
|
* found.
|
||||||
*/
|
*/
|
||||||
public final List<HelpDocument> getInstalledHelpDocuments(String compilerExecutablePath) throws CoreException {
|
private final List<InstalledHelpDocument> getInstalledHelpDocuments(String compilerExecutablePath)
|
||||||
|
throws CoreException {
|
||||||
if (compilerExecutablePath == null) {
|
if (compilerExecutablePath == null) {
|
||||||
throw new IllegalArgumentException("Parameter 'compilerExecutablePath' must not be null.");
|
throw new IllegalArgumentException("Parameter 'compilerExecutablePath' must not be null.");
|
||||||
}
|
}
|
||||||
String compilerText = LanguageUtility.getCompilerTextLower(language);
|
String compilerText = LanguageUtility.getCompilerTextLower(language);
|
||||||
if (!hasHelpDocumentPaths()) {
|
if (!hasHelpDocuments()) {
|
||||||
// INFO: The {0} '{1}' does not specify help document paths.
|
// INFO: The {0} '{1}' does not specify help documents.
|
||||||
throw new CoreException(new Status(IStatus.INFO, LanguagePlugin.ID,
|
throw new CoreException(new Status(IStatus.INFO, LanguagePlugin.ID,
|
||||||
TextUtility.format(Texts.MESSAGE_E102, compilerText, name)));
|
TextUtility.format(Texts.MESSAGE_E102, compilerText, name)));
|
||||||
}
|
}
|
||||||
@ -316,25 +316,22 @@ public final class CompilerDefinition implements Comparable<CompilerDefinition>
|
|||||||
TextUtility.format(Texts.MESSAGE_E130, name, compilerText, compilerPreferencesText)));
|
TextUtility.format(Texts.MESSAGE_E130, name, compilerText, compilerPreferencesText)));
|
||||||
}
|
}
|
||||||
|
|
||||||
return getHelpDocuments(compilerExecutablePath);
|
return CompilerHelp.getInstalledHelpDocuments(getHelpDocuments(), compilerExecutablePath);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public final List<HelpDocument> getHelpDocuments(String compilerExecutablePath) {
|
public final InstalledHelpDocument getInstalledHelpForCurrentLocale(String compilerExecutablePath)
|
||||||
return CompilerHelp.getHelpDocuments(helpDocumentPaths, compilerExecutablePath);
|
throws CoreException {
|
||||||
|
|
||||||
}
|
var helpDocuments = getInstalledHelpDocuments(compilerExecutablePath);
|
||||||
|
|
||||||
public final HelpDocument getHelpForCurrentLocale(String compilerExecutablePath) throws CoreException {
|
var localeLanguage = Locale.getDefault().getLanguage();
|
||||||
List<HelpDocument> helpDocuments = getInstalledHelpDocuments(compilerExecutablePath);
|
|
||||||
|
|
||||||
String localeLanguage = Locale.getDefault().getLanguage();
|
|
||||||
|
|
||||||
// Find the first existing local file and the first existing local file with
|
// Find the first existing local file and the first existing local file with
|
||||||
// matching language.
|
// matching language.
|
||||||
HelpDocument firstFile = null;
|
InstalledHelpDocument firstFile = null;
|
||||||
HelpDocument firstLanguageFile = null;
|
InstalledHelpDocument firstLanguageFile = null;
|
||||||
for (HelpDocument helpDocument : helpDocuments) {
|
for (var helpDocument : helpDocuments) {
|
||||||
|
|
||||||
if (helpDocument.file != null && helpDocument.file.exists()) {
|
if (helpDocument.file != null && helpDocument.file.exists()) {
|
||||||
if (firstFile == null) {
|
if (firstFile == null) {
|
||||||
@ -347,14 +344,14 @@ public final class CompilerDefinition implements Comparable<CompilerDefinition>
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Use language specific file if present, use first file otherwise.
|
// Use language specific file if present, use first file otherwise.
|
||||||
HelpDocument result = firstLanguageFile;
|
var result = firstLanguageFile;
|
||||||
if (result == null) {
|
if (result == null) {
|
||||||
result = firstFile;
|
result = firstFile;
|
||||||
}
|
}
|
||||||
|
|
||||||
// No local file specified or found. Try the URIs.
|
// No local file specified or found. Try the URIs.
|
||||||
if (result == null) {
|
if (result == null) {
|
||||||
for (HelpDocument helpDocument : helpDocuments) {
|
for (InstalledHelpDocument helpDocument : helpDocuments) {
|
||||||
if (helpDocument.uri != null) {
|
if (helpDocument.uri != null) {
|
||||||
if (firstFile == null) {
|
if (firstFile == null) {
|
||||||
firstFile = helpDocument;
|
firstFile = helpDocument;
|
||||||
@ -376,9 +373,9 @@ public final class CompilerDefinition implements Comparable<CompilerDefinition>
|
|||||||
if (result == null) {
|
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 '{2}' relative to the executable path '{3}'.
|
// found in the paths relative to the executable path '{2}'.
|
||||||
throw new CoreException(new Status(IStatus.ERROR, LanguagePlugin.ID, TextUtility.format(Texts.MESSAGE_E131,
|
throw new CoreException(new Status(IStatus.ERROR, LanguagePlugin.ID, TextUtility.format(Texts.MESSAGE_E131,
|
||||||
name, LanguageUtility.getCompilerTextLower(language), helpDocumentPaths, compilerExecutablePath)));
|
name, LanguageUtility.getCompilerTextLower(language), compilerExecutablePath)));
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
|
@ -24,10 +24,10 @@ import java.net.URI;
|
|||||||
import java.net.URISyntaxException;
|
import java.net.URISyntaxException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.StringTokenizer;
|
|
||||||
|
|
||||||
import com.wudsn.ide.base.common.FileUtility;
|
import com.wudsn.ide.base.common.FileUtility;
|
||||||
import com.wudsn.ide.base.common.StringUtility;
|
import com.wudsn.ide.base.common.StringUtility;
|
||||||
|
import com.wudsn.ide.lng.compiler.CompilerDefinition.HelpDocument;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Compiler help access.
|
* Compiler help access.
|
||||||
@ -37,43 +37,37 @@ import com.wudsn.ide.base.common.StringUtility;
|
|||||||
* @since 1.7.2
|
* @since 1.7.2
|
||||||
*/
|
*/
|
||||||
public final class CompilerHelp {
|
public final class CompilerHelp {
|
||||||
|
|
||||||
public static class HelpDocument {
|
public static class InstalledHelpDocument {
|
||||||
public String path;
|
public String path;
|
||||||
public String language;
|
public String language;
|
||||||
public File file;
|
public File file;
|
||||||
public URI uri;
|
public URI uri;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static List<HelpDocument> getHelpDocuments(String helpDocumentPaths, String compilerExecutablePath) {
|
public static List<InstalledHelpDocument> getInstalledHelpDocuments(List<HelpDocument> list,
|
||||||
List<HelpDocument> helpDocuments = new ArrayList<CompilerHelp.HelpDocument>();
|
String compilerExecutablePath) {
|
||||||
|
var result = new ArrayList<CompilerHelp.InstalledHelpDocument>();
|
||||||
|
|
||||||
StringTokenizer tokenizer = new StringTokenizer(helpDocumentPaths, ",");
|
for (var helpDocument : list) {
|
||||||
while (tokenizer.hasMoreTokens()) {
|
|
||||||
String helpFilePath = tokenizer.nextToken().trim();
|
var installeHelpDocument = new InstalledHelpDocument();
|
||||||
String helpFileLanguage = "";
|
installeHelpDocument.path = helpDocument.path;
|
||||||
int index = helpFilePath.lastIndexOf("(");
|
installeHelpDocument.language = helpDocument.language;
|
||||||
if (index > 0) {
|
|
||||||
helpFileLanguage = helpFilePath.substring(index + 1, index + 3);
|
|
||||||
helpFilePath = helpFilePath.substring(0, index - 1).trim();
|
|
||||||
}
|
|
||||||
HelpDocument helpDocument = new HelpDocument();
|
|
||||||
helpDocument.path = helpFilePath;
|
|
||||||
helpDocument.language = helpFileLanguage;
|
|
||||||
|
|
||||||
// Relative paths are local files.
|
// Relative paths are local files.
|
||||||
if (helpFilePath.startsWith(".") && StringUtility.isSpecified(compilerExecutablePath)) {
|
if (installeHelpDocument.path.startsWith(".") && StringUtility.isSpecified(compilerExecutablePath)) {
|
||||||
helpDocument.file = FileUtility
|
installeHelpDocument.file = FileUtility.getCanonicalFile(
|
||||||
.getCanonicalFile(new File(new File(compilerExecutablePath).getParent(), helpFilePath));
|
new File(new File(compilerExecutablePath).getParent(), installeHelpDocument.path));
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
helpDocument.uri = new URI(helpFilePath);
|
installeHelpDocument.uri = new URI(installeHelpDocument.path);
|
||||||
} catch (URISyntaxException ex) {
|
} catch (URISyntaxException ex) {
|
||||||
throw new RuntimeException("Invalid URI for '" + helpFilePath + "' help file path", ex);
|
throw new RuntimeException("Invalid URI for '" + helpDocument.path + "' help file path", ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
helpDocuments.add(helpDocument);
|
result.add(installeHelpDocument);
|
||||||
}
|
}
|
||||||
return helpDocuments;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -36,6 +36,7 @@ import com.wudsn.ide.base.hardware.Hardware;
|
|||||||
import com.wudsn.ide.lng.Language;
|
import com.wudsn.ide.lng.Language;
|
||||||
import com.wudsn.ide.lng.Target;
|
import com.wudsn.ide.lng.Target;
|
||||||
import com.wudsn.ide.lng.compiler.syntax.CompilerSyntax;
|
import com.wudsn.ide.lng.compiler.syntax.CompilerSyntax;
|
||||||
|
import com.wudsn.ide.lng.compiler.CompilerDefinition.HelpDocument;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Registry for compilers, based on the extension points
|
* Registry for compilers, based on the extension points
|
||||||
@ -97,18 +98,23 @@ public final class CompilerRegistry {
|
|||||||
compilerDefinition.setId(configurationElement.getAttribute("id"));
|
compilerDefinition.setId(configurationElement.getAttribute("id"));
|
||||||
compilerDefinition.setName(configurationElement.getAttribute("name"));
|
compilerDefinition.setName(configurationElement.getAttribute("name"));
|
||||||
compilerDefinition.setClassName(configurationElement.getAttribute("class"));
|
compilerDefinition.setClassName(configurationElement.getAttribute("class"));
|
||||||
compilerDefinition.setHelpDocumentPaths(configurationElement.getAttribute("helpDocumentPaths"));
|
|
||||||
|
var helpDocumentsArray = configurationElement.getChildren("helpDocument");
|
||||||
|
var helpDocuments = new ArrayList<HelpDocument>(helpDocumentsArray.length);
|
||||||
|
for (var helpDocument : helpDocumentsArray) {
|
||||||
|
helpDocuments.add(new HelpDocument(helpDocument.getAttribute("path"),
|
||||||
|
helpDocument.getAttribute("language")));
|
||||||
|
}
|
||||||
|
compilerDefinition.setHelpDocuments(Collections.unmodifiableList(helpDocuments));
|
||||||
compilerDefinition.setHomePageURL(configurationElement.getAttribute("homePageURL"));
|
compilerDefinition.setHomePageURL(configurationElement.getAttribute("homePageURL"));
|
||||||
compilerDefinition.setDefaultParameters(configurationElement.getAttribute("defaultParameters"));
|
compilerDefinition.setDefaultParameters(configurationElement.getAttribute("defaultParameters"));
|
||||||
|
|
||||||
IConfigurationElement[] supportedTargetsArray;
|
var supportedTargetsArray = configurationElement.getChildren("supportedTarget");
|
||||||
supportedTargetsArray = configurationElement.getChildren("supportedTarget");
|
var supportedTargets = new ArrayList<Target>(supportedTargetsArray.length);
|
||||||
List<Target> supportedTargets = new ArrayList<Target>(supportedTargetsArray.length);
|
for (var supportedTarget : supportedTargetsArray) {
|
||||||
for (IConfigurationElement supportedTarget : supportedTargetsArray) {
|
|
||||||
supportedTargets.add(Target.valueOf(supportedTarget.getAttribute("target")));
|
supportedTargets.add(Target.valueOf(supportedTarget.getAttribute("target")));
|
||||||
}
|
}
|
||||||
supportedTargets = Collections.unmodifiableList(supportedTargets);
|
compilerDefinition.setSupportedTargets(Collections.unmodifiableList(supportedTargets));
|
||||||
compilerDefinition.setSupportedTargets(supportedTargets);
|
|
||||||
compilerDefinition
|
compilerDefinition
|
||||||
.setDefaultHardware(Hardware.valueOf(configurationElement.getAttribute("defaultHardware")));
|
.setDefaultHardware(Hardware.valueOf(configurationElement.getAttribute("defaultHardware")));
|
||||||
|
|
||||||
|
@ -25,14 +25,8 @@ import org.eclipse.core.commands.ExecutionException;
|
|||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
import org.eclipse.jface.dialogs.MessageDialog;
|
import org.eclipse.jface.dialogs.MessageDialog;
|
||||||
import org.eclipse.swt.program.Program;
|
import org.eclipse.swt.program.Program;
|
||||||
import org.eclipse.swt.widgets.Shell;
|
|
||||||
import org.eclipse.ui.IEditorPart;
|
|
||||||
import org.eclipse.ui.handlers.HandlerUtil;
|
import org.eclipse.ui.handlers.HandlerUtil;
|
||||||
|
|
||||||
import com.wudsn.ide.lng.compiler.CompilerDefinition;
|
|
||||||
import com.wudsn.ide.lng.compiler.CompilerHelp.HelpDocument;
|
|
||||||
import com.wudsn.ide.lng.preferences.CompilerPreferences;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Event handler for the "Compiler Help" command.
|
* Event handler for the "Compiler Help" command.
|
||||||
*
|
*
|
||||||
@ -42,24 +36,20 @@ public final class LanguageEditorCompilerHelpCommandHandler extends AbstractHand
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object execute(ExecutionEvent event) throws ExecutionException {
|
public Object execute(ExecutionEvent event) throws ExecutionException {
|
||||||
Shell shell;
|
var shell = HandlerUtil.getActiveShell(event);
|
||||||
shell = HandlerUtil.getActiveShell(event);
|
|
||||||
|
|
||||||
IEditorPart editor;
|
var editor = HandlerUtil.getActiveEditorChecked(event);
|
||||||
editor = HandlerUtil.getActiveEditorChecked(event);
|
|
||||||
if (!(editor instanceof LanguageEditor)) {
|
if (!(editor instanceof LanguageEditor)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
LanguageEditor languageEditor;
|
var languageEditor = (LanguageEditor) editor;
|
||||||
languageEditor = (LanguageEditor) editor;
|
var compilerDefinition = languageEditor.getCompilerDefinition();
|
||||||
|
var compilerPreferences = languageEditor.getCompilerPreferences();
|
||||||
CompilerDefinition compilerDefinition = languageEditor.getCompilerDefinition();
|
var compilerExecutablePath = compilerPreferences.getCompilerExecutablePathOrDefault();
|
||||||
CompilerPreferences compilerPreferences = languageEditor.getCompilerPreferences();
|
|
||||||
String compilerExecutablePath = compilerPreferences.getCompilerExecutablePathOrDefault();
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
HelpDocument helpDocument = compilerDefinition.getHelpForCurrentLocale(compilerExecutablePath);
|
var helpDocument = compilerDefinition.getInstalledHelpForCurrentLocale(compilerExecutablePath);
|
||||||
if (helpDocument.file != null) {
|
if (helpDocument.file != null) {
|
||||||
Program.launch(helpDocument.file.getPath());
|
Program.launch(helpDocument.file.getPath());
|
||||||
} else {
|
} else {
|
||||||
|
@ -45,7 +45,6 @@ import org.eclipse.help.IHelpContentProducer;
|
|||||||
import com.wudsn.ide.base.common.EnumUtility;
|
import com.wudsn.ide.base.common.EnumUtility;
|
||||||
import com.wudsn.ide.base.common.HexUtility;
|
import com.wudsn.ide.base.common.HexUtility;
|
||||||
import com.wudsn.ide.base.common.StringUtility;
|
import com.wudsn.ide.base.common.StringUtility;
|
||||||
import com.wudsn.ide.base.common.TextUtility;
|
|
||||||
import com.wudsn.ide.base.hardware.Hardware;
|
import com.wudsn.ide.base.hardware.Hardware;
|
||||||
import com.wudsn.ide.base.hardware.HardwareUtility;
|
import com.wudsn.ide.base.hardware.HardwareUtility;
|
||||||
import com.wudsn.ide.lng.Language;
|
import com.wudsn.ide.lng.Language;
|
||||||
@ -54,7 +53,6 @@ import com.wudsn.ide.lng.Target;
|
|||||||
import com.wudsn.ide.lng.TargetUtility;
|
import com.wudsn.ide.lng.TargetUtility;
|
||||||
import com.wudsn.ide.lng.Texts;
|
import com.wudsn.ide.lng.Texts;
|
||||||
import com.wudsn.ide.lng.compiler.CompilerDefinition;
|
import com.wudsn.ide.lng.compiler.CompilerDefinition;
|
||||||
import com.wudsn.ide.lng.compiler.CompilerHelp.HelpDocument;
|
|
||||||
import com.wudsn.ide.lng.compiler.CompilerPaths.CompilerPath;
|
import com.wudsn.ide.lng.compiler.CompilerPaths.CompilerPath;
|
||||||
import com.wudsn.ide.lng.compiler.CompilerRegistry;
|
import com.wudsn.ide.lng.compiler.CompilerRegistry;
|
||||||
import com.wudsn.ide.lng.compiler.syntax.CompilerSyntax;
|
import com.wudsn.ide.lng.compiler.syntax.CompilerSyntax;
|
||||||
@ -314,8 +312,8 @@ public final class LanguageHelpContentProducer implements IHelpContentProducer {
|
|||||||
Hardware.GENERIC);
|
Hardware.GENERIC);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
HelpDocument helpDocDocument = compilerDefinition
|
var helpDocDocument = compilerDefinition
|
||||||
.getHelpForCurrentLocale(compilerPreferences.getCompilerExecutablePathOrDefault());
|
.getInstalledHelpForCurrentLocale(compilerPreferences.getCompilerExecutablePathOrDefault());
|
||||||
File file = helpDocDocument.file;
|
File file = helpDocDocument.file;
|
||||||
if (file == null) {
|
if (file == null) {
|
||||||
throw new RuntimeException(
|
throw new RuntimeException(
|
||||||
@ -373,13 +371,13 @@ public final class LanguageHelpContentProducer implements IHelpContentProducer {
|
|||||||
writer.writeTableRow(Texts.TOC_COMPILER_HOME_PAGE_LABEL,
|
writer.writeTableRow(Texts.TOC_COMPILER_HOME_PAGE_LABEL,
|
||||||
HTMLWriter.getLink(compilerDefinition.getHomePageURL(), compilerDefinition.getHomePageURL()));
|
HTMLWriter.getLink(compilerDefinition.getHomePageURL(), compilerDefinition.getHomePageURL()));
|
||||||
|
|
||||||
List<HelpDocument> helpDocuments = compilerDefinition.getHelpDocuments("");
|
var helpDocuments = compilerDefinition.getHelpDocuments();
|
||||||
HTMLWriter innerWriter = new HTMLWriter(); // TODO: Breaks layout if there are no paths
|
HTMLWriter innerWriter = new HTMLWriter(); // TODO: Breaks layout if there are no paths
|
||||||
if (!helpDocuments.isEmpty()) {
|
if (!helpDocuments.isEmpty()) {
|
||||||
innerWriter.beginTable(false);
|
innerWriter.beginTable(false);
|
||||||
for (HelpDocument helpDocument : helpDocuments) {
|
for (var helpDocument : helpDocuments) {
|
||||||
innerWriter.beginTableRow();
|
innerWriter.beginTableRow();
|
||||||
if (helpDocument.uri != null) {
|
if (helpDocument.isURL()) {
|
||||||
innerWriter.writeTableCell(HTMLWriter.getLink(helpDocument.path, helpDocument.path));
|
innerWriter.writeTableCell(HTMLWriter.getLink(helpDocument.path, helpDocument.path));
|
||||||
} else {
|
} else {
|
||||||
innerWriter.writeTableCell(helpDocument.path);
|
innerWriter.writeTableCell(helpDocument.path);
|
||||||
|
@ -45,10 +45,7 @@ import com.wudsn.ide.lng.LanguagePlugin;
|
|||||||
import com.wudsn.ide.lng.Target;
|
import com.wudsn.ide.lng.Target;
|
||||||
import com.wudsn.ide.lng.Texts;
|
import com.wudsn.ide.lng.Texts;
|
||||||
import com.wudsn.ide.lng.compiler.CompilerDefinition;
|
import com.wudsn.ide.lng.compiler.CompilerDefinition;
|
||||||
import com.wudsn.ide.lng.compiler.CompilerHelp.HelpDocument;
|
|
||||||
import com.wudsn.ide.lng.compiler.CompilerRegistry;
|
import com.wudsn.ide.lng.compiler.CompilerRegistry;
|
||||||
import com.wudsn.ide.lng.preferences.CompilerPreferences;
|
|
||||||
import com.wudsn.ide.lng.preferences.LanguagePreferences;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dynamic help content provider. Uses static pages and the meta data from the
|
* Dynamic help content provider. Uses static pages and the meta data from the
|
||||||
@ -251,31 +248,30 @@ public final class LanguageTocProvider extends AbstractTocProvider {
|
|||||||
if (compilerDefinitions == null) {
|
if (compilerDefinitions == null) {
|
||||||
throw new IllegalArgumentException("Parameter 'compilerDefinitions' must not be null.");
|
throw new IllegalArgumentException("Parameter 'compilerDefinitions' must not be null.");
|
||||||
}
|
}
|
||||||
int size = compilerDefinitions.size();
|
var size = compilerDefinitions.size();
|
||||||
List<ITopic> compilerTopics = new ArrayList<ITopic>(size);
|
var compilerTopics = new ArrayList<ITopic>(size);
|
||||||
|
|
||||||
for (int i = 0; i < size; i++) {
|
for (int i = 0; i < size; i++) {
|
||||||
CompilerDefinition compilerDefinition = compilerDefinitions.get(i);
|
var compilerDefinition = compilerDefinitions.get(i);
|
||||||
|
|
||||||
String href = LanguageHelpContentProducer.getComplierHref(compilerDefinition,
|
var href = LanguageHelpContentProducer.getComplierHref(compilerDefinition,
|
||||||
LanguageHelpContentProducer.SECTION_GENERAL, null);
|
LanguageHelpContentProducer.SECTION_GENERAL, null);
|
||||||
|
|
||||||
ITopic generalTopic = createTopic("", Texts.TOC_COMPILER_GENERAL_TOPIC_LABEL, href, null);
|
var generalTopic = createTopic("", Texts.TOC_COMPILER_GENERAL_TOPIC_LABEL, href, null);
|
||||||
|
|
||||||
href = LanguageHelpContentProducer.getComplierHref(compilerDefinition,
|
href = LanguageHelpContentProducer.getComplierHref(compilerDefinition,
|
||||||
LanguageHelpContentProducer.SECTION_INSTRUCTIONS, null);
|
LanguageHelpContentProducer.SECTION_INSTRUCTIONS, null);
|
||||||
ITopic opcodesTopic = createTopic("", Texts.TOC_COMPILER_INSTRUCTIONS_TOPIC_LABEL, href, null);
|
var opcodesTopic = createTopic("", Texts.TOC_COMPILER_INSTRUCTIONS_TOPIC_LABEL, href, null);
|
||||||
|
|
||||||
LanguagePreferences languagePreferences = LanguagePlugin.getInstance()
|
var languagePreferences = LanguagePlugin.getInstance()
|
||||||
.getLanguagePreferences(compilerDefinition.getLanguage());
|
.getLanguagePreferences(compilerDefinition.getLanguage());
|
||||||
CompilerPreferences compilerPreferences = languagePreferences.getCompilerPreferences(compilerDefinition,
|
var compilerPreferences = languagePreferences.getCompilerPreferences(compilerDefinition, Hardware.GENERIC);
|
||||||
Hardware.GENERIC);
|
var compilerExecutablePath = compilerPreferences.getCompilerExecutablePathOrDefault();
|
||||||
String compilerExecutablePath = compilerPreferences.getCompilerExecutablePathOrDefault();
|
|
||||||
|
|
||||||
String icon = "";
|
var icon = "";
|
||||||
List<ITopic> manualTopics = new ArrayList<ITopic>();
|
var manualTopics = new ArrayList<ITopic>();
|
||||||
try {
|
try {
|
||||||
HelpDocument helpDocument = compilerDefinition.getHelpForCurrentLocale(compilerExecutablePath);
|
var helpDocument = compilerDefinition.getInstalledHelpForCurrentLocale(compilerExecutablePath);
|
||||||
if (helpDocument.file != null) {
|
if (helpDocument.file != null) {
|
||||||
File file = helpDocument.file;
|
File file = helpDocument.file;
|
||||||
|
|
||||||
@ -327,7 +323,7 @@ public final class LanguageTocProvider extends AbstractTocProvider {
|
|||||||
LanguageHelpContentProducer.SECTION_MANUAL, null);
|
LanguageHelpContentProducer.SECTION_MANUAL, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
ITopic manualTopic = createTopic(icon, Texts.TOC_COMPILER_MANUAL_TOPIC_LABEL, href,
|
var manualTopic = createTopic(icon, Texts.TOC_COMPILER_MANUAL_TOPIC_LABEL, href,
|
||||||
createTopicsArray(manualTopics));
|
createTopicsArray(manualTopics));
|
||||||
|
|
||||||
compilerTopics.add(createTopic("", compilerDefinition.getName(), "",
|
compilerTopics.add(createTopic("", compilerDefinition.getName(), "",
|
||||||
|
@ -112,7 +112,6 @@
|
|||||||
class="com.wudsn.ide.lng.pas.compiler.mp.MadPascalCompiler"
|
class="com.wudsn.ide.lng.pas.compiler.mp.MadPascalCompiler"
|
||||||
defaultHardware="ATARI8BIT"
|
defaultHardware="ATARI8BIT"
|
||||||
defaultParameters="${sourceFilePath} "
|
defaultParameters="${sourceFilePath} "
|
||||||
helpDocumentPaths="https://mads.atari8.info/doc/en/index.html, https://mads.atari8.info/doc/pl/index.html (pl)"
|
|
||||||
homePageURL="https://github.com/tebe6502/Mad-Pascal/releases"
|
homePageURL="https://github.com/tebe6502/Mad-Pascal/releases"
|
||||||
id="MP"
|
id="MP"
|
||||||
language="PAS"
|
language="PAS"
|
||||||
@ -120,6 +119,14 @@
|
|||||||
version="1.6.5">
|
version="1.6.5">
|
||||||
<supportedTarget
|
<supportedTarget
|
||||||
target="PASCAL"></supportedTarget>
|
target="PASCAL"></supportedTarget>
|
||||||
|
<helpDocument
|
||||||
|
language="*"
|
||||||
|
path="https://mads.atari8.info/doc/en/index.html">
|
||||||
|
</helpDocument>
|
||||||
|
<helpDocument
|
||||||
|
language="pl"
|
||||||
|
path="https://mads.atari8.info/doc/pl/index.html">
|
||||||
|
</helpDocument>
|
||||||
</compiler>
|
</compiler>
|
||||||
</extension>
|
</extension>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user