From db4075ec14984a406b863c153c873c17adc23dab Mon Sep 17 00:00:00 2001 From: Daniel Kirschten Date: Mon, 15 Jul 2019 21:18:30 +0200 Subject: [PATCH] Finished renaming logic.ui to logic.model --- .../logic/core/types/BitVectorFormatter.java | 12 +++---- net.mograsim.logic.model.am2900/.project | 2 +- .../FullAdder.json | 6 ++-- .../HalfAdder.json | 14 ++++---- .../META-INF/MANIFEST.MF | 2 +- .../OSGI-INF/l10n/bundle.properties | 2 +- .../{ui => model}/am2900/Am2901Test.java | 14 ++++---- .../{ui => model}/am2900/Am2901Testbench.java | 2 +- .../logic/{ui => model}/am2900/TestUtil.java | 2 +- .../{ui => model}/am2900/TestableAm2901.java | 2 +- .../am2900/TestableAm2901Impl.java | 2 +- .../META-INF/MANIFEST.MF | 2 +- .../logic/model/editor/ui/EditorCanvas.java | 2 +- net.mograsim.logic.model/META-INF/MANIFEST.MF | 2 +- .../OSGI-INF/l10n/bundle.properties | 2 +- .../mograsim/logic/model/LogicUICanvas.java | 2 +- .../components/atomic/GUIBitDisplay.java | 4 +-- .../components/atomic/GUIManualSwitch.java | 4 +-- .../atomic/SimpleRectangularGUIGate.java | 4 +-- .../components/atomic/TextComponent.java | 2 +- .../SimpleRectangularSubmodelComponent.java | 2 +- .../DefaultOutlineRenderer.java | 2 +- .../CenteredTextSymbolRenderer.java | 2 +- .../DefaultSymbolRenderer.java | 2 +- .../SimpleRectangularLikeSymbolRenderer.java | 2 +- net.mograsim.plugin.core/.project | 4 +-- net.mograsim.plugin.core/plugin.xml | 34 +++++++++---------- net.mograsim.plugin.feature/.project | 2 +- net.mograsim.plugin.feature/feature.xml | 4 +-- .../preferences/DefaultPreferences.java | 16 ++++----- 30 files changed, 77 insertions(+), 77 deletions(-) rename net.mograsim.logic.model.am2900/test/net/mograsim/logic/{ui => model}/am2900/Am2901Test.java (94%) rename net.mograsim.logic.model.am2900/test/net/mograsim/logic/{ui => model}/am2900/Am2901Testbench.java (98%) rename net.mograsim.logic.model.am2900/test/net/mograsim/logic/{ui => model}/am2900/TestUtil.java (98%) rename net.mograsim.logic.model.am2900/test/net/mograsim/logic/{ui => model}/am2900/TestableAm2901.java (98%) rename net.mograsim.logic.model.am2900/test/net/mograsim/logic/{ui => model}/am2900/TestableAm2901Impl.java (99%) diff --git a/net.mograsim.logic.core/src/net/mograsim/logic/core/types/BitVectorFormatter.java b/net.mograsim.logic.core/src/net/mograsim/logic/core/types/BitVectorFormatter.java index 987f3619..c551fed9 100644 --- a/net.mograsim.logic.core/src/net/mograsim/logic/core/types/BitVectorFormatter.java +++ b/net.mograsim.logic.core/src/net/mograsim/logic/core/types/BitVectorFormatter.java @@ -19,7 +19,7 @@ public class BitVectorFormatter return bitVector.toString(); } - // TODO doesn't this belong to logic.ui? + // TODO doesn't this belong to logic.model? public static ColorDefinition formatAsColor(ReadEnd end) { return formatAsColor(end == null ? null : end.getValues()); @@ -33,15 +33,15 @@ public class BitVectorFormatter switch (bitVector.getLSBit(0)) { case ONE: - return Preferences.current().getColorDefinition("net.mograsim.logic.ui.color.bit.one"); + return Preferences.current().getColorDefinition("net.mograsim.logic.model.color.bit.one"); case U: - return Preferences.current().getColorDefinition("net.mograsim.logic.ui.color.bit.u"); + return Preferences.current().getColorDefinition("net.mograsim.logic.model.color.bit.u"); case X: - return Preferences.current().getColorDefinition("net.mograsim.logic.ui.color.bit.x"); + return Preferences.current().getColorDefinition("net.mograsim.logic.model.color.bit.x"); case Z: - return Preferences.current().getColorDefinition("net.mograsim.logic.ui.color.bit.z"); + return Preferences.current().getColorDefinition("net.mograsim.logic.model.color.bit.z"); case ZERO: - return Preferences.current().getColorDefinition("net.mograsim.logic.ui.color.bit.zero"); + return Preferences.current().getColorDefinition("net.mograsim.logic.model.color.bit.zero"); default: throw new IllegalArgumentException("Unknown enum constant: " + bitVector.getLSBit(0)); } diff --git a/net.mograsim.logic.model.am2900/.project b/net.mograsim.logic.model.am2900/.project index 5ac21380..494b451f 100644 --- a/net.mograsim.logic.model.am2900/.project +++ b/net.mograsim.logic.model.am2900/.project @@ -3,7 +3,7 @@ net.mograsim.logic.model.am2900 - net.mograsim.logic.ui + net.mograsim.logic.model SWTZoomableCanvas diff --git a/net.mograsim.logic.model.am2900/FullAdder.json b/net.mograsim.logic.model.am2900/FullAdder.json index 40c51c76..a027c43c 100644 --- a/net.mograsim.logic.model.am2900/FullAdder.json +++ b/net.mograsim.logic.model.am2900/FullAdder.json @@ -53,7 +53,7 @@ mograsim version: 0.1.1 "x": 5.0, "y": 40.0 }, - "type": "class:net.mograsim.logic.ui.model.components.mi.nandbased.GUIhalfadder", + "type": "class:net.mograsim.logic.model.model.components.mi.nandbased.GUIhalfadder", "params": {} }, { @@ -61,7 +61,7 @@ mograsim version: 0.1.1 "x": 45.0, "y": 7.5 }, - "type": "class:net.mograsim.logic.ui.model.components.mi.nandbased.GUIhalfadder", + "type": "class:net.mograsim.logic.model.model.components.mi.nandbased.GUIhalfadder", "params": {} }, { @@ -69,7 +69,7 @@ mograsim version: 0.1.1 "x": 57.5, "y": 40.0 }, - "type": "class:net.mograsim.logic.ui.model.components.GUINandGate", + "type": "class:net.mograsim.logic.model.model.components.GUINandGate", "params": { "logicWidth": 1 } diff --git a/net.mograsim.logic.model.am2900/HalfAdder.json b/net.mograsim.logic.model.am2900/HalfAdder.json index 48c19802..9eb7057f 100644 --- a/net.mograsim.logic.model.am2900/HalfAdder.json +++ b/net.mograsim.logic.model.am2900/HalfAdder.json @@ -45,7 +45,7 @@ mograsim version: 0.1.1 "x": 10.0, "y": 15.0 }, - "type": "class:net.mograsim.logic.ui.model.components.GUINandGate", + "type": "class:net.mograsim.logic.model.model.components.GUINandGate", "params": { "logicWidth": 1 } @@ -55,7 +55,7 @@ mograsim version: 0.1.1 "x": 40.0, "y": 2.5 }, - "type": "class:net.mograsim.logic.ui.model.components.GUINandGate", + "type": "class:net.mograsim.logic.model.model.components.GUINandGate", "params": { "logicWidth": 1 } @@ -65,7 +65,7 @@ mograsim version: 0.1.1 "x": 40.0, "y": 27.5 }, - "type": "class:net.mograsim.logic.ui.model.components.GUINandGate", + "type": "class:net.mograsim.logic.model.model.components.GUINandGate", "params": { "logicWidth": 1 } @@ -75,7 +75,7 @@ mograsim version: 0.1.1 "x": 65.0, "y": 2.5 }, - "type": "class:net.mograsim.logic.ui.model.components.GUINandGate", + "type": "class:net.mograsim.logic.model.model.components.GUINandGate", "params": { "logicWidth": 1 } @@ -85,7 +85,7 @@ mograsim version: 0.1.1 "x": 4.0, "y": 11.5 }, - "type": "class:net.mograsim.logic.ui.model.wires.WireCrossPoint", + "type": "class:net.mograsim.logic.model.model.wires.WireCrossPoint", "params": { "logicWidth": 1 } @@ -95,7 +95,7 @@ mograsim version: 0.1.1 "x": 4.0, "y": 36.5 }, - "type": "class:net.mograsim.logic.ui.model.wires.WireCrossPoint", + "type": "class:net.mograsim.logic.model.model.wires.WireCrossPoint", "params": { "logicWidth": 1 } @@ -105,7 +105,7 @@ mograsim version: 0.1.1 "x": 34.0, "y": 24.0 }, - "type": "class:net.mograsim.logic.ui.model.wires.WireCrossPoint", + "type": "class:net.mograsim.logic.model.model.wires.WireCrossPoint", "params": { "logicWidth": 1 } diff --git a/net.mograsim.logic.model.am2900/META-INF/MANIFEST.MF b/net.mograsim.logic.model.am2900/META-INF/MANIFEST.MF index 71d5a3b6..4854d0b9 100644 --- a/net.mograsim.logic.model.am2900/META-INF/MANIFEST.MF +++ b/net.mograsim.logic.model.am2900/META-INF/MANIFEST.MF @@ -8,5 +8,5 @@ Export-Package: net.mograsim.logic.model.examples, net.mograsim.logic.model.model.components.mi.nandbased.am2901 Bundle-RequiredExecutionEnvironment: JavaSE-11 Require-Bundle: net.mograsim.logic.model;bundle-version="0.1.0";visibility:=reexport -Automatic-Module-Name: net.mograsim.logic.ui +Automatic-Module-Name: net.mograsim.logic.model.am2900 Bundle-Vendor: Mograsim Team diff --git a/net.mograsim.logic.model.am2900/OSGI-INF/l10n/bundle.properties b/net.mograsim.logic.model.am2900/OSGI-INF/l10n/bundle.properties index f1ecb432..3fe36700 100644 --- a/net.mograsim.logic.model.am2900/OSGI-INF/l10n/bundle.properties +++ b/net.mograsim.logic.model.am2900/OSGI-INF/l10n/bundle.properties @@ -1,3 +1,3 @@ -#Properties file for net.mograsim.logic.ui +#Properties file for net.mograsim.logic.model.am2900 Bundle-Vendor = Mograsim Team Bundle-Name = Mograsim Am2900 logic \ No newline at end of file diff --git a/net.mograsim.logic.model.am2900/test/net/mograsim/logic/ui/am2900/Am2901Test.java b/net.mograsim.logic.model.am2900/test/net/mograsim/logic/model/am2900/Am2901Test.java similarity index 94% rename from net.mograsim.logic.model.am2900/test/net/mograsim/logic/ui/am2900/Am2901Test.java rename to net.mograsim.logic.model.am2900/test/net/mograsim/logic/model/am2900/Am2901Test.java index 03790ec5..7d87f39b 100644 --- a/net.mograsim.logic.model.am2900/test/net/mograsim/logic/ui/am2900/Am2901Test.java +++ b/net.mograsim.logic.model.am2900/test/net/mograsim/logic/model/am2900/Am2901Test.java @@ -1,10 +1,10 @@ -package net.mograsim.logic.ui.am2900; +package net.mograsim.logic.model.am2900; -import static net.mograsim.logic.ui.am2900.TestUtil.*; -import static net.mograsim.logic.ui.am2900.TestableAm2901.Am2901_Dest.*; -import static net.mograsim.logic.ui.am2900.TestableAm2901.Am2901_Func.*; -import static net.mograsim.logic.ui.am2900.TestableAm2901.Am2901_Src.*; -import static net.mograsim.logic.ui.am2900.TestableAm2901.Register.*; +import static net.mograsim.logic.model.am2900.TestUtil.*; +import static net.mograsim.logic.model.am2900.TestableAm2901.Am2901_Dest.*; +import static net.mograsim.logic.model.am2900.TestableAm2901.Am2901_Func.*; +import static net.mograsim.logic.model.am2900.TestableAm2901.Am2901_Src.*; +import static net.mograsim.logic.model.am2900.TestableAm2901.Register.*; import static org.junit.jupiter.api.Assertions.*; import java.awt.Point; @@ -20,7 +20,7 @@ import org.junit.jupiter.api.TestMethodOrder; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.EnumSource; -import net.mograsim.logic.ui.am2900.TestableAm2901.Register; +import net.mograsim.logic.model.am2900.TestableAm2901.Register; @DisplayName("Am2901 Tests") @TestMethodOrder(OrderAnnotation.class) diff --git a/net.mograsim.logic.model.am2900/test/net/mograsim/logic/ui/am2900/Am2901Testbench.java b/net.mograsim.logic.model.am2900/test/net/mograsim/logic/model/am2900/Am2901Testbench.java similarity index 98% rename from net.mograsim.logic.model.am2900/test/net/mograsim/logic/ui/am2900/Am2901Testbench.java rename to net.mograsim.logic.model.am2900/test/net/mograsim/logic/model/am2900/Am2901Testbench.java index 7c68cc1a..d6057f80 100644 --- a/net.mograsim.logic.model.am2900/test/net/mograsim/logic/ui/am2900/Am2901Testbench.java +++ b/net.mograsim.logic.model.am2900/test/net/mograsim/logic/model/am2900/Am2901Testbench.java @@ -1,4 +1,4 @@ -package net.mograsim.logic.ui.am2900; +package net.mograsim.logic.model.am2900; import java.util.ArrayList; import java.util.List; diff --git a/net.mograsim.logic.model.am2900/test/net/mograsim/logic/ui/am2900/TestUtil.java b/net.mograsim.logic.model.am2900/test/net/mograsim/logic/model/am2900/TestUtil.java similarity index 98% rename from net.mograsim.logic.model.am2900/test/net/mograsim/logic/ui/am2900/TestUtil.java rename to net.mograsim.logic.model.am2900/test/net/mograsim/logic/model/am2900/TestUtil.java index 937e566a..f85ae04a 100644 --- a/net.mograsim.logic.model.am2900/test/net/mograsim/logic/ui/am2900/TestUtil.java +++ b/net.mograsim.logic.model.am2900/test/net/mograsim/logic/model/am2900/TestUtil.java @@ -1,4 +1,4 @@ -package net.mograsim.logic.ui.am2900; +package net.mograsim.logic.model.am2900; public final class TestUtil { diff --git a/net.mograsim.logic.model.am2900/test/net/mograsim/logic/ui/am2900/TestableAm2901.java b/net.mograsim.logic.model.am2900/test/net/mograsim/logic/model/am2900/TestableAm2901.java similarity index 98% rename from net.mograsim.logic.model.am2900/test/net/mograsim/logic/ui/am2900/TestableAm2901.java rename to net.mograsim.logic.model.am2900/test/net/mograsim/logic/model/am2900/TestableAm2901.java index ad0a0b87..d898b399 100644 --- a/net.mograsim.logic.model.am2900/test/net/mograsim/logic/ui/am2900/TestableAm2901.java +++ b/net.mograsim.logic.model.am2900/test/net/mograsim/logic/model/am2900/TestableAm2901.java @@ -1,4 +1,4 @@ -package net.mograsim.logic.ui.am2900; +package net.mograsim.logic.model.am2900; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/net.mograsim.logic.model.am2900/test/net/mograsim/logic/ui/am2900/TestableAm2901Impl.java b/net.mograsim.logic.model.am2900/test/net/mograsim/logic/model/am2900/TestableAm2901Impl.java similarity index 99% rename from net.mograsim.logic.model.am2900/test/net/mograsim/logic/ui/am2900/TestableAm2901Impl.java rename to net.mograsim.logic.model.am2900/test/net/mograsim/logic/model/am2900/TestableAm2901Impl.java index af838d10..98a6d109 100644 --- a/net.mograsim.logic.model.am2900/test/net/mograsim/logic/ui/am2900/TestableAm2901Impl.java +++ b/net.mograsim.logic.model.am2900/test/net/mograsim/logic/model/am2900/TestableAm2901Impl.java @@ -1,4 +1,4 @@ -package net.mograsim.logic.ui.am2900; +package net.mograsim.logic.model.am2900; import static org.junit.jupiter.api.Assertions.fail; diff --git a/net.mograsim.logic.model.editor/META-INF/MANIFEST.MF b/net.mograsim.logic.model.editor/META-INF/MANIFEST.MF index a666cdec..728aa67e 100644 --- a/net.mograsim.logic.model.editor/META-INF/MANIFEST.MF +++ b/net.mograsim.logic.model.editor/META-INF/MANIFEST.MF @@ -10,5 +10,5 @@ Export-Package: net.mograsim.logic.model.editor, Require-Bundle: net.mograsim.logic.model;bundle-version="0.1.0", net.mograsim.preferences;bundle-version="0.1.0" Bundle-RequiredExecutionEnvironment: JavaSE-11 -Automatic-Module-Name: net.mograsim.logic.ui +Automatic-Module-Name: net.mograsim.logic.model.editor Bundle-Vendor: Mograsim Team diff --git a/net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/ui/EditorCanvas.java b/net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/ui/EditorCanvas.java index 98aefbb4..641aaa46 100644 --- a/net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/ui/EditorCanvas.java +++ b/net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/ui/EditorCanvas.java @@ -29,7 +29,7 @@ public class EditorCanvas extends LogicUICanvas addZoomedRenderer(gc -> { Rectangle visibleRegion = new Rectangle(-offX / zoom, -offY / zoom, gW / zoom, gH / zoom); - Color background = Preferences.current().getColor("net.mograsim.logic.ui.color.background"); + Color background = Preferences.current().getColor("net.mograsim.logic.model.color.background"); if (background != null) setBackground(background);// this.setBackground, not gc.setBackground to have the background fill the // canvas diff --git a/net.mograsim.logic.model/META-INF/MANIFEST.MF b/net.mograsim.logic.model/META-INF/MANIFEST.MF index 6da2e2a9..e6b077ab 100644 --- a/net.mograsim.logic.model/META-INF/MANIFEST.MF +++ b/net.mograsim.logic.model/META-INF/MANIFEST.MF @@ -27,5 +27,5 @@ Require-Bundle: org.eclipse.swt;bundle-version="3.0.0";visibility:=reexport, net.mograsim.logic.core;bundle-version="0.1.0";visibility:=reexport, com.google.gson;bundle-version="2.8.2";visibility:=reexport, net.mograsim.preferences;bundle-version="0.1.0" -Automatic-Module-Name: net.mograsim.logic.ui +Automatic-Module-Name: net.mograsim.logic.model Bundle-Vendor: Mograsim Team diff --git a/net.mograsim.logic.model/OSGI-INF/l10n/bundle.properties b/net.mograsim.logic.model/OSGI-INF/l10n/bundle.properties index 4eac2829..420d2fc2 100644 --- a/net.mograsim.logic.model/OSGI-INF/l10n/bundle.properties +++ b/net.mograsim.logic.model/OSGI-INF/l10n/bundle.properties @@ -1,3 +1,3 @@ -#Properties file for net.mograsim.logic.ui +#Properties file for net.mograsim.logic.model Bundle-Vendor = Mograsim Team Bundle-Name = Mograsim logic user interface \ No newline at end of file diff --git a/net.mograsim.logic.model/src/net/mograsim/logic/model/LogicUICanvas.java b/net.mograsim.logic.model/src/net/mograsim/logic/model/LogicUICanvas.java index 609bf74f..9aa80565 100644 --- a/net.mograsim.logic.model/src/net/mograsim/logic/model/LogicUICanvas.java +++ b/net.mograsim.logic.model/src/net/mograsim/logic/model/LogicUICanvas.java @@ -48,7 +48,7 @@ public class LogicUICanvas extends ZoomableCanvas LogicUIRenderer renderer = new LogicUIRenderer(model); addZoomedRenderer(gc -> { - Color background = Preferences.current().getColor("net.mograsim.logic.ui.color.background"); + Color background = Preferences.current().getColor("net.mograsim.logic.model.color.background"); if (background != null) setBackground(background);// this.setBackground, not gc.setBackground to have the background fill the canvas renderer.render(gc, new Rectangle(-offX / zoom, -offY / zoom, gW / zoom, gH / zoom)); diff --git a/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/GUIBitDisplay.java b/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/GUIBitDisplay.java index 46c85460..2c541f8b 100644 --- a/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/GUIBitDisplay.java +++ b/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/GUIBitDisplay.java @@ -45,7 +45,7 @@ public class GUIBitDisplay extends GUIComponent @Override public void render(GeneralGC gc, Rectangle visibleRegion) { - Color foreground = Preferences.current().getColor("net.mograsim.logic.ui.color.foreground"); + Color foreground = Preferences.current().getColor("net.mograsim.logic.model.color.foreground"); if (foreground != null) gc.setForeground(foreground); gc.drawRectangle(getBounds()); @@ -55,7 +55,7 @@ public class GUIBitDisplay extends GUIComponent Font labelFont = new Font(oldFont.getName(), fontHeight, oldFont.getStyle()); gc.setFont(labelFont); Point textExtent = gc.textExtent(label); - Color textColor = Preferences.current().getColor("net.mograsim.logic.ui.color.text"); + Color textColor = Preferences.current().getColor("net.mograsim.logic.model.color.text"); if (textColor != null) gc.setForeground(textColor); gc.drawText(label, getPosX() + (width - textExtent.x) / 2, getPosY() + (height - textExtent.y) / 2, true); diff --git a/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/GUIManualSwitch.java b/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/GUIManualSwitch.java index b79ec2fd..e4c18331 100644 --- a/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/GUIManualSwitch.java +++ b/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/GUIManualSwitch.java @@ -50,7 +50,7 @@ public class GUIManualSwitch extends GUIComponent public void render(GeneralGC gc, Rectangle visibleRegion) { // TODO maybe draw switch state too? - Color foreground = Preferences.current().getColor("net.mograsim.logic.ui.color.foreground"); + Color foreground = Preferences.current().getColor("net.mograsim.logic.model.color.foreground"); if (foreground != null) gc.setForeground(foreground); gc.drawRectangle(getBounds()); @@ -59,7 +59,7 @@ public class GUIManualSwitch extends GUIComponent Font labelFont = new Font(oldFont.getName(), fontHeight, oldFont.getStyle()); gc.setFont(labelFont); Point textExtent = gc.textExtent(label); - Color textColor = Preferences.current().getColor("net.mograsim.logic.ui.color.text"); + Color textColor = Preferences.current().getColor("net.mograsim.logic.model.color.text"); if (textColor != null) gc.setForeground(textColor); gc.drawText(label, getPosX() + (width - textExtent.x) / 2, getPosY() + (height - textExtent.y) / 2, true); diff --git a/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/SimpleRectangularGUIGate.java b/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/SimpleRectangularGUIGate.java index 9535d3b8..b14aaec4 100644 --- a/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/SimpleRectangularGUIGate.java +++ b/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/SimpleRectangularGUIGate.java @@ -67,7 +67,7 @@ public class SimpleRectangularGUIGate extends GUIComponent @Override public void render(GeneralGC gc, Rectangle visibleRegion) { - Color foreground = Preferences.current().getColor("net.mograsim.logic.ui.color.foreground"); + Color foreground = Preferences.current().getColor("net.mograsim.logic.model.color.foreground"); if (foreground != null) gc.setForeground(foreground); double height = (getPins().size() - 1) * pinDistance; @@ -78,7 +78,7 @@ public class SimpleRectangularGUIGate extends GUIComponent Font labelFont = new Font(oldFont.getName(), fontHeight, oldFont.getStyle()); gc.setFont(labelFont); Point textExtent = gc.textExtent(label); - Color textColor = Preferences.current().getColor("net.mograsim.logic.ui.color.text"); + Color textColor = Preferences.current().getColor("net.mograsim.logic.model.color.text"); if (textColor != null) gc.setForeground(textColor); gc.drawText(label, getPosX() + (rectWidth - textExtent.x) / 2, getPosY() + (height - textExtent.y) / 2, true); diff --git a/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/TextComponent.java b/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/TextComponent.java index 87c3cf47..4429b0e3 100644 --- a/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/TextComponent.java +++ b/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/TextComponent.java @@ -40,7 +40,7 @@ public class TextComponent extends GUIComponent Point textExtent = gc.textExtent(text); setSize(textExtent.x, textExtent.y); - Color textColor = Preferences.current().getColor("net.mograsim.logic.ui.color.text"); + Color textColor = Preferences.current().getColor("net.mograsim.logic.model.color.text"); if (textColor != null) gc.setForeground(textColor); gc.drawText(text, getPosX(), getPosY(), true); diff --git a/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/submodels/SimpleRectangularSubmodelComponent.java b/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/submodels/SimpleRectangularSubmodelComponent.java index 039cdab6..aae72e29 100644 --- a/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/submodels/SimpleRectangularSubmodelComponent.java +++ b/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/submodels/SimpleRectangularSubmodelComponent.java @@ -115,7 +115,7 @@ public class SimpleRectangularSubmodelComponent extends SubmodelComponent @Override protected void renderOutline(GeneralGC gc, Rectangle visibleRegion) { - Color foreground = Preferences.current().getColor("net.mograsim.logic.ui.color.foreground"); + Color foreground = Preferences.current().getColor("net.mograsim.logic.model.color.foreground"); if (foreground != null) gc.setForeground(foreground); gc.drawRectangle(getBounds()); diff --git a/net.mograsim.logic.model/src/net/mograsim/logic/model/snippets/outlinerenderers/DefaultOutlineRenderer.java b/net.mograsim.logic.model/src/net/mograsim/logic/model/snippets/outlinerenderers/DefaultOutlineRenderer.java index f7841dd6..a72b20cd 100644 --- a/net.mograsim.logic.model/src/net/mograsim/logic/model/snippets/outlinerenderers/DefaultOutlineRenderer.java +++ b/net.mograsim.logic.model/src/net/mograsim/logic/model/snippets/outlinerenderers/DefaultOutlineRenderer.java @@ -23,7 +23,7 @@ public class DefaultOutlineRenderer implements Renderer @Override public void render(GeneralGC gc, Rectangle visibleRegion) { - ColorDefinition fg = Preferences.current().getColorDefinition("net.mograsim.logic.ui.color.foreground"); + ColorDefinition fg = Preferences.current().getColorDefinition("net.mograsim.logic.model.color.foreground"); if (fg != null) gc.setForeground(ColorManager.current().toColor(fg)); gc.drawRectangle(component.getBounds()); diff --git a/net.mograsim.logic.model/src/net/mograsim/logic/model/snippets/symbolrenderers/CenteredTextSymbolRenderer.java b/net.mograsim.logic.model/src/net/mograsim/logic/model/snippets/symbolrenderers/CenteredTextSymbolRenderer.java index e1a68508..bf406396 100644 --- a/net.mograsim.logic.model/src/net/mograsim/logic/model/snippets/symbolrenderers/CenteredTextSymbolRenderer.java +++ b/net.mograsim.logic.model/src/net/mograsim/logic/model/snippets/symbolrenderers/CenteredTextSymbolRenderer.java @@ -35,7 +35,7 @@ public class CenteredTextSymbolRenderer implements Renderer { Font oldFont = gc.getFont(); gc.setFont(new Font(oldFont.getName(), params.fontHeight, oldFont.getStyle())); - ColorDefinition fg = Preferences.current().getColorDefinition("net.mograsim.logic.ui.color.text"); + ColorDefinition fg = Preferences.current().getColorDefinition("net.mograsim.logic.model.color.text"); if (fg != null) gc.setForeground(ColorManager.current().toColor(fg)); Point idSize = gc.textExtent(params.text); diff --git a/net.mograsim.logic.model/src/net/mograsim/logic/model/snippets/symbolrenderers/DefaultSymbolRenderer.java b/net.mograsim.logic.model/src/net/mograsim/logic/model/snippets/symbolrenderers/DefaultSymbolRenderer.java index 3faf0b91..3ae52082 100644 --- a/net.mograsim.logic.model/src/net/mograsim/logic/model/snippets/symbolrenderers/DefaultSymbolRenderer.java +++ b/net.mograsim.logic.model/src/net/mograsim/logic/model/snippets/symbolrenderers/DefaultSymbolRenderer.java @@ -26,7 +26,7 @@ public class DefaultSymbolRenderer implements Renderer @Override public void render(GeneralGC gc, Rectangle visibleRegion) { - ColorDefinition fg = Preferences.current().getColorDefinition("net.mograsim.logic.ui.color.text"); + ColorDefinition fg = Preferences.current().getColorDefinition("net.mograsim.logic.model.color.text"); if (fg != null) gc.setForeground(ColorManager.current().toColor(fg)); Point idSize = gc.textExtent(id); diff --git a/net.mograsim.logic.model/src/net/mograsim/logic/model/snippets/symbolrenderers/SimpleRectangularLikeSymbolRenderer.java b/net.mograsim.logic.model/src/net/mograsim/logic/model/snippets/symbolrenderers/SimpleRectangularLikeSymbolRenderer.java index d3173851..d6386e35 100644 --- a/net.mograsim.logic.model/src/net/mograsim/logic/model/snippets/symbolrenderers/SimpleRectangularLikeSymbolRenderer.java +++ b/net.mograsim.logic.model/src/net/mograsim/logic/model/snippets/symbolrenderers/SimpleRectangularLikeSymbolRenderer.java @@ -46,7 +46,7 @@ public class SimpleRectangularLikeSymbolRenderer implements Renderer Font oldFont = gc.getFont(); gc.setFont(new Font(oldFont.getName(), params.centerTextHeight, oldFont.getStyle())); Point textExtent = gc.textExtent(params.centerText); - Color textColor = Preferences.current().getColor("net.mograsim.logic.ui.color.text"); + Color textColor = Preferences.current().getColor("net.mograsim.logic.model.color.text"); if (textColor != null) gc.setForeground(textColor); gc.drawText(params.centerText, posX + (width - textExtent.x) / 2, posY + (height - textExtent.y) / 2, true); diff --git a/net.mograsim.plugin.core/.project b/net.mograsim.plugin.core/.project index 0b8dcb93..29dcdb4f 100644 --- a/net.mograsim.plugin.core/.project +++ b/net.mograsim.plugin.core/.project @@ -3,8 +3,8 @@ net.mograsim.plugin.core - net.mograsim.logic.ui - net.mograsim.logic.ui.am2900 + net.mograsim.logic.model + net.mograsim.logic.model.am2900 diff --git a/net.mograsim.plugin.core/plugin.xml b/net.mograsim.plugin.core/plugin.xml index 85754ef8..47d83d27 100644 --- a/net.mograsim.plugin.core/plugin.xml +++ b/net.mograsim.plugin.core/plugin.xml @@ -227,13 +227,13 @@ @@ -242,49 +242,49 @@ diff --git a/net.mograsim.plugin.feature/.project b/net.mograsim.plugin.feature/.project index cad50d4f..dae1e84d 100644 --- a/net.mograsim.plugin.feature/.project +++ b/net.mograsim.plugin.feature/.project @@ -3,7 +3,7 @@ net.mograsim.plugin.feature - net.mograsim.logic.ui.am2900 + net.mograsim.logic.model.am2900 net.mograsim.plugin.branding net.mograsim.plugin.core net.mograsim.plugin.docs diff --git a/net.mograsim.plugin.feature/feature.xml b/net.mograsim.plugin.feature/feature.xml index f29c03f4..a7924d8b 100644 --- a/net.mograsim.plugin.feature/feature.xml +++ b/net.mograsim.plugin.feature/feature.xml @@ -720,7 +720,7 @@ exception as provided by Oracle in the LICENSE file that accompanied this code.& unpack="false"/>