This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class QuickCommand extends AbstractUICommand { | |
@Inject | |
private ProjectFactory factory; | |
private Project getProject(UIExecutionContext context) { | |
return Projects.getSelectedProject(factory, context.getUIContext()); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyCommand extends AbstractUICommand { | |
@Inject | |
ProjectFactory projectFactory; | |
@Override | |
public UICommandMetadata getMetadata(UIContext context) { | |
return Metadata.forCommand(MyCommand.class).name("toto") | |
.category(Categories.create("JavaEE")); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
java.lang.ClassCastException: org.jboss.forge.addon.resource.DirectoryResourceImpl cannot be cast to org.jboss.forge.addon.parser.java.resources.JavaResource | |
at org.helloAddon.commands.MyCommand.execute(MyCommand.java:32) | |
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:483) | |
at org.jboss.forge.furnace.proxy.ClassLoaderInterceptor$1.call(ClassLoaderInterceptor.java:87) | |
at org.jboss.forge.furnace.util.ClassLoaders.executeIn(ClassLoaders.java:42) | |
at org.jboss.forge.furnace.proxy.ClassLoaderInterceptor.invoke(ClassLoaderInterceptor.java:103) | |
at org.helloAddon.commands.MyCommand_$$_javassist_9bdea49e-016c-44de-ba56-b175786e1cd2.execute(MyCommand_$$_javassist_9bdea49e-016c-44de-ba56-b175786e1cd2.java) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyCommand extends AbstractUICommand { | |
@Override | |
public UICommandMetadata getMetadata(UIContext context) { | |
return Metadata.forCommand(MyCommand.class).name("toto") | |
.category(Categories.create("JavaEE")); | |
} | |
@Override | |
public void initializeUI(UIBuilder builder) throws Exception { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[bin]$ project-new --named test | |
***SUCCESS*** Project named 'test' has been created. | |
[test]$ java-new-class --named MyClass | |
***SUCCESS*** Class org.test.MyClass was created | |
[MyClass.java]$ java-add-annotation --annotation java.lang.annotation.Documented --targetClass org.test.MyClass | |
Exception when parsing/running: java-add-annotation --annotation java.lang.annotation.Documented --targetClass org.test.MyClass , no such child: org.test.MyClass | |
***INFO*** (type "export VERBOSE=true" to enable stack traces) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Original test | |
@RunWith(Arquillian.class) | |
public class ValidationAddConstraintWizardTest | |
{ | |
@Deployment | |
@AddonDeployments({ | |
@AddonDeployment(name = "org.jboss.forge.addon:ui"), | |
@AddonDeployment(name = "org.jboss.forge.addon:ui-test-harness"), | |
@AddonDeployment(name = "org.jboss.forge.addon:javaee"), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Before | |
@Deployment | |
@AddonDeployments({ | |
@AddonDeployment(name = "org.jboss.forge.addon:ui"), | |
@AddonDeployment(name = "org.jboss.forge.addon:ui-test-harness"), | |
@AddonDeployment(name = "org.jboss.forge.addon:shell-test-harness"), | |
@AddonDeployment(name = "org.jboss.forge.addon:javaee"), | |
@AddonDeployment(name = "org.jboss.forge.addon:maven") | |
}) | |
public static AddonArchive getDeployment() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Copyright 2014 Red Hat, Inc. and/or its affiliates. | |
* | |
* Licensed under the Eclipse Public License version 1.0, available at | |
* http://www.eclipse.org/legal/epl-v10.html | |
*/ | |
package org.jboss.forge.addon.parser.java.ui; | |
import java.io.PrintStream; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class JPANewEmbeddableCommand extends AbstractJPACommand<JavaClassSource> | |
{ | |
@Inject | |
private PersistenceOperations persistenceOperations; | |
@Override | |
public Metadata getMetadata(UIContext context) | |
{ | |
return Metadata.from(super.getMetadata(context), getClass()) | |
.name("JPA: New Embeddable") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16:18:43,705 SEVERE [org.jboss.forge.addon.ui.impl.command.CommandFactoryImpl] (Aesh Process Loop 288036943) Error while checking if command org.jboss.forge.addon.as.ui.ASShutdownWizardImpl@5bff7a3e isEnabled: java.lang.IllegalStateException: A project is required in the current context | |
at org.jboss.forge.addon.projects.ui.AbstractProjectCommand.getSelectedProject(AbstractProjectCommand.java:78) | |
at org.jboss.forge.addon.as.ui.AbstractASWizardImpl.getSelectedProvider(AbstractASWizardImpl.java:82) | |
at org.jboss.forge.addon.as.ui.AbstractASWizardImpl.isEnabled(AbstractASWizardImpl.java:61) | |
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_45] | |
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_45] | |
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_45] | |
at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_45] | |
at org.jboss.forge.furnace.proxy.ClassLoaderInterceptor$1.call(Cla |