Commit 6fc41305 authored by Andreas Bayha's avatar Andreas Bayha
Browse files

Requirements: Drag 'n Drop support for overview editor

In the requirements/glossary overview editor, it is now possible to add
Requirements/Glossary entries via drag and drop.

Issue-Ref: 4081
Issue-Url: https://af3-developer.fortiss.org/issues/4081

Signed-off-by: Andreas Bayha's avatarAndreas Bayha <bayha@fortiss.org>
parent 09dc14ad
RequirementsOverviewFXEditor.java 61a0faa7d5dbf525fae07a334494920932770094 GREEN
RequirementsOverviewFXEditorBinding.java 3346106642d7dbd68e6328e4cbd33f6569c6f6ff GREEN
RequirementsOverviewFXEditorContentProvider.java 2f9b6874d6d7063ba2d3acd49f77f36052d75a5b GREEN
RequirementsOverviewFXEditorUIProvider.java 219b4bb77260b82aa28c84a04935426d7b8e1a7f GREEN
RequirementsOverviewFXEditorUIProvider.java a00fc594a841e120b14901fb0039664b5d1136ea YELLOW
......@@ -15,6 +15,9 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.mira.ui.editor.overview.fx;
import static org.fortiss.tooling.base.ui.utils.FXDNDUtils.canCompose;
import static org.fortiss.tooling.base.ui.utils.FXDNDUtils.compose;
import org.fortiss.af3.mira.model.Analysis;
import org.fortiss.af3.mira.model.Requirement;
import org.fortiss.af3.mira.model.RequirementsContainer;
......@@ -27,6 +30,7 @@ import org.fortiss.tooling.base.ui.editor.fx.controller.ModelElementFXEditorUIPr
import org.fortiss.tooling.kernel.ui.extension.base.FXEditorBase;
import javafx.scene.Node;
import javafx.scene.input.Dragboard;
/**
* UIProvider for RequirementsOverviewEditor.
......@@ -168,4 +172,16 @@ public class RequirementsOverviewFXEditorUIProvider
}
return null;
}
/** {@inheritDoc} */
@Override
public boolean dropClipboardContent(IHierarchicElement element, Dragboard dragboard) {
return compose(dragboard, element);
}
/** {@inheritDoc} */
@Override
public boolean dragOver(IHierarchicElement item, Dragboard dragboard) {
return canCompose(dragboard, item);
}
}
AnalysisCompositor.java 9ddf02601dcb78696ba66a05255a90e59056f920 GREEN
AnalysisCompositor.java 99798590e946aa1244d79536a391fbddaf457fcc YELLOW
AnalysisFileProjectCompositor.java 9d6303dd25ed674f7cb828469bf14ef59a5c4723 GREEN
GlossaryCompositor.java 06e80bcaa9cab98e3957496c702871538809dc60 GREEN
RequirementsContainerCompositor.java 8c42816e9e89c89fbf92d765788a552dec0afcdc GREEN
......
......@@ -19,8 +19,10 @@ import static org.eclipse.emf.ecore.util.EcoreUtil.delete;
import org.eclipse.emf.ecore.EObject;
import org.fortiss.af3.mira.model.Analysis;
import org.fortiss.af3.mira.model.Requirement;
import org.fortiss.af3.mira.model.RequirementsContainer;
import org.fortiss.af3.mira.model.glossary.Glossary;
import org.fortiss.af3.mira.model.glossary.GlossaryEntry;
import org.fortiss.tooling.kernel.extension.IElementCompositor;
import org.fortiss.tooling.kernel.extension.data.IElementCompositionContext;
import org.fortiss.tooling.kernel.extension.data.Prototype;
......@@ -43,7 +45,9 @@ public class AnalysisCompositor implements IElementCompositor<Analysis> {
@Override
public boolean canComposePrototype(Prototype prototype) {
return (prototype.getPrototype() instanceof Glossary) ||
(prototype.getPrototype() instanceof RequirementsContainer);
(prototype.getPrototype() instanceof RequirementsContainer) ||
(prototype.getPrototype() instanceof Requirement) ||
(prototype.getPrototype() instanceof GlossaryEntry);
}
/** {@inheritDoc} */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment