Output startup test message only for JAC!

This commit is contained in:
peterdell 2020-10-16 21:21:38 +02:00
parent ccaf1a554e
commit 80ddc43d9a

View File

@ -32,21 +32,22 @@ import org.eclipse.ui.menus.WorkbenchWindowControlContribution;
// TODO: This should become a replacement for the action/actionSet based dynamic menu // TODO: This should become a replacement for the action/actionSet based dynamic menu
// See also https://wiki.eclipse.org/Menu_Contributions // See also https://wiki.eclipse.org/Menu_Contributions
// Mail sent to grthor@users.sourceforge.net on 2020-10-11. // Asked at https://www.eclipse.org/forums/index.php/m/1833428/#msg_1833428
public final class AssemblerEditorCompileAndRunCommandMenu extends WorkbenchWindowControlContribution { public final class AssemblerEditorCompileAndRunCommandMenu extends WorkbenchWindowControlContribution {
public AssemblerEditorCompileAndRunCommandMenu() { public AssemblerEditorCompileAndRunCommandMenu() {
if (System.getProperty("user.name").equals("JAC")) {
new Exception("JAC! Test for Startup!").printStackTrace(); new Exception("JAC! Test for Startup!").printStackTrace();
} }
}
@AboutToShow @AboutToShow
public void aboutToShow(List<MMenuElement> items) { public void aboutToShow(List<MMenuElement> items) {
MDirectMenuItem dynamicItem = MMenuFactory.INSTANCE.createDirectMenuItem(); MDirectMenuItem dynamicItem = MMenuFactory.INSTANCE.createDirectMenuItem();
dynamicItem.setLabel("Dynamic Menu Item (" + new Date() + ")"); dynamicItem.setLabel("Dynamic Menu Item (" + new Date() + ")");
dynamicItem.setContributorURI("platform:/plugin/at.descher.eclipse.bug389063"); dynamicItem.setContributorURI("platform:/plugin/at.descher.eclipse.bug389063");
dynamicItem dynamicItem.setContributionURI(
.setContributionURI("bundleclass://at.descher.eclipse.bug389063/at.descher.eclipse.bug389063.dynamic.DirectMenuItemAHandler"); "bundleclass://at.descher.eclipse.bug389063/at.descher.eclipse.bug389063.dynamic.DirectMenuItemAHandler");
items.add(dynamicItem); items.add(dynamicItem);
} }