Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception thrown when opening design if java companion moved/renamed. #2065

Closed
anssit opened this issue Jun 10, 2019 · 2 comments
Closed

Exception thrown when opening design if java companion moved/renamed. #2065

anssit opened this issue Jun 10, 2019 · 2 comments
Assignees
Labels

Comments

@anssit
Copy link
Contributor

anssit commented Jun 10, 2019

Steps to reproduce

  1. Create a new design and a companion file.
  2. Close the design file.
  3. Move the companion file or rename the class.
  4. Reopen the design.

Actual behavior

Design opens, companion file functionality works, but an exception is thrown:

Java Model Exception: Java Model Status [AooHehe.java [in com.vaadin.starter.skeleton [in src/main/java [in skeleton-starter-flow]]] does not exist]
	at org.eclipse.jdt.internal.core.JavaElement.newJavaModelException(JavaElement.java:583)
	at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:256)
	at org.eclipse.jdt.internal.core.SourceRefElement.generateInfos(SourceRefElement.java:113)
	at org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(JavaElement.java:596)
	at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:326)
	at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:312)
	at org.eclipse.jdt.internal.core.SourceType.getAnnotations(SourceType.java:217)
	at com.vaadin.designer2.eclipse.editors.flow.FlowComponentApi.getAnnotationValues(FlowComponentApi.java:88)
	at com.vaadin.designer2.services.componentapi.flow.AbstractComponentApiService.lambda$getComponentApisWithImport$1(AbstractComponentApiService.java:67)
	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:174)
	at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382)
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
	at com.vaadin.designer2.services.componentapi.flow.AbstractComponentApiService.getComponentApisWithImport(AbstractComponentApiService.java:72)
	at com.vaadin.designer2.services.componentapi.flow.AbstractComponentApiService.getComponentApisWithHtmlImport(AbstractComponentApiService.java:87)
	at com.vaadin.designer2.eclipse.editors.FlowCompanionFileActionItem.getFlowComponentApi(FlowCompanionFileActionItem.java:157)
	at com.vaadin.designer2.eclipse.editors.FlowCompanionFileActionItem.lambda$0(FlowCompanionFileActionItem.java:87)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:185)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4095)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3762)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1173)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1062)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:636)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:563)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:151)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:155)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
	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:498)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:595)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1501)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1474)

Expected behavior

Everything works without exceptions.

Workaround

Rename/move the companion file when the design is open.

IDE, Designer and OS version

Eclipse, Designer 4.3.0.beta2.

@anssit anssit changed the title Project reopen needed to detect Java companion after rename or move Exception thrown when opening design if java companion moved/renamed. Jun 10, 2019
@stale
Copy link

stale bot commented Dec 7, 2019

Hello there!

It looks like this issue hasn't progressed lately. There are so many issues that we just can't deal them all within a reasonable timeframe.

There are a few things you could help to get things rolling on this issue (this is an automated message, so expect that some of these are already in use):

  • Check if the issue is still valid for the latest version. There are many duplicates in our issue tracker, so it is possible that the issue is already tackled.
  • Provide more details how to reproduce the issue.
  • Explain why it is important to get this issue fixed and politely draw others attention to it e.g. via the forum or social media.
  • Add a reduced test case about the issue, so it is easier for somebody to start working on a solution.
  • If the issue is clearly a bug, use the Warranty in your Vaadin subscription to raise its priority.

Thanks again for your contributions! Even though we haven't been able to get this issue fixed, we hope you to report your findings and enhancement ideas in the future too!

@stale stale bot added the Stale Inactive issue marked for closing label Dec 7, 2019
@Peppe Peppe removed the Eclipse label Mar 24, 2020
@stale stale bot removed the Stale Inactive issue marked for closing label Mar 24, 2020
@stale
Copy link

stale bot commented Sep 20, 2020

Hello there!

It looks like this issue hasn't progressed lately. There are so many issues that we just can't deal them all within a reasonable timeframe.

There are a few things you could help to get things rolling on this issue (this is an automated message, so expect that some of these are already in use):

  • Check if the issue is still valid for the latest version. There are many duplicates in our issue tracker, so it is possible that the issue is already tackled.
  • Provide more details how to reproduce the issue.
  • Explain why it is important to get this issue fixed and politely draw others attention to it e.g. via the forum or social media.
  • Add a reduced test case about the issue, so it is easier for somebody to start working on a solution.
  • If the issue is clearly a bug, use the Warranty in your Vaadin subscription to raise its priority.

Thanks again for your contributions! Even though we haven't been able to get this issue fixed, we hope you to report your findings and enhancement ideas in the future too!

@stale stale bot added the Stale Inactive issue marked for closing label Sep 20, 2020
@szolo szolo self-assigned this Sep 8, 2021
@szolo szolo removed the Stale Inactive issue marked for closing label Sep 8, 2021
@szolo szolo closed this as completed Oct 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants