-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
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
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
33 changes: 33 additions & 0 deletions
33
...r-java/impl/src/main/java/org/jboss/forge/parser/java/hints/InputTypeHintsRegistrant.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package org.jboss.forge.parser.java.hints; | ||
|
||
import javax.enterprise.event.Observes; | ||
import javax.inject.Inject; | ||
|
||
import org.jboss.forge.container.event.Startup; | ||
import org.jboss.forge.environment.Environment; | ||
import org.jboss.forge.parser.java.resources.JavaResource; | ||
import org.jboss.forge.ui.hints.HintsLookup; | ||
import org.jboss.forge.ui.hints.InputTypes; | ||
|
||
/** | ||
* Only active when ui-hints addon is installed. | ||
* | ||
* @author <a href="mailto:ggastald@redhat.com">George Gastaldi</a> | ||
* | ||
*/ | ||
public class InputTypeHintsRegistrant | ||
{ | ||
private Environment environment; | ||
|
||
@Inject | ||
public InputTypeHintsRegistrant(Environment environment) | ||
{ | ||
this.environment = environment; | ||
} | ||
|
||
public void initialize(@Observes Startup event) | ||
{ | ||
HintsLookup hints = new HintsLookup(environment); | ||
hints.setInputType(JavaResource.class, InputTypes.JAVA_CLASS_PICKER); | ||
} | ||
} |