che icon indicating copy to clipboard operation
che copied to clipboard

Custom extension not visible on IDE 4.7.2

Open mariosotil opened this issue 10 years ago • 2 comments

I followed the guides about how to create Extensions, but there is something I'm missing because I am still not able to add a Menu option. I tried with code written for other developers, and with projects started from the scratch.

These are the steps to reproduce the problem:

$ git checkout 4.7.2 
$ cd che
$ mvn clean install

In other place, I created a new folder and pulled a repo:

$ cd /home/user
$ mkdir example
$ git clone http://github.com/che-samples/che-ide-extension

I replaced the references into pom.xml, from 4.3.0-RC1-SNAPSHOT for 4.7.2. After that I built it

$ mvn clean install

I got back to the Che source code and installed the dependency in three places:

  • che/assembly/assembly-ide-war/pom.xml

    <dependency>
        <groupId>org.eclipse.che</groupId>
        <artifactId>che-examples-action</artifactId>
    </dependency>
    
  • che/assembly/assembly-ide-war/src/main/resources/org/eclipse/che/ide/IDE.gwt.xml

     <inherits name="examples.MyExtension"/>
    
  • che/pom.xml

        <dependency>
            <groupId>org.eclipse.che</groupId>
            <artifactId>che-examples-action</artifactId>
            <version>${che.version}</version>
        </dependency>
    

Just to be sure, I returned to the che folder and built everything

$ cd /home/user/eclipse/che
$ mvn clean install
$ cd assembly/assembly-main/target/eclipse-che-4.7.2/eclipse-che-4.7.2/
$ bin/che.sh

But the action is not visible at the IDE. What can I do?

mariosotil avatar Sep 10 '16 23:09 mariosotil

@mariosotil - my guess is that somehow when you are building your assembly, it's not picking up your local JAR file that contains your custom plugin.

A few things: 1: You don't need to build all of che from the root. It's going to spend a lot of cycles unnecessarily. So if you just want to include your plugin, go into /assembly/assembly-main and build it from there.

2: What happens if you replace the ${che.version} to be explicitly 4.7.2? The combination of , and tags that you have in your extension must match identically (case sensitive and all) what youa re including in che/pom.xml. So my guess is that something isn't quite right here and it's not getting picked up.

TylerJewell avatar Sep 10 '16 23:09 TylerJewell

Hey! It worked! I did this on che/pom.xml

        <dependency>
            <groupId>org.eclipse.che</groupId>
            <artifactId>che-examples-action</artifactId>
            <version>4.7.2</version>
        </dependency>

Thank you so much :-)

mariosotil avatar Sep 11 '16 00:09 mariosotil