diff options
Diffstat (limited to 'plugins/org.eclipse.osee.ats/src/org/eclipse/osee')
3 files changed, 36 insertions, 15 deletions
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/AtsPlugin.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/AtsPlugin.java index ba03676e051..060cffff79f 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/AtsPlugin.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/AtsPlugin.java @@ -19,7 +19,7 @@ import org.eclipse.osee.framework.core.util.ServiceDependencyTracker; import org.eclipse.osee.framework.jdk.core.util.Lib; import org.eclipse.osee.framework.plugin.core.IActionReportingService; import org.eclipse.osee.framework.ui.plugin.OseeUiActivator; -import org.eclipse.osee.framework.ui.skynet.ats.IOseeAtsService; +import org.eclipse.osee.framework.ui.skynet.cm.IOseeCmService; import org.osgi.framework.BundleContext; import org.osgi.framework.ServiceRegistration; @@ -52,7 +52,7 @@ public class AtsPlugin extends OseeUiActivator { super.start(context); service1 = context.registerService(IActionReportingService.class.getName(), new AtsActionReportingServiceImpl(), null); - service2 = context.registerService(IOseeAtsService.class.getName(), new OseeAtsServiceImpl(), null); + service2 = context.registerService(IOseeCmService.class.getName(), new OseeAtsServiceImpl(), null); // TODO Uncomment to re-enable ATS CM Access providing // if (OseeInfo.isEnabled("atsAccessEnabled")) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/OseeAtsServiceImpl.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/OseeAtsServiceImpl.java index 093c357fa92..8828588088e 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/OseeAtsServiceImpl.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/OseeAtsServiceImpl.java @@ -10,29 +10,50 @@ *******************************************************************************/ package org.eclipse.osee.ats.internal; +import java.util.Collection; +import org.eclipse.osee.ats.AtsImage; import org.eclipse.osee.ats.util.AtsUtil; +import org.eclipse.osee.ats.world.WorldEditor; +import org.eclipse.osee.ats.world.WorldEditorSimpleProvider; import org.eclipse.osee.framework.skynet.core.artifact.Artifact; -import org.eclipse.osee.framework.ui.skynet.ats.IOseeAtsService; -import org.eclipse.osee.framework.ui.skynet.ats.OseeEditor; +import org.eclipse.osee.framework.ui.skynet.FrameworkImage; +import org.eclipse.osee.framework.ui.skynet.cm.IOseeCmService; +import org.eclipse.osee.framework.ui.skynet.cm.OseeCmEditor; +import org.eclipse.osee.framework.ui.swt.KeyedImage; /** * @author Roberto E. Escobar */ -public class OseeAtsServiceImpl implements IOseeAtsService { +public class OseeAtsServiceImpl implements IOseeCmService { @Override - public boolean isAtsAdmin() { + public boolean isCmAdmin() { return AtsUtil.isAtsAdmin(); } @Override - public void openArtifact(Artifact artifact) { + public void openArtifact(String guid, OseeCmEditor oseeCmEditor) { + AtsUtil.openArtifact(guid, oseeCmEditor); + } + + @Override + public void openArtifact(Artifact artifact, OseeCmEditor oseeCmEditor) { AtsUtil.openATSArtifact(artifact); } @Override - public void openArtifact(String guid, OseeEditor view) { - AtsUtil.openArtifact(guid, view); + public void openArtifacts(String name, Collection<Artifact> artifacts, OseeCmEditor oseeCmEditor) { + WorldEditor.open(new WorldEditorSimpleProvider(name, artifacts)); + } + + @Override + public KeyedImage getOpenImage(OseeCmEditor oseeCmEditor) { + if (oseeCmEditor == OseeCmEditor.CmPcrEditor) { + return AtsImage.TEAM_WORKFLOW; + } else if (oseeCmEditor == OseeCmEditor.CmMultiPcrEditor) { + return AtsImage.GLOBE; + } + return FrameworkImage.LASER; } } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsUtil.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsUtil.java index 5e2517936a4..7ad0a64d2da 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsUtil.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsUtil.java @@ -62,7 +62,7 @@ import org.eclipse.osee.framework.ui.plugin.util.AWorkbench; import org.eclipse.osee.framework.ui.plugin.util.Result; import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateComposite.TableLoadOption; import org.eclipse.osee.framework.ui.skynet.XFormToolkit; -import org.eclipse.osee.framework.ui.skynet.ats.OseeEditor; +import org.eclipse.osee.framework.ui.skynet.cm.OseeCmEditor; import org.eclipse.osee.framework.ui.skynet.render.PresentationType; import org.eclipse.osee.framework.ui.skynet.render.RendererManager; import org.eclipse.osee.framework.ui.swt.ALayout; @@ -221,7 +221,7 @@ public final class AtsUtil { } } - public static void openArtifact(String guidOrHrid, Integer branchId, OseeEditor view) { + public static void openArtifact(String guidOrHrid, Integer branchId, OseeCmEditor view) { try { Branch branch = BranchManager.getBranch(branchId); Artifact artifact = ArtifactQuery.getArtifactFromId(guidOrHrid, branch); @@ -234,7 +234,7 @@ public final class AtsUtil { /** * Only to be used by browser. Use open (artifact) instead. */ - public static void openArtifact(String guid, OseeEditor view) { + public static void openArtifact(String guid, OseeCmEditor editor) { AtsBulkLoad.loadConfig(false); Artifact artifact = null; try { @@ -245,15 +245,15 @@ public final class AtsUtil { } try { - if (view == OseeEditor.ActionEditor) { + if (editor == OseeCmEditor.CmPcrEditor) { if (artifact instanceof StateMachineArtifact || artifact instanceof ActionArtifact) { openATSAction(artifact, AtsOpenOption.OpenOneOrPopupSelect); } else { RendererManager.open(artifact, PresentationType.GENERALIZED_EDIT); } - } else if (view == OseeEditor.ArtifactEditor) { + } else if (editor == OseeCmEditor.ArtifactEditor) { RendererManager.open(artifact, PresentationType.GENERALIZED_EDIT); - } else if (view == OseeEditor.ArtifactHyperViewer) { + } else if (editor == OseeCmEditor.ArtifactHyperViewer) { AWorkbench.popup("ERROR", "Unimplemented"); } } catch (OseeCoreException ex) { |