Commit 3fb2f348 authored by Daniel Ratiu's avatar Daniel Ratiu
Browse files

moving the system functionality from the plugins to org.fortiss.af3.system

refs 1418
parent d7404418
......@@ -204,13 +204,7 @@
<modelElementClass
modelElementClass="org.fortiss.af3.project.model.FileProject">
</modelElementClass>
</modelElementCompositor>
<modelElementCompositor
compositor="org.fortiss.af3.component.compositor.ComponentArchitectureSystemArchitectureCompositor">
<modelElementClass
modelElementClass="org.fortiss.af3.system.model.SystemArchitecture">
</modelElementClass>
</modelElementCompositor>
</modelElementCompositor>
</extension>
<extension
point="org.fortiss.tooling.kernel.modelElementCompositor">
......
/*--------------------------------------------------------------------------+
$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $
| |
| Copyright 2013 ForTISS GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.af3.component.compositor;
import org.eclipse.emf.ecore.EObject;
import org.fortiss.af3.component.model.ComponentArchitecture;
import org.fortiss.af3.system.compositor.SystemArchitectureCompositor;
/**
*
* @author wenwenchen
* @author $Author: hoelzl $
* @version $Rev: 18709 $
* @ConQAT.Rating YELLOW Hash: 3B3FE6398398BACEAB693A6D93DB3914
*/
public final class ComponentArchitectureSystemArchitectureCompositor extends
SystemArchitectureCompositor {
/** {@inheritDoc} */
@Override
protected boolean isCorrectElementClass(EObject contained) {
return contained instanceof ComponentArchitecture;
}
}
......@@ -75,12 +75,6 @@
<modelElementClass
modelElementClass="org.fortiss.af3.project.model.FileProject">
</modelElementClass>
</modelElementCompositor>
<modelElementCompositor
compositor="org.fortiss.af3.deployment.compositor.DeploymentSystemArchitectureCompositor">
<modelElementClass
modelElementClass="org.fortiss.af3.system.model.SystemArchitecture">
</modelElementClass>
</modelElementCompositor>
</modelElementCompositor>
</extension>
</plugin>
/*--------------------------------------------------------------------------+
$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $
| |
| Copyright 2013 ForTISS GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.af3.deployment.compositor;
import static org.fortiss.tooling.kernel.utils.EcoreUtils.pickFirstInstanceOf;
import org.eclipse.emf.ecore.EObject;
import org.fortiss.af3.component.model.ComponentArchitecture;
import org.fortiss.af3.deployment.model.Deployment;
import org.fortiss.af3.platform.model.PlatformArchitecture;
import org.fortiss.af3.system.compositor.SystemArchitectureCompositor;
import org.fortiss.af3.system.model.SystemArchitecture;
import org.fortiss.tooling.kernel.extension.data.IElementCompositionContext;
/**
*
* @author wenwenchen
* @author $Author: hoelzl $
* @version $Rev: 18709 $
* @ConQAT.Rating YELLOW Hash: 23DE410530A792108F8E9BADA34A67AD
*/
public final class DeploymentSystemArchitectureCompositor extends SystemArchitectureCompositor {
/** {@inheritDoc} */
@Override
protected boolean isCorrectElementClass(EObject contained) {
return contained instanceof Deployment;
}
/** {@inheritDoc} */
@Override
public boolean canCompose(SystemArchitecture container, EObject contained,
IElementCompositionContext context) {
if(!super.canCompose(container, contained, context)) {
return false;
}
if(pickFirstInstanceOf(ComponentArchitecture.class, container.getRootElementsList()) != null &&
pickFirstInstanceOf(PlatformArchitecture.class, container.getRootElementsList()) != null) {
return true;
}
return false;
}
}
......@@ -203,11 +203,6 @@
modelElementClass="org.fortiss.af3.project.model.FileProject">
</modelElementClass>
</modelElementCompositor>
<modelElementCompositor
compositor="org.fortiss.af3.expression.compositor.DataDictionarySystemArchitectureCompositor">
<modelElementClass
modelElementClass="org.fortiss.af3.system.model.SystemArchitecture">
</modelElementClass>
</modelElementCompositor>
</extension>
</plugin>
/*--------------------------------------------------------------------------+
$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $
| |
| Copyright 2013 ForTISS GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.af3.expression.compositor;
import org.eclipse.emf.ecore.EObject;
import org.fortiss.af3.expression.model.DataDictionary;
import org.fortiss.af3.system.compositor.SystemArchitectureCompositor;
/**
*
* @author wenwenchen
* @author $Author: hoelzl $
* @version $Rev: 18709 $
* @ConQAT.Rating YELLOW Hash: B399041968E534B5782C1058A3362A31
*/
public final class DataDictionarySystemArchitectureCompositor extends SystemArchitectureCompositor {
/** {@inheritDoc} */
@Override
protected boolean isCorrectElementClass(EObject contained) {
return contained instanceof DataDictionary;
}
}
......@@ -95,12 +95,6 @@
modelElementClass="org.fortiss.af3.mira.model.requirementSource.RequirementSource">
</modelElementClass>
</modelElementCompositor>
<modelElementCompositor
compositor="org.fortiss.af3.mira.compose.AnalysisSystemArchitectureCompositor">
<modelElementClass
modelElementClass="org.fortiss.af3.system.model.SystemArchitecture">
</modelElementClass>
</modelElementCompositor>
<modelElementCompositor
compositor="org.fortiss.af3.mira.compose.AnalysisFileProjectCompositor">
<modelElementClass
......
/*--------------------------------------------------------------------------+
$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $
| |
| Copyright 2013 ForTISS GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.af3.mira.compose;
import org.eclipse.emf.ecore.EObject;
import org.fortiss.af3.mira.model.Analysis;
import org.fortiss.af3.system.compositor.SystemArchitectureCompositor;
/**
*
* @author wenwenchen
* @author $Author: hoelzl $
* @version $Rev: 18709 $
* @ConQAT.Rating YELLOW Hash: 26F3E071D0269E89DB496B83DE020B5C
*/
public final class AnalysisSystemArchitectureCompositor extends SystemArchitectureCompositor {
/** {@inheritDoc} */
@Override
protected boolean isCorrectElementClass(EObject contained) {
return contained instanceof Analysis;
}
}
......@@ -101,13 +101,7 @@
<modelElementClass
modelElementClass="org.fortiss.af3.project.model.FileProject">
</modelElementClass>
</modelElementCompositor>
<modelElementCompositor
compositor="org.fortiss.af3.platform.compositor.PlatformArchitectureSystemArchitectureCompositor">
<modelElementClass
modelElementClass="org.fortiss.af3.system.model.SystemArchitecture">
</modelElementClass>
</modelElementCompositor>
</modelElementCompositor>
</extension>
</plugin>
/*--------------------------------------------------------------------------+
$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $
| |
| Copyright 2013 ForTISS GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.af3.platform.compositor;
import org.eclipse.emf.ecore.EObject;
import org.fortiss.af3.platform.model.PlatformArchitecture;
import org.fortiss.af3.system.compositor.SystemArchitectureCompositor;
/**
*
* @author wenwenchen
* @author $Author: hoelzl $
* @version $Rev: 18709 $
* @ConQAT.Rating YELLOW Hash: FDFCB97D9FE80BB3138EFC5C69476A9E
*/
public final class PlatformArchitectureSystemArchitectureCompositor extends
SystemArchitectureCompositor {
/** {@inheritDoc} */
@Override
protected boolean isCorrectElementClass(EObject contained) {
return contained instanceof PlatformArchitecture;
}
}
......@@ -25,7 +25,6 @@ import java.util.List;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.jface.resource.ImageDescriptor;
import org.fortiss.af3.project.model.FileProject;
import org.fortiss.af3.system.model.SystemArchitecture;
import org.fortiss.tooling.kernel.model.IProjectRootElement;
import org.fortiss.tooling.kernel.service.IPersistencyService;
import org.fortiss.tooling.kernel.ui.extension.IModelElementHandler;
......@@ -37,7 +36,7 @@ import org.fortiss.tooling.kernel.ui.extension.base.ModelElementHandlerBase;
* @author hoelzlf
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: 413885D8793E0AE7C805927454B129AC
* @ConQAT.Rating GREEN Hash: E8D4C5684A96109ECC48580028A885D6
*/
public final class FileProjectModelElementHandler extends ModelElementHandlerBase<FileProject> {
......@@ -67,26 +66,11 @@ public final class FileProjectModelElementHandler extends ModelElementHandlerBas
@Override
public List<EObject> getSubnodes(FileProject element) {
List<EObject> list = new ArrayList<EObject>();
// for(EObject node : element.eContents()) {
for(EObject node : element.getRootElementsList()) {
for(EObject node : element.eContents()) {
if(node instanceof IProjectRootElement) {
if(node instanceof SystemArchitecture) {
addSubSystemNodes(list, (SystemArchitecture)node);
}
list.add(node);
}
}
return list;
}
/** Recursive add subsystem nodes */
private void addSubSystemNodes(List<EObject> list, SystemArchitecture system) {
if(system.getSubSystemsLength() < 1) {
return;
}
for(SystemArchitecture subSystem : system.getSubSystemsList()) {
list.add(subSystem);
addSubSystemNodes(list, subSystem);
}
}
}
......@@ -33,9 +33,4 @@ Require-Bundle: org.eclipse.ui.ide.application,
org.fortiss.af3.viewpanel.ui;bundle-version="2.3.0",
org.eclipse.ui.intro;bundle-version="3.4.100",
org.eclipse.ui.intro.universal;bundle-version="3.2.500",
org.eclipse.ui,
org.eclipse.swtbot.eclipse.core;bundle-version="2.0.5",
org.eclipse.swtbot.junit4_x;bundle-version="2.0.5",
org.eclipse.swtbot.eclipse.finder;bundle-version="2.0.5",
org.eclipse.swtbot.swt.finder;bundle-version="2.0.5",
org.eclipse.swtbot.forms.finder;bundle-version="2.0.5"
org.eclipse.ui
Supports Markdown
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