Sorry if this looks like a very noob’ish question for the eclipse dev enthousiasts, I just did not find the time to dwell into eclipse dev compared to Python or Capella Studio Specifier which don’t need much plugin or manifest file configurations, so first question is about the plugin.xmli.
First step was indeed to write something in the plugin.xml file: First step is to add an extension
I am not sure if a “path” value need to be added inside the xml tag <template…> or if the uri name is important.
So what I did here was to keep the content of “point” just copy pasted it, and change uri into the path of the place where I added my template (red square in the top)
I am probably making some major mistake here.
Second step was to import the registered template, using Right click > import > M2DOC > import template > select the registered template
Except I can’t find that template, so I am probably making a mistake somewhere, if you see it anywhere please inform me. Thanks
Either use a lower version of Capella Studio I guess or really create a 3.2.0 template to see if it finally recognized.
I might have mixed things,
the “import template” phase, comes AFTER packaging/creating the update it and testing my package in Capella or in a runtime. Okay
Great number of errors, trying to reproduce this with a Capella Studio DSL project (rather than a simple Eclipse java that incorporate Capella libraries such as yours), and encountered and insane number of errors, I retried several times with different configurations, maybe the problem comes from the name of extension that contains the term ‘M2DOC’,
After re opening Capella later, I found it was successfully installed apparently, however no trace of the template in the import menu
In this Trial, I found the doc in the import menu however confirming importation lead to:
Desactivating an old extension and installing a new version
Do you know if the features chosen while creating the update site:
should include M2DOC ones? And if any create a conflict? What about installing Original M2DOC in Capella and Capella Studio, and about the order? (Installing My extension before/after M2DOC or opposite)
I will continue experimenting, there should be a way to make it work.
The easiest way to install M2Doc on Capella is via the extension:
If you are installing directly from the M2Doc update site:
You will need to add at least the Eclipse update site corresponding to your Capella version. You can find this information in the target platform definitions here.
To install your addon you will need to add the M2Doc update site since you now have a dependency to M2Doc. P2 will resolve dependencies across all available update sites. You can also include your dependencies inside your update site by adding corresponding features/plugins.
In the screenshot I can see that org.eclipse.amalgam.explorer.contextual.core is missing. This dependency comes from one of your plugins.
Thanks, Yes I am used to M2DOC, installed it so many times, but it makes sens to install it in CS (to be able to CREATE a template), and in Capella (to be able to IMPORT a template)
I followed this order:
CS + M2DOC 3.2.0 (I upgraded as you have suggested)
C + M2DOC 3.2.0
CS-> Add Template wherever inside of the plugins → configure plugin.xml with the right uri → add dependency to the first m2doc.ide (and ignore .jdt or .ie)
→ CS → create the update site with only the 4 features you see in scteen shot.
→ C → install the update site
→ import the template
Where do you see the missing (org.eclipse.amalgam.explorer.contextual.core) ? I have 4 screenshots.
Note I have 5.1 for both softwares and made sure i take 3.2.0 for 5.1 (not the one destined to 5.2)
When installing the update site into Capella (just after having installed official M2DOC) I encounter this message:
Could there be a bug related to this aswell?
The quickest fix I see, is to do exaclty what you did: create a simple class, with no kitalpha plugins, preferably within Capella Studio to be able to import all Capella libraries, and using the eclipse perspective
That’s the method you have used and that worked I believe?
Is there a more straightworward way to add Capella libraries into a java project than sing the add external jars and go pick them all? (You can’t even pick them all at once, I had to it by chunks or dozens of libraries (3 times))
Indeed I realized this is not a plugin, it cannot be made into a feature therefore cannot be made into an update site.
Edit: Anyway I tried to work out with a plug in project instead of a Capella Studio common kitalpha DSL projects (that seems to be having a bug related to M2DOC when importing templates in Capella) and noticed I did not have the plugin.xml file to configure the template extension point? What do you think?
Edit: tried to resolve this error by adding more features into the feature I made from my plug-in project, it seemed that some features related to osgi and equinox.p2 were missing, so I went and I added ANY feature related to this 2 terms:
→ updated and installed into a fresh Capella installation: Same result! Same error.
Althought testing again, made it clear that google.inject was missing from the feature and not from the update site.
I tried the Capella Studio DSL project → Update Site → Install it in Capella → Template appears in the import M2DOC menu but an error appears when confirming the import!
I tried Java project → added ALL CAPELLA LIBRARIES → Could not make a plugin from it
I tried a Plug in project → Added ALL CAPELLA LIBRARIES-> Added a plugin.xml file → made a feature and added the missing "Google.inject"t thing → Made an update site → Installed in Capella → but the template would not appear in the import M2DOC menu.
The install error you have seems related to M2Doc 3.2.0 not being installed. You can either install M2Doc 3.2.0 or lower the dependency in your MANIFEST.MF from 3.2.0 to 3.1.0 (if you installed M2Doc 3.1.0).
Thanks, however I think I am not having this error anymore, I was able to install the right M2DOC versions in all softwares, I even got the M2DOC import template menu and saw my template available in that menu, however an error could prevent me from completing the import:
Yes not result. I wrote a summary of my action at the end of my previous post, you can check it if you wish to.
What do you think? Am I in the right path?
I had to try to make the extension in a different way that the usual viewpoint construction style, I had to try making a plug in from scratch, indeed I am having an error with the first method. (Although second method is not working yet)
The second method with the plug-in project is the way to go.
The URI you used in the extension point seems ok.
Can you check if your template is present in the installed jar file ?
If not present try to add it to the build.properties.
After saving, i produced a new feature, added the google inject plug in and then produced an update site with this feature.
The Manifest.MF contains ALL capella libraries (don’t know if that’s a mistake or not, so it contains also the m2doc.ide you mentioned earlier)
I admit it, in my 20+ trials, since I started adding the google.inject plugin to the feature I started to forgot to add my plugin project (Yes it is JS_1),
Added it again and retried → I found the Template indeed now, inside the jar plugin of the update site, I extracted the jar to see it:
When installing it, I am encountering the same error message as the one telling me about the google plugin, now it is asking for 'github.classgraph"
It seems it is going to ask about missing plugins one at a time, because now capella installation window is asking me yet another plugin:
(Note: Rereading my own comment, I am realizing that all these extension gave message errors yet they are appearing as being “available”/installed, so strange)
I made DOZENS (Yep Dozens) of experiments today and I came to the conclusion that EVEN IF you have installed the M2DOC extension correctly, the first update site will go okay with no error, but installing a second update site will produce that error about missing contextual explorer, I assure you it happens if you have installed M2DOC prior correctly. I suppose that my first update site is “altering” M2DOC plugins/contextual explorer plugin/ somehow?
Back to the point about Features and other plugins:
Just to be clear, when making a plug in project in CS, the capella libraries are not included I had to add them through dependencies menu button:
Although I should have added them with another method maybe?
Anyway, then I made a feature where I simply included the plug in project as a whole nothing else → Then the update site takes That Feature simply → Then produced the update site.
The following errors appear, they are relative to these “missing” plugins:
(These can be added during the feature creation step, but the error message indicates a missing plugin only ONE at a time. )
→ I think I did not get this error only once and I am unable to know how or why it did not appear that time.
Another note to know: This “making a feature” does not exist when working with the capella studio perspective (working on viewpoints), you can directly make the update site,
It’s as if, the “feature” was made preemptively, and this “virtual feature” already contains all the necessary plugins. So when I am making my own feature (because the plug in perspective and plug in projects needs one), well I don’t have all the necessary plugins preemptively it seems (In any case installing the update site first time does not show these problems so IDK)
I went back to the feature making step, and instead of adding the mentioned missing plugins (google.inject etc) I went ahead and only added M2DOC plugins:
Still cant install the plugin:
→ This time it skipped the first three missing usual plugins (Google.inject etc) and directly asked me about some lpg.runtime.java plugin.
I will try in inside a new fresh capella instllation (unzip it, install M2DoC, install addon) yet again, in order to be sure there is no conflict between new plugins and old ones (I will also use a new CS).
And checked everything,
→ The new extention can’t be installed, the explorer plugin thing missing → Need to make a new Capella installation.
This is so exhausting, Spent 5H straight with no break trying to solve this.
(Also I am suspecting my features/builds configs to be sticking in CS, so I am probably needing a new CS installation a new fresh plug in project.)
Finally I retried again with new fresh C and CS installations (and this time)…
Instead of having 0 error (first update site) as I did the other time, I just got the usual errors “missing plugins”:
After several hours, I am less and less sure what I shall do.
First, I dont know why the capella Studio Viewpoint method (DSL), produce that error when confirming the import of the template (did you guys inverstigate and found some bug?). At least with the viewpoint method the extention can be installed to Capella.
Secondly, When using the plug in project, there are some considerations to have in terms of libraries
Capella libraries to add to dependencies (Shoul I have used the build path instead (only available through proprties of the project))
Considerations for plugin.xml (which is not existing in the beginning) and in term of build.properties
Creating a correct feature (does it need any more plugins other than the current plug in project?)
Creating the Update site (does it need any more features other than the previous feature?)
Installing M2DOC 3.2.0 FIRST in C and CS THEN making the update site and installing it → Seems to not be working,
I made it work like 1/30 times?
I am even considering whether cpy pasting .zip files into dorpings of freshly unzipped capella installation could be affecting the software and could somebhow preventing me from achieving this. Indeed I noticed that “available softwares” for some capella installations were richer sometimes depending on factors I have no control over (cf. my other post asking about capella first available softwares)
M2Doc doesn’t depend on lpg.runtime.java nor com.google.inject. Can you try with the two projects I provided as example and start a runtime. This way you will at least be able to develop your services and templates.
You don’t need to import the template. You can reference it from the template registry in your .genconf file. And there are M2Doc tests for both referencing the template and importing it that works fine.
You just need dependencies declared in the test project aka Capella metamodel and the M2Doc IDE plugin. So since both are already installed when you install your update site p2 should not complain about missing plugins.
All dependencies are declared via the MANIFEST.MF like in the test project.
when you use the template registry extension point, PDE will make your plugin a singleton and add the newly create plugin.xml file to the build.properties
I don’t know what you put in your feature but as long as the plugin with the service class and the template is in the feature you should be good.
you should not need any thing else since you already have the Capella metamodel installed and M2Doc installed.
I add here the feature and update site for the test project. You can build and install the update site no missing dependencies. I’m able to generate the document and import the template.
Alright thank you, I am bit upset for not finding the reason for the errors. But maybe tweaking with your feature and updatesite and comparing things will help me find the reasons for my multiple and numerious various errors. I love finding keys and resolve problems.
I will check them later, but just a quick test gave me this result:
Fresh M2DOC extension
Tying to install the update site to Capella (without opening the test (plugin project) nor the feature) just the update site:
Maybe my problem is wanting it to work as an extension (same as other extensions like Capella Requirement and such). I will experiment again for sure, but this is a first observation that is a bit puzzling. I think we are not having the same methods of testing update sites? Will keep you informed in any case and thanks again.