[JBoss JIRA] (JBIDE-21323) EL Knowledge Base Problem with enums
by Viacheslav Kabanovich (JIRA)
[ https://issues.jboss.org/browse/JBIDE-21323?page=com.atlassian.jira.plugi... ]
Viacheslav Kabanovich edited comment on JBIDE-21323 at 12/18/15 5:25 PM:
-------------------------------------------------------------------------
I tried these cases:
{code}
public Set<SignOffStatus> getStatuses()
public List<SignOffStatus> getStatuses()
public Collection<SignOffStatus> getStatuses()
public SignOffStatus[] getStatuses()
{code}
In all cases both stat.name() and stat.label worked ok.
[~andrei.ivanov], please specify what is return type of getStatuses() in your case?
was (Author: scabanovich):
I tried these cases:
{code}
public Set<SignOffStatus> getStatuses()
public List<SignOffStatus> getStatuses()
public Collection<SignOffStatus> getStatuses()
public SignOffStatus[] getStatuses()
{code}
In the first 3 cases both stat.name() and stat.label worked ok. In the case of array they did not work or rather they suggested to use syntax stat.next().label.
Yes, this is a bug, though it is not specific to enums, it involves all beans.
[~andrei.ivanov], please specify what is return type of getStatuses() in your case, is it an array?
Can we move the array problem into a separate issue, because it is not specific to enums?
> EL Knowledge Base Problem with enums
> ------------------------------------
>
> Key: JBIDE-21323
> URL: https://issues.jboss.org/browse/JBIDE-21323
> Project: Tools (JBoss Tools)
> Issue Type: Bug
> Components: jsf
> Affects Versions: 4.3.0.Final
> Environment: Eclipse Mars.1 (4.5.1), Primefaces 5.x
> Reporter: Andrei Ivanov
> Assignee: Viacheslav Kabanovich
> Priority: Minor
> Fix For: 4.4.x
>
>
> Enum properties and method are not recognized:
> In this case, {{label}} is recognized and shows up in the completion suggestions, but {{name()}} is not and marked as unrecognized.
> {code:xml}
> <p:dataTable value="#{page.dataModel}" var="managerData" lazy="true"
> rowStyleClass="#{managerData.status.label} labor-protection-#{managerData.status.name().replace('_', '-').toLowerCase()}">
> ...
> </p:dataTable>
> {code}
> {code:java}
> public enum SignOffStatus {
> VALID("Valid"),
> ALMOST_EXPIRED("Almost expired"),
> EXPIRED("Expired");
> private final String label;
> private SignOffStatus(String label) {
> this.label = label;
> }
> public String getLabel() {
> return label;
> }
> }
> {code}
> In a different page:
> {code:xml}
> <p:selectOneMenu value="#{instancePage.instanceCriteria.status}">
> <f:selectItem itemLabel="--select--" itemValue="#{null}" />
> <f:selectItems value="#{appBean.getStatuses()}" var="stat" itemLabel="#{stat.label}" />
> </p:selectOneMenu>
> {code}
> The enum has a {{getLabel()}} as the one above, but in this context it's not recognized ({{"label" cannot be resolved}}).
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 3 months
[JBoss JIRA] (JBIDE-21323) EL Knowledge Base Problem with enums
by Viacheslav Kabanovich (JIRA)
[ https://issues.jboss.org/browse/JBIDE-21323?page=com.atlassian.jira.plugi... ]
Viacheslav Kabanovich commented on JBIDE-21323:
-----------------------------------------------
I tried these cases:
{code}
public Set<SignOffStatus> getStatuses()
public List<SignOffStatus> getStatuses()
public Collection<SignOffStatus> getStatuses()
public SignOffStatus[] getStatuses()
{code}
In the first 3 cases both stat.name() and stat.label worked ok. In the case of array they did not work or rather they suggested to use syntax stat.next().label.
Yes, this is a bug, though it is not specific to enums, it involves all beans.
[~andrei.ivanov], please specify what is return type of getStatuses() in your case, is it an array?
Can we move the array problem into a separate issue, because it is not specific to enums?
> EL Knowledge Base Problem with enums
> ------------------------------------
>
> Key: JBIDE-21323
> URL: https://issues.jboss.org/browse/JBIDE-21323
> Project: Tools (JBoss Tools)
> Issue Type: Bug
> Components: jsf
> Affects Versions: 4.3.0.Final
> Environment: Eclipse Mars.1 (4.5.1), Primefaces 5.x
> Reporter: Andrei Ivanov
> Assignee: Viacheslav Kabanovich
> Priority: Minor
> Fix For: 4.4.x
>
>
> Enum properties and method are not recognized:
> In this case, {{label}} is recognized and shows up in the completion suggestions, but {{name()}} is not and marked as unrecognized.
> {code:xml}
> <p:dataTable value="#{page.dataModel}" var="managerData" lazy="true"
> rowStyleClass="#{managerData.status.label} labor-protection-#{managerData.status.name().replace('_', '-').toLowerCase()}">
> ...
> </p:dataTable>
> {code}
> {code:java}
> public enum SignOffStatus {
> VALID("Valid"),
> ALMOST_EXPIRED("Almost expired"),
> EXPIRED("Expired");
> private final String label;
> private SignOffStatus(String label) {
> this.label = label;
> }
> public String getLabel() {
> return label;
> }
> }
> {code}
> In a different page:
> {code:xml}
> <p:selectOneMenu value="#{instancePage.instanceCriteria.status}">
> <f:selectItem itemLabel="--select--" itemValue="#{null}" />
> <f:selectItems value="#{appBean.getStatuses()}" var="stat" itemLabel="#{stat.label}" />
> </p:selectOneMenu>
> {code}
> The enum has a {{getLabel()}} as the one above, but in this context it's not recognized ({{"label" cannot be resolved}}).
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 3 months
[JBoss JIRA] (JBIDE-21365) Beta 4.3.1 N&N for OpenShift should state that while the CDK is treated as a server, runtime detection is not possible
by Rob Stryker (JIRA)
[ https://issues.jboss.org/browse/JBIDE-21365?page=com.atlassian.jira.plugi... ]
Rob Stryker commented on JBIDE-21365:
-------------------------------------
Targeting this to beta1 just for attention ? It'd be best if this was committed before bits were publicly available. See PR on the side
> Beta 4.3.1 N&N for OpenShift should state that while the CDK is treated as a server, runtime detection is not possible
> ----------------------------------------------------------------------------------------------------------------------
>
> Key: JBIDE-21365
> URL: https://issues.jboss.org/browse/JBIDE-21365
> Project: Tools (JBoss Tools)
> Issue Type: Bug
> Components: runtime-detection
> Reporter: Len DiMaggio
> Assignee: Rob Stryker
> Priority: Minor
> Fix For: 4.3.1.Beta1
>
>
> This may be obvious to some/most users, but it may confuse other users - it would be better to make it explicit that runtime detection is not possible for runtime detection to detect the raw CDK.
> Since it's a raw cdk it is proper to fail to detect - here's no real way to detect cdk vs any other random vagrantfile.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 3 months
[JBoss JIRA] (JBIDE-21170) Virtualbox could not be found by CDK adapter
by Rob Stryker (JIRA)
[ https://issues.jboss.org/browse/JBIDE-21170?page=com.atlassian.jira.plugi... ]
Rob Stryker commented on JBIDE-21170:
-------------------------------------
[~mmalina] From our tests, and some tests with fred, well, we haven't been able to actually use this PR to *get* the full path. It seems our call to the 'bash' command counts as a child process, and so the bash command inherits our eclipse environment (including empty path). Then, our bash calling 'env' creates another child process which inherits bash's environment, including the empty path mentioned above.
So basically, seems the patch does nothing to fix anything at all :(
> Virtualbox could not be found by CDK adapter
> --------------------------------------------
>
> Key: JBIDE-21170
> URL: https://issues.jboss.org/browse/JBIDE-21170
> Project: Tools (JBoss Tools)
> Issue Type: Bug
> Components: openshift
> Affects Versions: 4.3.1.Beta1
> Reporter: Martin Malina
> Assignee: Rob Stryker
> Fix For: 4.3.1.Beta2
>
>
> After I set up a CDK server adapter and fixed the wrong path to vagrant in the launch config, I then started the server adapter and got this:
> Server CDK Server Adapter at localhost failed to start.
> Console:
> {code}
> The provider 'virtualbox' that was requested to back the machine
> 'default' is reporting that it isn't usable on this system. The
> reason is shown below:
> Vagrant could not detect VirtualBox! Make sure VirtualBox is properly installed.
> Vagrant uses the `VBoxManage` binary that ships with VirtualBox, and requires
> this to be available on the PATH. If VirtualBox is installed, please find the
> `VBoxManage` binary and add it to the PATH environmental variable.
> {code}
> Along with this, there was an Unhandled event loop exception in the error view:
> {code}
> org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException)
> at org.eclipse.swt.SWT.error(SWT.java:4491)
> at org.eclipse.swt.SWT.error(SWT.java:4406)
> at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:138)
> at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4024)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3700)
> at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1127)
> at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
> at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1018)
> at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)
> at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:654)
> at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
> at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:598)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
> at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:139)
> at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
> at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
> at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
> at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
> at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
> 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:520)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1515)
> Caused by: java.lang.NullPointerException
> at org.jboss.tools.central.editors.GettingStartedHtmlPage.updateEarlyAccess(GettingStartedHtmlPage.java:359)
> at org.jboss.tools.central.editors.GettingStartedHtmlPage.access$14(GettingStartedHtmlPage.java:342)
> at org.jboss.tools.central.editors.GettingStartedHtmlPage$6$1.run(GettingStartedHtmlPage.java:327)
> at org.eclipse.ui.internal.UILockListener.doPendingWork(UILockListener.java:162)
> at org.eclipse.ui.internal.UISynchronizer$3.run(UISynchronizer.java:154)
> at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
> at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
> ... 23 more
> {code}
> In the command line, VBoxManage is accessible and it is located in /usr/local/bin/ and on my PATH.
> Max suggested I could try to start Eclipse from command line instead of double-clicking in Finder (which is the normal way to do it on Mac) and that helped.
> So for some reason when you start Eclipse using Eclipse.app from Finder, the PATH is incorrect.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 3 months