Coder Social home page Coder Social logo

occi-studio's People

Contributors

fzalila avatar philippemerle avatar stephaniechallita avatar wpiers avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

occi-studio's Issues

Interface and implementation for generic operation on models (Ex: Import from provider)

Hello,

To implement generic operations like Import from provider, we need an interface to describe general operations method, Connector generator must be updated after consequently to generate default implementation of this interface.
On configuration part, the implementation is a singleton and will be instantiated by the Connector general factory after connector plugins is added on java class path.
This functionality will give import from provider on Model@Runtime server, Mart server will be updated to manage this interface and set reserved url automatically by connectors.

The main objective is for the user to access import from provider on Mart server in a standard way.

Model changes not taken into account in Designer unless fully rewritten from scratch

Model changes are not taken into account in designer, requires OCCI-Studio workspace and redoing extension completely ;_; Even when deleting inner eclipse's workspace and deleting & regenerating .ecore, .genmodel, src, .edit, .designer & registering extension. Doing all that even ends with having an empty palette or worse, having a representations.aird that can't open anymore and therefore no more sirius instance diagrams at all.

Eclipse logs showed a "no viewpoint for openshift" error, but I don't have them anymore, since I had to delete my OCCI-Studio workspace THRICE (like it had been installed anew) until I had the changes I wanted in tje OpenShift extension.

This is maybe rather an enhancement than a bug, but it really kills productivity.

Provide an Eclipse update site

Hi,

This would be useful to put an Eclipse update site online.
We have projects with a Tycho configuration that depend on some of these plug-ins. Without an update site, these projects can only be built on the developer's machine, by hijacking the project's class path.

Having a regular update site online is the right Eclipse way and would make our project builds portable.

Create extension project, fail to create modeling perspective

As shown here :
pb_create_project_extension

I fail to create a modeling view perspective with OCCI-Studio --> new extension project.
There is no modeling view perspective available in product release (downloaded on GitHub) and no options to create a new modeling project.

Textile generator fail to render mixin first table correctly

Hello,

Textile rendering fail with mixin table.
I've notice it is due to a lost carriage return after the table (depends or applied to).


| *Term* | copys3object |
| *Scheme* | http://occiware.org/occi/infrastructure/aws/s3# |
| *Title* |  |

**Carriage returned here !**
Depends on:
* <a href="s3.textile#mixin-s3objectmetadatas">http://occiware.org/occi/infrastructure/aws/s3#s3objectmetadatas</a>

Applies to:
* <a href="s3.textile#kind-bucketlink">http://occiware.org/occi/infrastructure/aws/s3#bucketlink</a>

Thanks in advance to add a carriage return after the table as in this exemple.

API Support for retrieving all AttributeStates for an Entity

Currently an Entity has a method getAttributes() which returns all AttributeStates that belong to the Entity itself. To additionally retrieve all AttributeStates that are defined by the MixinBases belonging to the Entity, one has to retrieve the MixinBases first and then collect all their AttributeStates.

For convenience, I suggest to add another method for Entity, e.g., getAllAttributes() that returns a combined list comprising the AttributeStates that are part of the Entity AND those that are part of its MixinBases.

Mixin tags : How to manage them in meta model v2 ?

Hello,
Using MixinBase is not a good solution for this particular mixin (not an extension mixin but a configuration mixin), MixinBase objects are used mainly for implementation and display. Mixin tags has no implementation as they are created on demand by users. To avoid memory leaks (instanciation of MixinBases), find a simple way to manage mixin tags in studio core v2 (optimized way) and how to use them in MartServer application.

Thanks.

Code generation with mixins introduce compilation error when applied several times

After creating my model through the visual interface I clicked on the .occie file and select "Generate EMF tooling"
Then I updated the model then I regenerated the EMF tooling. As a consequence two line are added to my generated source code each time I use the generation.

Those lines are :
createEOperation(providerEClass, PROVIDER___APPLIES_CONSTRAINT__DIAGNOSTICCHAIN_MAP_1);
and
createEOperation(credentialsEClass, CREDENTIALS___APPLIES_CONSTRAINT__DIAGNOSTICCHAIN_MAP_1);

In my model, provider and credentials are mixins and the number goes to 2, 3, etc each time I click on generate.

Removing those lines enable to fix the compilation issue introduced.

Items can't be placed beyond the displayed parts of the diagram

There is no way to place an item beyond the displayed parts of the diagram, meaning there is nowhere to place it when existing items take already more than all the displayed place.

Workaround : place it anywhere in a white space (not in another item), then drag'n drop it where it should be to expand the diagram's size.

Automatically register extension when importing project and when loading eclipse workspace

Hello,

I have an issue with all studios, when opening my workspace, i have a lot of extension to register manually (OCCI Studio --> register OCCI extension).
Typically i use import extensions from other extensions projects that are present in the workspace.
Eclipse give me errors on all imported extension from the same workspace like this box:
capture d ecran 2018-01-18 a 15 13 06

Is there any way to auto-register all extension (.occie) when loading workspace (or just before loading the extension occie in modeling view) ?

Generated connector project is not complete

The generated project doesn't have any resources and mixins base objects.
capture d ecran 2017-07-19 a 09 19 49

My vmware extension use core, infrastructure and crtp extensions.
This extension declare new mixins for infrastructure.

Use name instead of term in OCCI Configuration diagrams

Currently the label of entity/mixin boxes includes the category term, e.g., "vm1: compute", ": networkinterface", "ipnetworkinterface", etc.
It would be more useful to use the category name instead of the term, e.g., "vm1: Compute", ": NetworkInterface", "IpNetworkInterface", etc.
More useful because the name could be in camel case when the term is always in lower case.

EMF Tooling fail with a strange message

Hello,

I want to generate my EMF tooling for my model but i have a message that i don't understand :
capture d ecran 2018-03-23 a 15 23 18
Note that I validate my model, before launching EMF tooling generator.
Could you explain me what is this ?

Thank you

[OCCI Designer] Extension View

Add a new view in the OCCI Designer to only display the graph of extensions (without their contents) and the import relations between them. If the user double-clicks on an extension then open a new view on the contain of the selected extension.

FSM OCL validation & use of action method from an imported extension

Hello,

I had a problem with FSM on my aws infrastructure extension (ec2), i have created a FSM for instance EC2 with action provided by compute (start, restart etc.).
OCL give me errors on my design and specifies me that it is forbidden :
capture d ecran 2018-01-09 a 08 38 45

Is this really forbidden ?

Has a workaround i use my own actions on instance EC2 but its not OCCI infrastructure compliant.

Problem with import extension and remove extension on a new extension

Hello,

I find a major problem with import extension feature :

  • I import an existing extension (exist on my workspace development and registered), i use the palette "Import extension" :
    capture d ecran 2018-03-23 a 14 40 14

I use after Extensions Registry and i import the registered and desired extension.

  • I remove it with backspace (on mac) from my new extension diagram.
    This cause to delete all the content of the imported extension (on other extension project, file occie).

Generate EMF Tooling within another eclipse instance (run as --> Eclipse)

Hello,
I found a bug with EMF Generate tools, when i open my project (AWS) in another eclipse application instance via "run as" --> Eclipse application.
I have validated my model with OCL validation before launching EMF Tools generation.

This give me model validation error :
capture d ecran 2018-01-03 a 15 39 29

My main eclipse give this on console after clicking on OK button :

!ENTRY org.eclipse.ui 4 0 2018-01-03 15:41:59.306
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
	at java.util.ArrayList.rangeCheck(ArrayList.java:653)
	at java.util.ArrayList.get(ArrayList.java:429)
	at org.eclipse.cmf.occi.core.gen.emf.ui.popup.actions.OCCI2EMFGeneratorAction.generateEMFCode(OCCI2EMFGeneratorAction.java:260)
	at org.eclipse.cmf.occi.core.gen.emf.ui.popup.actions.OCCI2EMFGeneratorAction.run(OCCI2EMFGeneratorAction.java:152)
	at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:247)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:565)
	at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:397)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4258)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1502)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1525)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1510)
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1314)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4082)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3699)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1499)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1472)

As the error state it, the bug provide from this line in OCCI2GeneratorAction class in method generateEMFCode :

editOp.addGeneratorAndArguments(GenModelUtil.createGenerator(genModels.get(0)), genModels.get(0),
				"org.eclipse.emf.codegen.ecore.genmodel.generator.EditProject", "Edit");

This issue is maybe linked with issue #34 .

Latest release of OCCI-Studio product on P2 (content.xml) is not the lastest version.

Hello,

The p2 repository is : http://dl.bintray.com/occiware/OCCI-Studio/update-site/current-release

In content.xml is not the good one because it references a bad version of OCCI-Studio (feb. 2018).
This impact all substudio on build (multi-cloud studio etc.) with a P2 jar error message (file not found).

<artifact classifier='org.eclipse.update.feature' id='org.eclipse.cmf.occi' version='1.0.0.201802221456'/>

EMF tools errors on Table java object

Hello,

After generating EMF tools, i have errors on my ec2 extension :
On Ec2Tables.java :
capture d ecran 2017-12-29 a 16 14 34
And on Impl package this create an ecore file ! It's strange as it is not the location for ecore file (in model directory, not in java source directory).
capture d ecran 2017-12-29 a 16 14 57

I didn't find any clue for a workaround method.

Note that i use the latest version of OCCI-Studio and it happen within my development on Multi-Cloud Studio.

Problems with mixins and OCCIHelper

Hello,

We have a problem with mixins, particularly with infrastructure mixins.
The occi specification give a schema for ssh_key (and some others) that point to a scheme that is not equals to infrastructure main scheme (this is a sub scheme).
When calling OCCIHelper to create a concrete mixin implementation in connector via the method
public static MixinBase createMixinBase(Entity entity, Mixin mixin)
We have this error :
EPackage http://schemas.ogf.org/occi/infrastructure/credentials/ecore not found!
2017-10-24 08:43:53.472 WARN Couldnt create mixin base for mixin : http://schemas.ogf.org/occi/infrastructure/credentials#ssh_key

So we can't use the mixin concrete implementation Ssh_Key_connector because it instantiate the mixin on MixinBaseImpl only.

Note if mixins have the same scheme as infrastructure, creation method works.

Right clicking on my .occie file give error

With my development environment i have this error when i right click on my occie model file, this is maybe a dependency problem but may cause unexpected behaviors :

!MESSAGE Plug-in org.eclipse.cmf.occi.infrastructure was unable to load class org.eclipse.cmf.occi.core.ui.popup.actions.ExtensionConfiguration2OCCICAction.
!STACK 0
java.lang.ClassNotFoundException: org.eclipse.cmf.occi.core.ui.popup.actions.ExtensionConfiguration2OCCICAction cannot be found by org.eclipse.cmf.occi.infrastructure_1.0.0.qualifier
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:484)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:395)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:387)
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:150)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:564)
	at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174)
	at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905)
	at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
	at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)

Update the namespace2extension map after registering an OCCI extension

When we create an extension configuration, the resolveKind() method is invoked.

If the concerned extension is not registered, the resolveKind() add in the namespace2extension map the metamodelURI associated to the Core OCCI extension.
It is wrong (an error: term is not found into extension) but necessary to load the resource.

Once the OCCI extension is registered, the error always appears.

A possible solution consists to update the namespace2extension map when a new extension is registered.

Travis process is killed

Recently, the build process of OCCI-Studio fails.
It is strange because the process finishes successfully on our local machines (me and @cgourdin).
The log of Travis shows:

Killed
The command "sh travis/build.sh" exited with 137.

According to several posts (post1, post2), this behavior is due to running out of memory.

Any idea about that?

[Extension Designer Generator] generate several containment views

It could be useful that the generator of extension designers generates several containment views for the same extension. For instance for MoDMaCAO we could have two views. First view could be application-oriented, i.e., components are contained into its owning application. Second view could be compute-oriented, i.e., components are contained into its hosting compute.
The current generated view without containment would be kept.

Restarting the studio and occi editor fail with my .occie model

Hello,

I cannot reload my .occie in occi editor mode after close and restart the studio :
capture d ecran 2017-07-17 a 16 59 03

The error shows that the studio cannot load the extension CRTP.
Note: If i create a new extension project based on CRTP, my extension model .occie will load correctly.

Error Dialog message needed when EMF tooling generator fail in some conditions

Actually, if the generator fail it fail silently if some pre-requires are not ok, for example i have an extension imported by another and the imported extension doesn't have a genmodel file. When launching the EMF tooling and i was not informed about why it doesn't work.
At least, the workaround to manage this is to look on logs with "eclipse inception" mode.

How to set attributes Complex types (ArrayType and RecordType) programmatically using entity interface and OCCIHelper

Hello,

Objective : Implement complex datatypes on MartServer.
I have problems setting attributes with OCCIHelper, complex type are not eAttributeType but are ReferenceImpl type, i use OCCIHelper.setAttributes method with AttributeStates object but for complex type i can't pass attributeStates because its not a generic attribute type.
It throws IllegalArgumentException : Ecore structural feature 'arrayTest' is not an Ecore attribute!
My extension is set as this :
capture d ecran 2017-10-29 a 09 52 43

I have another question :
For my rendering output with json i need an ecore eValue object, as i don't have an EAttributeType, i can't obtain the instance value of the attribute.
for Example i want to render from my extension : arrayTest and counterRecord from my entity.

/**
     * Read attributes from entity (used by link and resource) from attributeState list and return an attribute map.
     * @param readAttrs
     * @param entity
     * @return
     */
    private Map<String, Object> readAttributesToAttributesMap(final List<AttributeState> readAttrs, final Entity entity) {
        Map<String, Object> attributes = new LinkedHashMap<>();
        for (AttributeState attr : readAttrs) {
            String key = attr.getName();
            String val = attr.getValue();
            boolean complexType = false;
            if (val != null) {
                if (!key.equals(Constants.OCCI_CORE_SUMMARY) && !key.equals(Constants.OCCI_CORE_TITLE)
                        && !key.equals(Constants.OCCI_CORE_ID)
                        && !key.equals(Constants.OCCI_CORE_SOURCE)
                        && !key.equals(Constants.OCCI_CORE_TARGET)) {

                    EDataType eAttrType = null;

                    // Determine attribute type.
                    Optional<EDataType> optEDataType = EntityManager.getEAttributeType(entity, key);
                    Optional<Object> optEValue = EntityManager.getEMFValueObject(entity, key);
                    Object eValue = null;

                    if (optEValue.isPresent()) {
                        eValue = optEValue.get();
                    }
                    if (optEDataType.isPresent()) {
                        eAttrType = optEDataType.get();
                    }
                    // Specific to EEnum, must be rendered as String.
                    if (eAttrType != null && eAttrType instanceof EEnum) {
                        System.out.println("Attribute : " + key + " is an enum, render as String, value : " + val);
                        attributes.put(key, val);
                        continue;
                    }

                    if (eAttrType == null) {
                        LOGGER.warn("Unknown type for attribute: " + key + " value: " + val);
                        // Display as a string for all others.
                        attributes.put(key, val);
                        continue;
                    }
                    if (eValue == null) {
                        // Get default eValue.
                        eValue = eAttrType.getDefaultValue();
                        if (eValue != null) {
                            System.out.println("Default value : " + eValue.toString());
                        } else {
                            System.out.println("No value and no default value for " + key + " val:" + val);
                            // Render if its a number or if its a String.
                            Optional<Number> optNum = EntityManager.getAttrValueNumber(entity, key, val);
                            if (optNum.isPresent()) {
                                attributes.put(key, optNum.get());
                            } else {
                                attributes.put(key, val);
                            }
                            continue;
                        }
                    }
                    attributes.put(key, eValue);

                }
            }
        }

        return attributes;
    }

Helper methods to get eAttributeType :

/**
   * Return an ecore type from attribute name and entity object.
   *
   * @param entity
   * @param attrName
   * @return
   */
  public static Optional<EDataType> getEAttributeType(Entity entity, String attrName) {
      EDataType eDataType = null;
      String eAttributeName = Occi2Ecore.convertOcciAttributeName2EcoreAttributeName(attrName);
      final EStructuralFeature eStructuralFeature = entity.eClass().getEStructuralFeature(eAttributeName);
      if (eStructuralFeature != null) {
          if ((eStructuralFeature instanceof EAttribute)) {
              // Obtain the attribute type.
              eDataType = ((EAttribute) eStructuralFeature).getEAttributeType();
          }
      }
      return Optional.ofNullable(eDataType);
  }

To get attribute object value :

/**
   * @param entity
   * @param attrName
   * @return an object container value from EMF attribute object.
   */
  public static Optional<Object> getEMFValueObject(Entity entity, String attrName) {
      EAttribute eAttr;
      Object result = null;
      String eAttributeName = Occi2Ecore.convertOcciAttributeName2EcoreAttributeName(attrName);
      final EStructuralFeature eStructuralFeature = entity.eClass().getEStructuralFeature(eAttributeName);
      if (eStructuralFeature != null) {
          if ((eStructuralFeature instanceof EAttribute)) {
              eAttr = (EAttribute) eStructuralFeature;
              result = entity.eGet(eAttr);
          }
      }
      return Optional.ofNullable(result);
  }

I'm lost here, so my main question how to manage (set and get) complex datatypes and value objects programmatically ?

Json Generator usage with curl generator and all concrete configuration models

Hello,

Adding a json generator will be an added value to perform occi task on runtime (MartServer and others).
First step : migrate json part from MartServer to OCCI core (studio), in MartServer, json objects will be used from occi core dependency.
Second step : add a new json generator project to OCCI-Studio to perform curl operations with json format.
Third step : Add a feature to import OCCI json and create automatically the configuration model.

Add an attribute "Description" on Category meta model

To allow edition of documentation for categories (kind, mixin etc.) when designing an extension.

This field will be used on documentation generation (textile, latex) and will be rendered with model@runtime on model description output.
To edit description, this feature will use a memo (multi-line editor).

Sirius and password field

Hello,

The designer has no component to set a password field.

How to build a component that set * to replace password text ?
Is this a specific datatype or a new component ?
Note that this may impact model@runtime renderings.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.