Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrbrooks2011-01-21 18:03:59 -0500
committerRyan D. Brooks2011-01-21 18:03:59 -0500
commit61b759dc7f72a3ee1ba8f197b366536d8dc9e1f4 (patch)
treee95157516c07f188b2323900393a8b1ac90cc589 /plugins/org.eclipse.osee.framework.core.dsl.ui.integration
parente847982e21edf58404ba4f4cc8061c699ef4509d (diff)
downloadorg.eclipse.osee-61b759dc7f72a3ee1ba8f197b366536d8dc9e1f4.tar.gz
org.eclipse.osee-61b759dc7f72a3ee1ba8f197b366536d8dc9e1f4.tar.xz
org.eclipse.osee-61b759dc7f72a3ee1ba8f197b366536d8dc9e1f4.zip
refactor: Eliminate complex artifact and branch detection logic in renderer edit logic
Diffstat (limited to 'plugins/org.eclipse.osee.framework.core.dsl.ui.integration')
-rw-r--r--plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/internal/OseeDslRenderer.java21
1 files changed, 6 insertions, 15 deletions
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 0984e0b983f..2824856ec02 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
@@ -27,13 +27,13 @@ import org.eclipse.osee.framework.core.enums.CoreArtifactTypes;
import org.eclipse.osee.framework.core.enums.CoreAttributeTypes;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.core.exception.OseeExceptions;
+import org.eclipse.osee.framework.core.model.Branch;
import org.eclipse.osee.framework.core.operation.IOperation;
import org.eclipse.osee.framework.logging.OseeLevel;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.ui.skynet.render.DefaultArtifactRenderer;
import org.eclipse.osee.framework.ui.skynet.render.FileSystemRenderer;
-import org.eclipse.osee.framework.ui.skynet.render.IArtifactUpdateOperationFactory;
import org.eclipse.osee.framework.ui.skynet.render.PresentationType;
import org.eclipse.osee.framework.ui.swt.Displays;
import org.eclipse.swt.program.Program;
@@ -46,22 +46,8 @@ import org.eclipse.ui.ide.IDE;
* @author Roberto E. Escobar
*/
public final class OseeDslRenderer extends FileSystemRenderer {
-
private static final String COMMAND_ID = "org.eclipse.osee.framework.core.dsl.OseeDsl.editor.command";
-
private static final OseeDslSegmentParser parser = new OseeDslSegmentParser();
- private static final class OseeDslArtifactUpdateOperationFactory implements IArtifactUpdateOperationFactory {
-
- @SuppressWarnings("unused")
- @Override
- public IOperation createUpdateOp(File file) throws OseeCoreException {
- return new OseeDslArtifactUpdateOperation(parser, file);
- }
- };
-
- public OseeDslRenderer() {
- super(new OseeDslArtifactUpdateOperationFactory());
- }
@Override
public String getName() {
@@ -150,4 +136,9 @@ public final class OseeDslRenderer extends FileSystemRenderer {
public Program getAssociatedProgram(Artifact artifact) throws OseeCoreException {
throw new OseeCoreException("should not be called");
}
+
+ @Override
+ protected IOperation getUpdateOperation(File file, List<Artifact> artifacts, Branch branch, PresentationType presentationType) {
+ return new OseeDslArtifactUpdateOperation(parser, file);
+ }
}

Back to the top