projects
/
Mograsim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d9d1417
)
Added activator to scan for machines, everything works now.
author
Christian Femers
<femers@in.tum.de>
Tue, 3 Sep 2019 07:20:36 +0000
(09:20 +0200)
committer
Christian Femers
<femers@in.tum.de>
Tue, 3 Sep 2019 07:20:36 +0000
(09:20 +0200)
net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/Am2900Loader.java
patch
|
blob
|
history
net.mograsim.plugin.core/META-INF/MANIFEST.MF
patch
|
blob
|
history
net.mograsim.plugin.core/src/net/mograsim/plugin/MograsimActivator.java
[new file with mode: 0644]
patch
|
blob
net.mograsim.plugin.core/src/net/mograsim/plugin/views/LogicUIPart.java
patch
|
blob
|
history
diff --git
a/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/Am2900Loader.java
b/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/Am2900Loader.java
index
45d2207
..
d5613b9
100644
(file)
--- a/
net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/Am2900Loader.java
+++ b/
net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/Am2900Loader.java
@@
-17,7
+17,7
@@
public class Am2900Loader implements BundleActivator
@Override
public void start(BundleContext context) throws Exception
{
@Override
public void start(BundleContext context) throws Exception
{
- setup();
// TODO: useful?
+ setup();
}
@Override
}
@Override
@@
-32,12
+32,7
@@
public class Am2900Loader implements BundleActivator
return;
IndirectGUIComponentCreator.registerResourceLoader(new Am2900ResourceLoader(), "Am2900Loader");
IndirectGUIComponentCreator.loadStandardComponentIDs(Am2900Loader.class.getResourceAsStream("standardComponentIDMapping.json"));
return;
IndirectGUIComponentCreator.registerResourceLoader(new Am2900ResourceLoader(), "Am2900Loader");
IndirectGUIComponentCreator.loadStandardComponentIDs(Am2900Loader.class.getResourceAsStream("standardComponentIDMapping.json"));
- System.out.println("SETUP DONE");
- }
-
- static
- {
- setup();
+// System.out.println("SETUP DONE"); // TODO: Debug
}
/**
}
/**
diff --git
a/net.mograsim.plugin.core/META-INF/MANIFEST.MF
b/net.mograsim.plugin.core/META-INF/MANIFEST.MF
index
02cb0fa
..
5b256d0
100644
(file)
--- a/
net.mograsim.plugin.core/META-INF/MANIFEST.MF
+++ b/
net.mograsim.plugin.core/META-INF/MANIFEST.MF
@@
-8,6
+8,10
@@
Export-Package: net.mograsim.plugin;uses:="org.eclipse.ui.themes,org.eclipse.swt
net.mograsim.plugin.asm.editor,
net.mograsim.plugin.asm.editor.rules,
net.mograsim.plugin.nature,
net.mograsim.plugin.asm.editor,
net.mograsim.plugin.asm.editor.rules,
net.mograsim.plugin.nature,
+ net.mograsim.plugin.tables,
+ net.mograsim.plugin.tables.memory,
+ net.mograsim.plugin.tables.mi,
+ net.mograsim.plugin.util,
net.mograsim.plugin.views
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.ui,
net.mograsim.plugin.views
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.ui,
@@
-27,3
+31,5
@@
Require-Bundle: org.eclipse.core.runtime,
Bundle-RequiredExecutionEnvironment: JavaSE-11
Automatic-Module-Name: net.mograsim.plugin.core
Bundle-Vendor: %Bundle-Vendor.0
Bundle-RequiredExecutionEnvironment: JavaSE-11
Automatic-Module-Name: net.mograsim.plugin.core
Bundle-Vendor: %Bundle-Vendor.0
+Bundle-Activator: net.mograsim.plugin.MograsimActivator
+Bundle-ActivationPolicy: lazy
diff --git a/net.mograsim.plugin.core/src/net/mograsim/plugin/MograsimActivator.java
b/net.mograsim.plugin.core/src/net/mograsim/plugin/MograsimActivator.java
new file mode 100644
(file)
index 0000000..
c17f530
--- /dev/null
+++ b/
net.mograsim.plugin.core/src/net/mograsim/plugin/MograsimActivator.java
@@ -0,0
+1,14
@@
+package net.mograsim.plugin;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+
+import net.mograsim.machine.MachineRegistry;
+
+public final class MograsimActivator extends AbstractUIPlugin
+{
+
+ public MograsimActivator()
+ {
+ MachineRegistry.reload();
+ }
+}
diff --git
a/net.mograsim.plugin.core/src/net/mograsim/plugin/views/LogicUIPart.java
b/net.mograsim.plugin.core/src/net/mograsim/plugin/views/LogicUIPart.java
index
83b3e2f
..
fecb922
100644
(file)
--- a/
net.mograsim.plugin.core/src/net/mograsim/plugin/views/LogicUIPart.java
+++ b/
net.mograsim.plugin.core/src/net/mograsim/plugin/views/LogicUIPart.java
@@
-40,7
+40,7
@@
public class LogicUIPart extends ViewPart
// set preferences
Preferences.setPreferences(new ThemePreferences(PlatformUI.getWorkbench().getThemeManager().getCurrentTheme()));
// set preferences
Preferences.setPreferences(new ThemePreferences(PlatformUI.getWorkbench().getThemeManager().getCurrentTheme()));
- Optional<MachineDefinition> mdo = MachineRegistry.getinstalledMachines().stream().findFirst();
+ Optional<MachineDefinition> mdo = MachineRegistry.getinstalledMachines().
values().
stream().findFirst();
MachineDefinition md = mdo.orElseThrow(IllegalStateException::new);
Machine m = md.createNew();
MachineDefinition md = mdo.orElseThrow(IllegalStateException::new);
Machine m = md.createNew();