eclipse-platform / .github

Common contribution content for eclipse-platform repositories
https://www.eclipse.org/eclipse/
5 stars 10 forks source link

Add a yml editor to the Oomph Platform SDK setup #107

Closed laeubi closed 1 year ago

laeubi commented 1 year ago

As we now have more and more ymal file (most notable github workflows), it seems usefull to have an editor to edit them.

Can we add https://marketplace.eclipse.org/content/yaml-editor (or similar) to the platform SDK?

I tried to drag+drop the marketplace link but have not had success with that.

akurtakov commented 1 year ago

https://github.com/eclipse/wildwebdeveloper/ also has yaml editor, maybe you'll have better luck with it.

Aggregating platform SDK is already enough trouble to introduce extra obstacles. I think platform SDK to contain only things just build to prevent the case where build fails due to change needed in 3rd party against unreleased version (aka build cycle). For the purpose you're looking there is https://www.eclipse.org/downloads/packages/release/2023-03/r/eclipse-ide-eclipse-committers so such out-of-the-box experience is provided for committer. I actually believe it contains yaml editor already.

laeubi commented 1 year ago

@akurtakov just to be sure I mean the automatic setup for develop platform not the "sdk.zip"

mickaelistria commented 1 year ago

So it's not the SDK but the Oomph configuration?

iloveeclipse commented 1 year ago

just to be sure I mean the automatic setup for develop platform not the

So probably you want change title of this task, because I also misunderstood it, same way as Alex.

merks commented 1 year ago

It's easy to add additional tools to be installed to the Oomph setup. Here are some examples:

image

laeubi commented 1 year ago

So it's not the SDK but the Oomph configuration?

The window titlte of this is grafik

Also the website name it "Platform SDK" so I'm not sure what is the official name for it?!?

grafik

merks commented 1 year ago

The title now makes it clear that you don't want to add it to the SDK product/feature but rather to the setup of the development environment. Which update site contains the feature(s) that you want installed?

laeubi commented 1 year ago

I only found the Marketplace entry but not an update site: https://marketplace.eclipse.org/content/yaml-editor

akurtakov commented 1 year ago

Isn't https://download.eclipse.org/wildwebdeveloper/releases/latest/ working for you? I ask as this is an EF project with some platform committers working on it too so communication channel and rules should be fairly similar.

laeubi commented 1 year ago

I won't mind what editor exactly, it is just that currently json / yml files are opens in the "system text editor" for me what is rather inconvenient.

merks commented 1 year ago

We could also just define a content type binding to an editor. Which one would be good?

merks commented 1 year ago

@laeubi

I could add this:

<?xml version="1.0" encoding="UTF-8"?>
<workbench:FileAssociationsTask
    xmi:version="2.0"
    xmlns:xmi="http://www.omg.org/XMI"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:workbench="http://www.eclipse.org/oomph/setup/workbench/1.0"
    xsi:schemaLocation="http://www.eclipse.org/oomph/setup/workbench/1.0 http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/models/Workbench.ecore">
  <mapping filePattern="*.yml"
      defaultEditorID="org.eclipse.ui.genericeditor.GenericEditor"/>
  <mapping filePattern="*.json"
      defaultEditorID="org.eclipse.ui.genericeditor.GenericEditor"/>
</workbench:FileAssociationsTask>

I'm not sure if there were a more specific installed editor bound to that extension if this would override that. For me, both these things opened in a regular text editor already anyway.

Shall I go ahead and add this to the setup?

laeubi commented 1 year ago

It would at laest be better than the current default, maybe @akurtakov can explain how e can use a wwd editor.

akurtakov commented 1 year ago

After installing WWD , open with / Generic Editor - should be all needed.

laeubi commented 1 year ago

So can we probably add WWD as well? I think syntax highlight and probably content assist would be great.

merks commented 1 year ago

@laeubi

I'm slightly uncomfortable installing WWD because not everyone needs that and it might introduce behavior that one might attribute to the SDK itself. (I.e., when eating your own dog food you're not sure which dog food you're eating.)

You could instead do the following. Copy the text below to the clipboard, use Navigate -> Open Setup -> User to open the Setup Editor for your user.setup, and paste the following p2 task to your User object in the editor:

<?xml version="1.0" encoding="UTF-8"?>
<setup.p2:P2Task
    xmi:version="2.0"
    xmlns:xmi="http://www.omg.org/XMI"
    xmlns:setup.p2="http://www.eclipse.org/oomph/setup/p2/1.0"
    label="WWD">
  <requirement
      name="org.eclipse.wildwebdeveloper.feature.feature.group"/>
  <requirement
      name="org.eclipse.wildwebdeveloper.xml.feature.feature.group"/>
  <repository
      url="https://download.eclipse.org/wildwebdeveloper/releases/latest/"/>
</setup.p2:P2Task>

Then every IDE you install (or already have installed) with Oomph will automatically install WWD.

You could even restrict the task to install only for the Eclipse SDK product:

<?xml version="1.0" encoding="UTF-8"?>
<setup.p2:P2Task
    xmi:version="2.0"
    xmlns:xmi="http://www.omg.org/XMI"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:setup="http://www.eclipse.org/oomph/setup/1.0"
    xmlns:setup.p2="http://www.eclipse.org/oomph/setup/p2/1.0"
    label="WWD">
  <restriction
      xsi:type="setup:Product"
      href="index:/org.eclipse.setup#//@productCatalogs[name='org.eclipse.applications']/@products[name='eclipse.platform.sdk']"/>
  <requirement
      name="org.eclipse.wildwebdeveloper.feature.feature.group"/>
  <requirement
      name="org.eclipse.wildwebdeveloper.xml.feature.feature.group"/>
  <repository
      url="https://download.eclipse.org/wildwebdeveloper/releases/latest/"/>
</setup.p2:P2Task>

Is that okay?

laeubi commented 1 year ago

I'll try that out, given that we also have to edit html pages (N&N), WWD might still be useful for a wider audience.