Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoberto E. Escobar2013-06-18 01:06:45 +0000
committerRoberto E. Escobar2013-06-26 22:19:13 +0000
commit40587061c4457256bfccc3187410aae64ae05cc4 (patch)
tree64aedb32b617c23ed081c27de30f8a427ff23ad3 /plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org
parent6e2fa637f5f2869a5d271b4644c32655744fdbbe (diff)
downloadorg.eclipse.osee-40587061c4457256bfccc3187410aae64ae05cc4.tar.gz
org.eclipse.osee-40587061c4457256bfccc3187410aae64ae05cc4.tar.xz
org.eclipse.osee-40587061c4457256bfccc3187410aae64ae05cc4.zip
feature[ats_0B926]: Upgrade to Eclipse 4.3
Remove EMF compare use Update tests for junit 4.11.0 Update launch configs Update google guava version ranges Fix server demo data deployment Change-Id: I388aafb3caaaf0791a01978a4ee49acb07decebe
Diffstat (limited to 'plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org')
-rw-r--r--plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/AbstractDslRenderer.java1
-rw-r--r--plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/internal/OseeDslRenderer.java1
-rw-r--r--plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/operations/OseeTypesImportOperation.java67
-rw-r--r--plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/operations/XtextOseeTypesHandler.java2
4 files changed, 4 insertions, 67 deletions
diff --git a/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/AbstractDslRenderer.java b/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/AbstractDslRenderer.java
index b057d25e101..77d491a6b92 100644
--- a/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/AbstractDslRenderer.java
+++ b/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/AbstractDslRenderer.java
@@ -125,7 +125,6 @@ public abstract class AbstractDslRenderer extends FileSystemRenderer {
return NO_MATCH;
}
- @SuppressWarnings("unused")
@Override
public final void open(final List<Artifact> artifacts, final PresentationType presentationType) throws OseeCoreException {
diff --git a/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/internal/OseeDslRenderer.java b/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/internal/OseeDslRenderer.java
index a837c04f82d..633a468b6db 100644
--- a/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/internal/OseeDslRenderer.java
+++ b/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/internal/OseeDslRenderer.java
@@ -49,7 +49,6 @@ public final class OseeDslRenderer extends AbstractDslRenderer {
return new OseeDslRenderer();
}
- @SuppressWarnings("unused")
@Override
public String getAssociatedExtension(Artifact artifact) throws OseeCoreException {
return "osee";
diff --git a/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/operations/OseeTypesImportOperation.java b/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/operations/OseeTypesImportOperation.java
index c51606f9446..234dfc5938a 100644
--- a/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/operations/OseeTypesImportOperation.java
+++ b/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/operations/OseeTypesImportOperation.java
@@ -11,7 +11,6 @@
package org.eclipse.osee.framework.core.dsl.ui.integration.operations;
import java.io.BufferedInputStream;
-import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URI;
@@ -19,21 +18,10 @@ import java.net.URL;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import org.eclipse.compare.CompareEditorInput;
import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.emf.compare.diff.metamodel.ComparisonSnapshot;
-import org.eclipse.emf.compare.ui.editor.ModelCompareEditorInput;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
import org.eclipse.osee.framework.core.data.OseeServerContext;
import org.eclipse.osee.framework.core.dsl.ui.integration.internal.DslUiIntegrationConstants;
import org.eclipse.osee.framework.core.enums.CoreTranslatorId;
-import org.eclipse.osee.framework.core.exception.OseeCoreException;
-import org.eclipse.osee.framework.core.exception.OseeExceptions;
import org.eclipse.osee.framework.core.model.OseeImportModelRequest;
import org.eclipse.osee.framework.core.model.OseeImportModelResponse;
import org.eclipse.osee.framework.core.model.TableData;
@@ -41,12 +29,7 @@ import org.eclipse.osee.framework.core.operation.AbstractOperation;
import org.eclipse.osee.framework.core.operation.Operations;
import org.eclipse.osee.framework.core.services.IOseeCachingService;
import org.eclipse.osee.framework.jdk.core.util.Lib;
-import org.eclipse.osee.framework.jdk.core.util.Strings;
-import org.eclipse.osee.framework.plugin.core.util.Jobs;
import org.eclipse.osee.framework.skynet.core.artifact.HttpClientMessage;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.progress.UIJob;
/**
* @author Roberto E. Escobar
@@ -56,14 +39,12 @@ public class OseeTypesImportOperation extends AbstractOperation {
private final URI model;
private final boolean isPersistAllowed;
private final boolean createTypeChangeReport;
- private final boolean createCompareReport;
- public OseeTypesImportOperation(IOseeCachingService cacheService, URI model, boolean createTypeChangeReport, boolean createCompareReport, boolean isPersistAllowed) {
+ public OseeTypesImportOperation(IOseeCachingService cacheService, URI model, boolean createTypeChangeReport, boolean isPersistAllowed) {
super("Import Osee Types Model", DslUiIntegrationConstants.PLUGIN_ID);
this.cacheService = cacheService;
this.model = model;
this.isPersistAllowed = isPersistAllowed;
- this.createCompareReport = createCompareReport;
this.createTypeChangeReport = createTypeChangeReport;
}
@@ -91,8 +72,8 @@ public class OseeTypesImportOperation extends AbstractOperation {
Map<String, String> parameters = new HashMap<String, String>();
OseeImportModelRequest modelRequest =
- new OseeImportModelRequest(getName(model), getModel(model.toURL()), createTypeChangeReport,
- createCompareReport, isPersistAllowed);
+ new OseeImportModelRequest(getName(model), getModel(model.toURL()), createTypeChangeReport, false,
+ isPersistAllowed);
OseeImportModelResponse response =
HttpClientMessage.send(OseeServerContext.OSEE_MODEL_CONTEXT, parameters,
@@ -109,48 +90,6 @@ public class OseeTypesImportOperation extends AbstractOperation {
openTabReport(response.getReportData());
}
- if (createCompareReport) {
- String compareName = response.getComparisonSnapshotModelName();
- String compareData = response.getComparisonSnapshotModel();
- if (Strings.isValid(compareData) && Strings.isValid(compareName)) {
- ComparisonSnapshot snapshot = loadComparisonSnapshot(compareName, compareData);
- openCompareEditor(snapshot);
- }
- }
- }
-
- private static ComparisonSnapshot loadComparisonSnapshot(String compareName, String compareData) throws OseeCoreException {
- ComparisonSnapshot snapshot = null;
- try {
- ResourceSet resourceSet = new ResourceSetImpl();
- Resource resource = resourceSet.createResource(org.eclipse.emf.common.util.URI.createURI(compareName));
- resource.load(new ByteArrayInputStream(compareData.getBytes("UTF-8")), resourceSet.getLoadOptions());
- snapshot = (ComparisonSnapshot) resource.getContents().get(0);
- } catch (IOException ex) {
- OseeExceptions.wrapAndThrow(ex);
- }
- return snapshot;
- }
-
- private void openCompareEditor(final ComparisonSnapshot snapshot) {
- Job job = new UIJob("Open Compare") {
-
- @Override
- public IStatus runInUIThread(IProgressMonitor monitor) {
- IStatus status;
- try {
- CompareEditorInput input = new ModelCompareEditorInput(snapshot);
- IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- page.openEditor(input, "org.eclipse.compare.CompareEditor", true);
- status = Status.OK_STATUS;
- } catch (Exception ex) {
- status =
- new Status(IStatus.ERROR, DslUiIntegrationConstants.PLUGIN_ID, "Error opening compare editor", ex);
- }
- return status;
- }
- };
- Jobs.startJob(job);
}
private void openTabReport(List<TableData> tableData) {
diff --git a/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/operations/XtextOseeTypesHandler.java b/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/operations/XtextOseeTypesHandler.java
index 7a84dfa06cc..6172620eccc 100644
--- a/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/operations/XtextOseeTypesHandler.java
+++ b/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/operations/XtextOseeTypesHandler.java
@@ -32,7 +32,7 @@ public class XtextOseeTypesHandler implements IOseeTypesHandler {
@Override
public void execute(IProgressMonitor monitor, URI uri) throws OseeCoreException {
IOseeCachingService cacheService = getCachingService();
- IOperation operation = new OseeTypesImportOperation(cacheService, uri, false, false, true);
+ IOperation operation = new OseeTypesImportOperation(cacheService, uri, false, true);
Operations.executeWorkAndCheckStatus(operation, monitor);
}

Back to the top