Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions com.vogella.tasks.ui/Application.e4xmi
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,16 @@
<children xsi:type="basic:PartStack" xmi:id="_SVGXUMzxEeqxQICfeITfhA" elementId="com.vogella.tasks.ui.partstack.1">
<children xsi:type="basic:Part" xmi:id="_U9UWwMzxEeqxQICfeITfhA" elementId="com.vogella.tasks.ui.part.details" contributionURI="bundleclass://com.vogella.tasks.ui/com.vogella.tasks.ui.parts.TodoDetailsPart" label="Details" iconURI="platform:/plugin/com.vogella.tasks.ui/img/task-detail.svg" closeable="true"/>
</children>
<children xsi:type="basic:PartStack" xmi:id="_SqA3YMzxEeqxQICfeITfhA" elementId="com.vogella.tasks.ui.partstack.bottom">
<children xsi:type="basic:Part" xmi:id="_WPBPMMzxEeqxQICfeITfhA" elementId="com.vogella.tasks.ui.part.playground" contributionURI="bundleclass://com.vogella.tasks.ui/com.vogella.tasks.ui.parts.PlaygroundPart" label="Playground" iconURI="platform:/plugin/com.vogella.tasks.ui/img/playground.svg" closeable="true"/>
<children xsi:type="basic:Part" xmi:id="_CovBcBLUEeuLk-08oElwdw" elementId="com.vogella.tasks.ui.part.autocompletiondemo" contributionURI="bundleclass://com.vogella.tasks.ui/com.vogella.tasks.ui.parts.AutoCompleteFieldPart" label="Autocompletion Demo" iconURI="platform:/plugin/com.vogella.tasks.ui/img/autocompletion.svg" closeable="true"/>
<children xsi:type="basic:Part" xmi:id="_mC2sYFztEfC-z4xraj1QdA" elementId="com.vogella.tasks.ui.part.imagedownload" contributionURI="bundleclass://com.vogella.tasks.ui/com.vogella.tasks.ui.parts.ImageDownloadPart" label="Image Download" iconURI="platform:/plugin/com.vogella.tasks.ui/img/image-download.svg"/>
<children xsi:type="basic:Part" xmi:id="_WYHtQKIXEfC4_N2PIIsnDg" elementId="com.vogella.tasks.ui.part.canvas" contributionURI="bundleclass://com.vogella.tasks.ui/com.vogella.tasks.ui.parts.ParticleCanvas" label="Canvas" iconURI="platform:/plugin/com.vogella.tasks.ui/img/canvas.svg"/>
</children>
<children xsi:type="basic:PartStack" xmi:id="_eDtStK5cEfCvBq3k9xYz1Q" elementId="com.vogella.tasks.ui.partstack.bottom"/>
</children>
</children>
</children>
<children xsi:type="advanced:Perspective" xmi:id="_Szej0MnFEeuD8-bVRByS6Q" elementId="com.vogella.tasks.ui.perspective.manager" label="Manager" iconURI="platform:/plugin/com.vogella.tasks.ui/img/playground.svg">
<children xsi:type="basic:PartStack" xmi:id="_u-NDQF2cEfCdebTTo0pPlw" elementId="com.vogella.tasks.ui.partstack.2">
<children xsi:type="basic:Part" xmi:id="_TOaMUMnFEeuD8-bVRByS6Q" elementId="com.vogella.tasks.ui.part.part" contributionURI="bundleclass://com.vogella.tasks.ui/com.vogella.tasks.ui.parts.PlaygroundPart" label="Part" iconURI="platform:/plugin/com.vogella.tasks.ui/img/playground.svg"/>
<children xsi:type="basic:PartStack" xmi:id="_SqA3YMzxEeqxQICfeITfhA" elementId="com.vogella.tasks.ui.partstack.playground">
<children xsi:type="basic:Part" xmi:id="_WPBPMMzxEeqxQICfeITfhA" elementId="com.vogella.tasks.ui.part.playground" contributionURI="bundleclass://com.vogella.tasks.ui/com.vogella.tasks.ui.parts.PlaygroundPart" label="Playground" iconURI="platform:/plugin/com.vogella.tasks.ui/img/playground.svg" closeable="true"/>
<children xsi:type="basic:Part" xmi:id="_CovBcBLUEeuLk-08oElwdw" elementId="com.vogella.tasks.ui.part.autocompletiondemo" contributionURI="bundleclass://com.vogella.tasks.ui/com.vogella.tasks.ui.parts.AutoCompleteFieldPart" label="Autocompletion Demo" iconURI="platform:/plugin/com.vogella.tasks.ui/img/autocompletion.svg" closeable="true"/>
<children xsi:type="basic:Part" xmi:id="_mC2sYFztEfC-z4xraj1QdA" elementId="com.vogella.tasks.ui.part.imagedownload" contributionURI="bundleclass://com.vogella.tasks.ui/com.vogella.tasks.ui.parts.ImageDownloadPart" label="Image Download" iconURI="platform:/plugin/com.vogella.tasks.ui/img/image-download.svg"/>
<children xsi:type="basic:Part" xmi:id="_WYHtQKIXEfC4_N2PIIsnDg" elementId="com.vogella.tasks.ui.part.canvas" contributionURI="bundleclass://com.vogella.tasks.ui/com.vogella.tasks.ui.parts.ParticleCanvas" label="Canvas" iconURI="platform:/plugin/com.vogella.tasks.ui/img/canvas.svg"/>
</children>
</children>
</children>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package com.vogella.tasks.ui.addon;

import org.eclipse.e4.core.di.annotations.Optional;
import org.eclipse.e4.ui.di.UIEventTopic;
import org.eclipse.e4.ui.model.application.MApplication;
import org.eclipse.e4.ui.model.application.ui.MUIElement;
import org.eclipse.e4.ui.workbench.IPresentationEngine;
import org.eclipse.e4.ui.workbench.UIEvents;
import org.eclipse.e4.ui.workbench.modeling.EModelService;

import jakarta.inject.Inject;

/** Minimizes the Playground part stack when the application has started. */
public class MinimizePlaygroundStackAddon {

private static final String STACK_ID = "com.vogella.tasks.ui.partstack.playground";

@Inject
@Optional
public void minimize(@UIEventTopic(UIEvents.UILifeCycle.APP_STARTUP_COMPLETE) Object event,
EModelService modelService, MApplication application) {
MUIElement stack = modelService.find(STACK_ID, application);
// adding the tag at runtime, rather than in the model, makes the MinMaxAddon create the trim stack
if (stack != null && !stack.getTags().contains(IPresentationEngine.MINIMIZED)) {
stack.getTags().add(IPresentationEngine.MINIMIZED);
}
}
}
Loading