mirror of
https://github.com/peterdell/wudsn-ide.git
synced 2025-04-10 11:38:33 +00:00
Rename Assembler to Language/Compiler
This commit is contained in:
parent
ebe42d3e98
commit
49f91b768d
@ -1,7 +1,7 @@
|
||||
Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: WUDSN IDE Assembler Test Compilers Plug-in
|
||||
Bundle-SymbolicName: com.wudsn.ide.lng.asm.compiler.test;singleton:=true
|
||||
Bundle-SymbolicName: com.wudsn.ide.lng.asm.test;singleton:=true
|
||||
Bundle-Version: 1.7.2.qualifier
|
||||
Bundle-Vendor: Peter Dell
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-11
|
||||
|
@ -1,8 +1,8 @@
|
||||
package com.wudsn.ide.lng.asm.compiler.test;
|
||||
|
||||
import com.wudsn.ide.lng.editor.AssemblerEditor;
|
||||
import com.wudsn.ide.lng.editor.LanguageEditor;
|
||||
|
||||
public final class TestEditor extends AssemblerEditor {
|
||||
public final class TestEditor extends LanguageEditor {
|
||||
|
||||
/**
|
||||
* Creation is public. Called by the extension "org.eclipse.ui.editors".
|
||||
|
@ -20,9 +20,9 @@
|
||||
package com.wudsn.ide.lng.asm.compiler.acme;
|
||||
|
||||
import com.wudsn.ide.lng.asm.compiler.CompilerId;
|
||||
import com.wudsn.ide.lng.editor.AssemblerEditor;
|
||||
import com.wudsn.ide.lng.editor.LanguageEditor;
|
||||
|
||||
public final class AcmeEditor extends AssemblerEditor {
|
||||
public final class AcmeEditor extends LanguageEditor {
|
||||
|
||||
/**
|
||||
* Creation is public. Called by the extension "org.eclipse.ui.editors".
|
||||
|
@ -20,9 +20,9 @@
|
||||
package com.wudsn.ide.lng.asm.compiler.asm6;
|
||||
|
||||
import com.wudsn.ide.lng.asm.compiler.CompilerId;
|
||||
import com.wudsn.ide.lng.editor.AssemblerEditor;
|
||||
import com.wudsn.ide.lng.editor.LanguageEditor;
|
||||
|
||||
public final class Asm6Editor extends AssemblerEditor {
|
||||
public final class Asm6Editor extends LanguageEditor {
|
||||
|
||||
/**
|
||||
* Creation is public. Called by the extension "org.eclipse.ui.editors".
|
||||
|
@ -20,9 +20,9 @@
|
||||
package com.wudsn.ide.lng.asm.compiler.atasm;
|
||||
|
||||
import com.wudsn.ide.lng.asm.compiler.CompilerId;
|
||||
import com.wudsn.ide.lng.editor.AssemblerEditor;
|
||||
import com.wudsn.ide.lng.editor.LanguageEditor;
|
||||
|
||||
public final class AtasmEditor extends AssemblerEditor {
|
||||
public final class AtasmEditor extends LanguageEditor {
|
||||
|
||||
/**
|
||||
* Creation is public. Called by the extension "org.eclipse.ui.editors".
|
||||
|
@ -20,9 +20,9 @@
|
||||
package com.wudsn.ide.lng.asm.compiler.dasm;
|
||||
|
||||
import com.wudsn.ide.lng.asm.compiler.CompilerId;
|
||||
import com.wudsn.ide.lng.editor.AssemblerEditor;
|
||||
import com.wudsn.ide.lng.editor.LanguageEditor;
|
||||
|
||||
public final class DasmEditor extends AssemblerEditor {
|
||||
public final class DasmEditor extends LanguageEditor {
|
||||
|
||||
/**
|
||||
* Creation is public. Called by the extension "org.eclipse.ui.editors".
|
||||
|
@ -20,9 +20,9 @@
|
||||
package com.wudsn.ide.lng.asm.compiler.kickass;
|
||||
|
||||
import com.wudsn.ide.lng.asm.compiler.CompilerId;
|
||||
import com.wudsn.ide.lng.editor.AssemblerEditor;
|
||||
import com.wudsn.ide.lng.editor.LanguageEditor;
|
||||
|
||||
public final class KickAssEditor extends AssemblerEditor {
|
||||
public final class KickAssEditor extends LanguageEditor {
|
||||
|
||||
/**
|
||||
* Creation is public. Called by the extension "org.eclipse.ui.editors".
|
||||
|
@ -20,9 +20,9 @@
|
||||
package com.wudsn.ide.lng.asm.compiler.mads;
|
||||
|
||||
import com.wudsn.ide.lng.asm.compiler.CompilerId;
|
||||
import com.wudsn.ide.lng.editor.AssemblerEditor;
|
||||
import com.wudsn.ide.lng.editor.LanguageEditor;
|
||||
|
||||
public final class MadsEditor extends AssemblerEditor {
|
||||
public final class MadsEditor extends LanguageEditor {
|
||||
|
||||
/**
|
||||
* Creation is public. Called by the extension "org.eclipse.ui.editors".
|
||||
|
@ -20,9 +20,9 @@
|
||||
package com.wudsn.ide.lng.asm.compiler.merlin32;
|
||||
|
||||
import com.wudsn.ide.lng.asm.compiler.CompilerId;
|
||||
import com.wudsn.ide.lng.editor.AssemblerEditor;
|
||||
import com.wudsn.ide.lng.editor.LanguageEditor;
|
||||
|
||||
public final class Merlin32Editor extends AssemblerEditor {
|
||||
public final class Merlin32Editor extends LanguageEditor {
|
||||
|
||||
/**
|
||||
* Creation is public. Called by the extension "org.eclipse.ui.editors".
|
||||
|
@ -20,9 +20,9 @@
|
||||
package com.wudsn.ide.lng.asm.compiler.tass;
|
||||
|
||||
import com.wudsn.ide.lng.asm.compiler.CompilerId;
|
||||
import com.wudsn.ide.lng.editor.AssemblerEditor;
|
||||
import com.wudsn.ide.lng.editor.LanguageEditor;
|
||||
|
||||
public final class TassEditor extends AssemblerEditor {
|
||||
public final class TassEditor extends LanguageEditor {
|
||||
|
||||
/**
|
||||
* Creation is public. Called by the extension "org.eclipse.ui.editors".
|
||||
|
@ -20,9 +20,9 @@
|
||||
package com.wudsn.ide.lng.asm.compiler.xasm;
|
||||
|
||||
import com.wudsn.ide.lng.asm.compiler.CompilerId;
|
||||
import com.wudsn.ide.lng.editor.AssemblerEditor;
|
||||
import com.wudsn.ide.lng.editor.LanguageEditor;
|
||||
|
||||
public final class XasmEditor extends AssemblerEditor {
|
||||
public final class XasmEditor extends LanguageEditor {
|
||||
|
||||
/**
|
||||
* Creation is public. Called by the extension "org.eclipse.ui.editors".
|
||||
|
@ -35,6 +35,7 @@ Export-Package: com.wudsn.ide.lng;
|
||||
com.wudsn.ide.asm.runner,
|
||||
com.wudsn.ide.asm.preferences,
|
||||
com.wudsn.ide.asm.compiler",
|
||||
com.wudsn.ide.lng.breakpoint,
|
||||
com.wudsn.ide.lng.compiler;
|
||||
uses:="org.eclipse.jface.text,
|
||||
org.eclipse.ui.console,
|
||||
|
@ -13,36 +13,36 @@ com.wudsn.ide.lng.Target.MOS65C02=65C02
|
||||
com.wudsn.ide.lng.Target.MOS6502_DTV=6502 DTV
|
||||
com.wudsn.ide.lng.Target.MOS65816=65816
|
||||
|
||||
com.wudsn.ide.lng.compiler.AssemblerSourceFile.name=Assembler Source File
|
||||
com.wudsn.ide.lng.compiler.CompilerSourceFile.name=Source Code File
|
||||
|
||||
com.wudsn.ide.lng.editor.AssemblerEditorAssemblerMenu.label=Assembler
|
||||
com.wudsn.ide.lng.editor.AssemblerEditorAssemblerMenu.mnemonic=A
|
||||
com.wudsn.ide.lng.editor.LanguageEditorCompilerMenu.label=Compiler
|
||||
com.wudsn.ide.lng.editor.LanguageEditorCompilerMenu.mnemonic=C
|
||||
|
||||
com.wudsn.ide.lng.editor.AssemblerEditorAssemblerToolbar.label=Assembler
|
||||
com.wudsn.ide.lng.editor.LanguageEditorCompilerToolbar.label=Compiler
|
||||
|
||||
com.wudsn.ide.lng.editor.AssemblerEditorCommands.name=Assembler Editor Commands
|
||||
com.wudsn.ide.lng.editor.AssemblerEditorOpenSourceFolderCommand.name=Open Source Folder
|
||||
com.wudsn.ide.lng.editor.AssemblerEditorOpenSourceFolderCommand.mnemonic=S
|
||||
com.wudsn.ide.lng.editor.AssemblerEditorOpenOutputFolderCommand.name=Open Output Folder
|
||||
com.wudsn.ide.lng.editor.AssemblerEditorOpenOutputFolderCommand.mnemonic=O
|
||||
com.wudsn.ide.lng.editor.AssemblerEditorCompileCommand.name=Compile
|
||||
com.wudsn.ide.lng.editor.AssemblerEditorCompileCommand.mnemonic=C
|
||||
com.wudsn.ide.lng.editor.AssemblerEditorCompileAndRunCommand.name=Compile and Run
|
||||
com.wudsn.ide.lng.editor.AssemblerEditorCompileAndRunWithCommand.name=Compile and Run with...
|
||||
com.wudsn.ide.lng.editor.AssemblerEditorCompileAndRunCommand.mnemonic=R
|
||||
com.wudsn.ide.lng.editor.AssemblerEditorCompilerHelpCommand.name=Compiler Help
|
||||
com.wudsn.ide.lng.editor.AssemblerEditorCompilerHelpCommand.mnemonic=H
|
||||
com.wudsn.ide.lng.editor.AssemblerEditorToggleCommentCommand.name=Toggle Comment
|
||||
com.wudsn.ide.lng.editor.AssemblerEditorToggleBreakpointCommand.name=Toggle Breakpoint
|
||||
com.wudsn.ide.lng.editor.AssemblerEditorOpenDeclarationCommand.name=Open Declaration
|
||||
com.wudsn.ide.lng.editor.AssemblerEditorEnableDisableBreakpointCommand.name=Enable/Disable Breakpoint
|
||||
com.wudsn.ide.lng.editor.LanguageEditorCommands.name=Source Code Editor Commands
|
||||
com.wudsn.ide.lng.editor.LanguageEditorOpenSourceFolderCommand.name=Open Source Folder
|
||||
com.wudsn.ide.lng.editor.LanguageEditorOpenSourceFolderCommand.mnemonic=S
|
||||
com.wudsn.ide.lng.editor.LanguageEditorOpenOutputFolderCommand.name=Open Output Folder
|
||||
com.wudsn.ide.lng.editor.LanguageEditorOpenOutputFolderCommand.mnemonic=O
|
||||
com.wudsn.ide.lng.editor.LanguageEditorCompileCommand.name=Compile
|
||||
com.wudsn.ide.lng.editor.LanguageEditorCompileCommand.mnemonic=C
|
||||
com.wudsn.ide.lng.editor.LanguageEditorCompileAndRunCommand.name=Compile and Run
|
||||
com.wudsn.ide.lng.editor.LanguageEditorCompileAndRunWithCommand.name=Compile and Run with...
|
||||
com.wudsn.ide.lng.editor.LanguageEditorCompileAndRunCommand.mnemonic=R
|
||||
com.wudsn.ide.lng.editor.LanguageEditorCompilerHelpCommand.name=Compiler Help
|
||||
com.wudsn.ide.lng.editor.LanguageEditorCompilerHelpCommand.mnemonic=H
|
||||
com.wudsn.ide.lng.editor.LanguageEditorToggleCommentCommand.name=Toggle Comment
|
||||
com.wudsn.ide.lng.editor.LanguageEditorToggleBreakpointCommand.name=Toggle Breakpoint
|
||||
com.wudsn.ide.lng.editor.LanguageEditorOpenDeclarationCommand.name=Open Declaration
|
||||
com.wudsn.ide.lng.editor.LanguageEditorEnableDisableBreakpointCommand.name=Enable/Disable Breakpoint
|
||||
|
||||
com.wudsn.ide.lng.editor.AssemblerHyperlinkDetector.name=Hyperlink Detector
|
||||
com.wudsn.ide.lng.editor.AssemblerHyperlinkDetectorEditorTarget.name=Assembler Editor
|
||||
com.wudsn.ide.lng.editor.LanguageHyperlinkDetector.name=Hyperlink Detector
|
||||
com.wudsn.ide.lng.editor.LanguageHyperlinkDetectorEditorTarget.name=Source Code Editor
|
||||
|
||||
com.wudsn.ide.lng.editor.AssemblerBreakpoint.name=Breakpoint
|
||||
com.wudsn.ide.lng.breakpoint.LanguageBreakpoint.name=Breakpoint
|
||||
|
||||
com.wudsn.ide.lng.editor.CompilerSymbolsView.name=Symbols
|
||||
com.wudsn.ide.lng.symbol.CompilerSymbolsView.name=Symbols
|
||||
|
||||
# Preferences
|
||||
com.wudsn.ide.lng.preferences.LanguagesPreferences.name=Languages Preferences
|
||||
|
@ -13,36 +13,36 @@ com.wudsn.ide.lng.Target.MOS65C02=65C02
|
||||
com.wudsn.ide.lng.Target.MOS6502_DTV=6502 DTV
|
||||
com.wudsn.ide.lng.Target.MOS65816=65816
|
||||
|
||||
com.wudsn.ide.lng.compiler.AssemblerSourceFile.name=Assembler Quell-Datei
|
||||
com.wudsn.ide.lng.compiler.CompilerSourceFile.name=Quelltext-Datei
|
||||
|
||||
com.wudsn.ide.lng.editor.AssemblerEditorAssemblerMenu.label=Assembler
|
||||
com.wudsn.ide.lng.editor.AssemblerEditorAssemblerMenu.mnemonic=A
|
||||
com.wudsn.ide.lng.editor.LanguageEditorCompilerMenu.label=Kompiler
|
||||
com.wudsn.ide.lng.editor.LanguageEditorCompilerMenu.mnemonic=K
|
||||
|
||||
com.wudsn.ide.lng.editor.AssemblerEditorAssemblerToolbar.label=Assembler
|
||||
com.wudsn.ide.lng.editor.LanguageEditorCompilerToolbar.label=Kompiler
|
||||
|
||||
com.wudsn.ide.lng.editor.AssemblerEditorCommands.name=Assembler Editor Befehle
|
||||
com.wudsn.ide.lng.editor.AssemblerEditorOpenSourceFolderCommand.name=Quell-Ordner öffnen
|
||||
com.wudsn.ide.lng.editor.AssemblerEditorOpenSourceFolderCommand.mnemonic=Q
|
||||
com.wudsn.ide.lng.editor.AssemblerEditorOpenOutputFolderCommand.name=Ausgabe-Ordner öffnen
|
||||
com.wudsn.ide.lng.editor.AssemblerEditorOpenOutputFolderCommand.mnemonic=A
|
||||
com.wudsn.ide.lng.editor.AssemblerEditorCompileCommand.name=Kompilieren
|
||||
com.wudsn.ide.lng.editor.AssemblerEditorCompileCommand.mnemonic=K
|
||||
com.wudsn.ide.lng.editor.AssemblerEditorCompileAndRunCommand.name=Kompilieren und Ausführen
|
||||
com.wudsn.ide.lng.editor.AssemblerEditorCompileAndRunWithCommand.name=Kompilieren und Ausführen mit ...
|
||||
com.wudsn.ide.lng.editor.AssemblerEditorCompileAndRunCommand.mnemonic=A
|
||||
com.wudsn.ide.lng.editor.AssemblerEditorCompilerHelpCommand.name=Kompiler Hilfe
|
||||
com.wudsn.ide.lng.editor.AssemblerEditorCompilerHelpCommand.mnemonic=H
|
||||
com.wudsn.ide.lng.editor.AssemblerEditorToggleCommentCommand.name=Kommentar umschalten
|
||||
com.wudsn.ide.lng.editor.AssemblerEditorToggleBreakpointCommand.name=Breakpoint umschalten
|
||||
com.wudsn.ide.lng.editor.AssemblerEditorOpenDeclarationCommand.name=Deklaration öffnen
|
||||
com.wudsn.ide.lng.editor.AssemblerEditorEnableDisableBreakpointCommand.name=Breakpoint ein/ausschalten
|
||||
com.wudsn.ide.lng.editor.LanguageEditorCommands.name=Quelltext Editor Befehle
|
||||
com.wudsn.ide.lng.editor.LanguageEditorOpenSourceFolderCommand.name=Quell-Ordner öffnen
|
||||
com.wudsn.ide.lng.editor.LanguageEditorOpenSourceFolderCommand.mnemonic=Q
|
||||
com.wudsn.ide.lng.editor.LanguageEditorOpenOutputFolderCommand.name=Ausgabe-Ordner öffnen
|
||||
com.wudsn.ide.lng.editor.LanguageEditorOpenOutputFolderCommand.mnemonic=A
|
||||
com.wudsn.ide.lng.editor.LanguageEditorCompileCommand.name=Kompilieren
|
||||
com.wudsn.ide.lng.editor.LanguageEditorCompileCommand.mnemonic=K
|
||||
com.wudsn.ide.lng.editor.LanguageEditorCompileAndRunCommand.name=Kompilieren und Ausführen
|
||||
com.wudsn.ide.lng.editor.LanguageEditorCompileAndRunWithCommand.name=Kompilieren und Ausführen mit ...
|
||||
com.wudsn.ide.lng.editor.LanguageEditorCompileAndRunCommand.mnemonic=A
|
||||
com.wudsn.ide.lng.editor.LanguageEditorCompilerHelpCommand.name=Kompiler Hilfe
|
||||
com.wudsn.ide.lng.editor.LanguageEditorCompilerHelpCommand.mnemonic=H
|
||||
com.wudsn.ide.lng.editor.LanguageEditorToggleCommentCommand.name=Kommentar umschalten
|
||||
com.wudsn.ide.lng.editor.LanguageEditorToggleBreakpointCommand.name=Breakpoint umschalten
|
||||
com.wudsn.ide.lng.editor.LanguageEditorOpenDeclarationCommand.name=Deklaration öffnen
|
||||
com.wudsn.ide.lng.editor.LanguageEditorEnableDisableBreakpointCommand.name=Breakpoint ein/ausschalten
|
||||
|
||||
com.wudsn.ide.lng.editor.AssemblerHyperlinkDetector.name=Hyperlink Detector
|
||||
com.wudsn.ide.lng.editor.AssemblerHyperlinkDetectorEditorTarget.name=Assembler Editor
|
||||
com.wudsn.ide.lng.editor.LanguageHyperlinkDetector.name=Hyperlink Detector
|
||||
com.wudsn.ide.lng.editor.LanguageHyperlinkDetectorEditorTarget.name=Quelltext Editor
|
||||
|
||||
com.wudsn.ide.lng.editor.AssemblerBreakpoint.name=Unterbrechungspunkt
|
||||
com.wudsn.ide.lng.breakpoint.LanguageBreakpoint.name=Unterbrechungspunkt
|
||||
|
||||
com.wudsn.ide.lng.editor.CompilerSymbolsView.name=Symbole
|
||||
com.wudsn.ide.lng.symbol.CompilerSymbolsView.name=Symbole
|
||||
|
||||
# Preferences
|
||||
com.wudsn.ide.lng.preferences.LanguagesPreferences.name=Sprachen Einstellungen
|
||||
|
@ -1,10 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?eclipse version="3.0"?>
|
||||
<plugin>
|
||||
|
||||
<extension-point id="compilers" name="Compilers" schema="schema/compilers.exsd"/>
|
||||
<extension-point id="runners" name="Runners" schema="schema/runners.exsd"/>
|
||||
|
||||
|
||||
<extension
|
||||
point="org.eclipse.core.runtime.preferences">
|
||||
<initializer
|
||||
@ -16,8 +16,8 @@
|
||||
point="org.eclipse.core.contenttype.contentTypes">
|
||||
<content-type
|
||||
base-type="org.eclipse.core.runtime.text"
|
||||
id="com.wudsn.ide.lng.compiler.AssemblerSourceFile"
|
||||
name="%com.wudsn.ide.lng.compiler.AssemblerSourceFile.name"
|
||||
id="com.wudsn.ide.lng.compiler.LanguageSourceFile"
|
||||
name="%com.wudsn.ide.lng.compiler.LanguageSourceFile.name"
|
||||
priority="normal">
|
||||
</content-type>
|
||||
</extension>
|
||||
@ -33,147 +33,147 @@
|
||||
point="org.eclipse.ui.workbench.texteditor.hyperlinkDetectors">
|
||||
<hyperlinkDetector
|
||||
activate="true"
|
||||
class="com.wudsn.ide.lng.editor.AssemblerHyperlinkDetector"
|
||||
id="com.wudsn.ide.lng.editor.AssemblerHyperlinkDetector"
|
||||
name="%com.wudsn.ide.lng.editor.AssemblerHyperlinkDetector.name"
|
||||
targetId="com.wudsn.ide.lng.editor.AssemblerHyperlinkDetectorEditorTarget">
|
||||
class="com.wudsn.ide.lng.editor.LanguageHyperlinkDetector"
|
||||
id="com.wudsn.ide.lng.editor.LanguageHyperlinkDetector"
|
||||
name="%com.wudsn.ide.lng.editor.LanguageHyperlinkDetector.name"
|
||||
targetId="com.wudsn.ide.lng.editor.LanguageHyperlinkDetectorEditorTarget">
|
||||
</hyperlinkDetector>
|
||||
</extension>
|
||||
<extension
|
||||
point="org.eclipse.ui.workbench.texteditor.hyperlinkDetectorTargets">
|
||||
<target
|
||||
id="com.wudsn.ide.lng.editor.AssemblerHyperlinkDetectorEditorTarget"
|
||||
name="%com.wudsn.ide.lng.editor.AssemblerHyperlinkDetectorEditorTarget.name">
|
||||
id="com.wudsn.ide.lng.editor.LanguageHyperlinkDetectorEditorTarget"
|
||||
name="%com.wudsn.ide.lng.editor.LanguageHyperlinkDetectorEditorTarget.name">
|
||||
</target>
|
||||
</extension>
|
||||
<extension
|
||||
point="org.eclipse.ui.commands">
|
||||
<category
|
||||
id="com.wudsn.ide.lng.editor.AssemblerEditorCommands"
|
||||
name="%com.wudsn.ide.lng.editor.AssemblerEditorCommands.name">
|
||||
id="com.wudsn.ide.lng.editor.LanguageEditorCommands"
|
||||
name="%com.wudsn.ide.lng.editor.LanguageEditorCommands.name">
|
||||
</category>
|
||||
<command
|
||||
categoryId="com.wudsn.ide.lng.editor.AssemblerEditorCommands"
|
||||
id="com.wudsn.ide.lng.editor.AssemblerEditorOpenSourceFolderCommand"
|
||||
name="%com.wudsn.ide.lng.editor.AssemblerEditorOpenSourceFolderCommand.name">
|
||||
categoryId="com.wudsn.ide.lng.editor.LanguageEditorCommands"
|
||||
id="com.wudsn.ide.lng.editor.LanguageEditorOpenSourceFolderCommand"
|
||||
name="%com.wudsn.ide.lng.editor.LanguageEditorOpenSourceFolderCommand.name">
|
||||
</command>
|
||||
<command
|
||||
categoryId="com.wudsn.ide.lng.editor.AssemblerEditorCommands"
|
||||
id="com.wudsn.ide.lng.editor.AssemblerEditorOpenOutputFolderCommand"
|
||||
name="%com.wudsn.ide.lng.editor.AssemblerEditorOpenOutputFolderCommand.name">
|
||||
categoryId="com.wudsn.ide.lng.editor.LanguageEditorCommands"
|
||||
id="com.wudsn.ide.lng.editor.LanguageEditorOpenOutputFolderCommand"
|
||||
name="%com.wudsn.ide.lng.editor.LanguageEditorOpenOutputFolderCommand.name">
|
||||
</command>
|
||||
<command
|
||||
categoryId="com.wudsn.ide.lng.editor.AssemblerEditorCommands"
|
||||
id="com.wudsn.ide.lng.editor.AssemblerEditorCompileCommand"
|
||||
name="%com.wudsn.ide.lng.editor.AssemblerEditorCompileCommand.name">
|
||||
categoryId="com.wudsn.ide.lng.editor.LanguageEditorCommands"
|
||||
id="com.wudsn.ide.lng.editor.LanguageEditorCompileCommand"
|
||||
name="%com.wudsn.ide.lng.editor.LanguageEditorCompileCommand.name">
|
||||
</command>
|
||||
<command
|
||||
categoryId="com.wudsn.ide.lng.editor.AssemblerEditorCommands"
|
||||
id="com.wudsn.ide.lng.editor.AssemblerEditorCompileAndRunCommand"
|
||||
name="%com.wudsn.ide.lng.editor.AssemblerEditorCompileAndRunCommand.name">
|
||||
categoryId="com.wudsn.ide.lng.editor.LanguageEditorCommands"
|
||||
id="com.wudsn.ide.lng.editor.LanguageEditorCompileAndRunCommand"
|
||||
name="%com.wudsn.ide.lng.editor.LanguageEditorCompileAndRunCommand.name">
|
||||
</command>
|
||||
<command
|
||||
categoryId="com.wudsn.ide.lng.editor.AssemblerEditorCommands"
|
||||
id="com.wudsn.ide.lng.editor.AssemblerEditorCompileAndRunWithCommand"
|
||||
name="%com.wudsn.ide.lng.editor.AssemblerEditorCompileAndRunWithCommand.name">
|
||||
categoryId="com.wudsn.ide.lng.editor.LanguageEditorCommands"
|
||||
id="com.wudsn.ide.lng.editor.LanguageEditorCompileAndRunWithCommand"
|
||||
name="%com.wudsn.ide.lng.editor.LanguageEditorCompileAndRunWithCommand.name">
|
||||
</command>
|
||||
<command
|
||||
categoryId="com.wudsn.ide.lng.editor.AssemblerEditorCommands"
|
||||
id="com.wudsn.ide.lng.editor.AssemblerEditorCompilerHelpCommand"
|
||||
name="%com.wudsn.ide.lng.editor.AssemblerEditorCompilerHelpCommand.name">
|
||||
categoryId="com.wudsn.ide.lng.editor.LanguageEditorCommands"
|
||||
id="com.wudsn.ide.lng.editor.LanguageEditorCompilerHelpCommand"
|
||||
name="%com.wudsn.ide.lng.editor.LanguageEditorCompilerHelpCommand.name">
|
||||
</command>
|
||||
<command
|
||||
categoryId="com.wudsn.ide.lng.editor.AssemblerEditorCommands"
|
||||
id="com.wudsn.ide.lng.editor.AssemblerEditorOpenDeclarationCommand"
|
||||
name="%com.wudsn.ide.lng.editor.AssemblerEditorOpenDeclarationCommand.name">
|
||||
categoryId="com.wudsn.ide.lng.editor.LanguageEditorCommands"
|
||||
id="com.wudsn.ide.lng.editor.LanguageEditorOpenDeclarationCommand"
|
||||
name="%com.wudsn.ide.lng.editor.LanguageEditorOpenDeclarationCommand.name">
|
||||
</command>
|
||||
<command
|
||||
categoryId="com.wudsn.ide.lng.editor.AssemblerEditorCommands"
|
||||
id="com.wudsn.ide.lng.editor.AssemblerEditorToggleCommentCommand"
|
||||
name="%com.wudsn.ide.lng.editor.AssemblerEditorToggleCommentCommand.name">
|
||||
categoryId="com.wudsn.ide.lng.editor.LanguageEditorCommands"
|
||||
id="com.wudsn.ide.lng.editor.LanguageEditorToggleCommentCommand"
|
||||
name="%com.wudsn.ide.lng.editor.LanguageEditorToggleCommentCommand.name">
|
||||
</command>
|
||||
</extension>
|
||||
<extension
|
||||
point="org.eclipse.ui.handlers">
|
||||
<handler
|
||||
class="com.wudsn.ide.lng.editor.AssemblerEditorOpenFolderCommandHandler"
|
||||
commandId="com.wudsn.ide.lng.editor.AssemblerEditorOpenSourceFolderCommand">
|
||||
class="com.wudsn.ide.lng.editor.LanguageEditorOpenFolderCommandHandler"
|
||||
commandId="com.wudsn.ide.lng.editor.LanguageEditorOpenSourceFolderCommand">
|
||||
<activeWhen>
|
||||
<with
|
||||
variable="activeEditor">
|
||||
<instanceof
|
||||
value="com.wudsn.ide.lng.editor.AssemblerEditor">
|
||||
value="com.wudsn.ide.lng.editor.LanguageEditor">
|
||||
</instanceof>
|
||||
</with></activeWhen>
|
||||
</handler>
|
||||
<handler
|
||||
class="com.wudsn.ide.lng.editor.AssemblerEditorOpenFolderCommandHandler"
|
||||
commandId="com.wudsn.ide.lng.editor.AssemblerEditorOpenOutputFolderCommand">
|
||||
class="com.wudsn.ide.lng.editor.LanguageEditorOpenFolderCommandHandler"
|
||||
commandId="com.wudsn.ide.lng.editor.LanguageEditorOpenOutputFolderCommand">
|
||||
<activeWhen>
|
||||
<with
|
||||
variable="activeEditor">
|
||||
<instanceof
|
||||
value="com.wudsn.ide.lng.editor.AssemblerEditor">
|
||||
value="com.wudsn.ide.lng.editor.LanguageEditor">
|
||||
</instanceof>
|
||||
</with>
|
||||
</activeWhen>
|
||||
</handler>
|
||||
<handler
|
||||
class="com.wudsn.ide.lng.editor.AssemblerEditorCompileCommandHandler"
|
||||
commandId="com.wudsn.ide.lng.editor.AssemblerEditorCompileCommand">
|
||||
class="com.wudsn.ide.lng.editor.LanguageEditorCompileCommandHandler"
|
||||
commandId="com.wudsn.ide.lng.editor.LanguageEditorCompileCommand">
|
||||
<activeWhen>
|
||||
<with
|
||||
variable="activeEditor">
|
||||
<instanceof
|
||||
value="com.wudsn.ide.lng.editor.AssemblerEditor">
|
||||
value="com.wudsn.ide.lng.editor.LanguageEditor">
|
||||
</instanceof>
|
||||
</with>
|
||||
</activeWhen>
|
||||
</handler>
|
||||
<handler
|
||||
class="com.wudsn.ide.lng.editor.AssemblerEditorCompileCommandHandler"
|
||||
commandId="com.wudsn.ide.lng.editor.AssemblerEditorCompileAndRunCommand">
|
||||
class="com.wudsn.ide.lng.editor.LanguageEditorCompileCommandHandler"
|
||||
commandId="com.wudsn.ide.lng.editor.LanguageEditorCompileAndRunCommand">
|
||||
<activeWhen>
|
||||
<with
|
||||
variable="activeEditor">
|
||||
<instanceof
|
||||
value="com.wudsn.ide.lng.editor.AssemblerEditor">
|
||||
value="com.wudsn.ide.lng.editor.LanguageEditor">
|
||||
</instanceof>
|
||||
</with>
|
||||
</activeWhen>
|
||||
</handler>
|
||||
<handler
|
||||
class="com.wudsn.ide.lng.editor.AssemblerEditorCompileCommandHandler"
|
||||
commandId="com.wudsn.ide.lng.editor.AssemblerEditorCompileAndRunWithCommand">
|
||||
class="com.wudsn.ide.lng.editor.LanguageEditorCompileCommandHandler"
|
||||
commandId="com.wudsn.ide.lng.editor.LanguageEditorCompileAndRunWithCommand">
|
||||
<activeWhen>
|
||||
<with
|
||||
variable="activeEditor">
|
||||
<instanceof
|
||||
value="com.wudsn.ide.lng.editor.AssemblerEditor">
|
||||
value="com.wudsn.ide.lng.editor.LanguageEditor">
|
||||
</instanceof>
|
||||
</with>
|
||||
</activeWhen>
|
||||
</handler>
|
||||
<handler
|
||||
class="com.wudsn.ide.lng.editor.AssemblerEditorCompilerHelpCommandHandler"
|
||||
commandId="com.wudsn.ide.lng.editor.AssemblerEditorCompilerHelpCommand">
|
||||
class="com.wudsn.ide.lng.editor.LanguageEditorCompilerHelpCommandHandler"
|
||||
commandId="com.wudsn.ide.lng.editor.LanguageEditorCompilerHelpCommand">
|
||||
<activeWhen>
|
||||
<with
|
||||
variable="activeEditor">
|
||||
<instanceof
|
||||
value="com.wudsn.ide.lng.editor.AssemblerEditor">
|
||||
value="com.wudsn.ide.lng.editor.LanguageEditor">
|
||||
</instanceof>
|
||||
</with>
|
||||
</activeWhen>
|
||||
</handler>
|
||||
<handler
|
||||
class="com.wudsn.ide.lng.editor.AssemblerEditorOpenDeclarationCommandHandler"
|
||||
commandId="com.wudsn.ide.lng.editor.AssemblerEditorOpenDeclarationCommand">
|
||||
class="com.wudsn.ide.lng.editor.LanguageEditorOpenDeclarationCommandHandler"
|
||||
commandId="com.wudsn.ide.lng.editor.LanguageEditorOpenDeclarationCommand">
|
||||
<activeWhen>
|
||||
<with
|
||||
variable="activeEditor">
|
||||
<instanceof
|
||||
value="com.wudsn.ide.lng.editor.AssemblerEditor">
|
||||
value="com.wudsn.ide.lng.editor.LanguageEditor">
|
||||
</instanceof>
|
||||
</with>
|
||||
</activeWhen>
|
||||
@ -182,25 +182,25 @@
|
||||
<extension
|
||||
point="org.eclipse.ui.bindings">
|
||||
<key
|
||||
commandId="com.wudsn.ide.lng.editor.AssemblerEditorCompileCommand"
|
||||
commandId="com.wudsn.ide.lng.editor.LanguageEditorCompileCommand"
|
||||
contextId="org.eclipse.ui.contexts.window"
|
||||
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
|
||||
sequence="M1+M2+9">
|
||||
</key>
|
||||
<key
|
||||
commandId="com.wudsn.ide.lng.editor.AssemblerEditorCompileAndRunCommand"
|
||||
commandId="com.wudsn.ide.lng.editor.LanguageEditorCompileAndRunCommand"
|
||||
contextId="org.eclipse.ui.contexts.window"
|
||||
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
|
||||
sequence="M1+M2+0">
|
||||
</key>
|
||||
<key
|
||||
commandId="com.wudsn.ide.lng.editor.AssemblerEditorToggleCommentCommand"
|
||||
commandId="com.wudsn.ide.lng.editor.LanguageEditorToggleCommentCommand"
|
||||
contextId="org.eclipse.ui.textEditorScope"
|
||||
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
|
||||
sequence="M1+7">
|
||||
</key>
|
||||
<key
|
||||
commandId="com.wudsn.ide.lng.editor.AssemblerEditorOpenDeclarationCommand"
|
||||
commandId="com.wudsn.ide.lng.editor.LanguageEditorOpenDeclarationCommand"
|
||||
contextId="org.eclipse.ui.textEditorScope"
|
||||
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
|
||||
sequence="F3">
|
||||
@ -217,60 +217,60 @@
|
||||
<menuContribution
|
||||
locationURI="menu:org.eclipse.ui.main.menu?after=additions">
|
||||
<menu
|
||||
id="com.wudsn.ide.lng.editor.AssemblerEditorAssemblerMenu"
|
||||
label="%com.wudsn.ide.lng.editor.AssemblerEditorAssemblerMenu.label"
|
||||
mnemonic="%com.wudsn.ide.lng.editor.AssemblerEditorAssemblerMenu.mnemonic">
|
||||
id="com.wudsn.ide.lng.editor.LanguageEditorCompilerMenu"
|
||||
label="%com.wudsn.ide.lng.editor.LanguageEditorCompilerMenu.label"
|
||||
mnemonic="%com.wudsn.ide.lng.editor.LanguageEditorCompilerMenu.mnemonic">
|
||||
<visibleWhen
|
||||
checkEnabled="false">
|
||||
<with
|
||||
variable="activeEditor">
|
||||
<instanceof
|
||||
value="com.wudsn.ide.lng.editor.AssemblerEditor">
|
||||
value="com.wudsn.ide.lng.editor.LanguageEditor">
|
||||
</instanceof>
|
||||
</with>
|
||||
</visibleWhen>
|
||||
<command
|
||||
commandId="com.wudsn.ide.lng.editor.AssemblerEditorOpenSourceFolderCommand"
|
||||
mnemonic="%com.wudsn.ide.lng.editor.AssemblerEditorOpenSourceFolderCommand.mnemonic">
|
||||
commandId="com.wudsn.ide.lng.editor.LanguageEditorOpenSourceFolderCommand"
|
||||
mnemonic="%com.wudsn.ide.lng.editor.LanguageEditorOpenSourceFolderCommand.mnemonic">
|
||||
</command>
|
||||
<command
|
||||
commandId="com.wudsn.ide.lng.editor.AssemblerEditorOpenOutputFolderCommand"
|
||||
mnemonic="%com.wudsn.ide.lng.editor.AssemblerEditorOpenOutputFolderCommand.mnemonic">
|
||||
commandId="com.wudsn.ide.lng.editor.LanguageEditorOpenOutputFolderCommand"
|
||||
mnemonic="%com.wudsn.ide.lng.editor.LanguageEditorOpenOutputFolderCommand.mnemonic">
|
||||
</command>
|
||||
<separator
|
||||
name="com.wudsn.ide.lng.editor.AssemblerEditorAssemblerMenuSeparator1"
|
||||
name="com.wudsn.ide.lng.editor.LanguageEditorCompilerMenuSeparator1"
|
||||
visible="true">
|
||||
</separator>
|
||||
<command
|
||||
commandId="com.wudsn.ide.lng.editor.AssemblerEditorCompileCommand"
|
||||
id="com.wudsn.ide.lng.editor.AssemblerEditorCompileCommand"
|
||||
mnemonic="%com.wudsn.ide.lng.editor.AssemblerEditorCompileCommand.mnemonic">
|
||||
commandId="com.wudsn.ide.lng.editor.LanguageEditorCompileCommand"
|
||||
id="com.wudsn.ide.lng.editor.LanguageEditorCompileCommand"
|
||||
mnemonic="%com.wudsn.ide.lng.editor.LanguageEditorCompileCommand.mnemonic">
|
||||
</command>
|
||||
<command
|
||||
commandId="com.wudsn.ide.lng.editor.AssemblerEditorCompileAndRunCommand"
|
||||
id="com.wudsn.ide.lng.editor.AssemblerEditorCompileAndRunCommand"
|
||||
mnemonic="%com.wudsn.ide.lng.editor.AssemblerEditorCompileAndRunCommand.mnemonic">
|
||||
commandId="com.wudsn.ide.lng.editor.LanguageEditorCompileAndRunCommand"
|
||||
id="com.wudsn.ide.lng.editor.LanguageEditorCompileAndRunCommand"
|
||||
mnemonic="%com.wudsn.ide.lng.editor.LanguageEditorCompileAndRunCommand.mnemonic">
|
||||
</command>
|
||||
<separator
|
||||
name="com.wudsn.ide.lng.editor.AssemblerEditorAssemblerMenuSeparator2"
|
||||
name="com.wudsn.ide.lng.editor.LanguageEditorCompilerMenuSeparator2"
|
||||
visible="true">
|
||||
</separator>
|
||||
<command
|
||||
commandId="com.wudsn.ide.lng.editor.AssemblerEditorCompilerHelpCommand"
|
||||
mnemonic="%com.wudsn.ide.lng.editor.AssemblerEditorCompilerHelpCommand.mnemonic">
|
||||
commandId="com.wudsn.ide.lng.editor.LanguageEditorCompilerHelpCommand"
|
||||
mnemonic="%com.wudsn.ide.lng.editor.LanguageEditorCompilerHelpCommand.mnemonic">
|
||||
</command>
|
||||
</menu>
|
||||
</menuContribution>
|
||||
|
||||
<menuContribution
|
||||
locationURI="toolbar:org.eclipse.ui.main.toolbar?after=additions">
|
||||
label="%com.wudsn.ide.lng.editor.AssemblerEditorAssemblerMenu.label"
|
||||
label="%com.wudsn.ide.lng.editor.LanguageEditorCompilerMenu.label"
|
||||
<toolbar
|
||||
id="com.wudsn.ide.lng.editor.AssemblerEditorToolbar"
|
||||
label="%com.wudsn.ide.lng.editor.AssemblerEditorAssemblerToolbar.label">
|
||||
id="com.wudsn.ide.lng.editor.LanguageEditorToolbar"
|
||||
label="%com.wudsn.ide.lng.editor.LanguageEditorCompilerToolbar.label">
|
||||
<dynamic
|
||||
class="com.wudsn.ide.lng.editor.AssemblerEditorCompileAndRunCommandMenu"
|
||||
id="com.wudsn.ide.lng.editor.AssemblerEditorCompileAndRunCommandMenu">
|
||||
class="com.wudsn.ide.lng.editor.LanguageEditorCompileAndRunCommandMenu"
|
||||
id="com.wudsn.ide.lng.editor.LanguageEditorCompileAndRunCommandMenu">
|
||||
<visibleWhen
|
||||
checkEnabled="true">
|
||||
</visibleWhen>
|
||||
@ -282,16 +282,16 @@
|
||||
<menuContribution
|
||||
locationURI="popup:#TextEditorContext?after=com.wudsn.ide.base.editor.CommonOpenFolderCommand">
|
||||
<command
|
||||
commandId="com.wudsn.ide.lng.editor.AssemblerEditorOpenDeclarationCommand"
|
||||
id="com.wudsn.ide.lng.editor.AssemblerEditorOpenDeclarationCommand"
|
||||
commandId="com.wudsn.ide.lng.editor.LanguageEditorOpenDeclarationCommand"
|
||||
id="com.wudsn.ide.lng.editor.LanguageEditorOpenDeclarationCommand"
|
||||
style="push">
|
||||
</command>
|
||||
</menuContribution>
|
||||
<menuContribution
|
||||
locationURI="popup:#TextEditorContext?after=com.wudsn.ide.base.editor.text.TextEditorSortMenu">
|
||||
<command
|
||||
commandId="com.wudsn.ide.lng.editor.AssemblerEditorToggleCommentCommand"
|
||||
id="com.wudsn.ide.lng.editor.AssemblerEditorToggleCommentCommand"
|
||||
commandId="com.wudsn.ide.lng.editor.LanguageEditorToggleCommentCommand"
|
||||
id="com.wudsn.ide.lng.editor.LanguageEditorToggleCommentCommand"
|
||||
style="push">
|
||||
</command>
|
||||
<command
|
||||
@ -304,7 +304,7 @@
|
||||
<extension
|
||||
point="org.eclipse.help.toc">
|
||||
<tocProvider
|
||||
class="com.wudsn.ide.lng.help.AssemblerTocProvider">
|
||||
class="com.wudsn.ide.lng.help.LanguageTocProvider">
|
||||
</tocProvider>
|
||||
<tocIcon
|
||||
id="pdf"
|
||||
@ -314,24 +314,24 @@
|
||||
<extension
|
||||
point="org.eclipse.help.contentProducer">
|
||||
<contentProducer
|
||||
producer="com.wudsn.ide.lng.help.AssemblerHelpContentProducer">
|
||||
producer="com.wudsn.ide.lng.help.LanguageHelpContentProducer">
|
||||
</contentProducer>
|
||||
</extension>
|
||||
<extension
|
||||
name="Assembler Action Set for Toolbar"
|
||||
name="Compiler Action Set for Toolbar"
|
||||
point="org.eclipse.ui.actionSets">
|
||||
<actionSet
|
||||
id="com.wudsn.ide.lng.editor.AssemblerEditorAssemblerActionSet"
|
||||
label="%com.wudsn.ide.lng.editor.AssemblerEditorAssemblerMenu.label"
|
||||
id="com.wudsn.ide.lng.editor.LanguageEditorCompilerActionSet"
|
||||
label="%com.wudsn.ide.lng.editor.LanguageEditorCompilerMenu.label"
|
||||
visible="true">
|
||||
<action
|
||||
class="com.wudsn.ide.lng.editor.AssemblerEditorCompileCommandDelegate"
|
||||
definitionId="com.wudsn.ide.lng.editor.AssemblerEditorCompileAndRunCommand"
|
||||
class="com.wudsn.ide.lng.editor.LanguageEditorCompileCommandDelegate"
|
||||
definitionId="com.wudsn.ide.lng.editor.LanguageEditorCompileAndRunCommand"
|
||||
icon="icons/hardware-generic-16x16.gif"
|
||||
id="com.wudsn.ide.lng.editor.AssemblerEditorCompileAndRunAction"
|
||||
label="%com.wudsn.ide.lng.editor.AssemblerEditorCompileAndRunCommand.name"
|
||||
id="com.wudsn.ide.lng.editor.LanguageEditorCompileAndRunAction"
|
||||
label="%com.wudsn.ide.lng.editor.LanguageEditorCompileAndRunCommand.name"
|
||||
style="pulldown"
|
||||
toolbarPath="com.wudsn.ide.lng.editor.AssemblerEditorToolbar">
|
||||
toolbarPath="com.wudsn.ide.lng.editor.LanguageEditorToolbar">
|
||||
</action>
|
||||
</actionSet>
|
||||
</extension>
|
||||
@ -352,23 +352,23 @@
|
||||
<extension
|
||||
point="org.eclipse.debug.core.breakpoints">
|
||||
<breakpoint
|
||||
class="com.wudsn.ide.lng.editor.AssemblerBreakpoint"
|
||||
id="assemblerBreakpoint"
|
||||
class="com.wudsn.ide.lng.breakpoint.LanguageBreakpoint"
|
||||
id="languageBreakpoint"
|
||||
markerType="org.eclipse.debug.core.lineBreakpointMarker"
|
||||
name="%com.wudsn.ide.lng.editor.AssemblerBreakpoint.name">
|
||||
name="%com.wudsn.ide.lng.editor.LanguageBreakpoint.name">
|
||||
</breakpoint>
|
||||
</extension>
|
||||
<extension
|
||||
point="org.eclipse.debug.ui.toggleBreakpointsTargetFactories">
|
||||
<toggleTargetFactory
|
||||
class="com.wudsn.ide.lng.editor.AssemblerBreakpointAdapterFactory"
|
||||
id="com.wudsn.ide.lng.editor.AssemblerBreakpointAdapterFactory">
|
||||
class="com.wudsn.ide.lng.breakpoint.LanguageBreakpointAdapterFactory"
|
||||
id="com.wudsn.ide.lng.editor.LanguageBreakpointAdapterFactory">
|
||||
</toggleTargetFactory>
|
||||
</extension>
|
||||
<extension
|
||||
point="org.eclipse.debug.ui.debugModelPresentations">
|
||||
<debugModelPresentation
|
||||
class="com.wudsn.ide.lng.editor.AssemblerBreakpoinDebugModelPresentation"
|
||||
class="com.wudsn.ide.lng.breakpoint.LanguageBreakpoinDebugModelPresentation"
|
||||
id="com.wudsn.ide.asm">
|
||||
</debugModelPresentation>
|
||||
</extension>
|
||||
@ -383,12 +383,12 @@
|
||||
class="org.eclipse.debug.ui.actions.RulerToggleBreakpointActionDelegate"
|
||||
definitionId="org.eclipse.debug.ui.commands.ToggleBreakpoint"
|
||||
id="org.eclipse.debug.ui.commands.ToggleBreakpoint"
|
||||
label="%com.wudsn.ide.lng.editor.AssemblerEditorToggleBreakpointCommand.name"
|
||||
label="%com.wudsn.ide.lng.editor.LanguageEditorToggleBreakpointCommand.name"
|
||||
menubarPath="additions">
|
||||
</action>
|
||||
<action
|
||||
class="org.eclipse.debug.ui.actions.RulerEnableDisableBreakpointActionDelegate"
|
||||
id="com.wudsn.ide.lng.editor.AssemblerEditorRulerEnableDisableBreakpointAction"
|
||||
id="com.wudsn.ide.lng.editor.LanguageEditorRulerEnableDisableBreakpointAction"
|
||||
label="Enable/Disable Breakpoint (label is overridden by action at runtime)"
|
||||
menubarPath="additions">
|
||||
</action>
|
||||
@ -412,7 +412,7 @@
|
||||
point="org.eclipse.ui.views">
|
||||
<view
|
||||
category="org.eclipse.debug.ui"
|
||||
class="com.wudsn.ide.lng.editor.CompilerSymbolsView"
|
||||
class="com.wudsn.ide.lng.symbol.CompilerSymbolsView"
|
||||
icon="icons/outline-label-definition-16x16.gif"
|
||||
id="com.wudsn.ide.lng.editor.CompilerSymbolsView"
|
||||
name="%com.wudsn.ide.lng.editor.CompilerSymbolsView.name"
|
||||
|
@ -1,3 +1,3 @@
|
||||
# Used by LanguageEditor
|
||||
com.wudsn.ide.lng.editor.ContentAssistProposal_label=Content Assist
|
||||
com.wudsn.ide.lng.editor.AssemblerEditorToggleCommentCommand_label=Toggle Comment2
|
||||
com.wudsn.ide.lng.editor.LanguageEditorToggleCommentCommand_label=Toggle Comment
|
@ -26,19 +26,19 @@ import org.eclipse.core.resources.IMarker;
|
||||
|
||||
import com.wudsn.ide.base.common.StringUtility;
|
||||
|
||||
public final class AssemblerProperties {
|
||||
public final class LanguageProperties {
|
||||
|
||||
/**
|
||||
* A single key value pair.
|
||||
*
|
||||
* @since 1.6.1
|
||||
*/
|
||||
public static final class AssemblerProperty {
|
||||
public static final class LanguageProperty {
|
||||
public final String key;
|
||||
public final String value;
|
||||
public final int lineNumber;
|
||||
|
||||
AssemblerProperty(String key, String value, int lineNumber) {
|
||||
LanguageProperty(String key, String value, int lineNumber) {
|
||||
this.key = key;
|
||||
this.value = value;
|
||||
this.lineNumber = lineNumber;
|
||||
@ -51,11 +51,11 @@ public final class AssemblerProperties {
|
||||
}
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public final static class InvalidAssemblerPropertyException extends Exception {
|
||||
public final AssemblerProperty property;
|
||||
public final static class InvalidLanguagePropertyException extends Exception {
|
||||
public final LanguageProperty property;
|
||||
public final IMarker marker;
|
||||
|
||||
public InvalidAssemblerPropertyException(AssemblerProperty property, IMarker marker) {
|
||||
public InvalidLanguagePropertyException(LanguageProperty property, IMarker marker) {
|
||||
if (property == null) {
|
||||
throw new IllegalArgumentException("Parameter 'property' must not be null.");
|
||||
}
|
||||
@ -75,13 +75,13 @@ public final class AssemblerProperties {
|
||||
public final static String OUTPUT_FILE_EXTENSION = "@com.wudsn.ide.lng.outputfileextension";
|
||||
public final static String OUTPUT_FILE = "@com.wudsn.ide.lng.outputfile";
|
||||
|
||||
private Map<String, AssemblerProperty> properties;
|
||||
private Map<String, LanguageProperty> properties;
|
||||
|
||||
/**
|
||||
* Creation is public.
|
||||
*/
|
||||
public AssemblerProperties() {
|
||||
properties = new TreeMap<String, AssemblerProperties.AssemblerProperty>();
|
||||
public LanguageProperties() {
|
||||
properties = new TreeMap<String, LanguageProperties.LanguageProperty>();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -109,7 +109,7 @@ public final class AssemblerProperties {
|
||||
"Parameter 'lineNumber' must not be negative. Specified value is " + lineNumber + ".");
|
||||
}
|
||||
if (!properties.containsKey(key)) {
|
||||
AssemblerProperty property = new AssemblerProperty(key, value, lineNumber);
|
||||
LanguageProperty property = new LanguageProperty(key, value, lineNumber);
|
||||
properties.put(key, property);
|
||||
}
|
||||
}
|
||||
@ -122,7 +122,7 @@ public final class AssemblerProperties {
|
||||
*
|
||||
* @since 1.6.1
|
||||
*/
|
||||
public AssemblerProperty get(String key) {
|
||||
public LanguageProperty get(String key) {
|
||||
if (key == null) {
|
||||
throw new IllegalArgumentException("Parameter 'key' must not be null.");
|
||||
}
|
||||
|
@ -21,6 +21,23 @@ 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
|
||||
//
|
||||
//TOC_COMPILERS_TOPIC_LABEL={0}
|
||||
//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.
|
||||
*
|
||||
@ -78,13 +95,13 @@ public final class Texts extends NLS {
|
||||
public static String COMPILER_SYNTAX_W65816_ONLY;
|
||||
|
||||
/**
|
||||
* Assembler toolbar and menu.
|
||||
* Compiler toolbar and menu.
|
||||
*
|
||||
*/
|
||||
public static String COMPILER_TOOLBAR_RUN_WITH_DEFAULT_LABEL;
|
||||
|
||||
/**
|
||||
* Assembler content outline.
|
||||
* Compiler content outline.
|
||||
*/
|
||||
public static String COMPILER_CONTENT_OUTLINE_SORT_BUTTON_TOOL_TIP;
|
||||
public static String COMPILER_CONTENT_OUTLINE_TREE_TYPE_DEFAULT;
|
||||
@ -92,7 +109,7 @@ public final class Texts extends NLS {
|
||||
public static String COMPILER_CONTENT_OUTLINE_TREE_TYPE_IMPLEMENTATION_SECTION;
|
||||
|
||||
/**
|
||||
* Assembler hyperlink detector.
|
||||
* Compiler hyperlink detector.
|
||||
*/
|
||||
public static String COMPILER_HYPERLINK_DETECTOR_OPEN_SOURCE_WITH_LANGUAGE_EDITOR;
|
||||
public static String COMPILER_HYPERLINK_DETECTOR_OPEN_BINARY_WITH_HEX_EDITOR;
|
||||
@ -104,10 +121,10 @@ public final class Texts extends NLS {
|
||||
public static String COMPILER_HYPERLINK_FILE_NOT_EXISTS;
|
||||
|
||||
/**
|
||||
* Assembler breakpoints.
|
||||
* Language breakpoints.
|
||||
*/
|
||||
public static String COMPILER_BREAKPOINT_MARKER_MESSAGE;
|
||||
public static String COMPILER_BREAKPOINT_TOGGLE_TYPE_MENU_TEXT;
|
||||
public static String LANGUAGE_BREAKPOINT_MARKER_MESSAGE;
|
||||
public static String LANGUAGE_BREAKPOINT_TOGGLE_TYPE_MENU_TEXT;
|
||||
|
||||
/**
|
||||
* Compiler symbols
|
||||
@ -201,7 +218,7 @@ public final class Texts extends NLS {
|
||||
|
||||
public static String TOC_IDE_TOPIC_LABEL;
|
||||
|
||||
public static String TOC_ASSEMBLERS_TOPIC_LABEL;
|
||||
public static String TOC_COMPILERS_TOPIC_LABEL;
|
||||
public static String TOC_COMPILER_GENERAL_TOPIC_LABEL;
|
||||
public static String TOC_COMPILER_NAME_LABEL;
|
||||
public static String TOC_COMPILER_HOME_PAGE_LABEL;
|
||||
@ -229,7 +246,7 @@ public final class Texts extends NLS {
|
||||
public static String TOC_HARDWARE_DEFAULT_PARAMETERS_LABEL;
|
||||
|
||||
public static String TOC_TARGETS_TOPIC_LABEL;
|
||||
public static String TOC_TARGET_NAME_LABEL;
|
||||
public static String TOC_TARGETS_NAME_LABEL;
|
||||
public static String TOC_TARGET_OPCODE_LABEL;
|
||||
|
||||
/**
|
||||
|
@ -29,7 +29,7 @@ COMPILER_CONTENT_OUTLINE_TREE_TYPE_DEFAULT=Default
|
||||
COMPILER_CONTENT_OUTLINE_TREE_TYPE_DEFINITION_SECTION=Definition Section
|
||||
COMPILER_CONTENT_OUTLINE_TREE_TYPE_IMPLEMENTATION_SECTION=Implementation Section
|
||||
|
||||
COMPILER_HYPERLINK_DETECTOR_OPEN_SOURCE_WITH_LANGUAGE_EDITOR=Open with Language Editor
|
||||
COMPILER_HYPERLINK_DETECTOR_OPEN_SOURCE_WITH_LANGUAGE_EDITOR=Open with {0} Editor
|
||||
COMPILER_HYPERLINK_DETECTOR_OPEN_BINARY_WITH_HEX_EDITOR=Open with Hex Editor
|
||||
COMPILER_HYPERLINK_DETECTOR_OPEN_BINARY_WITH_GRAPHICS_EDITOR=Open with Graphics Editor
|
||||
COMPILER_HYPERLINK_DETECTOR_OPEN_BINARY_WITH_DEFAULT_EDITOR=Open with Default Editor
|
||||
@ -38,8 +38,8 @@ COMPILER_HYPERLINK_DETECTOR_OPEN_IDENTIFIER={0} {1} in line {2}
|
||||
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?
|
||||
|
||||
COMPILER_BREAKPOINT_MARKER_MESSAGE={0} [line: {1}] - {2}
|
||||
COMPILER_BREAKPOINT_TOGGLE_TYPE_MENU_TEXT=Assembler Breakpoints
|
||||
LANGUAGE_BREAKPOINT_MARKER_MESSAGE={0} [line: {1}] - {2}
|
||||
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:
|
||||
@ -114,7 +114,7 @@ TOC_WUDSN_IDE_LABEL=WUDSN IDE Guide
|
||||
|
||||
TOC_IDE_TOPIC_LABEL=WUDSN IDE
|
||||
|
||||
TOC_ASSEMBLERS_TOPIC_LABEL=Assemblers
|
||||
TOC_COMPILERS_TOPIC_LABEL={0}
|
||||
TOC_COMPILER_GENERAL_TOPIC_LABEL=General
|
||||
TOC_COMPILER_NAME_LABEL=Name
|
||||
TOC_COMPILER_HOME_PAGE_LABEL=Home Page
|
||||
@ -160,12 +160,12 @@ TOC_TARGETS_TOPIC_LABEL=Targets
|
||||
TOC_TARGETS_NAME_LABEL=Target
|
||||
TOC_TARGET_OPCODE_LABEL=Opcode
|
||||
|
||||
MESSAGE_E100=Path to '{0}' compiler executable is not set in the 'Assembler' preferences.
|
||||
MESSAGE_E101=The compiler '{0}' does not specify default parameters.
|
||||
MESSAGE_E102=The compiler '{0}' does not specify a help file path.
|
||||
MESSAGE_E103=Path to '{0}' compiler executable in the preferences points to non-existing file '{1}'.
|
||||
MESSAGE_E104=Output file extension must be set in the preferences of compiler '{0}' or via the annotation '{1}'.
|
||||
MESSAGE_E105=Cannot execute compiler process '{0}' in working directory '{1}'. System error: {2}
|
||||
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_E106=Output file '{0}' cannot be opened for writing. End all applications which may keep the file open.
|
||||
MESSAGE_E107=Output file not created. Check the error messages and the console log.
|
||||
MESSAGE_E108=Output file not updated. Check the error messages and the console log.
|
||||
@ -187,11 +187,11 @@ MESSAGE_E123=Cannot delete empty breakpoints file '{0}'.
|
||||
MESSAGE_E124=Unknown hardware '{0}'. Specify one of the following valid values '{1}'.
|
||||
MESSAGE_E125=Main source file '{0}' does not exist.
|
||||
MESSAGE_E126=Output file created but empty. Check the error messages and the console log.
|
||||
MESSAGE_E127=Compiler process ended with return code {0}. Check the error messages and the console log.
|
||||
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}' compiler cannot be displayed because the path to the compiler executable is not set in the preferences.
|
||||
MESSAGE_E131=Help for the '{0}' compiler cannot be displayed because no help file was found in the paths '{1}' relative to the compiler executable path '{0}'.
|
||||
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}'.
|
||||
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}
|
||||
|
@ -29,7 +29,7 @@ COMPILER_CONTENT_OUTLINE_TREE_TYPE_DEFAULT=Standard
|
||||
COMPILER_CONTENT_OUTLINE_TREE_TYPE_DEFINITION_SECTION=Definitionsabschnitt
|
||||
COMPILER_CONTENT_OUTLINE_TREE_TYPE_IMPLEMENTATION_SECTION=Implementierungsabschnitt
|
||||
|
||||
COMPILER_HYPERLINK_DETECTOR_OPEN_SOURCE_WITH_LANGUAGE_EDITOR=Öffnen mit Programmiersprachen Editor
|
||||
COMPILER_HYPERLINK_DETECTOR_OPEN_SOURCE_WITH_LANGUAGE_EDITOR=Öffnen mit {0} Editor
|
||||
COMPILER_HYPERLINK_DETECTOR_OPEN_BINARY_WITH_HEX_EDITOR=Öffnen mit Hex Editor
|
||||
COMPILER_HYPERLINK_DETECTOR_OPEN_BINARY_WITH_GRAPHICS_EDITOR=Öffnen mit Grafik Editor
|
||||
COMPILER_HYPERLINK_DETECTOR_OPEN_BINARY_WITH_DEFAULT_EDITOR=Öffnen mit Standardeditor
|
||||
@ -38,8 +38,8 @@ COMPILER_HYPERLINK_DETECTOR_OPEN_IDENTIFIER={0} {1} in Zeile {2}
|
||||
COMPILER_HYPERLINK_DETECTOR_OPEN_IDENTIFIER_IN_INCLUDE={0} {1} in Zeile {2} von {3}
|
||||
COMPILER_HYPERLINK_FILE_NOT_EXISTS=Ziel-Datei '{0}' existiert nicht. Möchten Sie die Ziel-Datei nun anlegen?
|
||||
|
||||
COMPILER_BREAKPOINT_MARKER_MESSAGE={0} [Zeile: {1}] - {2}
|
||||
COMPILER_BREAKPOINT_TOGGLE_TYPE_MENU_TEXT=Assembler Breakpoints
|
||||
LANGUAGE_BREAKPOINT_MARKER_MESSAGE={0} [Zeile: {1}] - {2}
|
||||
LANGUAGE_BREAKPOINT_TOGGLE_TYPE_MENU_TEXT={0} Breakpoints
|
||||
|
||||
COMPILER_SYMBOLS_VIEW_FILTER_TOOLTIP=Geben sie eine oder mehrere Teilzeichenfolgen durch Leerzeichen getrennt an
|
||||
COMPILER_SYMBOLS_VIEW_SOURCE_LABEL=Quelle:
|
||||
@ -112,7 +112,7 @@ TOC_WUDSN_IDE_LABEL=WUDSN IDE Handbuch
|
||||
|
||||
TOC_IDE_TOPIC_LABEL=WUDSN IDE
|
||||
|
||||
TOC_ASSEMBLERS_TOPIC_LABEL=Assembler
|
||||
TOC_COMPILERS_TOPIC_LABEL={0}
|
||||
TOC_COMPILER_GENERAL_TOPIC_LABEL=Allgemein
|
||||
TOC_COMPILER_NAME_LABEL=Name
|
||||
TOC_COMPILER_HOME_PAGE_LABEL=Home Page
|
||||
@ -158,7 +158,7 @@ TOC_TARGETS_TOPIC_LABEL=Ziele
|
||||
TOC_TARGET_NAME_LABEL=Ziel
|
||||
TOC_TARGET_OPCODE_LABEL=Opcode
|
||||
|
||||
MESSAGE_E100=Pfad zur ausführbaren Datei des Kompilers '{0}' ist in den 'Assembler' Voreinstellungen nicht angegeben.
|
||||
MESSAGE_E100=Pfad zur ausführbaren Datei des Kompilers '{0}' ist in den '{1}' Voreinstellungen nicht angegeben.
|
||||
MESSAGE_E101=Der Kompiler '{0}' definiert keine Standardparameter.
|
||||
MESSAGE_E102=Der Kompiler '{0}' getHelpFile keine Pfade zu Hilfe-Dateien.
|
||||
MESSAGE_E103=Pfad zur ausführbaren Datei des Kompilers '{0}' in den Voreinstellungen verweist auf die nicht existierende Datei '{1}'.
|
||||
|
@ -17,7 +17,7 @@
|
||||
* along with WUDSN IDE. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.wudsn.ide.lng.editor;
|
||||
package com.wudsn.ide.lng.breakpoint;
|
||||
|
||||
import org.eclipse.debug.core.model.IValue;
|
||||
import org.eclipse.debug.ui.IDebugModelPresentation;
|
||||
@ -34,13 +34,13 @@ import org.eclipse.ui.ide.IDE;
|
||||
|
||||
/**
|
||||
* Implementation class for extension
|
||||
* "com.wudsn.ide.lng.editor.AssemblerBreakpoinDebugModelPresentation". This is
|
||||
* "com.wudsn.ide.lng.editor.LanguageBreakpoinDebugModelPresentation". This is
|
||||
* the binding logic which enables navigation from transient and persistent
|
||||
* break point markers to the corresponding editor.
|
||||
*
|
||||
* @author Peter Dell
|
||||
*/
|
||||
public class AssemblerBreakpoinDebugModelPresentation implements IDebugModelPresentation {
|
||||
public class LanguageBreakpoinDebugModelPresentation implements IDebugModelPresentation {
|
||||
|
||||
@Override
|
||||
public void dispose() {
|
||||
@ -62,8 +62,8 @@ public class AssemblerBreakpoinDebugModelPresentation implements IDebugModelPres
|
||||
|
||||
@Override
|
||||
public IEditorInput getEditorInput(Object element) {
|
||||
AssemblerBreakpoint assemblerBreakpoint = (AssemblerBreakpoint) element;
|
||||
IEditorInput result = assemblerBreakpoint.getEditorInput();
|
||||
LanguageBreakpoint languageBreakpoint = (LanguageBreakpoint) element;
|
||||
IEditorInput result = languageBreakpoint.getEditorInput();
|
||||
if (result == null) {
|
||||
IWorkbenchWindow activeWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
|
||||
if (activeWindow == null) {
|
||||
@ -75,7 +75,7 @@ public class AssemblerBreakpoinDebugModelPresentation implements IDebugModelPres
|
||||
}
|
||||
IEditorPart part;
|
||||
try {
|
||||
part = IDE.openEditor(activePage, assemblerBreakpoint.getMarker(), false);
|
||||
part = IDE.openEditor(activePage, languageBreakpoint.getMarker(), false);
|
||||
} catch (PartInitException ex) {
|
||||
return null;
|
||||
}
|
||||
@ -86,8 +86,8 @@ public class AssemblerBreakpoinDebugModelPresentation implements IDebugModelPres
|
||||
|
||||
@Override
|
||||
public String getEditorId(IEditorInput input, Object element) {
|
||||
AssemblerBreakpoint assemblerBreakpoint = (AssemblerBreakpoint) element;
|
||||
return assemblerBreakpoint.getEditorId();
|
||||
LanguageBreakpoint languageBreakpoint = (LanguageBreakpoint) element;
|
||||
return languageBreakpoint.getEditorId();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -17,7 +17,7 @@
|
||||
* along with WUDSN IDE. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.wudsn.ide.lng.editor;
|
||||
package com.wudsn.ide.lng.breakpoint;
|
||||
|
||||
import org.eclipse.core.resources.IMarker;
|
||||
import org.eclipse.core.resources.IResource;
|
||||
@ -34,7 +34,7 @@ import com.wudsn.ide.lng.LanguagePlugin;
|
||||
import com.wudsn.ide.lng.Texts;
|
||||
|
||||
/**
|
||||
* Implementation class for assembler breakpoints. See
|
||||
* Implementation class for language breakpoints. See
|
||||
* http://eclipse.org/articles/Article-Debugger/how-to.html for details.
|
||||
*
|
||||
* @author Peter Dell
|
||||
@ -42,7 +42,7 @@ import com.wudsn.ide.lng.Texts;
|
||||
*
|
||||
*/
|
||||
|
||||
public final class AssemblerBreakpoint extends LineBreakpoint {
|
||||
public final class LanguageBreakpoint extends LineBreakpoint {
|
||||
|
||||
/**
|
||||
* Attributes stored with the marker.
|
||||
@ -67,7 +67,7 @@ public final class AssemblerBreakpoint extends LineBreakpoint {
|
||||
* <code>setMarker(...)</code> method is called to restore this breakpoint's
|
||||
* attributes.
|
||||
*/
|
||||
public AssemblerBreakpoint() {
|
||||
public LanguageBreakpoint() {
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -98,7 +98,7 @@ public final class AssemblerBreakpoint extends LineBreakpoint {
|
||||
* <code>null</code>.
|
||||
* @throws CoreException if unable to create the breakpoint
|
||||
*/
|
||||
public AssemblerBreakpoint(final String editorId, IEditorInput editorInput, final IResource resource,
|
||||
public LanguageBreakpoint(final String editorId, IEditorInput editorInput, final IResource resource,
|
||||
final int lineNumber, final String description) throws CoreException {
|
||||
if (editorId == null) {
|
||||
throw new IllegalArgumentException("Parameter 'editorId' must not be null.");
|
||||
@ -129,7 +129,7 @@ public final class AssemblerBreakpoint extends LineBreakpoint {
|
||||
marker.setAttribute(IBreakpoint.ENABLED, Boolean.TRUE);
|
||||
marker.setAttribute(IMarker.LINE_NUMBER, lineNumber);
|
||||
marker.setAttribute(IBreakpoint.ID, getModelIdentifier());
|
||||
marker.setAttribute(IMarker.MESSAGE, TextUtility.format(Texts.COMPILER_BREAKPOINT_MARKER_MESSAGE,
|
||||
marker.setAttribute(IMarker.MESSAGE, TextUtility.format(Texts.LANGUAGE_BREAKPOINT_MARKER_MESSAGE,
|
||||
resource.getName(), NumberUtility.getLongValueDecimalString(lineNumber), description));
|
||||
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
* along with WUDSN IDE. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.wudsn.ide.lng.editor;
|
||||
package com.wudsn.ide.lng.breakpoint;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
@ -28,28 +28,30 @@ import org.eclipse.debug.ui.actions.IToggleBreakpointsTargetFactory;
|
||||
import org.eclipse.jface.viewers.ISelection;
|
||||
import org.eclipse.ui.IWorkbenchPart;
|
||||
|
||||
import com.wudsn.ide.base.common.TextUtility;
|
||||
import com.wudsn.ide.lng.Texts;
|
||||
import com.wudsn.ide.lng.editor.LanguageEditor;
|
||||
|
||||
/**
|
||||
* Factory for {@AssemblerBreakpointsTarget} instances. Used by extension
|
||||
* Factory for {@LanguageBreakpointsTarget} instances. Used by extension
|
||||
* "org.eclipse.debug.ui.toggleBreakpointsTargetFactories"
|
||||
*
|
||||
* @author Peter Dell
|
||||
* @since 1.6.1
|
||||
*/
|
||||
public final class AssemblerBreakpointAdapterFactory implements IToggleBreakpointsTargetFactory {
|
||||
public final class LanguageBreakpointAdapterFactory implements IToggleBreakpointsTargetFactory {
|
||||
|
||||
private String TARGET_ID = AssemblerBreakpointsTarget.class.getName();
|
||||
private String TARGET_ID = LanguageBreakpointsTarget.class.getName();
|
||||
private Set<String> defaultSet;
|
||||
|
||||
public AssemblerBreakpointAdapterFactory() {
|
||||
public LanguageBreakpointAdapterFactory() {
|
||||
defaultSet = new HashSet<String>();
|
||||
defaultSet.add(TARGET_ID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<String> getToggleTargets(IWorkbenchPart part, ISelection selection) {
|
||||
if (part instanceof AssemblerEditor) {
|
||||
if (part instanceof LanguageEditor) {
|
||||
return defaultSet;
|
||||
}
|
||||
return Collections.emptySet();
|
||||
@ -57,7 +59,7 @@ public final class AssemblerBreakpointAdapterFactory implements IToggleBreakpoin
|
||||
|
||||
@Override
|
||||
public String getDefaultToggleTarget(IWorkbenchPart part, ISelection selection) {
|
||||
if (part instanceof AssemblerEditor) {
|
||||
if (part instanceof LanguageEditor) {
|
||||
return TARGET_ID;
|
||||
}
|
||||
return null;
|
||||
@ -66,14 +68,14 @@ public final class AssemblerBreakpointAdapterFactory implements IToggleBreakpoin
|
||||
@Override
|
||||
public IToggleBreakpointsTarget createToggleTarget(String targetID) {
|
||||
if (TARGET_ID.equals(targetID)) {
|
||||
return new AssemblerBreakpointsTarget();
|
||||
return new LanguageBreakpointsTarget();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getToggleTargetName(String targetID) {
|
||||
return Texts.COMPILER_BREAKPOINT_TOGGLE_TYPE_MENU_TEXT;
|
||||
return TextUtility.format( Texts.LANGUAGE_BREAKPOINT_TOGGLE_TYPE_MENU_TEXT, "TODO: 2121");// TODO
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -16,7 +16,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with WUDSN IDE. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.wudsn.ide.lng.editor;
|
||||
package com.wudsn.ide.lng.breakpoint;
|
||||
|
||||
import org.eclipse.core.resources.IResource;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
@ -34,12 +34,13 @@ import org.eclipse.ui.IWorkbenchPart;
|
||||
import org.eclipse.ui.texteditor.IDocumentProvider;
|
||||
|
||||
import com.wudsn.ide.base.common.StringUtility;
|
||||
import com.wudsn.ide.lng.editor.LanguageEditor;
|
||||
|
||||
/**
|
||||
* Target which creates {@link AssemblerBreakpoint} instances. Used by
|
||||
* {@link AssemblerBreakpointAdapterFactory}.
|
||||
* Target which creates {@link LanguageBreakpoint} instances. Used by
|
||||
* {@link LanguageBreakpointAdapterFactory}.
|
||||
*/
|
||||
public final class AssemblerBreakpointsTarget implements IToggleBreakpointsTarget {
|
||||
public final class LanguageBreakpointsTarget implements IToggleBreakpointsTarget {
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
@ -49,15 +50,15 @@ public final class AssemblerBreakpointsTarget implements IToggleBreakpointsTarge
|
||||
*/
|
||||
@Override
|
||||
public void toggleLineBreakpoints(IWorkbenchPart part, ISelection selection) throws CoreException {
|
||||
AssemblerEditor assemblerEditor = getEditor(part);
|
||||
if (assemblerEditor != null) {
|
||||
LanguageEditor languageEditor = getEditor(part);
|
||||
if (languageEditor != null) {
|
||||
IBreakpointManager breakPointManager = DebugPlugin.getDefault().getBreakpointManager();
|
||||
String editorId = assemblerEditor.getClass().getName();
|
||||
IEditorInput editorInput = assemblerEditor.getEditorInput();
|
||||
String editorId = languageEditor.getClass().getName();
|
||||
IEditorInput editorInput = languageEditor.getEditorInput();
|
||||
IResource resource = editorInput.getAdapter(IResource.class);
|
||||
ITextSelection textSelection = (ITextSelection) selection;
|
||||
int lineNumber = textSelection.getStartLine();
|
||||
IBreakpoint[] breakpoints = breakPointManager.getBreakpoints(AssemblerBreakpoint.DEBUG_MODEL_ID);
|
||||
IBreakpoint[] breakpoints = breakPointManager.getBreakpoints(LanguageBreakpoint.DEBUG_MODEL_ID);
|
||||
for (int i = 0; i < breakpoints.length; i++) {
|
||||
IBreakpoint breakpoint = breakpoints[i];
|
||||
if (resource.equals(breakpoint.getMarker().getResource())) {
|
||||
@ -70,8 +71,8 @@ public final class AssemblerBreakpointsTarget implements IToggleBreakpointsTarge
|
||||
}
|
||||
// Create line breakpoint (doc line numbers start at 0)
|
||||
String description;
|
||||
IDocumentProvider provider = assemblerEditor.getDocumentProvider();
|
||||
IDocument document = provider.getDocument(assemblerEditor.getEditorInput());
|
||||
IDocumentProvider provider = languageEditor.getDocumentProvider();
|
||||
IDocument document = provider.getDocument(languageEditor.getEditorInput());
|
||||
try {
|
||||
int startOffset = document.getLineOffset(lineNumber);
|
||||
int lineLength = document.getLineLength(lineNumber);
|
||||
@ -85,7 +86,7 @@ public final class AssemblerBreakpointsTarget implements IToggleBreakpointsTarge
|
||||
if (StringUtility.isEmpty(description)) {
|
||||
return;
|
||||
}
|
||||
AssemblerBreakpoint breakpoint = new AssemblerBreakpoint(editorId, editorInput, resource, lineNumber + 1,
|
||||
LanguageBreakpoint breakpoint = new LanguageBreakpoint(editorId, editorInput, resource, lineNumber + 1,
|
||||
description);
|
||||
breakPointManager.addBreakpoint(breakpoint);
|
||||
}
|
||||
@ -149,17 +150,17 @@ public final class AssemblerBreakpointsTarget implements IToggleBreakpointsTarge
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines of the specified workbench part is an assembler editor with a
|
||||
* Determines of the specified workbench part is an language editor with a
|
||||
* valid resource.
|
||||
*
|
||||
* @param part The editor part or <code>null</code>.
|
||||
* @return The assembler editor or <code>null</code>.
|
||||
* @return The language editor or <code>null</code>.
|
||||
*/
|
||||
private AssemblerEditor getEditor(IWorkbenchPart part) {
|
||||
if (part instanceof AssemblerEditor) {
|
||||
AssemblerEditor assemblerEditor = (AssemblerEditor) part;
|
||||
if (assemblerEditor.getCurrentFile() != null) {
|
||||
return assemblerEditor;
|
||||
private LanguageEditor getEditor(IWorkbenchPart part) {
|
||||
if (part instanceof LanguageEditor) {
|
||||
LanguageEditor languageEditor = (LanguageEditor) part;
|
||||
if (languageEditor.getCurrentFile() != null) {
|
||||
return languageEditor;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
@ -25,8 +25,8 @@ import org.eclipse.core.resources.IFile;
|
||||
|
||||
import com.wudsn.ide.base.common.FileUtility;
|
||||
import com.wudsn.ide.base.common.StringUtility;
|
||||
import com.wudsn.ide.lng.AssemblerProperties;
|
||||
import com.wudsn.ide.lng.AssemblerProperties.AssemblerProperty;
|
||||
import com.wudsn.ide.lng.LanguageProperties;
|
||||
import com.wudsn.ide.lng.LanguageProperties.LanguageProperty;
|
||||
import com.wudsn.ide.lng.preferences.CompilerPreferences;
|
||||
|
||||
/**
|
||||
@ -50,19 +50,19 @@ public final class CompilerFiles {
|
||||
public final String fileName;
|
||||
public final String fileNameWithoutExtension;
|
||||
|
||||
public final AssemblerProperties assemblerProperties;
|
||||
public final LanguageProperties languageProperties;
|
||||
|
||||
SourceFile(IFile iFile, AssemblerProperties assemblerProperties) {
|
||||
SourceFile(IFile iFile, LanguageProperties languageProperties) {
|
||||
|
||||
if (iFile == null) {
|
||||
throw new IllegalArgumentException("Parameter 'iFile' must not be null.");
|
||||
}
|
||||
if (assemblerProperties == null) {
|
||||
throw new IllegalArgumentException("Parameter 'assemblerProperties' must not be null.");
|
||||
if (languageProperties == null) {
|
||||
throw new IllegalArgumentException("Parameter 'languageProperties' must not be null.");
|
||||
}
|
||||
|
||||
this.iFile = iFile;
|
||||
this.assemblerProperties = assemblerProperties;
|
||||
this.languageProperties = languageProperties;
|
||||
|
||||
// Source file.
|
||||
filePath = iFile.getLocation().toOSString();
|
||||
@ -92,10 +92,10 @@ public final class CompilerFiles {
|
||||
*/
|
||||
public final SourceFile mainSourceFile;
|
||||
|
||||
public final AssemblerProperty outputFolderModeProperty;
|
||||
public final LanguageProperty outputFolderModeProperty;
|
||||
public final String outputFolderMode;
|
||||
|
||||
public final AssemblerProperty outputFolderProperty;
|
||||
public final LanguageProperty outputFolderProperty;
|
||||
public final File outputFolder;
|
||||
public final String outputFolderPath;
|
||||
|
||||
@ -103,10 +103,10 @@ public final class CompilerFiles {
|
||||
public final String outputFilePath;
|
||||
public final String outputFilePathWithoutExtension;
|
||||
|
||||
public final AssemblerProperty outputFileProperty;
|
||||
public final LanguageProperty outputFileProperty;
|
||||
public final String outputFileName;
|
||||
public final String outputFileNameWithoutExtension;
|
||||
public final AssemblerProperty outputFileExtensionProperty;
|
||||
public final LanguageProperty outputFileExtensionProperty;
|
||||
public final String outputFileExtension;
|
||||
public final String outputFileNameShortWithoutExtension;
|
||||
|
||||
@ -114,8 +114,8 @@ public final class CompilerFiles {
|
||||
public final String symbolsFilePath;
|
||||
public final String symbolsFileName;
|
||||
|
||||
public CompilerFiles(IFile mainSourceIFile, AssemblerProperties mainSourceFileAssemblerProperties,
|
||||
IFile sourceIFile, AssemblerProperties sourceFileAssemblerProperties,
|
||||
public CompilerFiles(IFile mainSourceIFile, LanguageProperties mainSourceFileLanguageProperties,
|
||||
IFile sourceIFile, LanguageProperties sourceFileLanguageProperties,
|
||||
CompilerPreferences compilerPreferences) {
|
||||
|
||||
if (mainSourceIFile == null) {
|
||||
@ -127,8 +127,8 @@ public final class CompilerFiles {
|
||||
if (compilerPreferences == null) {
|
||||
throw new IllegalArgumentException("Parameter 'compilerPreferences' must not be null.");
|
||||
}
|
||||
this.mainSourceFile = new SourceFile(mainSourceIFile, mainSourceFileAssemblerProperties);
|
||||
this.sourceFile = new SourceFile(sourceIFile, sourceFileAssemblerProperties);
|
||||
this.mainSourceFile = new SourceFile(mainSourceIFile, mainSourceFileLanguageProperties);
|
||||
this.sourceFile = new SourceFile(sourceIFile, sourceFileLanguageProperties);
|
||||
|
||||
// Output folder mode
|
||||
// Can be overridden via annotation property in main source file
|
||||
@ -137,10 +137,10 @@ public final class CompilerFiles {
|
||||
String localOutputFileExtension = compilerPreferences.getOutputFileExtension();
|
||||
|
||||
// Properties which override the preferences
|
||||
outputFolderModeProperty = mainSourceFileAssemblerProperties.get(AssemblerProperties.OUTPUT_FOLDER_MODE);
|
||||
outputFolderProperty = mainSourceFileAssemblerProperties.get(AssemblerProperties.OUTPUT_FOLDER);
|
||||
outputFileExtensionProperty = mainSourceFileAssemblerProperties.get(AssemblerProperties.OUTPUT_FILE_EXTENSION);
|
||||
outputFileProperty = mainSourceFileAssemblerProperties.get(AssemblerProperties.OUTPUT_FILE);
|
||||
outputFolderModeProperty = mainSourceFileLanguageProperties.get(LanguageProperties.OUTPUT_FOLDER_MODE);
|
||||
outputFolderProperty = mainSourceFileLanguageProperties.get(LanguageProperties.OUTPUT_FOLDER);
|
||||
outputFileExtensionProperty = mainSourceFileLanguageProperties.get(LanguageProperties.OUTPUT_FILE_EXTENSION);
|
||||
outputFileProperty = mainSourceFileLanguageProperties.get(LanguageProperties.OUTPUT_FILE);
|
||||
|
||||
// The following sequence sets the instance fields "outputFolder" and
|
||||
// "outputFileNameWithoutExtension" as well as the
|
||||
|
@ -35,7 +35,7 @@ import com.wudsn.ide.base.BasePlugin;
|
||||
import com.wudsn.ide.base.common.FileUtility;
|
||||
import com.wudsn.ide.base.common.StringUtility;
|
||||
import com.wudsn.ide.lng.LanguagePlugin;
|
||||
import com.wudsn.ide.lng.AssemblerProperties;
|
||||
import com.wudsn.ide.lng.LanguageProperties;
|
||||
import com.wudsn.ide.lng.compiler.Compiler;
|
||||
import com.wudsn.ide.lng.compiler.syntax.CompilerSyntax;
|
||||
import com.wudsn.ide.lng.compiler.syntax.Instruction;
|
||||
@ -81,19 +81,19 @@ public abstract class CompilerSourceParser {
|
||||
private boolean logEnabled = false;
|
||||
|
||||
/**
|
||||
* Extract all {@link AssemblerProperties} properties from a document.
|
||||
* Extract all {@link LanguageProperties} properties from a document.
|
||||
*
|
||||
* @param document The document, not <code>null</code>.
|
||||
* @return The properties, may be empty, not <code>null</code>.
|
||||
*/
|
||||
public static AssemblerProperties getDocumentProperties(IDocument document) {
|
||||
public static LanguageProperties getDocumentProperties(IDocument document) {
|
||||
if (document == null) {
|
||||
throw new IllegalArgumentException("Parameter 'document' must not be null.");
|
||||
}
|
||||
String content = document.get();
|
||||
AssemblerProperties properties = new AssemblerProperties();
|
||||
LanguageProperties properties = new LanguageProperties();
|
||||
|
||||
int index1 = content.indexOf(AssemblerProperties.PREFIX);
|
||||
int index1 = content.indexOf(LanguageProperties.PREFIX);
|
||||
while (index1 >= 0) {
|
||||
|
||||
int indexEqualSign = content.indexOf('=', index1);
|
||||
@ -116,7 +116,7 @@ public abstract class CompilerSourceParser {
|
||||
}
|
||||
properties.put(key, value, lineNumber);
|
||||
}
|
||||
index1 = content.indexOf(AssemblerProperties.PREFIX, indexNewLine);
|
||||
index1 = content.indexOf(LanguageProperties.PREFIX, indexNewLine);
|
||||
}
|
||||
return properties;
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
* along with WUDSN IDE. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.wudsn.ide.lng.editor;
|
||||
package com.wudsn.ide.lng.compiler.parser;
|
||||
|
||||
import org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider;
|
||||
import org.eclipse.jface.viewers.LabelProvider;
|
||||
@ -25,8 +25,6 @@ import org.eclipse.jface.viewers.StyledString;
|
||||
import org.eclipse.swt.graphics.Image;
|
||||
|
||||
import com.wudsn.ide.lng.LanguagePlugin;
|
||||
import com.wudsn.ide.lng.compiler.parser.CompilerSourceParserTreeObject;
|
||||
import com.wudsn.ide.lng.compiler.parser.CompilerSourceParserTreeObjectType;
|
||||
|
||||
/**
|
||||
* LabelProvider for the {@link CompilerSourceParserTreeObject} instances in the
|
||||
@ -35,7 +33,7 @@ import com.wudsn.ide.lng.compiler.parser.CompilerSourceParserTreeObjectType;
|
||||
* @author Peter Dell
|
||||
* @author Daniel Mitte
|
||||
*/
|
||||
final class CompilerSourceParserTreeObjectLabelProvider extends DelegatingStyledCellLabelProvider {
|
||||
public final class CompilerSourceParserTreeObjectLabelProvider extends DelegatingStyledCellLabelProvider {
|
||||
|
||||
/** Default tree image */
|
||||
private final Image defaultImage;
|
||||
@ -108,11 +106,8 @@ final class CompilerSourceParserTreeObjectLabelProvider extends DelegatingStyled
|
||||
/**
|
||||
* Creates a new instance.
|
||||
*
|
||||
* Called by
|
||||
* {@link AssemblerContentOutlinePage#createControl(org.eclipse.swt.widgets.Composite)}
|
||||
* .
|
||||
*/
|
||||
CompilerSourceParserTreeObjectLabelProvider() {
|
||||
public CompilerSourceParserTreeObjectLabelProvider() {
|
||||
super(new StyledLabelProvider());
|
||||
LanguagePlugin plugin;
|
||||
plugin = LanguagePlugin.getInstance();
|
||||
|
@ -34,7 +34,7 @@ import org.eclipse.jface.text.rules.SingleLineRule;
|
||||
import org.eclipse.jface.text.rules.Token;
|
||||
|
||||
import com.wudsn.ide.lng.compiler.syntax.CompilerSyntax;
|
||||
import com.wudsn.ide.lng.editor.AssemblerEditor;
|
||||
import com.wudsn.ide.lng.editor.LanguageEditor;
|
||||
|
||||
/**
|
||||
* A partition scanner for the comments and strings.
|
||||
@ -63,7 +63,7 @@ public final class CompilerSourcePartitionScanner extends RuleBasedPartitionScan
|
||||
* Creates a new instance.
|
||||
*
|
||||
* Called by
|
||||
* {@link AssemblerEditor#init(org.eclipse.ui.IEditorSite, org.eclipse.ui.IEditorInput)}
|
||||
* {@link LanguageEditor#init(org.eclipse.ui.IEditorSite, org.eclipse.ui.IEditorInput)}
|
||||
* .
|
||||
*
|
||||
* @param compilerSyntax The compiler syntax, not <code>null</code>.
|
||||
|
@ -44,6 +44,7 @@ import com.wudsn.ide.lng.compiler.parser.CompilerSourceFile;
|
||||
import com.wudsn.ide.lng.compiler.parser.CompilerSourceParser;
|
||||
import com.wudsn.ide.lng.compiler.parser.CompilerSourceParserLineCallback;
|
||||
import com.wudsn.ide.lng.compiler.parser.CompilerSourceParserTreeObject;
|
||||
import com.wudsn.ide.lng.compiler.parser.CompilerSourceParserTreeObjectLabelProvider;
|
||||
import com.wudsn.ide.lng.compiler.syntax.CompilerSyntax;
|
||||
import com.wudsn.ide.lng.compiler.syntax.Directive;
|
||||
import com.wudsn.ide.lng.compiler.syntax.Instruction;
|
||||
@ -58,7 +59,7 @@ import com.wudsn.ide.lng.preferences.LanguagePreferences;
|
||||
* @author Peter Dell
|
||||
* @author Daniel Mitte
|
||||
*/
|
||||
final class AssemblerContentAssistProcessor implements IContentAssistProcessor {
|
||||
final class LanguageContentAssistProcessor implements IContentAssistProcessor {
|
||||
|
||||
/**
|
||||
* Empty styler
|
||||
@ -145,7 +146,7 @@ final class AssemblerContentAssistProcessor implements IContentAssistProcessor {
|
||||
}
|
||||
}
|
||||
|
||||
private AssemblerEditor editor;
|
||||
private LanguageEditor editor;
|
||||
|
||||
private Image directiveImage;
|
||||
private Image legalOpcodeImage;
|
||||
@ -158,13 +159,13 @@ final class AssemblerContentAssistProcessor implements IContentAssistProcessor {
|
||||
* Creates a new instance.
|
||||
*
|
||||
* Called by
|
||||
* {@link AssemblerSourceViewerConfiguration#getContentAssistant(org.eclipse.jface.text.source.ISourceViewer)}
|
||||
* {@link LanguageSourceViewerConfiguration#getContentAssistant(org.eclipse.jface.text.source.ISourceViewer)}
|
||||
* .
|
||||
*
|
||||
* @param editor The assembler editor for which this instance is created, not
|
||||
* @param editor The language editor for which this instance is created, not
|
||||
* <code>null</code>.
|
||||
*/
|
||||
AssemblerContentAssistProcessor(AssemblerEditor editor) {
|
||||
LanguageContentAssistProcessor(LanguageEditor editor) {
|
||||
if (editor == null) {
|
||||
throw new IllegalArgumentException("Parameter 'editor' must not be null.");
|
||||
}
|
||||
@ -209,9 +210,9 @@ final class AssemblerContentAssistProcessor implements IContentAssistProcessor {
|
||||
lineOffset = -1;
|
||||
}
|
||||
|
||||
// Parse the current assembler file and try to find the line in the
|
||||
// Parse the current compiler file and try to find the line in the
|
||||
// correct source file.
|
||||
CompilerFiles files = AssemblerEditorFilesLogic.createInstance(editor).createCompilerFiles();
|
||||
CompilerFiles files = LanguageEditorFilesLogic.createInstance(editor).createCompilerFiles();
|
||||
if (files == null) {
|
||||
return null;
|
||||
}
|
||||
@ -314,7 +315,7 @@ final class AssemblerContentAssistProcessor implements IContentAssistProcessor {
|
||||
if (StringUtility.isEmpty(prefix) || !Character.isLetter(prefix.charAt(prefix.length() - 1))) {
|
||||
String defaultCase;
|
||||
defaultCase = languagePreferences.getEditorContentAssistProcessorDefaultCase();
|
||||
lowerCase = AssemblerContentAssistProcessorDefaultCase.LOWER_CASE.equals(defaultCase);
|
||||
lowerCase = LanguageContentAssistProcessorDefaultCase.LOWER_CASE.equals(defaultCase);
|
||||
} else {
|
||||
char lastchar = prefix.charAt(prefix.length() - 1);
|
||||
lowerCase = ((lastchar < 'a') || (lastchar > 'z')) ? false : true;
|
||||
@ -394,7 +395,7 @@ final class AssemblerContentAssistProcessor implements IContentAssistProcessor {
|
||||
proposal = proposal.replace("\n", "\n\t");
|
||||
newCursorOffset = offset + proposalIndex;
|
||||
|
||||
proposalList.add(new AssemblerInstructionCompletionProposal(proposal, offset, region.getLength(),
|
||||
proposalList.add(new LanguageInstructionCompletionProposal(proposal, offset, region.getLength(),
|
||||
newCursorOffset, image, displayString, styledDisplayString, null));
|
||||
}
|
||||
}
|
||||
@ -457,7 +458,7 @@ final class AssemblerContentAssistProcessor implements IContentAssistProcessor {
|
||||
|
||||
int newCursorOffset = regionOffset + proposal.length();
|
||||
|
||||
proposalList.add(new AssemblerInstructionCompletionProposal(proposal, regionOffset, regionLength,
|
||||
proposalList.add(new LanguageInstructionCompletionProposal(proposal, regionOffset, regionLength,
|
||||
newCursorOffset, image, displayString, styledDisplayString, null));
|
||||
}
|
||||
}
|
||||
|
@ -25,12 +25,12 @@ package com.wudsn.ide.lng.editor;
|
||||
* @author Peter Dell
|
||||
*
|
||||
*/
|
||||
public final class AssemblerContentAssistProcessorDefaultCase {
|
||||
public final class LanguageContentAssistProcessorDefaultCase {
|
||||
|
||||
/**
|
||||
* Creation is private.
|
||||
*/
|
||||
private AssemblerContentAssistProcessorDefaultCase() {
|
||||
private LanguageContentAssistProcessorDefaultCase() {
|
||||
|
||||
}
|
||||
|
||||
|
@ -56,31 +56,32 @@ import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
|
||||
import com.wudsn.ide.base.common.Profiler;
|
||||
import com.wudsn.ide.base.hardware.Hardware;
|
||||
import com.wudsn.ide.lng.LanguagePlugin;
|
||||
import com.wudsn.ide.lng.AssemblerProperties;
|
||||
import com.wudsn.ide.lng.LanguageProperties;
|
||||
import com.wudsn.ide.lng.Target;
|
||||
import com.wudsn.ide.lng.AssemblerProperties.InvalidAssemblerPropertyException;
|
||||
import com.wudsn.ide.lng.LanguageProperties.InvalidLanguagePropertyException;
|
||||
import com.wudsn.ide.lng.compiler.Compiler;
|
||||
import com.wudsn.ide.lng.compiler.CompilerDefinition;
|
||||
import com.wudsn.ide.lng.compiler.parser.CompilerSourceFile;
|
||||
import com.wudsn.ide.lng.compiler.parser.CompilerSourceParser;
|
||||
import com.wudsn.ide.lng.compiler.parser.CompilerSourceParserTreeObject;
|
||||
import com.wudsn.ide.lng.compiler.parser.CompilerSourcePartitionScanner;
|
||||
import com.wudsn.ide.lng.outline.LanguageOutlinePage;
|
||||
import com.wudsn.ide.lng.preferences.CompilerPreferences;
|
||||
|
||||
/**
|
||||
* The assembler editor.
|
||||
* The language editor.
|
||||
*
|
||||
* @author Peter Dell
|
||||
* @author Andy Reek
|
||||
*/
|
||||
public abstract class AssemblerEditor extends TextEditor {
|
||||
public abstract class LanguageEditor extends TextEditor {
|
||||
|
||||
private LanguagePlugin plugin;
|
||||
private AssemblerEditorFilesLogic filesLogic;
|
||||
private LanguageEditorFilesLogic filesLogic;
|
||||
|
||||
private Compiler compiler;
|
||||
|
||||
private AssemblerContentOutlinePage contentOutlinePage;
|
||||
private LanguageOutlinePage contentOutlinePage;
|
||||
private ProjectionAnnotationModel annotationModel;
|
||||
|
||||
private Hardware hardware;
|
||||
@ -90,8 +91,8 @@ public abstract class AssemblerEditor extends TextEditor {
|
||||
* super constructor inverts the flow of control, so {@link #initializeEditor}
|
||||
* is called before the code in this constructor is executed.
|
||||
*/
|
||||
protected AssemblerEditor() {
|
||||
filesLogic = AssemblerEditorFilesLogic.createInstance(this);
|
||||
protected LanguageEditor() {
|
||||
filesLogic = LanguageEditorFilesLogic.createInstance(this);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -99,7 +100,7 @@ public abstract class AssemblerEditor extends TextEditor {
|
||||
*
|
||||
* @return The files logic, not <code>null</code>.
|
||||
*/
|
||||
public AssemblerEditorFilesLogic getFilesLogic() {
|
||||
public LanguageEditorFilesLogic getFilesLogic() {
|
||||
return filesLogic;
|
||||
}
|
||||
|
||||
@ -131,7 +132,7 @@ public abstract class AssemblerEditor extends TextEditor {
|
||||
plugin = LanguagePlugin.getInstance();
|
||||
compiler = plugin.getCompilerRegistry().getCompiler(getCompilerId());
|
||||
|
||||
setSourceViewerConfiguration(new AssemblerSourceViewerConfiguration(this, getPreferenceStore()));
|
||||
setSourceViewerConfiguration(new LanguageSourceViewerConfiguration(this, getPreferenceStore()));
|
||||
|
||||
}
|
||||
|
||||
@ -218,13 +219,13 @@ public abstract class AssemblerEditor extends TextEditor {
|
||||
compiler.getDefinition().getSyntax());
|
||||
partitionScanner.createDocumentPartitioner(document);
|
||||
|
||||
AssemblerProperties properties = CompilerSourceParser.getDocumentProperties(document);
|
||||
LanguageProperties properties = CompilerSourceParser.getDocumentProperties(document);
|
||||
|
||||
IFile iFile = getCurrentIFile();
|
||||
if (iFile != null) {
|
||||
try {
|
||||
hardware = filesLogic.getHardware(iFile, properties);
|
||||
} catch (InvalidAssemblerPropertyException ex) {
|
||||
} catch (InvalidLanguagePropertyException ex) {
|
||||
// Do not use MarkerUtility.gotoMarker to make sure this
|
||||
// editor instance is used.
|
||||
IDE.gotoMarker(this, ex.marker);
|
||||
@ -240,7 +241,7 @@ public abstract class AssemblerEditor extends TextEditor {
|
||||
super.createActions();
|
||||
|
||||
ResourceBundle bundle = ResourceBundle.getBundle("com.wudsn.ide.lng.Actions", Locale.getDefault(),
|
||||
AssemblerEditor.class.getClassLoader());
|
||||
LanguageEditor.class.getClassLoader());
|
||||
|
||||
String actionDefintionId;
|
||||
String actionId;
|
||||
@ -252,9 +253,9 @@ public abstract class AssemblerEditor extends TextEditor {
|
||||
markAsStateDependentAction(actionId, true);
|
||||
|
||||
SourceViewer sourceViewer = (SourceViewer) getSourceViewer();
|
||||
actionDefintionId = "com.wudsn.ide.lng.editor.AssemblerEditorToggleCommentCommand";
|
||||
actionDefintionId = "com.wudsn.ide.lng.editor.LanguageEditorToggleCommentCommand";
|
||||
actionId = actionDefintionId;
|
||||
action = new AssemblerEditorToggleCommentAction(bundle, actionId + ".", this, sourceViewer);
|
||||
action = new LanguageEditorToggleCommentAction(bundle, actionId + ".", this, sourceViewer);
|
||||
action.setActionDefinitionId(actionId);
|
||||
setAction(actionId, action);
|
||||
markAsStateDependentAction(actionId, true);
|
||||
@ -281,7 +282,7 @@ public abstract class AssemblerEditor extends TextEditor {
|
||||
* content.
|
||||
*
|
||||
* Called by {@link #updateIdentifiers(CompilerSourceFile)} and
|
||||
* {@link AssemblerSourceViewerConfiguration#preferencesChanged(com.wudsn.ide.lng.preferences.LanguagePreferences, java.util.Set)}
|
||||
* {@link LanguageSourceViewerConfiguration#preferencesChanged(com.wudsn.ide.lng.preferences.LanguagePreferences, java.util.Set)}
|
||||
* .
|
||||
*/
|
||||
final void refreshSourceViewer() {
|
||||
@ -293,8 +294,8 @@ public abstract class AssemblerEditor extends TextEditor {
|
||||
|
||||
@Override
|
||||
public final void dispose() {
|
||||
AssemblerSourceViewerConfiguration asvc;
|
||||
asvc = (AssemblerSourceViewerConfiguration) getSourceViewerConfiguration();
|
||||
LanguageSourceViewerConfiguration asvc;
|
||||
asvc = (LanguageSourceViewerConfiguration) getSourceViewerConfiguration();
|
||||
asvc.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
@ -304,7 +305,7 @@ public abstract class AssemblerEditor extends TextEditor {
|
||||
public <T> T getAdapter(Class<T> adapter) {
|
||||
if (IContentOutlinePage.class.equals(adapter)) {
|
||||
if (contentOutlinePage == null) {
|
||||
contentOutlinePage = new AssemblerContentOutlinePage(this);
|
||||
contentOutlinePage = new LanguageOutlinePage(this);
|
||||
// This causes double parsing upon starting with a new file
|
||||
// currently.
|
||||
updateContentOutlinePage();
|
||||
@ -316,7 +317,7 @@ public abstract class AssemblerEditor extends TextEditor {
|
||||
|
||||
/**
|
||||
* Updates the content in view of the outline page. Called by
|
||||
* {@link AssemblerReconcilingStategy#parse}.
|
||||
* {@link LanguageReconcilingStategy#parse}.
|
||||
*/
|
||||
final void updateContentOutlinePage() {
|
||||
if (contentOutlinePage != null) {
|
||||
@ -390,14 +391,18 @@ public abstract class AssemblerEditor extends TextEditor {
|
||||
* Update the identifiers to be highlighted
|
||||
*
|
||||
* @param compilerSourceFile The compiler source file or <code>null</code>.
|
||||
*
|
||||
* Note: Only public for {@link LanguageOutlinePage}
|
||||
* TODO: Make this an event handler interface/MVP
|
||||
* registration
|
||||
*/
|
||||
final void updateIdentifiers(CompilerSourceFile compilerSourceFile) {
|
||||
public final void updateIdentifiers(CompilerSourceFile compilerSourceFile) {
|
||||
Profiler profiler = new Profiler(this.getClass());
|
||||
|
||||
AssemblerSourceViewerConfiguration asvc;
|
||||
AssemblerSourceScanner ais;
|
||||
asvc = (AssemblerSourceViewerConfiguration) getSourceViewerConfiguration();
|
||||
ais = asvc.getAssemblerInstructionScanner();
|
||||
LanguageSourceViewerConfiguration asvc;
|
||||
LanguageSourceScanner ais;
|
||||
asvc = (LanguageSourceViewerConfiguration) getSourceViewerConfiguration();
|
||||
ais = asvc.getInstructionScanner();
|
||||
|
||||
List<CompilerSourceParserTreeObject> newIdentifiers;
|
||||
if (compilerSourceFile == null) {
|
||||
@ -414,12 +419,14 @@ public abstract class AssemblerEditor extends TextEditor {
|
||||
|
||||
/**
|
||||
* Update the folding structure with a given list of foldingPositions. Used by
|
||||
* the editor updater of {@link AssemblerReconcilingStategy}.
|
||||
* the editor updater of {@link LanguageReconcilingStategy}.
|
||||
*
|
||||
* @param foldingPositions The list of foldingPositions, may be empty, not
|
||||
* <code>null</code>.
|
||||
* <code>null</code>. Note: Only public for
|
||||
* {@link LanguageOutlinePage} TODO: Make this an event
|
||||
* handler interface/MVP registration
|
||||
*/
|
||||
final void updateFoldingStructure(List<Position> foldingPositions) {
|
||||
public final void updateFoldingStructure(List<Position> foldingPositions) {
|
||||
if (foldingPositions == null) {
|
||||
throw new IllegalArgumentException("Parameter 'foldingPositions' must not be null.");
|
||||
}
|
||||
|
@ -33,9 +33,9 @@ import org.eclipse.ui.menus.WorkbenchWindowControlContribution;
|
||||
// TODO: This should become a replacement for the action/actionSet based dynamic menu
|
||||
// See also https://wiki.eclipse.org/Menu_Contributions
|
||||
// Asked at https://www.eclipse.org/forums/index.php/m/1833428/#msg_1833428
|
||||
public final class AssemblerEditorCompileAndRunCommandMenu extends WorkbenchWindowControlContribution {
|
||||
public final class LanguageEditorCompileAndRunCommandMenu extends WorkbenchWindowControlContribution {
|
||||
|
||||
public AssemblerEditorCompileAndRunCommandMenu() {
|
||||
public LanguageEditorCompileAndRunCommandMenu() {
|
||||
if (System.getProperty("user.name").equals("JAC")) {
|
||||
new Exception("JAC! Test for Startup!").printStackTrace();
|
||||
}
|
||||
|
@ -60,6 +60,7 @@ import com.wudsn.ide.base.hardware.Hardware;
|
||||
import com.wudsn.ide.lng.LanguagePlugin;
|
||||
import com.wudsn.ide.lng.HardwareUtility;
|
||||
import com.wudsn.ide.lng.Texts;
|
||||
import com.wudsn.ide.lng.breakpoint.LanguageBreakpoint;
|
||||
import com.wudsn.ide.lng.compiler.Compiler;
|
||||
import com.wudsn.ide.lng.compiler.CompilerConsole;
|
||||
import com.wudsn.ide.lng.compiler.CompilerDefinition;
|
||||
@ -73,20 +74,21 @@ import com.wudsn.ide.lng.preferences.CompilerRunPreferences;
|
||||
import com.wudsn.ide.lng.runner.Runner;
|
||||
import com.wudsn.ide.lng.runner.RunnerDefinition;
|
||||
import com.wudsn.ide.lng.runner.RunnerId;
|
||||
import com.wudsn.ide.lng.symbol.CompilerSymbolsView;
|
||||
|
||||
/**
|
||||
* Implementation of the "Compile" command.
|
||||
*
|
||||
* @author Peter Dell
|
||||
*/
|
||||
final class AssemblerEditorCompileCommand {
|
||||
final class LanguageEditorCompileCommand {
|
||||
|
||||
/**
|
||||
* Commands.
|
||||
*/
|
||||
public static final String COMPILE = "com.wudsn.ide.lng.editor.AssemblerEditorCompileCommand";
|
||||
public static final String COMPILE_AND_RUN = "com.wudsn.ide.lng.editor.AssemblerEditorCompileAndRunCommand";
|
||||
public static final String COMPILE_AND_RUN_WITH = "com.wudsn.ide.lng.editor.AssemblerEditorCompileAndRunWithCommand";
|
||||
public static final String COMPILE = "com.wudsn.ide.lng.editor.LanguageEditorCompileCommand";
|
||||
public static final String COMPILE_AND_RUN = "com.wudsn.ide.lng.editor.LanguageEditorCompileAndRunCommand";
|
||||
public static final String COMPILE_AND_RUN_WITH = "com.wudsn.ide.lng.editor.LanguageEditorCompileAndRunWithCommand";
|
||||
|
||||
/**
|
||||
* The owning plugin.
|
||||
@ -96,7 +98,7 @@ final class AssemblerEditorCompileCommand {
|
||||
/**
|
||||
* Creation is private.
|
||||
*/
|
||||
private AssemblerEditorCompileCommand() {
|
||||
private LanguageEditorCompileCommand() {
|
||||
plugin = LanguagePlugin.getInstance();
|
||||
}
|
||||
|
||||
@ -121,20 +123,20 @@ final class AssemblerEditorCompileCommand {
|
||||
/**
|
||||
* Executes a compile command.
|
||||
*
|
||||
* @param assemblerEditor The assembler editor, not <code>null</code>.
|
||||
* @param files The compiler files, not <code>null</code>.
|
||||
* @param commandId The command id, see {@link #COMPILE},
|
||||
* {@link #COMPILE_AND_RUN} ,
|
||||
* {@link #COMPILE_AND_RUN_WITH}.
|
||||
* @param runnerId The runner id, may be empty or <code>null</code>.
|
||||
* @param languageEditor The language editor, not <code>null</code>.
|
||||
* @param files The compiler files, not <code>null</code>.
|
||||
* @param commandId The command id, see {@link #COMPILE},
|
||||
* {@link #COMPILE_AND_RUN} ,
|
||||
* {@link #COMPILE_AND_RUN_WITH}.
|
||||
* @param runnerId The runner id, may be empty or <code>null</code>.
|
||||
*
|
||||
* @throws RuntimeException
|
||||
*/
|
||||
public static void execute(AssemblerEditor assemblerEditor, CompilerFiles files, String commandId, String runnerId)
|
||||
public static void execute(LanguageEditor languageEditor, CompilerFiles files, String commandId, String runnerId)
|
||||
throws RuntimeException {
|
||||
|
||||
if (assemblerEditor == null) {
|
||||
throw new IllegalArgumentException("Parameter 'assemblerEditor' must not be null.");
|
||||
if (languageEditor == null) {
|
||||
throw new IllegalArgumentException("Parameter 'languageEditor' must not be null.");
|
||||
}
|
||||
if (files == null) {
|
||||
throw new IllegalArgumentException("Parameter 'files' must not be null.");
|
||||
@ -148,15 +150,15 @@ final class AssemblerEditorCompileCommand {
|
||||
return;
|
||||
}
|
||||
|
||||
assemblerEditor.doSave(null);
|
||||
languageEditor.doSave(null);
|
||||
|
||||
IWorkbenchPage page = assemblerEditor.getSite().getPage();
|
||||
IWorkbenchPage page = languageEditor.getSite().getPage();
|
||||
|
||||
AssemblerEditorCompileCommand instance;
|
||||
instance = new AssemblerEditorCompileCommand();
|
||||
LanguageEditorCompileCommand instance;
|
||||
instance = new LanguageEditorCompileCommand();
|
||||
|
||||
try {
|
||||
instance.executeInternal(assemblerEditor, files, commandId, runnerId);
|
||||
instance.executeInternal(languageEditor, files, commandId, runnerId);
|
||||
} catch (RuntimeException ex) {
|
||||
throw ex;
|
||||
}
|
||||
@ -181,11 +183,11 @@ final class AssemblerEditorCompileCommand {
|
||||
}
|
||||
}
|
||||
|
||||
private boolean executeInternal(AssemblerEditor assemblerEditor, CompilerFiles files, String commandId,
|
||||
private boolean executeInternal(LanguageEditor languageEditor, CompilerFiles files, String commandId,
|
||||
String runnerId) {
|
||||
|
||||
if (assemblerEditor == null) {
|
||||
throw new IllegalArgumentException("Parameter 'assemblerEditor' must not be null.");
|
||||
if (languageEditor == null) {
|
||||
throw new IllegalArgumentException("Parameter 'languageEditor' must not be null.");
|
||||
}
|
||||
if (files == null) {
|
||||
throw new IllegalArgumentException("Parameter 'files' must not be null.");
|
||||
@ -194,28 +196,28 @@ final class AssemblerEditorCompileCommand {
|
||||
throw new IllegalArgumentException("Parameter 'commandId' must not be null.");
|
||||
}
|
||||
|
||||
AssemblerEditorFilesLogic assemblerEditorFilesLogic = AssemblerEditorFilesLogic.createInstance(assemblerEditor);
|
||||
LanguageEditorFilesLogic languageEditorFilesLogic = LanguageEditorFilesLogic.createInstance(languageEditor);
|
||||
|
||||
// Remove existing problem markers from all files.
|
||||
if (!assemblerEditorFilesLogic.removeMarkers(files)) {
|
||||
if (!languageEditorFilesLogic.removeMarkers(files)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Determine and check hardware.
|
||||
Hardware hardware = assemblerEditorFilesLogic.getHardware(files);
|
||||
Hardware hardware = languageEditorFilesLogic.getHardware(files);
|
||||
if (hardware == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check files based on the compiler definition.
|
||||
if (!assemblerEditorFilesLogic.validateOutputFile(files)) {
|
||||
if (!languageEditorFilesLogic.validateOutputFile(files)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Create wrapper for run properties.
|
||||
CompilerDefinition compilerDefinition = assemblerEditor.getCompilerDefinition();
|
||||
CompilerDefinition compilerDefinition = languageEditor.getCompilerDefinition();
|
||||
CompilerRunPreferences compilerRunPreferences = new CompilerRunPreferences(
|
||||
assemblerEditor.getCompilerPreferences(), files.mainSourceFile.assemblerProperties);
|
||||
languageEditor.getCompilerPreferences(), files.mainSourceFile.languageProperties);
|
||||
|
||||
// Check if output file is modifiable in case it already exists.
|
||||
long outputFileLastModified = -1;
|
||||
@ -348,7 +350,7 @@ final class AssemblerEditorCompileCommand {
|
||||
compilerConsole.println(compilerProcess.getOutputLog());
|
||||
|
||||
// Compiling is over, check the result.
|
||||
Compiler compiler = assemblerEditor.getCompiler();
|
||||
Compiler compiler = languageEditor.getCompiler();
|
||||
boolean compilerSuccess = compiler.isSuccessExitValue(compilerProcess.getExitValue());
|
||||
if (compilerSuccess) {
|
||||
if (files.outputFile.exists()) {
|
||||
@ -370,7 +372,7 @@ final class AssemblerEditorCompileCommand {
|
||||
|
||||
if (commandId.equals(COMPILE_AND_RUN) || commandId.equals(COMPILE_AND_RUN_WITH)) {
|
||||
|
||||
openOutputFile(assemblerEditor, files, compilerRunPreferences, compilerConsole, runnerId);
|
||||
openOutputFile(languageEditor, files, compilerRunPreferences, compilerConsole, runnerId);
|
||||
|
||||
}
|
||||
} else {
|
||||
@ -394,7 +396,7 @@ final class AssemblerEditorCompileCommand {
|
||||
|
||||
// Output an additional message if the reason for the compiler's exit
|
||||
// value is not already contained in the error messages.
|
||||
boolean errorFound = parseLogs(assemblerEditor, files, compilerProcess);
|
||||
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.
|
||||
@ -408,15 +410,15 @@ final class AssemblerEditorCompileCommand {
|
||||
/**
|
||||
* Creates or deletes the breakpoints file based on the runner.
|
||||
*
|
||||
* @param assemblerEditor The assembler editor, not <code>null</code>.
|
||||
* @param files The assembler files, not <code>null</code>.
|
||||
* @param runner The runner, not <code>null</code>.
|
||||
* @param languageEditor The language editor, not <code>null</code>.
|
||||
* @param files The compiler files, not <code>null</code>.
|
||||
* @param runner The runner, not <code>null</code>.
|
||||
*
|
||||
* @since 1.6.1
|
||||
*/
|
||||
private void createBreakpointsFile(AssemblerEditor assemblerEditor, CompilerFiles files, Runner runner) {
|
||||
if (assemblerEditor == null) {
|
||||
throw new IllegalArgumentException("Parameter 'assemblerEditor' must not be null.");
|
||||
private void createBreakpointsFile(LanguageEditor languageEditor, CompilerFiles files, Runner runner) {
|
||||
if (languageEditor == null) {
|
||||
throw new IllegalArgumentException("Parameter 'languageEditor' must not be null.");
|
||||
}
|
||||
if (files == null) {
|
||||
throw new IllegalArgumentException("Parameter 'files' must not be null.");
|
||||
@ -428,7 +430,7 @@ final class AssemblerEditorCompileCommand {
|
||||
IBreakpointManager breakpointManager = DebugPlugin.getDefault().getBreakpointManager();
|
||||
IBreakpoint breakpoints[];
|
||||
if (breakpointManager.isEnabled()) {
|
||||
breakpoints = breakpointManager.getBreakpoints(AssemblerBreakpoint.DEBUG_MODEL_ID);
|
||||
breakpoints = breakpointManager.getBreakpoints(LanguageBreakpoint.DEBUG_MODEL_ID);
|
||||
} else {
|
||||
breakpoints = new IBreakpoint[0];
|
||||
}
|
||||
@ -444,10 +446,10 @@ final class AssemblerEditorCompileCommand {
|
||||
|
||||
// If breakpoints are present, a breakpoints file is generated.
|
||||
if (breakpoints.length >= 0) {
|
||||
AssemblerBreakpoint[] assemblerBreakpoints = new AssemblerBreakpoint[breakpoints.length];
|
||||
System.arraycopy(breakpoints, 0, assemblerBreakpoints, 0, breakpoints.length);
|
||||
LanguageBreakpoint[] languageBreakpoints = new LanguageBreakpoint[breakpoints.length];
|
||||
System.arraycopy(breakpoints, 0, languageBreakpoints, 0, breakpoints.length);
|
||||
StringBuilder breakpointBuilder = new StringBuilder();
|
||||
int activeBreakpointCount = runner.createBreakpointsFileContent(assemblerBreakpoints, breakpointBuilder);
|
||||
int activeBreakpointCount = runner.createBreakpointsFileContent(languageBreakpoints, breakpointBuilder);
|
||||
try {
|
||||
FileUtility.writeString(breakpointsFile, breakpointBuilder.toString());
|
||||
} catch (CoreException ex) {
|
||||
@ -473,11 +475,11 @@ final class AssemblerEditorCompileCommand {
|
||||
}
|
||||
}
|
||||
|
||||
private void openOutputFile(AssemblerEditor assemblerEditor, CompilerFiles files,
|
||||
private void openOutputFile(LanguageEditor languageEditor, CompilerFiles files,
|
||||
CompilerRunPreferences compilerRunPreferences, CompilerConsole compilerConsole, String runnerId) {
|
||||
|
||||
if (assemblerEditor == null) {
|
||||
throw new IllegalArgumentException("Parameter 'assemblerEditor' must not be null.");
|
||||
if (languageEditor == null) {
|
||||
throw new IllegalArgumentException("Parameter 'languageEditor' must not be null.");
|
||||
}
|
||||
if (files == null) {
|
||||
throw new IllegalArgumentException("Parameter 'files' must not be null.");
|
||||
@ -509,7 +511,7 @@ final class AssemblerEditorCompileCommand {
|
||||
return;
|
||||
}
|
||||
|
||||
createBreakpointsFile(assemblerEditor, files, runner);
|
||||
createBreakpointsFile(languageEditor, files, runner);
|
||||
|
||||
String runnerCommandLine;
|
||||
runnerCommandLine = compilerRunPreferences.getRunnerCommandLine(runnerId);
|
||||
@ -631,10 +633,10 @@ final class AssemblerEditorCompileCommand {
|
||||
return parameter;
|
||||
}
|
||||
|
||||
private boolean parseLogs(AssemblerEditor assemblerEditor, CompilerFiles files, ProcessWithLogs compileProcess) {
|
||||
private boolean parseLogs(LanguageEditor languageEditor, CompilerFiles files, ProcessWithLogs compileProcess) {
|
||||
|
||||
if (assemblerEditor == null) {
|
||||
throw new IllegalArgumentException("Parameter 'assemblerEditor' must not be null.");
|
||||
if (languageEditor == null) {
|
||||
throw new IllegalArgumentException("Parameter 'languageEditor' must not be null.");
|
||||
}
|
||||
if (files == null) {
|
||||
throw new IllegalArgumentException("Parameter 'files' must not be null.");
|
||||
@ -642,7 +644,7 @@ final class AssemblerEditorCompileCommand {
|
||||
if (compileProcess == null) {
|
||||
throw new IllegalArgumentException("Parameter 'compileProcess' must not be null.");
|
||||
}
|
||||
Compiler compiler = assemblerEditor.getCompiler();
|
||||
Compiler compiler = languageEditor.getCompiler();
|
||||
CompilerProcessLogParser logParser = compiler.createLogParser();
|
||||
|
||||
// Line parser with main source file and logs.
|
||||
@ -674,9 +676,9 @@ final class AssemblerEditorCompileCommand {
|
||||
markerProxy = markerProxy.getDetailMarker();
|
||||
}
|
||||
}
|
||||
boolean errorOccurred = positionToFirstErrorOrWarning(assemblerEditor, markers);
|
||||
boolean errorOccurred = positionToFirstErrorOrWarning(languageEditor, markers);
|
||||
|
||||
parseCompilerSymbols(assemblerEditor, files, logParser);
|
||||
parseCompilerSymbols(languageEditor, files, logParser);
|
||||
|
||||
return errorOccurred;
|
||||
}
|
||||
@ -685,15 +687,16 @@ final class AssemblerEditorCompileCommand {
|
||||
* Positions to the first error or warning in any file for which markers have
|
||||
* been created.
|
||||
*
|
||||
* @param assemblerEditor The assembler editor, not <code>null</code>. Used as
|
||||
* basis for opening another editor when required.
|
||||
* @param markers The modifiable list of marker, may be empty, not
|
||||
* <code>null</code>.
|
||||
* @param languageEditor The language editor, not <code>null</code>. Used as
|
||||
* basis for opening another editor when required.
|
||||
* @param markers The modifiable list of marker, may be empty, not
|
||||
* <code>null</code>.
|
||||
* @return <code>true</code> if an error was found.
|
||||
*/
|
||||
private boolean positionToFirstErrorOrWarning(AssemblerEditor assemblerEditor, List<IMarker> markers) {
|
||||
if (assemblerEditor == null) {
|
||||
throw new IllegalArgumentException("Parameter 'assemblerEditor' must not be null.");
|
||||
private boolean positionToFirstErrorOrWarning(LanguageEditor languageEditor, List<IMarker> markers) {
|
||||
|
||||
if (languageEditor == null) {
|
||||
throw new IllegalArgumentException("Parameter 'languageEditor' must not be null.");
|
||||
}
|
||||
if (markers == null) {
|
||||
throw new IllegalArgumentException("Parameter 'markers' must not be null.");
|
||||
@ -714,7 +717,7 @@ final class AssemblerEditorCompileCommand {
|
||||
});
|
||||
|
||||
String positioningMode = plugin.getPreferences().getEditorCompileCommandPositioningMode();
|
||||
boolean ignoreWarnings = positioningMode.equals(AssemblerEditorCompileCommandPositioningMode.FIRST_ERROR);
|
||||
boolean ignoreWarnings = positioningMode.equals(LanguageEditorCompileCommandPositioningMode.FIRST_ERROR);
|
||||
IMarker firstWarningMarker = null;
|
||||
IMarker firstErrorMarker = null;
|
||||
for (IMarker marker : markers) {
|
||||
@ -743,16 +746,16 @@ final class AssemblerEditorCompileCommand {
|
||||
}
|
||||
|
||||
if (firstMarker != null) {
|
||||
MarkerUtility.gotoMarker(assemblerEditor, firstMarker);
|
||||
MarkerUtility.gotoMarker(languageEditor, firstMarker);
|
||||
}
|
||||
return firstErrorMarker != null;
|
||||
}
|
||||
|
||||
private void parseCompilerSymbols(AssemblerEditor assemblerEditor, CompilerFiles files,
|
||||
private void parseCompilerSymbols(LanguageEditor languageEditor, CompilerFiles files,
|
||||
CompilerProcessLogParser logParser) {
|
||||
|
||||
if (assemblerEditor == null)
|
||||
throw new IllegalArgumentException("Parameter 'assemblerEditor' must not be null.");
|
||||
if (languageEditor == null)
|
||||
throw new IllegalArgumentException("Parameter 'languageEditor' must not be null.");
|
||||
if (files == null)
|
||||
throw new IllegalArgumentException("Parameter 'files' must not be null.");
|
||||
if (logParser == null)
|
||||
@ -781,7 +784,7 @@ final class AssemblerEditorCompileCommand {
|
||||
}
|
||||
|
||||
// Display symbols.
|
||||
IViewReference[] references = assemblerEditor.getSite().getPage().getViewReferences();
|
||||
IViewReference[] references = languageEditor.getSite().getPage().getViewReferences();
|
||||
for (IViewReference reference : references) {
|
||||
if (reference.getId().equals(CompilerSymbolsView.ID)) {
|
||||
CompilerSymbolsView compilerSymbolsView = (CompilerSymbolsView) reference.getView(true);
|
||||
|
@ -52,7 +52,7 @@ import com.wudsn.ide.lng.runner.RunnerRegistry;
|
||||
* @author Peter Dell
|
||||
*
|
||||
*/
|
||||
public final class AssemblerEditorCompileCommandDelegate
|
||||
public final class LanguageEditorCompileCommandDelegate
|
||||
implements IActionDelegate2, IWorkbenchWindowPulldownDelegate2 {
|
||||
|
||||
private IWorkbenchWindow window;
|
||||
@ -90,7 +90,7 @@ public final class AssemblerEditorCompileCommandDelegate
|
||||
/**
|
||||
* Creation is public.
|
||||
*/
|
||||
public AssemblerEditorCompileCommandDelegate() {
|
||||
public LanguageEditorCompileCommandDelegate() {
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -101,16 +101,16 @@ public final class AssemblerEditorCompileCommandDelegate
|
||||
@Override
|
||||
public Menu getMenu(Control parent) {
|
||||
|
||||
AssemblerEditor assemblerEditor = getAssemblerEditor();
|
||||
if (assemblerEditor == null) {
|
||||
LanguageEditor languageEditor = getLanguageEditor();
|
||||
if (languageEditor == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
LanguagePlugin languagePlugin = assemblerEditor.getPlugin();
|
||||
LanguagePlugin languagePlugin = languageEditor.getPlugin();
|
||||
RunnerRegistry runnerRegistry = languagePlugin.getRunnerRegistry();
|
||||
Hardware hardware = assemblerEditor.getHardware();
|
||||
Hardware hardware = languageEditor.getHardware();
|
||||
List<RunnerDefinition> runnerDefinitions = runnerRegistry.getDefinitions(hardware);
|
||||
CompilerPreferences compilerPreferences = assemblerEditor.getCompilerPreferences();
|
||||
CompilerPreferences compilerPreferences = languageEditor.getCompilerPreferences();
|
||||
|
||||
Menu menu = new Menu(parent);
|
||||
setMenu(menu);
|
||||
@ -129,7 +129,7 @@ public final class AssemblerEditorCompileCommandDelegate
|
||||
}
|
||||
|
||||
Action action = new CompileAndRunAction(runnerId);
|
||||
action.setActionDefinitionId(AssemblerEditorCompileCommand.COMPILE_AND_RUN_WITH);
|
||||
action.setActionDefinitionId(LanguageEditorCompileCommand.COMPILE_AND_RUN_WITH);
|
||||
action.setImageDescriptor(imageDescriptor);
|
||||
if (runnerId.equals(compilerPreferences.getRunnerId())) {
|
||||
runnerName = runnerName + " " + Texts.COMPILER_TOOLBAR_RUN_WITH_DEFAULT_LABEL;
|
||||
@ -154,13 +154,13 @@ public final class AssemblerEditorCompileCommandDelegate
|
||||
|
||||
@Override
|
||||
public void init(IAction action) {
|
||||
AssemblerEditor assemblerEditor = getAssemblerEditor();
|
||||
boolean enabled = assemblerEditor != null && assemblerEditor.getCurrentIFile() != null;
|
||||
LanguageEditor languageEditor = getLanguageEditor();
|
||||
boolean enabled = languageEditor != null && languageEditor.getCurrentIFile() != null;
|
||||
action.setEnabled(enabled);
|
||||
|
||||
Hardware hardware;
|
||||
if (assemblerEditor != null) {
|
||||
hardware = assemblerEditor.getHardware();
|
||||
if (languageEditor != null) {
|
||||
hardware = languageEditor.getHardware();
|
||||
|
||||
} else {
|
||||
hardware = Hardware.GENERIC;
|
||||
@ -204,11 +204,11 @@ public final class AssemblerEditorCompileCommandDelegate
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the currently active assembler editor.
|
||||
* Gets the currently active language editor.
|
||||
*
|
||||
* @return The currently active assembler editor or <code>null</code>.
|
||||
* @return The currently active language editor or <code>null</code>.
|
||||
*/
|
||||
private AssemblerEditor getAssemblerEditor() {
|
||||
private LanguageEditor getLanguageEditor() {
|
||||
if (window == null) {
|
||||
return null;
|
||||
}
|
||||
@ -218,10 +218,10 @@ public final class AssemblerEditorCompileCommandDelegate
|
||||
return null;
|
||||
}
|
||||
IEditorPart editorPart = workbenchPage.getActiveEditor();
|
||||
if (!(editorPart instanceof AssemblerEditor)) {
|
||||
if (!(editorPart instanceof LanguageEditor)) {
|
||||
return null;
|
||||
}
|
||||
return (AssemblerEditor) editorPart;
|
||||
return (LanguageEditor) editorPart;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -230,13 +230,13 @@ public final class AssemblerEditorCompileCommandDelegate
|
||||
* @param runnerId The runner id or <code>null</code> to use the default.
|
||||
*/
|
||||
final void compileAndRun(String runnerId) {
|
||||
AssemblerEditor assemblerEditor = getAssemblerEditor();
|
||||
if (assemblerEditor == null) {
|
||||
throw new IllegalStateException("Action is active but no assembler editor is active.");
|
||||
LanguageEditor languageEditor = getLanguageEditor();
|
||||
if (languageEditor == null) {
|
||||
throw new IllegalStateException("Action is active but no language editor is active.");
|
||||
}
|
||||
AssemblerEditorCompileCommand.execute(assemblerEditor,
|
||||
AssemblerEditorFilesLogic.createInstance(assemblerEditor).createCompilerFiles(),
|
||||
AssemblerEditorCompileCommand.COMPILE_AND_RUN, runnerId);
|
||||
LanguageEditorCompileCommand.execute(languageEditor,
|
||||
LanguageEditorFilesLogic.createInstance(languageEditor).createCompilerFiles(),
|
||||
LanguageEditorCompileCommand.COMPILE_AND_RUN, runnerId);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -29,30 +29,30 @@ import com.wudsn.ide.lng.compiler.CompilerFiles;
|
||||
*
|
||||
* @author Peter Dell
|
||||
*/
|
||||
public final class AssemblerEditorCompileCommandHandler extends AssemblerEditorFilesCommandHandler {
|
||||
public final class LanguageEditorCompileCommandHandler extends LanguageEditorFilesCommandHandler {
|
||||
|
||||
/**
|
||||
* Creates a new instance. Called by the extension point
|
||||
* "org.eclipse.ui.handlers".
|
||||
*/
|
||||
public AssemblerEditorCompileCommandHandler() {
|
||||
public LanguageEditorCompileCommandHandler() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void execute(ExecutionEvent event, AssemblerEditor assemblerEditor, CompilerFiles files)
|
||||
protected void execute(ExecutionEvent event, LanguageEditor languageEditor, CompilerFiles files)
|
||||
throws ExecutionException {
|
||||
if (event == null) {
|
||||
throw new IllegalArgumentException("Parameter 'event' must not be null.");
|
||||
}
|
||||
if (assemblerEditor == null) {
|
||||
throw new IllegalArgumentException("Parameter 'assemblerEditor' must not be null.");
|
||||
if (languageEditor == null) {
|
||||
throw new IllegalArgumentException("Parameter 'languageEditor' must not be null.");
|
||||
}
|
||||
if (files == null) {
|
||||
throw new IllegalArgumentException("Parameter 'files' must not be null.");
|
||||
}
|
||||
try {
|
||||
AssemblerEditorCompileCommand.execute(assemblerEditor, files, event.getCommand().getId(), null);
|
||||
LanguageEditorCompileCommand.execute(languageEditor, files, event.getCommand().getId(), null);
|
||||
} catch (RuntimeException ex) {
|
||||
throw new ExecutionException("Cannot execute event " + event, ex);
|
||||
}
|
||||
|
@ -25,12 +25,12 @@ package com.wudsn.ide.lng.editor;
|
||||
* @author Peter Dell
|
||||
*
|
||||
*/
|
||||
public final class AssemblerEditorCompileCommandPositioningMode {
|
||||
public final class LanguageEditorCompileCommandPositioningMode {
|
||||
|
||||
/**
|
||||
* Creation is private.
|
||||
*/
|
||||
private AssemblerEditorCompileCommandPositioningMode() {
|
||||
private LanguageEditorCompileCommandPositioningMode() {
|
||||
|
||||
}
|
||||
|
||||
|
@ -40,7 +40,7 @@ import com.wudsn.ide.lng.preferences.LanguagePreferences;
|
||||
*
|
||||
* @author Peter Dell
|
||||
*/
|
||||
public final class AssemblerEditorCompilerHelpCommandHandler extends AbstractHandler {
|
||||
public final class LanguageEditorCompilerHelpCommandHandler extends AbstractHandler {
|
||||
|
||||
@Override
|
||||
public Object execute(ExecutionEvent event) throws ExecutionException {
|
||||
@ -49,14 +49,14 @@ public final class AssemblerEditorCompilerHelpCommandHandler extends AbstractHan
|
||||
|
||||
IEditorPart editor;
|
||||
editor = HandlerUtil.getActiveEditorChecked(event);
|
||||
if (!(editor instanceof AssemblerEditor)) {
|
||||
if (!(editor instanceof LanguageEditor)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
AssemblerEditor assemblerEditor;
|
||||
assemblerEditor = (AssemblerEditor) editor;
|
||||
LanguageEditor languageEditor;
|
||||
languageEditor = (LanguageEditor) editor;
|
||||
|
||||
CompilerDefinition compilerDefinition = assemblerEditor.getCompilerDefinition();
|
||||
CompilerDefinition compilerDefinition = languageEditor.getCompilerDefinition();
|
||||
LanguagePreferences languagePreferences = LanguagePlugin.getInstance().getPreferences();
|
||||
String compilerExecutablePath = languagePreferences.getCompilerExecutablePath(compilerDefinition.getId());
|
||||
|
||||
|
@ -30,16 +30,16 @@ import com.wudsn.ide.lng.LanguagePlugin;
|
||||
import com.wudsn.ide.lng.compiler.CompilerFiles;
|
||||
|
||||
/**
|
||||
* Base class for commands which operate on the current file of an assembler
|
||||
* Base class for commands which operate on the current file of an language
|
||||
* editor, in case the file is within the work space. The base class ensures
|
||||
* that the corresponding command is disabled, if there is no active assembler
|
||||
* that the corresponding command is disabled, if there is no active language
|
||||
* editor or the editor contains a file from outside of the work space.
|
||||
*
|
||||
* @author Peter Dell
|
||||
*/
|
||||
public abstract class AssemblerEditorFilesCommandHandler extends AbstractHandler {
|
||||
public abstract class LanguageEditorFilesCommandHandler extends AbstractHandler {
|
||||
|
||||
public AssemblerEditorFilesCommandHandler() {
|
||||
public LanguageEditorFilesCommandHandler() {
|
||||
super();
|
||||
}
|
||||
|
||||
@ -47,24 +47,24 @@ public abstract class AssemblerEditorFilesCommandHandler extends AbstractHandler
|
||||
public Object execute(ExecutionEvent event) throws ExecutionException {
|
||||
IEditorPart editor;
|
||||
editor = HandlerUtil.getActiveEditorChecked(event);
|
||||
if (!(editor instanceof AssemblerEditor)) {
|
||||
if (!(editor instanceof LanguageEditor)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
AssemblerEditor assemblerEditor;
|
||||
assemblerEditor = (AssemblerEditor) editor;
|
||||
LanguageEditor languageEditor;
|
||||
languageEditor = (LanguageEditor) editor;
|
||||
|
||||
CompilerFiles files;
|
||||
files = AssemblerEditorFilesLogic.createInstance(assemblerEditor).createCompilerFiles();
|
||||
files = LanguageEditorFilesLogic.createInstance(languageEditor).createCompilerFiles();
|
||||
|
||||
if (files != null) {
|
||||
execute(event, assemblerEditor, files);
|
||||
execute(event, languageEditor, files);
|
||||
} else {
|
||||
try {
|
||||
LanguagePlugin.getInstance().showError(assemblerEditor.getSite().getShell(),
|
||||
LanguagePlugin.getInstance().showError(languageEditor.getSite().getShell(),
|
||||
"Operation '" + event.getCommand().getName()
|
||||
+ "' is not possible because the file in the editor is not located in the workspace.",
|
||||
new Exception("Cannot resolve compiler files of " + assemblerEditor.getEditorInput()));
|
||||
new Exception("Cannot resolve compiler files of " + languageEditor.getEditorInput()));
|
||||
} catch (NotDefinedException ignore) {
|
||||
// Ignore
|
||||
}
|
||||
@ -75,14 +75,14 @@ public abstract class AssemblerEditorFilesCommandHandler extends AbstractHandler
|
||||
/**
|
||||
* Perform the action on the current editor and file.
|
||||
*
|
||||
* @param event The event, not <code>null</code>.
|
||||
* @param assemblerEditor The assembler editor, not <code>null</code> and with
|
||||
* current files which are not <code>null</code>.
|
||||
* @param files The current compiler files of the editor, not
|
||||
* <code>null</code> .
|
||||
* @param event The event, not <code>null</code>.
|
||||
* @param languageEditor The language editor, not <code>null</code> and with
|
||||
* current files which are not <code>null</code>.
|
||||
* @param files The current compiler files of the editor, not
|
||||
* <code>null</code> .
|
||||
* @throws ExecutionException if an exception occurred during execution.
|
||||
*/
|
||||
protected abstract void execute(ExecutionEvent event, AssemblerEditor assemblerEditor, CompilerFiles files)
|
||||
protected abstract void execute(ExecutionEvent event, LanguageEditor languageEditor, CompilerFiles files)
|
||||
throws ExecutionException;
|
||||
|
||||
}
|
@ -37,40 +37,40 @@ import com.wudsn.ide.base.common.MarkerUtility;
|
||||
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.AssemblerProperties;
|
||||
import com.wudsn.ide.lng.LanguageProperties;
|
||||
import com.wudsn.ide.lng.Texts;
|
||||
import com.wudsn.ide.lng.AssemblerProperties.AssemblerProperty;
|
||||
import com.wudsn.ide.lng.AssemblerProperties.InvalidAssemblerPropertyException;
|
||||
import com.wudsn.ide.lng.LanguageProperties.LanguageProperty;
|
||||
import com.wudsn.ide.lng.LanguageProperties.InvalidLanguagePropertyException;
|
||||
import com.wudsn.ide.lng.compiler.CompilerDefinition;
|
||||
import com.wudsn.ide.lng.compiler.CompilerFiles;
|
||||
import com.wudsn.ide.lng.compiler.CompilerOutputFolderMode;
|
||||
import com.wudsn.ide.lng.compiler.parser.CompilerSourceParser;
|
||||
|
||||
/**
|
||||
* Logic to handle the {@link CompilerFiles} of an {@link AssemblerEditor}
|
||||
* Logic to handle the {@link CompilerFiles} of an {@link LanguageEditor}
|
||||
*
|
||||
* @author Peter Dell
|
||||
*
|
||||
* @since 1.7.0
|
||||
*/
|
||||
public final class AssemblerEditorFilesLogic {
|
||||
public final class LanguageEditorFilesLogic {
|
||||
|
||||
private AssemblerEditor assemblerEditor;
|
||||
private LanguageEditor languageEditor;
|
||||
|
||||
/**
|
||||
* Create a new instance of the logic.
|
||||
*
|
||||
* @param assemblerEditor The assembler editor, not <code>null</code>.
|
||||
* @param languageEditor The language editor, not <code>null</code>.
|
||||
*
|
||||
* @return The new instance, not <code>null</code>.
|
||||
*/
|
||||
static AssemblerEditorFilesLogic createInstance(AssemblerEditor assemblerEditor) {
|
||||
if (assemblerEditor == null) {
|
||||
throw new IllegalArgumentException("Parameter 'assemblerEditor' must not be null.");
|
||||
static LanguageEditorFilesLogic createInstance(LanguageEditor languageEditor) {
|
||||
if (languageEditor == null) {
|
||||
throw new IllegalArgumentException("Parameter 'languageEditor' must not be null.");
|
||||
}
|
||||
|
||||
AssemblerEditorFilesLogic result = new AssemblerEditorFilesLogic();
|
||||
result.assemblerEditor = assemblerEditor;
|
||||
LanguageEditorFilesLogic result = new LanguageEditorFilesLogic();
|
||||
result.languageEditor = languageEditor;
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -83,19 +83,19 @@ public final class AssemblerEditorFilesLogic {
|
||||
CompilerFiles createCompilerFiles() {
|
||||
IFile sourceIFile;
|
||||
CompilerFiles result;
|
||||
sourceIFile = assemblerEditor.getCurrentIFile();
|
||||
sourceIFile = languageEditor.getCurrentIFile();
|
||||
if (sourceIFile != null) {
|
||||
|
||||
IDocument document = assemblerEditor.getDocumentProvider().getDocument(assemblerEditor.getEditorInput());
|
||||
AssemblerProperties sourceFileProperties = CompilerSourceParser.getDocumentProperties(document);
|
||||
IDocument document = languageEditor.getDocumentProvider().getDocument(languageEditor.getEditorInput());
|
||||
LanguageProperties sourceFileProperties = CompilerSourceParser.getDocumentProperties(document);
|
||||
|
||||
IFile mainSourceIFile;
|
||||
AssemblerProperties mainSourceFileProperties;
|
||||
LanguageProperties mainSourceFileProperties;
|
||||
|
||||
mainSourceIFile = sourceIFile;
|
||||
mainSourceFileProperties = sourceFileProperties;
|
||||
|
||||
AssemblerProperty property = sourceFileProperties.get(AssemblerProperties.MAIN_SOURCE_FILE);
|
||||
LanguageProperty property = sourceFileProperties.get(LanguageProperties.MAIN_SOURCE_FILE);
|
||||
if (property != null) {
|
||||
if (StringUtility.isSpecified(property.value)) {
|
||||
IPath mainSourceFileIPath;
|
||||
@ -114,13 +114,13 @@ public final class AssemblerEditorFilesLogic {
|
||||
|
||||
plugin.logError("Cannot read main source file '{0'}", new Object[] { mainSourceFile.getPath() },
|
||||
ex);
|
||||
mainSourceFileProperties = new AssemblerProperties();
|
||||
mainSourceFileProperties = new LanguageProperties();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
result = new CompilerFiles(mainSourceIFile, mainSourceFileProperties, sourceIFile, sourceFileProperties,
|
||||
assemblerEditor.getCompilerPreferences());
|
||||
languageEditor.getCompilerPreferences());
|
||||
} else {
|
||||
result = null;
|
||||
}
|
||||
@ -136,19 +136,19 @@ public final class AssemblerEditorFilesLogic {
|
||||
try {
|
||||
files.sourceFile.iFile.deleteMarkers(IMarker.PROBLEM, true, IResource.DEPTH_INFINITE);
|
||||
} catch (CoreException ex) {
|
||||
assemblerEditor.getPlugin().logError("Cannot remove markers", null, ex);
|
||||
languageEditor.getPlugin().logError("Cannot remove markers", null, ex);
|
||||
}
|
||||
|
||||
// If the main source file is not there, the error shall be related to
|
||||
// the include source file. In all other cases, the main source file
|
||||
// exists and is the main message target.
|
||||
if (!files.mainSourceFile.iFile.exists()) {
|
||||
int lineNumber = files.sourceFile.assemblerProperties.get(AssemblerProperties.MAIN_SOURCE_FILE).lineNumber;
|
||||
int lineNumber = files.sourceFile.languageProperties.get(LanguageProperties.MAIN_SOURCE_FILE).lineNumber;
|
||||
|
||||
// ERROR: Main source file '{0}' does not exist.
|
||||
IMarker marker = MarkerUtility.createMarker(files.sourceFile.iFile, lineNumber, IMarker.SEVERITY_ERROR,
|
||||
Texts.MESSAGE_E125, files.mainSourceFile.filePath);
|
||||
MarkerUtility.gotoMarker(assemblerEditor, marker);
|
||||
MarkerUtility.gotoMarker(languageEditor, marker);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -157,33 +157,33 @@ public final class AssemblerEditorFilesLogic {
|
||||
try {
|
||||
files.mainSourceFile.iFile.getParent().deleteMarkers(IMarker.PROBLEM, true, IResource.DEPTH_INFINITE);
|
||||
} catch (CoreException ex) {
|
||||
assemblerEditor.getPlugin().logError("Cannot remove markers", null, ex);
|
||||
languageEditor.getPlugin().logError("Cannot remove markers", null, ex);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine the hardware defined by the property
|
||||
* {@link AssemblerProperties#HARDWARE}.
|
||||
* {@link LanguageProperties#HARDWARE}.
|
||||
*
|
||||
* @param iFile The iFIle to which error message will be associated, not
|
||||
* @param iFile The IFile to which error message will be associated, not
|
||||
* <code>null</code>.
|
||||
* @param properties The assembler properties, not <code>null</code>.
|
||||
* @param properties The language properties, not <code>null</code>.
|
||||
*
|
||||
* @return The hardware or <code>null</code> if is the not defined in the
|
||||
* properties.
|
||||
* @throws InvalidAssemblerPropertyException If the hardware is specified but
|
||||
* invalid. Error message will be
|
||||
* assigned to the iFile in this case.
|
||||
* @throws InvalidLanguagePropertyException If the hardware is specified but
|
||||
* invalid. Error message will be
|
||||
* assigned to the iFile in this case.
|
||||
*
|
||||
* @since 1.6.1
|
||||
*/
|
||||
Hardware getHardware(IFile iFile, AssemblerProperties properties) throws InvalidAssemblerPropertyException {
|
||||
Hardware getHardware(IFile iFile, LanguageProperties properties) throws InvalidLanguagePropertyException {
|
||||
if (iFile == null) {
|
||||
throw new IllegalArgumentException("Parameter 'iFile' must not be null.");
|
||||
}
|
||||
Hardware hardware = null;
|
||||
AssemblerProperty hardwareProperty = properties.get(AssemblerProperties.HARDWARE);
|
||||
LanguageProperty hardwareProperty = properties.get(LanguageProperties.HARDWARE);
|
||||
if (hardwareProperty != null) {
|
||||
Map<String, Hardware> allowedValues = new TreeMap<String, Hardware>();
|
||||
StringBuilder allowedValuesBuilder = new StringBuilder();
|
||||
@ -209,7 +209,7 @@ public final class AssemblerEditorFilesLogic {
|
||||
// following valid values '{0}'.
|
||||
IMarker marker = MarkerUtility.createMarker(iFile, hardwareProperty.lineNumber, IMarker.SEVERITY_ERROR,
|
||||
Texts.MESSAGE_E128, new String[] { allowedValuesBuilder.toString() });
|
||||
throw new InvalidAssemblerPropertyException(hardwareProperty, marker);
|
||||
throw new InvalidLanguagePropertyException(hardwareProperty, marker);
|
||||
}
|
||||
hardware = allowedValues.get(hardwarePropertyValue);
|
||||
|
||||
@ -217,13 +217,13 @@ public final class AssemblerEditorFilesLogic {
|
||||
try {
|
||||
iFile.deleteMarkers(IMarker.PROBLEM, true, IResource.DEPTH_ZERO);
|
||||
} catch (CoreException ex) {
|
||||
assemblerEditor.getPlugin().logError("Cannot remove markers", null, ex);
|
||||
languageEditor.getPlugin().logError("Cannot remove markers", null, ex);
|
||||
}
|
||||
// ERROR: Unknown hardware {0}. Specify one of the
|
||||
// following valid values '{1}'.
|
||||
IMarker marker = MarkerUtility.createMarker(iFile, hardwareProperty.lineNumber, IMarker.SEVERITY_ERROR,
|
||||
Texts.MESSAGE_E124, new String[] { hardwarePropertyValue, allowedValuesBuilder.toString() });
|
||||
throw new InvalidAssemblerPropertyException(hardwareProperty, marker);
|
||||
throw new InvalidLanguagePropertyException(hardwareProperty, marker);
|
||||
}
|
||||
|
||||
}
|
||||
@ -247,32 +247,32 @@ public final class AssemblerEditorFilesLogic {
|
||||
Hardware mainSourceFileHardware;
|
||||
Hardware sourceFileHardware;
|
||||
try {
|
||||
sourceFileHardware = getHardware(files.sourceFile.iFile, files.sourceFile.assemblerProperties);
|
||||
} catch (InvalidAssemblerPropertyException ex) {
|
||||
MarkerUtility.gotoMarker(assemblerEditor, ex.marker);
|
||||
sourceFileHardware = getHardware(files.sourceFile.iFile, files.sourceFile.languageProperties);
|
||||
} catch (InvalidLanguagePropertyException ex) {
|
||||
MarkerUtility.gotoMarker(languageEditor, ex.marker);
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
mainSourceFileHardware = getHardware(files.mainSourceFile.iFile, files.mainSourceFile.assemblerProperties);
|
||||
} catch (InvalidAssemblerPropertyException ex) {
|
||||
MarkerUtility.gotoMarker(assemblerEditor, ex.marker);
|
||||
mainSourceFileHardware = getHardware(files.mainSourceFile.iFile, files.mainSourceFile.languageProperties);
|
||||
} catch (InvalidLanguagePropertyException ex) {
|
||||
MarkerUtility.gotoMarker(languageEditor, ex.marker);
|
||||
return null;
|
||||
}
|
||||
Hardware defaultHardware = assemblerEditor.getCompilerDefinition().getDefaultHardware();
|
||||
Hardware defaultHardware = languageEditor.getCompilerDefinition().getDefaultHardware();
|
||||
int sourceFileLineNumber;
|
||||
int mainSourceFileLineNumber;
|
||||
if (sourceFileHardware == null) {
|
||||
sourceFileHardware = defaultHardware;
|
||||
sourceFileLineNumber = 0;
|
||||
} else {
|
||||
sourceFileLineNumber = files.sourceFile.assemblerProperties.get(AssemblerProperties.HARDWARE).lineNumber;
|
||||
sourceFileLineNumber = files.sourceFile.languageProperties.get(LanguageProperties.HARDWARE).lineNumber;
|
||||
}
|
||||
if (mainSourceFileHardware == null) {
|
||||
mainSourceFileHardware = defaultHardware;
|
||||
mainSourceFileLineNumber = 0;
|
||||
} else {
|
||||
mainSourceFileLineNumber = files.mainSourceFile.assemblerProperties
|
||||
.get(AssemblerProperties.HARDWARE).lineNumber;
|
||||
mainSourceFileLineNumber = files.mainSourceFile.languageProperties
|
||||
.get(LanguageProperties.HARDWARE).lineNumber;
|
||||
}
|
||||
|
||||
if (!sourceFileHardware.equals(mainSourceFileHardware)) {
|
||||
@ -298,12 +298,12 @@ public final class AssemblerEditorFilesLogic {
|
||||
if (files == null) {
|
||||
throw new IllegalArgumentException("Parameter 'files' must not be null.");
|
||||
}
|
||||
CompilerDefinition compilerDefinition = assemblerEditor.getCompilerDefinition();
|
||||
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}'.
|
||||
createMainSourceFileMessage(files, files.outputFileExtensionProperty, IMarker.SEVERITY_ERROR,
|
||||
Texts.MESSAGE_E104, compilerDefinition.getName(), AssemblerProperties.OUTPUT_FILE_EXTENSION);
|
||||
Texts.MESSAGE_E104, compilerDefinition.getName(), LanguageProperties.OUTPUT_FILE_EXTENSION);
|
||||
|
||||
return false;
|
||||
}
|
||||
@ -318,7 +318,7 @@ public final class AssemblerEditorFilesLogic {
|
||||
// ERROR: Output folder mode be set in the preferences of
|
||||
// compiler '{0}' or via the annotation '{1}'.
|
||||
createMainSourceFileMessage(files, files.outputFolderModeProperty, IMarker.SEVERITY_ERROR,
|
||||
Texts.MESSAGE_E140, compilerDefinition.getName(), AssemblerProperties.OUTPUT_FOLDER_MODE);
|
||||
Texts.MESSAGE_E140, compilerDefinition.getName(), LanguageProperties.OUTPUT_FOLDER_MODE);
|
||||
|
||||
return false;
|
||||
}
|
||||
@ -336,28 +336,27 @@ public final class AssemblerEditorFilesLogic {
|
||||
|
||||
/**
|
||||
* Creates a message associated with the main source file of an
|
||||
* {@link AssemblerEditorFilesLogic} instance. The message is is bound to the
|
||||
* {@link LanguageEditorFilesLogic} instance. The message is is bound to the
|
||||
* line number number of the property (if available). Also the editor is
|
||||
* position to the marker.
|
||||
*
|
||||
* @param files The {@link AssemblerEditorFilesLogic} not
|
||||
* @param files The {@link CompilerFiles} not <code>null</code>.
|
||||
* @param property The language property to which the message belongs or
|
||||
* <code>null</code>.
|
||||
* @param property The assembler editor property to which the message belongs
|
||||
* or <code>null</code>.
|
||||
* @param severity The message severity, see {@link IMarker#SEVERITY}
|
||||
* @param message The message, may contain parameter "{0}" to "{9}". May be
|
||||
* empty, not <code>null</code>.
|
||||
* @param parameters The format parameters for the message, may be empty, not
|
||||
* <code>null</code>.
|
||||
*/
|
||||
private void createMainSourceFileMessage(CompilerFiles files, AssemblerProperty property, int severity,
|
||||
private void createMainSourceFileMessage(CompilerFiles files, LanguageProperty property, int severity,
|
||||
String message, String... parameters) {
|
||||
if (files == null) {
|
||||
throw new IllegalArgumentException("Parameter 'files' must not be null.");
|
||||
}
|
||||
IMarker marker = MarkerUtility.createMarker(files.mainSourceFile.iFile,
|
||||
(property == null ? 0 : property.lineNumber), severity, message, parameters);
|
||||
MarkerUtility.gotoMarker(assemblerEditor, marker);
|
||||
MarkerUtility.gotoMarker(languageEditor, marker);
|
||||
|
||||
}
|
||||
|
||||
|
@ -37,26 +37,26 @@ import org.eclipse.ui.handlers.HandlerUtil;
|
||||
*
|
||||
* @since 1.7.0
|
||||
*/
|
||||
public final class AssemblerEditorOpenDeclarationCommandHandler extends AbstractHandler {
|
||||
public final class LanguageEditorOpenDeclarationCommandHandler extends AbstractHandler {
|
||||
|
||||
@Override
|
||||
public Object execute(ExecutionEvent event) throws ExecutionException {
|
||||
IEditorPart editor;
|
||||
editor = HandlerUtil.getActiveEditorChecked(event);
|
||||
if (!(editor instanceof AssemblerEditor)) {
|
||||
if (!(editor instanceof LanguageEditor)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
AssemblerEditor assemblerEditor;
|
||||
assemblerEditor = (AssemblerEditor) editor;
|
||||
ITextSelection textSelection = (ITextSelection) assemblerEditor.getSite().getSelectionProvider().getSelection();
|
||||
LanguageEditor languageEditor;
|
||||
languageEditor = (LanguageEditor) editor;
|
||||
ITextSelection textSelection = (ITextSelection) languageEditor.getSite().getSelectionProvider().getSelection();
|
||||
if (textSelection != null) {
|
||||
IDocument document = assemblerEditor.getDocumentProvider().getDocument(assemblerEditor.getEditorInput());
|
||||
IDocument document = languageEditor.getDocumentProvider().getDocument(languageEditor.getEditorInput());
|
||||
int offset = textSelection.getOffset();
|
||||
List<AssemblerHyperlink> hyperlinks = new ArrayList<AssemblerHyperlink>();
|
||||
AssemblerHyperlinkDetector.detectHyperlinks(assemblerEditor, document, offset, false, hyperlinks);
|
||||
List<LanguageHyperlink> hyperlinks = new ArrayList<LanguageHyperlink>();
|
||||
LanguageHyperlinkDetector.detectHyperlinks(languageEditor, document, offset, false, hyperlinks);
|
||||
if (!hyperlinks.isEmpty()) {
|
||||
AssemblerHyperlink hyperlink = hyperlinks.get(0);
|
||||
LanguageHyperlink hyperlink = hyperlinks.get(0);
|
||||
hyperlink.open();
|
||||
}
|
||||
}
|
||||
|
@ -30,20 +30,20 @@ import com.wudsn.ide.lng.compiler.CompilerFiles;
|
||||
*
|
||||
* @author Peter Dell
|
||||
*/
|
||||
public final class AssemblerEditorOpenFolderCommandHandler extends AssemblerEditorFilesCommandHandler {
|
||||
public final class LanguageEditorOpenFolderCommandHandler extends LanguageEditorFilesCommandHandler {
|
||||
|
||||
public static final String OPEN_SOURCE_FOLDER = "com.wudsn.ide.lng.editor.AssemblerEditorOpenSourceFolderCommand";
|
||||
public static final String OPEN_OUTPUT_FOLDER = "com.wudsn.ide.lng.editor.AssemblerEditorOpenOutputFolderCommand";
|
||||
public static final String OPEN_SOURCE_FOLDER = "com.wudsn.ide.lng.editor.LanguageEditorOpenSourceFolderCommand";
|
||||
public static final String OPEN_OUTPUT_FOLDER = "com.wudsn.ide.lng.editor.LanguageEditorOpenOutputFolderCommand";
|
||||
|
||||
@Override
|
||||
protected void execute(ExecutionEvent event, AssemblerEditor assemblerEditor, CompilerFiles files)
|
||||
protected void execute(ExecutionEvent event, LanguageEditor languageEditor, CompilerFiles files)
|
||||
throws ExecutionException {
|
||||
|
||||
if (event == null) {
|
||||
throw new IllegalArgumentException("Parameter 'event' must not be null.");
|
||||
}
|
||||
if (assemblerEditor == null) {
|
||||
throw new IllegalArgumentException("Parameter 'assemblerEditor' must not be null.");
|
||||
if (languageEditor == null) {
|
||||
throw new IllegalArgumentException("Parameter 'languageEditor' must not be null.");
|
||||
}
|
||||
if (files == null) {
|
||||
throw new IllegalArgumentException("Parameter 'files' must not be null.");
|
||||
|
@ -38,12 +38,12 @@ import com.wudsn.ide.lng.LanguagePlugin;
|
||||
* @author Peter Dell
|
||||
* @author Andy Reek
|
||||
*/
|
||||
final class AssemblerEditorToggleCommentAction extends TextEditorAction {
|
||||
final class LanguageEditorToggleCommentAction extends TextEditorAction {
|
||||
|
||||
/**
|
||||
* The owning editor.
|
||||
*/
|
||||
private final AssemblerEditor editor;
|
||||
private final LanguageEditor editor;
|
||||
|
||||
/**
|
||||
* The editor's source viewer.
|
||||
@ -56,11 +56,11 @@ final class AssemblerEditorToggleCommentAction extends TextEditorAction {
|
||||
* @param bundle The resource bundle, not <code>null</code>.
|
||||
* @param prefix The resource bundle key prefix, not <code>null</code>.
|
||||
*
|
||||
* @param editor The assembler editor, not <code>null</code>.
|
||||
* @param sourceViewer The assembler editor's source viewer.
|
||||
* @param editor The editor, not <code>null</code>.
|
||||
* @param sourceViewer The editor's source viewer.
|
||||
*
|
||||
*/
|
||||
AssemblerEditorToggleCommentAction(ResourceBundle bundle, String prefix, AssemblerEditor editor,
|
||||
LanguageEditorToggleCommentAction(ResourceBundle bundle, String prefix, LanguageEditor editor,
|
||||
SourceViewer sourceViewer) {
|
||||
super(bundle, prefix, editor);
|
||||
if (editor == null) {
|
||||
|
@ -46,7 +46,7 @@ import com.wudsn.ide.lng.Texts;
|
||||
*
|
||||
* @author Peter Dell
|
||||
*/
|
||||
final class AssemblerHyperlink implements IHyperlink {
|
||||
final class LanguageHyperlink implements IHyperlink {
|
||||
|
||||
public static final String DEFAULT_EDITOR = "DEFAULT_EDITOR";
|
||||
public static final String SYSTEM_EDITOR = "SYSTEM_EDITOR";
|
||||
@ -74,7 +74,7 @@ final class AssemblerHyperlink implements IHyperlink {
|
||||
* <code>null</code>.
|
||||
*
|
||||
* @param lineNumber The liner number to position to, in case the editor
|
||||
* is an {@link AssemblerEditor}. The line numbers are
|
||||
* is an {@link LanguageEditor}. The line numbers are
|
||||
* starting at 1. The value 0 indicates that no
|
||||
* positioning shall take place.
|
||||
*
|
||||
@ -82,7 +82,7 @@ final class AssemblerHyperlink implements IHyperlink {
|
||||
* than one hyperlink for the same location, may be
|
||||
* empty, not <code>null</code>.
|
||||
*/
|
||||
AssemblerHyperlink(IRegion region, IWorkbenchPage workbenchPage, String absoluteFilePath, URI uri, String editorId,
|
||||
LanguageHyperlink(IRegion region, IWorkbenchPage workbenchPage, String absoluteFilePath, URI uri, String editorId,
|
||||
int lineNumber, String hyperlinkText) {
|
||||
if (region == null) {
|
||||
throw new IllegalArgumentException("Parameter 'region' must not be null.");
|
||||
@ -201,9 +201,9 @@ final class AssemblerHyperlink implements IHyperlink {
|
||||
new Object[] { uri }, ex);
|
||||
}
|
||||
}
|
||||
if (editorPart instanceof AssemblerEditor && lineNumber > 0) {
|
||||
AssemblerEditor assemblerEditor = (AssemblerEditor) editorPart;
|
||||
assemblerEditor.gotoLine(lineNumber);
|
||||
if (editorPart instanceof LanguageEditor && lineNumber > 0) {
|
||||
LanguageEditor languageEditor = (LanguageEditor) editorPart;
|
||||
languageEditor.gotoLine(lineNumber);
|
||||
}
|
||||
|
||||
uri = null;
|
||||
|
@ -53,20 +53,20 @@ import com.wudsn.ide.lng.compiler.syntax.CompilerSyntax;
|
||||
*
|
||||
* @author Peter Dell
|
||||
*/
|
||||
public final class AssemblerHyperlinkDetector extends AbstractHyperlinkDetector {
|
||||
public final class LanguageHyperlinkDetector extends AbstractHyperlinkDetector {
|
||||
|
||||
/**
|
||||
* Hyperlink detector target as defined in the extension
|
||||
* "org.eclipse.ui.workbench.texteditor.hyperlinkDetectorTargets".
|
||||
*/
|
||||
public static final String TARGET = "com.wudsn.ide.lng.editor.AssemblerHyperlinkDetectorEditorTarget";
|
||||
public static final String TARGET = "com.wudsn.ide.lng.editor.LanguageHyperlinkDetectorEditorTarget";
|
||||
|
||||
/**
|
||||
* Creates a new instance. Called by extension point
|
||||
* "org.eclipse.ui.workbench.texteditor.hyperlinkDetectors".
|
||||
*
|
||||
*/
|
||||
public AssemblerHyperlinkDetector() {
|
||||
public LanguageHyperlinkDetector() {
|
||||
}
|
||||
|
||||
/**
|
||||
@ -94,16 +94,16 @@ public final class AssemblerHyperlinkDetector extends AbstractHyperlinkDetector
|
||||
@Override
|
||||
public IHyperlink[] detectHyperlinks(ITextViewer textViewer, IRegion region, boolean canShowMultipleHyperlinks) {
|
||||
|
||||
List<AssemblerHyperlink> hyperlinks;
|
||||
hyperlinks = new ArrayList<AssemblerHyperlink>(2);
|
||||
List<LanguageHyperlink> hyperlinks;
|
||||
hyperlinks = new ArrayList<LanguageHyperlink>(2);
|
||||
|
||||
if (region == null || textViewer == null)
|
||||
return null;
|
||||
|
||||
AssemblerEditor assemblerEditor;
|
||||
LanguageEditor languageEditor;
|
||||
|
||||
assemblerEditor = getAdapter(AssemblerEditor.class);
|
||||
if (assemblerEditor == null) {
|
||||
languageEditor = getAdapter(LanguageEditor.class);
|
||||
if (languageEditor == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -114,7 +114,7 @@ public final class AssemblerHyperlinkDetector extends AbstractHyperlinkDetector
|
||||
|
||||
int offset = region.getOffset();
|
||||
|
||||
detectHyperlinks(assemblerEditor, document, offset, canShowMultipleHyperlinks, hyperlinks);
|
||||
detectHyperlinks(languageEditor, document, offset, canShowMultipleHyperlinks, hyperlinks);
|
||||
|
||||
if (!hyperlinks.isEmpty()) {
|
||||
return hyperlinks.toArray(new IHyperlink[hyperlinks.size()]);
|
||||
@ -123,8 +123,8 @@ public final class AssemblerHyperlinkDetector extends AbstractHyperlinkDetector
|
||||
|
||||
}
|
||||
|
||||
final static void detectHyperlinks(AssemblerEditor assemblerEditor, IDocument document, int offset,
|
||||
boolean canShowMultipleHyperlinks, List<AssemblerHyperlink> hyperlinks) {
|
||||
final static void detectHyperlinks(LanguageEditor languageEditor, IDocument document, int offset,
|
||||
boolean canShowMultipleHyperlinks, List<LanguageHyperlink> hyperlinks) {
|
||||
IRegion lineInfo;
|
||||
int lineNumber;
|
||||
String line;
|
||||
@ -141,17 +141,17 @@ public final class AssemblerHyperlinkDetector extends AbstractHyperlinkDetector
|
||||
if (offsetInLine >= line.length()) {
|
||||
return;
|
||||
}
|
||||
detectInclude(assemblerEditor, lineInfo, lineNumber, line, offsetInLine, canShowMultipleHyperlinks, hyperlinks);
|
||||
detectInclude(languageEditor, lineInfo, lineNumber, line, offsetInLine, canShowMultipleHyperlinks, hyperlinks);
|
||||
if (hyperlinks.isEmpty()) {
|
||||
detectIdentifier(assemblerEditor, lineInfo, lineNumber, line, offsetInLine, canShowMultipleHyperlinks,
|
||||
detectIdentifier(languageEditor, lineInfo, lineNumber, line, offsetInLine, canShowMultipleHyperlinks,
|
||||
hyperlinks);
|
||||
}
|
||||
}
|
||||
|
||||
private static void detectInclude(AssemblerEditor assemblerEditor, IRegion lineInfo, int lineNumber, String line,
|
||||
int offsetInLine, boolean canShowMultipleHyperlinks, List<AssemblerHyperlink> hyperlinks) {
|
||||
private static void detectInclude(LanguageEditor languageEditor, IRegion lineInfo, int lineNumber, String line,
|
||||
int offsetInLine, boolean canShowMultipleHyperlinks, List<LanguageHyperlink> hyperlinks) {
|
||||
// Try to detect binary or source includes
|
||||
CompilerSourceParser compilerSourceParser = assemblerEditor.createCompilerSourceParser();
|
||||
CompilerSourceParser compilerSourceParser = languageEditor.createCompilerSourceParser();
|
||||
CompilerSourceParserFileReference fileReference;
|
||||
fileReference = new CompilerSourceParserFileReference();
|
||||
compilerSourceParser.detectFileReference(line, fileReference);
|
||||
@ -184,7 +184,7 @@ public final class AssemblerHyperlinkDetector extends AbstractHyperlinkDetector
|
||||
|
||||
// Perform resolution of relative paths and compiler specific
|
||||
// default extension.
|
||||
File currentDirectory = assemblerEditor.getCurrentDirectory();
|
||||
File currentDirectory = languageEditor.getCurrentDirectory();
|
||||
String absoluteFilePath = compilerSourceParser.getIncludeAbsoluteFilePath(fileReference.getType(),
|
||||
currentDirectory, filePath);
|
||||
if (absoluteFilePath == null) {
|
||||
@ -196,7 +196,7 @@ public final class AssemblerHyperlinkDetector extends AbstractHyperlinkDetector
|
||||
|
||||
IRegion linkRegion = new Region(lineInfo.getOffset() + startQuoteOffset + 1, filePath.length());
|
||||
|
||||
IEditorSite site = assemblerEditor.getEditorSite();
|
||||
IEditorSite site = languageEditor.getEditorSite();
|
||||
if (site == null) {
|
||||
return;
|
||||
}
|
||||
@ -204,22 +204,22 @@ public final class AssemblerHyperlinkDetector extends AbstractHyperlinkDetector
|
||||
|
||||
switch (fileReference.getType()) {
|
||||
case CompilerSourceParserFileReferenceType.SOURCE:
|
||||
hyperlinks.add(new AssemblerHyperlink(linkRegion, workbenchPage, absoluteFilePath, uri,
|
||||
assemblerEditor.getClass().getName(), 0,
|
||||
Texts.COMPILER_HYPERLINK_DETECTOR_OPEN_SOURCE_WITH_LANGUAGE_EDITOR));
|
||||
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
|
||||
break;
|
||||
case CompilerSourceParserFileReferenceType.BINARY:
|
||||
hyperlinks.add(new AssemblerHyperlink(linkRegion, workbenchPage, absoluteFilePath, uri, HexEditor.ID, 0,
|
||||
hyperlinks.add(new LanguageHyperlink(linkRegion, workbenchPage, absoluteFilePath, uri, HexEditor.ID, 0,
|
||||
Texts.COMPILER_HYPERLINK_DETECTOR_OPEN_BINARY_WITH_HEX_EDITOR));
|
||||
if (canShowMultipleHyperlinks) {
|
||||
hyperlinks.add(new AssemblerHyperlink(linkRegion, workbenchPage, absoluteFilePath, uri,
|
||||
hyperlinks.add(new LanguageHyperlink(linkRegion, workbenchPage, absoluteFilePath, uri,
|
||||
GraphicsConversionEditor.ID, 0,
|
||||
Texts.COMPILER_HYPERLINK_DETECTOR_OPEN_BINARY_WITH_GRAPHICS_EDITOR));
|
||||
hyperlinks.add(new AssemblerHyperlink(linkRegion, workbenchPage, absoluteFilePath, uri,
|
||||
AssemblerHyperlink.DEFAULT_EDITOR, 0,
|
||||
hyperlinks.add(new LanguageHyperlink(linkRegion, workbenchPage, absoluteFilePath, uri,
|
||||
LanguageHyperlink.DEFAULT_EDITOR, 0,
|
||||
Texts.COMPILER_HYPERLINK_DETECTOR_OPEN_BINARY_WITH_DEFAULT_EDITOR));
|
||||
hyperlinks.add(new AssemblerHyperlink(linkRegion, workbenchPage, absoluteFilePath, uri,
|
||||
AssemblerHyperlink.SYSTEM_EDITOR, 0,
|
||||
hyperlinks.add(new LanguageHyperlink(linkRegion, workbenchPage, absoluteFilePath, uri,
|
||||
LanguageHyperlink.SYSTEM_EDITOR, 0,
|
||||
Texts.COMPILER_HYPERLINK_DETECTOR_OPEN_BINARY_WITH_SYSTEM_EDITOR));
|
||||
}
|
||||
break;
|
||||
@ -230,10 +230,10 @@ public final class AssemblerHyperlinkDetector extends AbstractHyperlinkDetector
|
||||
}
|
||||
}
|
||||
|
||||
private static void detectIdentifier(AssemblerEditor assemblerEditor, IRegion lineInfo, int lineNumber, String line,
|
||||
int offsetInLine, boolean canShowMultipleHyperlinks, List<AssemblerHyperlink> hyperlinks) {
|
||||
private static void detectIdentifier(LanguageEditor languageEditor, IRegion lineInfo, int lineNumber, String line,
|
||||
int offsetInLine, boolean canShowMultipleHyperlinks, List<LanguageHyperlink> hyperlinks) {
|
||||
|
||||
CompilerSyntax compilerSyntax = assemblerEditor.createCompilerSourceParser().getCompilerSyntax();
|
||||
CompilerSyntax compilerSyntax = languageEditor.createCompilerSourceParser().getCompilerSyntax();
|
||||
|
||||
int startIdentifierOffset = offsetInLine;
|
||||
int endIdentifierOffset = offsetInLine;
|
||||
@ -257,7 +257,7 @@ public final class AssemblerHyperlinkDetector extends AbstractHyperlinkDetector
|
||||
endIdentifierOffset++;
|
||||
}
|
||||
String identifier = line.substring(startIdentifierOffset, endIdentifierOffset);
|
||||
CompilerSourceFile compilerSourceFile = assemblerEditor.getCompilerSourceFile();
|
||||
CompilerSourceFile compilerSourceFile = languageEditor.getCompilerSourceFile();
|
||||
if (compilerSourceFile == null) {
|
||||
return;
|
||||
}
|
||||
@ -268,7 +268,7 @@ public final class AssemblerHyperlinkDetector extends AbstractHyperlinkDetector
|
||||
return;
|
||||
}
|
||||
|
||||
IEditorSite site = assemblerEditor.getEditorSite();
|
||||
IEditorSite site = languageEditor.getEditorSite();
|
||||
if (site == null) {
|
||||
return;
|
||||
}
|
||||
@ -302,7 +302,7 @@ public final class AssemblerHyperlinkDetector extends AbstractHyperlinkDetector
|
||||
}
|
||||
|
||||
// Ignore if the found element is the start element only.
|
||||
File currentFile = assemblerEditor.getCurrentFile();
|
||||
File currentFile = languageEditor.getCurrentFile();
|
||||
boolean inSameFile = foundElements.size() == 1 && currentFile != null
|
||||
&& currentFile.getPath().equals(absoluteFilePath);
|
||||
|
||||
@ -325,8 +325,8 @@ public final class AssemblerHyperlinkDetector extends AbstractHyperlinkDetector
|
||||
CompilerSourceParserTreeObjectType.getText(element.getType()), element.getCompoundName(),
|
||||
NumberUtility.getLongValueDecimalString(elementLineNumber), fileName);
|
||||
}
|
||||
hyperlinks.add(new AssemblerHyperlink(linkRegion, workbenchPage, absoluteFilePath, uri,
|
||||
assemblerEditor.getClass().getName(), elementLineNumber, hyperlinkText));
|
||||
hyperlinks.add(new LanguageHyperlink(linkRegion, workbenchPage, absoluteFilePath, uri,
|
||||
languageEditor.getClass().getName(), elementLineNumber, hyperlinkText));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,7 @@ import org.eclipse.swt.graphics.Point;
|
||||
*
|
||||
* @author Peter Dell
|
||||
*/
|
||||
final class AssemblerInstructionCompletionProposal implements ICompletionProposal, ICompletionProposalExtension6 {
|
||||
final class LanguageInstructionCompletionProposal implements ICompletionProposal, ICompletionProposalExtension6 {
|
||||
|
||||
/** The string to be displayed in the completion proposal popup. */
|
||||
private String displayString;
|
||||
@ -71,7 +71,7 @@ final class AssemblerInstructionCompletionProposal implements ICompletionProposa
|
||||
* @param contextInformation The context information associated with this
|
||||
* proposal.
|
||||
*/
|
||||
AssemblerInstructionCompletionProposal(String replacementString, int replacementOffset, int replacementLength,
|
||||
LanguageInstructionCompletionProposal(String replacementString, int replacementOffset, int replacementLength,
|
||||
int cursorOffset, Image image, String displayString, StyledString styledDisplayString,
|
||||
IContextInformation contextInformation) {
|
||||
Assert.isNotNull(replacementString);
|
||||
|
@ -27,25 +27,25 @@ import org.eclipse.jface.text.reconciler.IReconcilingStrategy;
|
||||
import org.eclipse.jface.text.reconciler.IReconcilingStrategyExtension;
|
||||
|
||||
/**
|
||||
* The reconciling strategy for the AssemblerEditor. Builds the folding
|
||||
* The reconciling strategy for the LanguageEditor. Builds the folding
|
||||
* structure for folding and notifies the editor.
|
||||
*
|
||||
* @author Peter Dell
|
||||
* @author Andy Reek
|
||||
*/
|
||||
final class AssemblerReconcilingStategy implements IReconcilingStrategy, IReconcilingStrategyExtension {
|
||||
final class LanguageReconcilingStategy implements IReconcilingStrategy, IReconcilingStrategyExtension {
|
||||
|
||||
private final AssemblerEditor editor;
|
||||
private final LanguageEditor editor;
|
||||
private IDocument document;
|
||||
|
||||
/**
|
||||
* Creates a new instance. Called by
|
||||
* {@link AssemblerSourceViewerConfiguration#getReconciler(org.eclipse.jface.text.source.ISourceViewer)}
|
||||
* {@link LanguageSourceViewerConfiguration#getReconciler(org.eclipse.jface.text.source.ISourceViewer)}
|
||||
* .
|
||||
*
|
||||
* * @param editor The underlying assembler editor, not <code>null</code>.
|
||||
* * @param editor The underlying language editor, not <code>null</code>.
|
||||
*/
|
||||
AssemblerReconcilingStategy(AssemblerEditor editor) {
|
||||
LanguageReconcilingStategy(LanguageEditor editor) {
|
||||
if (editor == null) {
|
||||
throw new IllegalArgumentException("Parameter 'editor' must not be null.");
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ import com.wudsn.ide.lng.preferences.TextAttributeConverter;
|
||||
* @author Peter Dell
|
||||
* @author Daniel Mitte
|
||||
*/
|
||||
final class AssemblerRuleBasedScanner extends RuleBasedScanner {
|
||||
final class LanguageRuleBasedScanner extends RuleBasedScanner {
|
||||
|
||||
/** Default Token for the text attributes * */
|
||||
private Token defaultToken;
|
||||
@ -44,12 +44,12 @@ final class AssemblerRuleBasedScanner extends RuleBasedScanner {
|
||||
private String preferencesKey;
|
||||
|
||||
/**
|
||||
* Creates a new instance. Called by {@link AssemblerSourceViewerConfiguration}.
|
||||
* Creates a new instance. Called by {@link LanguageSourceViewerConfiguration}.
|
||||
*
|
||||
* @param preferencesKey The preference key to listen to for text attribute
|
||||
* changes, not <code>null</code>..
|
||||
*/
|
||||
AssemblerRuleBasedScanner(String preferencesKey) {
|
||||
LanguageRuleBasedScanner(String preferencesKey) {
|
||||
|
||||
if (preferencesKey == null) {
|
||||
throw new IllegalArgumentException("Parameter 'preferencesKey' must not be null.");
|
||||
@ -72,7 +72,7 @@ final class AssemblerRuleBasedScanner extends RuleBasedScanner {
|
||||
|
||||
/**
|
||||
* Update the token based on the preferences. Called by
|
||||
* {@link AssemblerSourceViewerConfiguration}.
|
||||
* {@link LanguageSourceViewerConfiguration}.
|
||||
*
|
||||
* @param preferences The preferences, not <code>null</code>.
|
||||
* @param changedPropertyNames The set of changed property names, not
|
||||
|
@ -51,9 +51,9 @@ import com.wudsn.ide.lng.preferences.TextAttributeConverter;
|
||||
* @author Peter Dell
|
||||
* @author Andy Reek
|
||||
*/
|
||||
final class AssemblerSourceScanner extends RuleBasedScanner {
|
||||
final class LanguageSourceScanner extends RuleBasedScanner {
|
||||
|
||||
private final class AssemblerWordRule implements IRule {
|
||||
private final class LanguageWordRule implements IRule {
|
||||
public final class State {
|
||||
public CompilerSourceParser compilerSourceParser;
|
||||
|
||||
@ -84,7 +84,7 @@ final class AssemblerSourceScanner extends RuleBasedScanner {
|
||||
}
|
||||
}
|
||||
|
||||
// State of the AssemblerWordRule instance.
|
||||
// State of the LanguageWordRule instance.
|
||||
State state;
|
||||
|
||||
/** Buffer used for pattern detection in evaluate() only. */
|
||||
@ -92,7 +92,7 @@ final class AssemblerSourceScanner extends RuleBasedScanner {
|
||||
private StringBuilder identifierBuffer = new StringBuilder();
|
||||
private StringBuilder numberBuffer = new StringBuilder();
|
||||
|
||||
public AssemblerWordRule() {
|
||||
public LanguageWordRule() {
|
||||
|
||||
}
|
||||
|
||||
@ -347,7 +347,7 @@ final class AssemblerSourceScanner extends RuleBasedScanner {
|
||||
}
|
||||
}
|
||||
|
||||
private AssemblerEditor editor;
|
||||
private LanguageEditor editor;
|
||||
private Map<String, Token> tokens;
|
||||
|
||||
// Numbers
|
||||
@ -369,16 +369,16 @@ final class AssemblerSourceScanner extends RuleBasedScanner {
|
||||
IToken procedureDefinitionSectionIdentifierToken;
|
||||
|
||||
// Word rule
|
||||
private AssemblerWordRule wordRule;
|
||||
private LanguageWordRule wordRule;
|
||||
|
||||
/**
|
||||
* Creates a new instance. Called by the
|
||||
* {@link AssemblerSourceViewerConfiguration}.
|
||||
* {@link LanguageSourceViewerConfiguration}.
|
||||
*
|
||||
* @param editor The underlying AssemblerEditor for the code scanner, not
|
||||
* @param editor The underlying LanguageEditor for the code scanner, not
|
||||
* <code>null</code>.
|
||||
*/
|
||||
AssemblerSourceScanner(AssemblerEditor editor) {
|
||||
LanguageSourceScanner(LanguageEditor editor) {
|
||||
if (editor == null) {
|
||||
throw new IllegalArgumentException("Parameter 'editor' must not be null.");
|
||||
}
|
||||
@ -445,7 +445,7 @@ final class AssemblerSourceScanner extends RuleBasedScanner {
|
||||
private void createRules() {
|
||||
|
||||
// Instructions, identifiers and numbers.
|
||||
wordRule = new AssemblerWordRule();
|
||||
wordRule = new LanguageWordRule();
|
||||
List<IRule> rules = new ArrayList<IRule>(4);
|
||||
rules.add(wordRule);
|
||||
setRules(rules.toArray(new IRule[rules.size()]));
|
||||
@ -478,7 +478,7 @@ final class AssemblerSourceScanner extends RuleBasedScanner {
|
||||
|
||||
/**
|
||||
* Update the token based on the preferences. Called by
|
||||
* {@link AssemblerSourceViewerConfiguration}.
|
||||
* {@link LanguageSourceViewerConfiguration}.
|
||||
*
|
||||
* @param preferences The preferences, not <code>null</code>.
|
||||
* @param changedPropertyNames The set of changed property names, not
|
||||
|
@ -43,50 +43,50 @@ import com.wudsn.ide.lng.preferences.LanguagePreferencesChangeListener;
|
||||
import com.wudsn.ide.lng.preferences.LanguagePreferencesConstants;
|
||||
|
||||
/**
|
||||
* Source configuration for the assembler editor. Provides syntax highlighting.
|
||||
* Source configuration for the language editor. Provides syntax highlighting.
|
||||
*
|
||||
* Created and disposed by {@link AssemblerEditor}.
|
||||
* Created and disposed by {@link LanguageEditor}.
|
||||
*
|
||||
* @author Peter Dell
|
||||
* @author Andy Reek
|
||||
*/
|
||||
final class AssemblerSourceViewerConfiguration extends TextSourceViewerConfiguration
|
||||
final class LanguageSourceViewerConfiguration extends TextSourceViewerConfiguration
|
||||
implements LanguagePreferencesChangeListener {
|
||||
|
||||
/**
|
||||
* The underlying assembler editor.
|
||||
* The underlying language editor.
|
||||
*/
|
||||
private AssemblerEditor editor;
|
||||
private LanguageEditor editor;
|
||||
|
||||
/**
|
||||
* Rule scanner for single line comments.
|
||||
*/
|
||||
private AssemblerRuleBasedScanner commentSingleScanner;
|
||||
private LanguageRuleBasedScanner commentSingleScanner;
|
||||
|
||||
/**
|
||||
* Rule scanner for multiple lines comments.
|
||||
*/
|
||||
private AssemblerRuleBasedScanner commentMultipleScanner;
|
||||
private LanguageRuleBasedScanner commentMultipleScanner;
|
||||
|
||||
/**
|
||||
* Rule scanner for strings.
|
||||
*/
|
||||
private AssemblerRuleBasedScanner stringScanner;
|
||||
private LanguageRuleBasedScanner stringScanner;
|
||||
|
||||
/**
|
||||
* Rule scanner for assembler instructions.
|
||||
* Rule scanner for language instructions.
|
||||
*/
|
||||
private AssemblerSourceScanner instructionScanner;
|
||||
private LanguageSourceScanner instructionScanner;
|
||||
|
||||
/**
|
||||
* Creates a new instance. Called by {@link AssemblerEditor#initializeEditor()}.
|
||||
* Creates a new instance. Called by {@link LanguageEditor#initializeEditor()}.
|
||||
*
|
||||
* @param editor The underlying assembler editor, not
|
||||
* @param editor The underlying language editor, not
|
||||
* <code>null</code>.
|
||||
*
|
||||
* @param preferenceStore The preferences store, not <code>null</code>.
|
||||
*/
|
||||
AssemblerSourceViewerConfiguration(AssemblerEditor editor, IPreferenceStore preferenceStore) {
|
||||
LanguageSourceViewerConfiguration(LanguageEditor editor, IPreferenceStore preferenceStore) {
|
||||
super(preferenceStore);
|
||||
if (editor == null) {
|
||||
throw new IllegalArgumentException("Parameter 'editor' must not be null.");
|
||||
@ -98,11 +98,11 @@ final class AssemblerSourceViewerConfiguration extends TextSourceViewerConfigura
|
||||
|
||||
/**
|
||||
* Called by
|
||||
* {@link AssemblerEditor#updateIdentifiers(com.wudsn.ide.lng.compiler.parser.CompilerSourceFile)}
|
||||
* {@link LanguageEditor#updateIdentifiers(com.wudsn.ide.lng.compiler.parser.CompilerSourceFile)}
|
||||
*
|
||||
* @return The instruction scanner, not <code>null</code>.
|
||||
*/
|
||||
final AssemblerSourceScanner getAssemblerInstructionScanner() {
|
||||
final LanguageSourceScanner getInstructionScanner() {
|
||||
if (instructionScanner == null) {
|
||||
throw new IllegalStateException("Instruction scanner not yet created");
|
||||
}
|
||||
@ -111,7 +111,7 @@ final class AssemblerSourceViewerConfiguration extends TextSourceViewerConfigura
|
||||
|
||||
/**
|
||||
* Remove all rule scanners from property change listener. Used by
|
||||
* {@link AssemblerEditor#dispose()}.
|
||||
* {@link LanguageEditor#dispose()}.
|
||||
*/
|
||||
final void dispose() {
|
||||
if (commentSingleScanner != null) {
|
||||
@ -154,7 +154,7 @@ final class AssemblerSourceViewerConfiguration extends TextSourceViewerConfigura
|
||||
@Override
|
||||
public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
|
||||
ContentAssistant assistant = new ContentAssistant();
|
||||
assistant.setContentAssistProcessor(new AssemblerContentAssistProcessor(editor),
|
||||
assistant.setContentAssistProcessor(new LanguageContentAssistProcessor(editor),
|
||||
IDocument.DEFAULT_CONTENT_TYPE);
|
||||
assistant.setContextInformationPopupOrientation(IContentAssistant.CONTEXT_INFO_ABOVE);
|
||||
assistant.enableAutoActivation(true);
|
||||
@ -173,24 +173,24 @@ final class AssemblerSourceViewerConfiguration extends TextSourceViewerConfigura
|
||||
PresentationReconciler reconciler = new PresentationReconciler();
|
||||
DefaultDamagerRepairer dr;
|
||||
|
||||
commentSingleScanner = new AssemblerRuleBasedScanner(
|
||||
commentSingleScanner = new LanguageRuleBasedScanner(
|
||||
LanguagePreferencesConstants.EDITOR_TEXT_ATTRIBUTE_COMMENT);
|
||||
dr = new DefaultDamagerRepairer(commentSingleScanner);
|
||||
reconciler.setDamager(dr, CompilerSourcePartitionScanner.PARTITION_COMMENT_SINGLE);
|
||||
reconciler.setRepairer(dr, CompilerSourcePartitionScanner.PARTITION_COMMENT_SINGLE);
|
||||
|
||||
commentMultipleScanner = new AssemblerRuleBasedScanner(
|
||||
commentMultipleScanner = new LanguageRuleBasedScanner(
|
||||
LanguagePreferencesConstants.EDITOR_TEXT_ATTRIBUTE_COMMENT);
|
||||
dr = new DefaultDamagerRepairer(commentMultipleScanner);
|
||||
reconciler.setDamager(dr, CompilerSourcePartitionScanner.PARTITION_COMMENT_MULTIPLE);
|
||||
reconciler.setRepairer(dr, CompilerSourcePartitionScanner.PARTITION_COMMENT_MULTIPLE);
|
||||
|
||||
stringScanner = new AssemblerRuleBasedScanner(LanguagePreferencesConstants.EDITOR_TEXT_ATTRIBUTE_STRING);
|
||||
stringScanner = new LanguageRuleBasedScanner(LanguagePreferencesConstants.EDITOR_TEXT_ATTRIBUTE_STRING);
|
||||
dr = new DefaultDamagerRepairer(stringScanner);
|
||||
reconciler.setDamager(dr, CompilerSourcePartitionScanner.PARTITION_STRING);
|
||||
reconciler.setRepairer(dr, CompilerSourcePartitionScanner.PARTITION_STRING);
|
||||
|
||||
instructionScanner = new AssemblerSourceScanner(editor);
|
||||
instructionScanner = new LanguageSourceScanner(editor);
|
||||
dr = new DefaultDamagerRepairer(instructionScanner);
|
||||
reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
|
||||
reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);
|
||||
@ -203,7 +203,7 @@ final class AssemblerSourceViewerConfiguration extends TextSourceViewerConfigura
|
||||
if (sourceViewer == null) {
|
||||
throw new IllegalArgumentException("Parameter 'sourceViewer' must not be null.");
|
||||
}
|
||||
IReconcilingStrategy reconcilingStrategy = new AssemblerReconcilingStategy(editor);
|
||||
IReconcilingStrategy reconcilingStrategy = new LanguageReconcilingStategy(editor);
|
||||
|
||||
MonoReconciler reconciler = new MonoReconciler(reconcilingStrategy, false);
|
||||
reconciler.setProgressMonitor(new NullProgressMonitor());
|
||||
@ -215,7 +215,7 @@ final class AssemblerSourceViewerConfiguration extends TextSourceViewerConfigura
|
||||
@Override
|
||||
protected Map<String, IAdaptable> getHyperlinkDetectorTargets(ISourceViewer sourceViewer) {
|
||||
Map<String, IAdaptable> targets = super.getHyperlinkDetectorTargets(sourceViewer);
|
||||
targets.put(AssemblerHyperlinkDetector.TARGET, editor);
|
||||
targets.put(LanguageHyperlinkDetector.TARGET, editor);
|
||||
return targets;
|
||||
}
|
||||
|
||||
|
@ -77,7 +77,7 @@ import com.wudsn.ide.lng.runner.RunnerRegistry;
|
||||
* TODO Complete opcode entries in Compiler.xml, also for extended and
|
||||
* illegal opcodes
|
||||
*/
|
||||
public final class AssemblerHelpContentProducer implements IHelpContentProducer {
|
||||
public final class LanguageHelpContentProducer implements IHelpContentProducer {
|
||||
|
||||
// In order to get the navigation breadcrumbs automatically,
|
||||
// the files have to have this suffix (see BreadcrumbsFilter).
|
||||
@ -610,7 +610,7 @@ public final class AssemblerHelpContentProducer implements IHelpContentProducer
|
||||
HTMLWriter writer = createHeader();
|
||||
|
||||
writer.beginTable();
|
||||
writer.writeTableRow(Texts.TOC_TARGET_NAME_LABEL, EnumUtility.getText(target));
|
||||
writer.writeTableRow(Texts.TOC_TARGETS_NAME_LABEL, EnumUtility.getText(target));
|
||||
writer.end();
|
||||
|
||||
writer.begin("br", null);
|
||||
|
@ -54,7 +54,7 @@ import com.wudsn.ide.lng.preferences.LanguagePreferences;
|
||||
*
|
||||
* @since 1.6.1
|
||||
*/
|
||||
public final class AssemblerTocProvider extends AbstractTocProvider {
|
||||
public final class LanguageTocProvider extends AbstractTocProvider {
|
||||
|
||||
private static final class Toc implements IToc {
|
||||
private ITopic[] topics;
|
||||
@ -142,7 +142,7 @@ public final class AssemblerTocProvider extends AbstractTocProvider {
|
||||
|
||||
}
|
||||
|
||||
public AssemblerTocProvider() {
|
||||
public LanguageTocProvider() {
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -159,8 +159,8 @@ public final class AssemblerTocProvider extends AbstractTocProvider {
|
||||
String key = href;
|
||||
try {
|
||||
ResourceBundle resourceBundle;
|
||||
resourceBundle = ResourceBundle.getBundle("com/wudsn/ide/asm/help/AssemblerTocProvider",
|
||||
Locale.getDefault(), AssemblerTocProvider.class.getClassLoader());
|
||||
resourceBundle = ResourceBundle.getBundle("com/wudsn/ide/asm/help/LanguageTocProvider",
|
||||
Locale.getDefault(), LanguageTocProvider.class.getClassLoader());
|
||||
label = resourceBundle.getString(key);
|
||||
} catch (MissingResourceException ex) {
|
||||
label = href + " - Text missing";
|
||||
@ -200,14 +200,14 @@ public final class AssemblerTocProvider extends AbstractTocProvider {
|
||||
List<CompilerDefinition> compilerDefinitions = compilerRegistry.getCompilerDefinitions();
|
||||
|
||||
List<ITopic> ideTopics = createIDETopics();
|
||||
List<ITopic> assemblerTopics = createAssemblerTopics(compilerDefinitions);
|
||||
List<ITopic> compilerTopics = createCompilerTopics(compilerDefinitions);
|
||||
List<ITopic> hardwareTopics = createHardwareTopics();
|
||||
List<ITopic> cpuTopics = createCPUTopics();
|
||||
List<ITopic> cpuTopics = createTargetTopics();
|
||||
|
||||
List<ITopic> topics = new ArrayList<ITopic>();
|
||||
|
||||
topics.add(createTopic("", Texts.TOC_IDE_TOPIC_LABEL, "", createTopicsArray(ideTopics)));
|
||||
topics.add(createTopic("", Texts.TOC_ASSEMBLERS_TOPIC_LABEL, "", createTopicsArray(assemblerTopics)));
|
||||
topics.add(createTopic("", Texts.TOC_COMPILERS_TOPIC_LABEL, "", createTopicsArray(compilerTopics)));
|
||||
topics.add(createTopic("", Texts.TOC_HARDWARES_TOPIC_LABEL, "", createTopicsArray(hardwareTopics)));
|
||||
topics.add(createTopic("", Texts.TOC_TARGETS_TOPIC_LABEL, "", createTopicsArray(cpuTopics)));
|
||||
|
||||
@ -226,23 +226,23 @@ public final class AssemblerTocProvider extends AbstractTocProvider {
|
||||
return topics;
|
||||
}
|
||||
|
||||
private static List<ITopic> createAssemblerTopics(List<CompilerDefinition> compilerDefinitions) {
|
||||
private static List<ITopic> createCompilerTopics(List<CompilerDefinition> compilerDefinitions) {
|
||||
if (compilerDefinitions == null) {
|
||||
throw new IllegalArgumentException("Parameter 'compilerDefinitions' must not be null.");
|
||||
}
|
||||
int size = compilerDefinitions.size();
|
||||
List<ITopic> assemblerTopics = new ArrayList<ITopic>(size);
|
||||
List<ITopic> compilerTopics = new ArrayList<ITopic>(size);
|
||||
|
||||
for (int i = 0; i < size; i++) {
|
||||
CompilerDefinition compilerDefinition = compilerDefinitions.get(i);
|
||||
|
||||
String href = AssemblerHelpContentProducer.SCHEMA_COMPILER + compilerDefinition.getId() + "/"
|
||||
+ AssemblerHelpContentProducer.SECTION_GENERAL + AssemblerHelpContentProducer.EXTENSION;
|
||||
String href = LanguageHelpContentProducer.SCHEMA_COMPILER + compilerDefinition.getId() + "/"
|
||||
+ LanguageHelpContentProducer.SECTION_GENERAL + LanguageHelpContentProducer.EXTENSION;
|
||||
|
||||
ITopic generalTopic = createTopic("", Texts.TOC_COMPILER_GENERAL_TOPIC_LABEL, href, null);
|
||||
|
||||
href = AssemblerHelpContentProducer.SCHEMA_COMPILER + compilerDefinition.getId() + "/"
|
||||
+ AssemblerHelpContentProducer.SECTION_INSTRUCTIONS + AssemblerHelpContentProducer.EXTENSION;
|
||||
href = LanguageHelpContentProducer.SCHEMA_COMPILER + compilerDefinition.getId() + "/"
|
||||
+ LanguageHelpContentProducer.SECTION_INSTRUCTIONS + LanguageHelpContentProducer.EXTENSION;
|
||||
ITopic opcodesTopic = createTopic("", Texts.TOC_COMPILER_INSTRUCTIONS_TOPIC_LABEL, href, null);
|
||||
|
||||
LanguagePreferences languagePreferences = LanguagePlugin.getInstance().getPreferences();
|
||||
@ -267,8 +267,8 @@ public final class AssemblerTocProvider extends AbstractTocProvider {
|
||||
extension = ".html";
|
||||
}
|
||||
|
||||
href = AssemblerHelpContentProducer.SCHEMA_COMPILER + compilerDefinition.getId() + "/"
|
||||
+ AssemblerHelpContentProducer.SECTION_MANUAL + extension;
|
||||
href = LanguageHelpContentProducer.SCHEMA_COMPILER + compilerDefinition.getId() + "/"
|
||||
+ LanguageHelpContentProducer.SECTION_MANUAL + extension;
|
||||
|
||||
if (file.isDirectory()) {
|
||||
File[] files = file.listFiles();
|
||||
@ -282,7 +282,7 @@ public final class AssemblerTocProvider extends AbstractTocProvider {
|
||||
}
|
||||
|
||||
manualTopics.add(createTopic("", file2.getName(),
|
||||
href + "?" + AssemblerHelpContentProducer.SECTION_MANUAL_FILE + "=" + encodedPath,
|
||||
href + "?" + LanguageHelpContentProducer.SECTION_MANUAL_FILE + "=" + encodedPath,
|
||||
null));
|
||||
}
|
||||
}
|
||||
@ -291,17 +291,17 @@ public final class AssemblerTocProvider extends AbstractTocProvider {
|
||||
href = "";
|
||||
}
|
||||
} catch (CoreException ex) {
|
||||
href = AssemblerHelpContentProducer.SCHEMA_COMPILER + compilerDefinition.getId() + "/"
|
||||
+ AssemblerHelpContentProducer.SECTION_MANUAL + ".html";
|
||||
href = LanguageHelpContentProducer.SCHEMA_COMPILER + compilerDefinition.getId() + "/"
|
||||
+ LanguageHelpContentProducer.SECTION_MANUAL + ".html";
|
||||
}
|
||||
|
||||
ITopic manualTopic = createTopic(icon, Texts.TOC_COMPILER_MANUAL_TOPIC_LABEL, href,
|
||||
createTopicsArray(manualTopics));
|
||||
|
||||
assemblerTopics.add(createTopic("", compilerDefinition.getName(), "",
|
||||
compilerTopics.add(createTopic("", compilerDefinition.getName(), "",
|
||||
new ITopic[] { generalTopic, opcodesTopic, manualTopic }));
|
||||
}
|
||||
return assemblerTopics;
|
||||
return compilerTopics;
|
||||
}
|
||||
|
||||
private static List<ITopic> createHardwareTopics() {
|
||||
@ -338,18 +338,18 @@ public final class AssemblerTocProvider extends AbstractTocProvider {
|
||||
// Nothing available.
|
||||
|
||||
}
|
||||
String href = AssemblerHelpContentProducer.SCHEMA_HARDWARE + hardware.name().toLowerCase()
|
||||
+ AssemblerHelpContentProducer.EXTENSION;
|
||||
String href = LanguageHelpContentProducer.SCHEMA_HARDWARE + hardware.name().toLowerCase()
|
||||
+ LanguageHelpContentProducer.EXTENSION;
|
||||
hardwareTopics.add(createTopic("", EnumUtility.getText(hardware), href, createTopicsArray(chipTopics)));
|
||||
}
|
||||
return hardwareTopics;
|
||||
}
|
||||
|
||||
private static List<ITopic> createCPUTopics() {
|
||||
private static List<ITopic> createTargetTopics() {
|
||||
List<ITopic> cpuTopics = new ArrayList<ITopic>(Target.values().length - 1);
|
||||
for (Target target : Target.values()) {
|
||||
String href = AssemblerHelpContentProducer.SCHEMA_TARGET + target.name().toLowerCase()
|
||||
+ AssemblerHelpContentProducer.EXTENSION;
|
||||
String href = LanguageHelpContentProducer.SCHEMA_TARGET + target.name().toLowerCase()
|
||||
+ LanguageHelpContentProducer.EXTENSION;
|
||||
cpuTopics.add(createTopic("", EnumUtility.getText(target), href, null));
|
||||
}
|
||||
return cpuTopics;
|
||||
|
@ -17,7 +17,7 @@
|
||||
* along with WUDSN IDE. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.wudsn.ide.lng.editor;
|
||||
package com.wudsn.ide.lng.outline;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
@ -55,15 +55,17 @@ import com.wudsn.ide.lng.LanguagePlugin;
|
||||
import com.wudsn.ide.lng.Texts;
|
||||
import com.wudsn.ide.lng.compiler.parser.CompilerSourceFile;
|
||||
import com.wudsn.ide.lng.compiler.parser.CompilerSourceParserTreeObject;
|
||||
import com.wudsn.ide.lng.compiler.parser.CompilerSourceParserTreeObjectLabelProvider;
|
||||
import com.wudsn.ide.lng.compiler.parser.CompilerSourceParserTreeObjectType;
|
||||
import com.wudsn.ide.lng.editor.LanguageEditor;
|
||||
|
||||
/**
|
||||
* Outline page for the assembler editor.
|
||||
* Outline page for the language editor.
|
||||
*
|
||||
* @author Peter Dell.
|
||||
* @author Andy Reek
|
||||
*/
|
||||
final class AssemblerContentOutlinePage extends ContentOutlinePage {
|
||||
public final class LanguageOutlinePage extends ContentOutlinePage {
|
||||
|
||||
/*
|
||||
* Toggle action to toggle the sorting in the outline tree. The state of the
|
||||
@ -74,7 +76,7 @@ final class AssemblerContentOutlinePage extends ContentOutlinePage {
|
||||
private static final class OutlineViewerSortAction extends Action {
|
||||
private static final QualifiedName CHECKED = new QualifiedName("OutlineViewerSortAction", "Checked");
|
||||
|
||||
final AssemblerEditor editor;
|
||||
final LanguageEditor editor;
|
||||
final TreeViewer treeViewer;
|
||||
|
||||
/**
|
||||
@ -84,7 +86,7 @@ final class AssemblerContentOutlinePage extends ContentOutlinePage {
|
||||
* <code>null</code>.
|
||||
* @param treeViewer The tree viewer which displays the outline.
|
||||
*/
|
||||
public OutlineViewerSortAction(AssemblerEditor editor, TreeViewer treeViewer) {
|
||||
public OutlineViewerSortAction(LanguageEditor editor, TreeViewer treeViewer) {
|
||||
super("", AS_CHECK_BOX);
|
||||
if (editor == null) {
|
||||
throw new IllegalArgumentException("Parameter 'editor' must not be null.");
|
||||
@ -256,12 +258,12 @@ final class AssemblerContentOutlinePage extends ContentOutlinePage {
|
||||
private final static class EditorUpdater extends RunnableWithLogging {
|
||||
private final Profiler profiler;
|
||||
|
||||
private final AssemblerEditor editor;
|
||||
private final AssemblerContentOutlinePage outlinePage;
|
||||
private final LanguageEditor editor;
|
||||
private final LanguageOutlinePage outlinePage;
|
||||
private final TreeViewer viewer;
|
||||
private final AssemblerContentOutlineTreeContentProvider contentProvider;
|
||||
private final LanguageOutlineTreeContentProvider contentProvider;
|
||||
|
||||
EditorUpdater(AssemblerEditor editor, AssemblerContentOutlinePage outlinePage, TreeViewer viewer) {
|
||||
EditorUpdater(LanguageEditor editor, LanguageOutlinePage outlinePage, TreeViewer viewer) {
|
||||
if (editor == null) {
|
||||
throw new IllegalArgumentException("Parameter 'editor' must not be null.");
|
||||
}
|
||||
@ -274,13 +276,13 @@ final class AssemblerContentOutlinePage extends ContentOutlinePage {
|
||||
this.editor = editor;
|
||||
this.outlinePage = outlinePage;
|
||||
this.viewer = viewer;
|
||||
this.contentProvider = (AssemblerContentOutlineTreeContentProvider) viewer.getContentProvider();
|
||||
this.contentProvider = (LanguageOutlineTreeContentProvider) viewer.getContentProvider();
|
||||
profiler = new Profiler(this);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Triggers a new {@link AssemblerContentOutlineTreeContentProvider#parse} run
|
||||
* Triggers a new {@link LanguageOutlineTreeContentProvider#parse} run
|
||||
* and updates the display.
|
||||
*/
|
||||
@Override
|
||||
@ -405,7 +407,7 @@ final class AssemblerContentOutlinePage extends ContentOutlinePage {
|
||||
/**
|
||||
* The owning editor.
|
||||
*/
|
||||
final AssemblerEditor editor;
|
||||
final LanguageEditor editor;
|
||||
|
||||
/**
|
||||
* The visual components.
|
||||
@ -422,9 +424,9 @@ final class AssemblerContentOutlinePage extends ContentOutlinePage {
|
||||
/**
|
||||
* Creates a new instance.
|
||||
*
|
||||
* @param editor The assembler editor, not <code>null</code>.
|
||||
* @param editor The language editor, not <code>null</code>.
|
||||
*/
|
||||
AssemblerContentOutlinePage(AssemblerEditor editor) {
|
||||
public LanguageOutlinePage(LanguageEditor editor) {
|
||||
if (editor == null) {
|
||||
throw new IllegalArgumentException("Parameter 'editor' must not be null.");
|
||||
}
|
||||
@ -436,7 +438,7 @@ final class AssemblerContentOutlinePage extends ContentOutlinePage {
|
||||
*
|
||||
* @param input The new input, not <code>null</code>.
|
||||
*/
|
||||
final void setInput(IEditorInput input) {
|
||||
public final void setInput(IEditorInput input) {
|
||||
if (input == null) {
|
||||
throw new IllegalArgumentException("Parameter 'input' must not be null.");
|
||||
}
|
||||
@ -472,7 +474,7 @@ final class AssemblerContentOutlinePage extends ContentOutlinePage {
|
||||
IToolBarManager toolBarManager = getSite().getActionBars().getToolBarManager();
|
||||
|
||||
// Configure the content.
|
||||
treeViewer.setContentProvider(new AssemblerContentOutlineTreeContentProvider(this));
|
||||
treeViewer.setContentProvider(new LanguageOutlineTreeContentProvider(this));
|
||||
treeViewer.setLabelProvider(new CompilerSourceParserTreeObjectLabelProvider());
|
||||
treeViewer.setComparator(treeViewerComparator);
|
||||
treeViewer.addSelectionChangedListener(this);
|
||||
@ -507,8 +509,8 @@ final class AssemblerContentOutlinePage extends ContentOutlinePage {
|
||||
if (object instanceof CompilerSourceParserTreeObject) {
|
||||
|
||||
CompilerSourceParserTreeObject treeObject;
|
||||
AssemblerContentOutlineTreeContentProvider contentProvider;
|
||||
contentProvider = (AssemblerContentOutlineTreeContentProvider) getTreeViewer().getContentProvider();
|
||||
LanguageOutlineTreeContentProvider contentProvider;
|
||||
contentProvider = (LanguageOutlineTreeContentProvider) getTreeViewer().getContentProvider();
|
||||
treeObject = (CompilerSourceParserTreeObject) object;
|
||||
|
||||
// If this is the tree object from another (source
|
||||
@ -539,9 +541,9 @@ final class AssemblerContentOutlinePage extends ContentOutlinePage {
|
||||
* @return The compiler source file of the last parse process or
|
||||
* <code>null</code>.
|
||||
*/
|
||||
final CompilerSourceFile getCompilerSourceFile() {
|
||||
AssemblerContentOutlineTreeContentProvider contentProvider;
|
||||
contentProvider = (AssemblerContentOutlineTreeContentProvider) getTreeViewer().getContentProvider();
|
||||
public final CompilerSourceFile getCompilerSourceFile() {
|
||||
LanguageOutlineTreeContentProvider contentProvider;
|
||||
contentProvider = (LanguageOutlineTreeContentProvider) getTreeViewer().getContentProvider();
|
||||
CompilerSourceFile compilerSourceFile = contentProvider.getCompilerSourceFile();
|
||||
return compilerSourceFile;
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
* along with WUDSN IDE. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.wudsn.ide.lng.editor;
|
||||
package com.wudsn.ide.lng.outline;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -30,19 +30,20 @@ import com.wudsn.ide.base.common.Profiler;
|
||||
import com.wudsn.ide.lng.compiler.parser.CompilerSourceFile;
|
||||
import com.wudsn.ide.lng.compiler.parser.CompilerSourceParser;
|
||||
import com.wudsn.ide.lng.compiler.parser.CompilerSourceParserTreeObject;
|
||||
import com.wudsn.ide.lng.editor.LanguageEditor;
|
||||
|
||||
/**
|
||||
* Tree content provider to {@link AssemblerContentOutlinePage}.
|
||||
* Tree content provider to {@link LanguageOutlinePage}.
|
||||
*
|
||||
* @author Peter Dell
|
||||
* @author Andy Reek
|
||||
*/
|
||||
final class AssemblerContentOutlineTreeContentProvider implements ITreeContentProvider {
|
||||
final class LanguageOutlineTreeContentProvider implements ITreeContentProvider {
|
||||
|
||||
/**
|
||||
* The surrounding content outline page.
|
||||
*/
|
||||
private final AssemblerContentOutlinePage assemblerContentOutlinePage;
|
||||
private final LanguageOutlinePage languageOutlinePage;
|
||||
|
||||
/**
|
||||
* The last editor input which was parsed.
|
||||
@ -56,16 +57,16 @@ final class AssemblerContentOutlineTreeContentProvider implements ITreeContentPr
|
||||
|
||||
/**
|
||||
* Called by
|
||||
* {@link AssemblerContentOutlinePage#createControl(org.eclipse.swt.widgets.Composite)}
|
||||
* {@link LanguageOutlinePage#createControl(org.eclipse.swt.widgets.Composite)}
|
||||
* .
|
||||
*
|
||||
* @param assemblerContentOutlinePage The outline page, not <code>null</code>.
|
||||
* @param languageOutlinePage The outline page, not <code>null</code>.
|
||||
*/
|
||||
AssemblerContentOutlineTreeContentProvider(AssemblerContentOutlinePage assemblerContentOutlinePage) {
|
||||
if (assemblerContentOutlinePage == null) {
|
||||
throw new IllegalArgumentException("Parameter 'assemblerContentOutlinePage' must not be null.");
|
||||
LanguageOutlineTreeContentProvider(LanguageOutlinePage languageOutlinePage) {
|
||||
if (languageOutlinePage == null) {
|
||||
throw new IllegalArgumentException("Parameter 'languageOutlinePage' must not be null.");
|
||||
}
|
||||
this.assemblerContentOutlinePage = assemblerContentOutlinePage;
|
||||
this.languageOutlinePage = languageOutlinePage;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -158,7 +159,7 @@ final class AssemblerContentOutlineTreeContentProvider implements ITreeContentPr
|
||||
*/
|
||||
private void parse() {
|
||||
|
||||
AssemblerEditor editor = this.assemblerContentOutlinePage.editor;
|
||||
LanguageEditor editor = this.languageOutlinePage.editor;
|
||||
IDocument document = editor.getDocumentProvider().getDocument(editor.getEditorInput());
|
||||
|
||||
if (document != null) {
|
||||
|
@ -21,7 +21,7 @@ package com.wudsn.ide.lng.preferences;
|
||||
|
||||
import com.wudsn.ide.base.common.StringUtility;
|
||||
import com.wudsn.ide.base.hardware.Hardware;
|
||||
import com.wudsn.ide.lng.AssemblerProperties;
|
||||
import com.wudsn.ide.lng.LanguageProperties;
|
||||
|
||||
/**
|
||||
* Facade class to mix compiler run specific preferences into the global
|
||||
@ -33,10 +33,10 @@ import com.wudsn.ide.lng.AssemblerProperties;
|
||||
public final class CompilerRunPreferences {
|
||||
|
||||
private CompilerPreferences compilerPreferences;
|
||||
private AssemblerProperties mainSourceFileProperties;
|
||||
private LanguageProperties mainSourceFileProperties;
|
||||
|
||||
public CompilerRunPreferences(CompilerPreferences compilerPreferences,
|
||||
AssemblerProperties mainSourceFileProperties) {
|
||||
LanguageProperties mainSourceFileProperties) {
|
||||
if (compilerPreferences == null) {
|
||||
throw new IllegalArgumentException("Parameter 'compilerPreferences' must not be null.");
|
||||
}
|
||||
|
@ -25,8 +25,8 @@ import org.eclipse.jface.text.TextAttribute;
|
||||
import com.wudsn.ide.base.common.AbstractIDEPlugin;
|
||||
import com.wudsn.ide.base.common.StringUtility;
|
||||
import com.wudsn.ide.base.hardware.Hardware;
|
||||
import com.wudsn.ide.lng.editor.AssemblerContentAssistProcessorDefaultCase;
|
||||
import com.wudsn.ide.lng.editor.AssemblerEditorCompileCommandPositioningMode;
|
||||
import com.wudsn.ide.lng.editor.LanguageContentAssistProcessorDefaultCase;
|
||||
import com.wudsn.ide.lng.editor.LanguageEditorCompileCommandPositioningMode;
|
||||
|
||||
/**
|
||||
* Facade class for typed access to the plugin preferences.
|
||||
@ -71,7 +71,7 @@ public final class LanguagePreferences {
|
||||
* Gets the default case content assist.
|
||||
*
|
||||
* @return The default case content assist, may be empty, not <code>null</code>.
|
||||
* See {@link AssemblerContentAssistProcessorDefaultCase}.
|
||||
* See {@link LanguageContentAssistProcessorDefaultCase}.
|
||||
*/
|
||||
public String getEditorContentAssistProcessorDefaultCase() {
|
||||
return getString(LanguagePreferencesConstants.EDITOR_CONTENT_ASSIST_PROCESSOR_DEFAULT_CASE);
|
||||
@ -81,7 +81,7 @@ public final class LanguagePreferences {
|
||||
* Gets the compile command positioning mode.
|
||||
*
|
||||
* @return The positioning mode, may be empty, not <code>null</code>. See
|
||||
* {@link AssemblerEditorCompileCommandPositioningMode}.
|
||||
* {@link LanguageEditorCompileCommandPositioningMode}.
|
||||
* @since 1.6.1
|
||||
*/
|
||||
public String getEditorCompileCommandPositioningMode() {
|
||||
|
@ -33,7 +33,7 @@ public interface LanguagePreferencesChangeListener {
|
||||
/**
|
||||
* Notify of changed properties.
|
||||
*
|
||||
* @param preferences The assembler preferences containing the new
|
||||
* @param preferences The language preferences containing the new
|
||||
* values, not <code>null</code>.
|
||||
* @param changedPropertyNames The set of names of properties that have been
|
||||
* changed, may be empty, not <code>null</code>.
|
||||
|
@ -61,7 +61,7 @@ import com.wudsn.ide.lng.Texts;
|
||||
import com.wudsn.ide.lng.compiler.CompilerDefinition;
|
||||
import com.wudsn.ide.lng.compiler.CompilerOutputFolderMode;
|
||||
import com.wudsn.ide.lng.compiler.CompilerRegistry;
|
||||
import com.wudsn.ide.lng.editor.AssemblerEditor;
|
||||
import com.wudsn.ide.lng.editor.LanguageEditor;
|
||||
import com.wudsn.ide.lng.runner.RunnerDefinition;
|
||||
import com.wudsn.ide.lng.runner.RunnerId;
|
||||
import com.wudsn.ide.lng.runner.RunnerRegistry;
|
||||
@ -222,11 +222,11 @@ public abstract class LanguagePreferencesCompilersPage extends FieldEditorPrefer
|
||||
throw new IllegalArgumentException("Parameter 'workbench' must not be null.");
|
||||
}
|
||||
IEditorPart editor = workbench.getActiveWorkbenchWindow().getActivePage().getActiveEditor();
|
||||
if (editor instanceof AssemblerEditor) {
|
||||
AssemblerEditor assemblerEditor;
|
||||
assemblerEditor = (AssemblerEditor) editor;
|
||||
activeCompilerId = assemblerEditor.getCompilerDefinition().getId();
|
||||
activeRunnerId = assemblerEditor.getCompilerPreferences().getRunnerId();
|
||||
if (editor instanceof LanguageEditor) {
|
||||
LanguageEditor languageEditor;
|
||||
languageEditor = (LanguageEditor) editor;
|
||||
activeCompilerId = languageEditor.getCompilerDefinition().getId();
|
||||
activeRunnerId = languageEditor.getCompilerPreferences().getRunnerId();
|
||||
} else {
|
||||
activeCompilerId = "";
|
||||
activeRunnerId = "";
|
||||
|
@ -34,8 +34,8 @@ import com.wudsn.ide.lng.LanguagePlugin;
|
||||
import com.wudsn.ide.lng.compiler.CompilerDefinition;
|
||||
import com.wudsn.ide.lng.compiler.CompilerOutputFolderMode;
|
||||
import com.wudsn.ide.lng.compiler.CompilerRegistry;
|
||||
import com.wudsn.ide.lng.editor.AssemblerContentAssistProcessorDefaultCase;
|
||||
import com.wudsn.ide.lng.editor.AssemblerEditorCompileCommandPositioningMode;
|
||||
import com.wudsn.ide.lng.editor.LanguageContentAssistProcessorDefaultCase;
|
||||
import com.wudsn.ide.lng.editor.LanguageEditorCompileCommandPositioningMode;
|
||||
import com.wudsn.ide.lng.runner.RunnerId;
|
||||
|
||||
/**
|
||||
@ -99,11 +99,11 @@ public final class LanguagePreferencesInitializer extends AbstractPreferenceInit
|
||||
|
||||
// Content assist.
|
||||
store.setDefault(LanguagePreferencesConstants.EDITOR_CONTENT_ASSIST_PROCESSOR_DEFAULT_CASE,
|
||||
AssemblerContentAssistProcessorDefaultCase.LOWER_CASE);
|
||||
LanguageContentAssistProcessorDefaultCase.LOWER_CASE);
|
||||
|
||||
// Compiling.
|
||||
store.setDefault(LanguagePreferencesConstants.EDITOR_COMPILE_COMMAND_POSITIONING_MODE,
|
||||
AssemblerEditorCompileCommandPositioningMode.FIRST_ERROR_OR_WARNING);
|
||||
LanguageEditorCompileCommandPositioningMode.FIRST_ERROR_OR_WARNING);
|
||||
}
|
||||
|
||||
private void initializeCompilerPreferences(IPreferenceStore store) {
|
||||
|
@ -63,9 +63,9 @@ import com.wudsn.ide.lng.Language;
|
||||
import com.wudsn.ide.lng.Texts;
|
||||
import com.wudsn.ide.lng.compiler.CompilerDefinition;
|
||||
import com.wudsn.ide.lng.compiler.CompilerRegistry;
|
||||
import com.wudsn.ide.lng.editor.AssemblerContentAssistProcessorDefaultCase;
|
||||
import com.wudsn.ide.lng.editor.AssemblerEditor;
|
||||
import com.wudsn.ide.lng.editor.AssemblerEditorCompileCommandPositioningMode;
|
||||
import com.wudsn.ide.lng.editor.LanguageContentAssistProcessorDefaultCase;
|
||||
import com.wudsn.ide.lng.editor.LanguageEditor;
|
||||
import com.wudsn.ide.lng.editor.LanguageEditorCompileCommandPositioningMode;
|
||||
|
||||
/**
|
||||
* Visual editor page for the language preferences.
|
||||
@ -198,10 +198,10 @@ public abstract class LanguagePreferencesPage extends FieldEditorPreferencePage
|
||||
@Override
|
||||
public void init(IWorkbench workbench) {
|
||||
IEditorPart editor = workbench.getActiveWorkbenchWindow().getActivePage().getActiveEditor();
|
||||
if (editor instanceof AssemblerEditor) {
|
||||
AssemblerEditor assemblerEditor;
|
||||
assemblerEditor = (AssemblerEditor) editor;
|
||||
activeCompilerId = assemblerEditor.getCompilerDefinition().getId();
|
||||
if (editor instanceof LanguageEditor) {
|
||||
LanguageEditor languageEditor;
|
||||
languageEditor = (LanguageEditor) editor;
|
||||
activeCompilerId = languageEditor.getCompilerDefinition().getId();
|
||||
|
||||
}
|
||||
changedPropertyNames.clear();
|
||||
@ -419,11 +419,11 @@ public abstract class LanguagePreferencesPage extends FieldEditorPreferencePage
|
||||
labelsAndValues = new String[][] { {
|
||||
|
||||
Texts.PREFERENCES_CONTENT_ASSIST_PROCESSOR_DEFAULT_CASE_LOWER_CASE_TEXT,
|
||||
AssemblerContentAssistProcessorDefaultCase.LOWER_CASE },
|
||||
LanguageContentAssistProcessorDefaultCase.LOWER_CASE },
|
||||
{
|
||||
|
||||
Texts.PREFERENCES_CONTENT_ASSIST_PROCESSOR_DEFAULT_CASE_UPPER_CASE_TEXT,
|
||||
AssemblerContentAssistProcessorDefaultCase.UPPER_CASE }
|
||||
LanguageContentAssistProcessorDefaultCase.UPPER_CASE }
|
||||
|
||||
};
|
||||
|
||||
@ -435,11 +435,11 @@ public abstract class LanguagePreferencesPage extends FieldEditorPreferencePage
|
||||
labelsAndValues = new String[][] { {
|
||||
|
||||
Texts.PREFERENCES_COMPILE_COMMAND_POSITIONING_MODE_FIRST_ERROR_OR_WARNING_TEXT,
|
||||
AssemblerEditorCompileCommandPositioningMode.FIRST_ERROR_OR_WARNING },
|
||||
LanguageEditorCompileCommandPositioningMode.FIRST_ERROR_OR_WARNING },
|
||||
{
|
||||
|
||||
Texts.PREFERENCES_COMPILE_COMMAND_POSITIONING_MODE_FIRST_ERROR_TEXT,
|
||||
AssemblerEditorCompileCommandPositioningMode.FIRST_ERROR }
|
||||
LanguageEditorCompileCommandPositioningMode.FIRST_ERROR }
|
||||
|
||||
};
|
||||
|
||||
|
@ -21,8 +21,8 @@ package com.wudsn.ide.lng.runner;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import com.wudsn.ide.lng.breakpoint.LanguageBreakpoint;
|
||||
import com.wudsn.ide.lng.compiler.CompilerFiles;
|
||||
import com.wudsn.ide.lng.editor.AssemblerBreakpoint;
|
||||
|
||||
/**
|
||||
* Base class for runner implementations.
|
||||
@ -67,7 +67,7 @@ public class Runner {
|
||||
/**
|
||||
* Creates the {@link File} object for the breakpoints file.
|
||||
*
|
||||
* @param files The assembler editor file containing the path to the output
|
||||
* @param files The language editor file containing the path to the output
|
||||
* folder and file, not <code>null</code>.
|
||||
*
|
||||
* @return The file to created (if there are breakpoints) or deleted (if there
|
||||
@ -95,7 +95,7 @@ public class Runner {
|
||||
* are active.
|
||||
* @since 1.6.1
|
||||
*/
|
||||
public int createBreakpointsFileContent(AssemblerBreakpoint[] breakpoints, StringBuilder breakpointBuilder) {
|
||||
public int createBreakpointsFileContent(LanguageBreakpoint[] breakpoints, StringBuilder breakpointBuilder) {
|
||||
if (breakpoints == null) {
|
||||
throw new IllegalArgumentException("Parameter 'breakpoints' must not be null.");
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
* along with WUDSN IDE. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.wudsn.ide.lng.editor;
|
||||
package com.wudsn.ide.lng.symbol;
|
||||
|
||||
import org.eclipse.swt.graphics.Image;
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
* along with WUDSN IDE. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.wudsn.ide.lng.editor;
|
||||
package com.wudsn.ide.lng.symbol;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.util.ArrayList;
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<description url="http://www.wudsn.com">
|
||||
The WUDSN IDE is an Eclipse feature which provides integrated
|
||||
an assembler development environment for Apple II, Atari 2600,
|
||||
an development environment for Apple II, Atari 2600,
|
||||
Atari 7800, Atari 8-bit, Commodore 8-bit and Nintendo 8-bit
|
||||
computers.
|
||||
</description>
|
||||
|
@ -23,7 +23,7 @@ import com.wudsn.ide.lng.Language;
|
||||
import com.wudsn.ide.lng.preferences.LanguagePreferencesCompilersPage;
|
||||
|
||||
/**
|
||||
* Visual editor page for the assembler preferences regarding Apple 2 compilers.
|
||||
* Visual editor page for the Pascal preferences regarding Apple 2 compilers.
|
||||
*
|
||||
* @author Peter Dell
|
||||
*
|
||||
|
@ -23,7 +23,7 @@ import com.wudsn.ide.lng.Language;
|
||||
import com.wudsn.ide.lng.preferences.LanguagePreferencesCompilersPage;
|
||||
|
||||
/**
|
||||
* Visual editor page for the assembler preferences regarding Apple 2 compilers.
|
||||
* Visual editor page for the Pascal preferences regarding Apple 2 compilers.
|
||||
*
|
||||
* @author Peter Dell
|
||||
*
|
||||
|
@ -23,7 +23,7 @@ import com.wudsn.ide.lng.Language;
|
||||
import com.wudsn.ide.lng.preferences.LanguagePreferencesCompilersPage;
|
||||
|
||||
/**
|
||||
* Visual editor page for the assembler preferences regarding Apple 2 compilers.
|
||||
* Visual editor page for the Pascal preferences regarding Apple 2 compilers.
|
||||
*
|
||||
* @author Peter Dell
|
||||
*
|
||||
|
@ -23,7 +23,7 @@ import com.wudsn.ide.lng.Language;
|
||||
import com.wudsn.ide.lng.preferences.LanguagePreferencesCompilersPage;
|
||||
|
||||
/**
|
||||
* Visual editor page for the assembler preferences regarding Atari 8-bit
|
||||
* Visual editor page for the Pascal preferences regarding Atari 8-bit
|
||||
* compilers.
|
||||
*
|
||||
* @author Peter Dell
|
||||
|
@ -23,7 +23,7 @@ import com.wudsn.ide.lng.Language;
|
||||
import com.wudsn.ide.lng.preferences.LanguagePreferencesCompilersPage;
|
||||
|
||||
/**
|
||||
* Visual editor page for the assembler preferences regarding C64 compilers.
|
||||
* Visual editor page for the Pascal preferences regarding C64 compilers.
|
||||
*
|
||||
* @author Peter Dell
|
||||
*
|
||||
|
@ -23,7 +23,7 @@ import com.wudsn.ide.lng.Language;
|
||||
import com.wudsn.ide.lng.preferences.LanguagePreferencesCompilersPage;
|
||||
|
||||
/**
|
||||
* Visual editor page for the assembler preferences regarding NES compilers.
|
||||
* Visual editor page for the Pascal preferences regarding NES compilers.
|
||||
*
|
||||
* @author Peter Dell
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user