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

Unable to edit template file with 0.9.0 #275

Open
eximius313 opened this issue Jan 23, 2017 · 22 comments
Open

Unable to edit template file with 0.9.0 #275

eximius313 opened this issue Jan 23, 2017 · 22 comments

Comments

@eximius313
Copy link

I have fresh install of eclipse 4.6.2 with only one plugin installed (ScalaIDE from this update site: http://download.scala-ide.org/sdk/lithium/e46/scala211/stable/site)
along with: Play2 support in Scala IDE 0.9.0.v-2_11-201612131054-063b4e8 org.scala-ide.play2.feature.feature.group

When I open any template file the HTML syntax is not colored and if I modify the file - changes are not shown (editor "freezes")

@scalastic
Copy link

Same exasperating problem !
When entering a simple new line in a view template, everything goes wrong (Cf. logs below)

Clean 4.6.2 eclipse with latest and up-to-date Scala IDE for Eclipse 4.5.0.v-2_11-201612131030-02830a6 and Play2 support in Scala IDE 0.9.0.v-2_11-201612131054-063b4e8.

Eclipse log :

!SESSION 2017-03-16 12:23:14.124 -----------------------------------------------
eclipse.buildId=4.5.0-vfinal-2016-12-13T10:59:29Z-Typesafe
java.version=1.8.0_101
java.vendor=Oracle Corporation
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=fr_FR
Framework arguments:  -keyring /Users/jeanjerome/.eclipse_keyring
Command-line arguments:  -os macosx -ws cocoa -arch x86_64 -keyring /Users/jeanjerome/.eclipse_keyring

!ENTRY org.eclipse.core.resources 2 10035 2017-03-16 12:23:16.155
!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.

!ENTRY org.eclipse.core.net 1 0 2017-03-16 12:23:20.108
!MESSAGE System property http.nonProxyHosts has been set to local|*.local|169.254/16|*.169.254/16 by an external source. This value will be overwritten using the values from the preferences

!ENTRY org.scala-ide.sdt.core 2 0 2017-03-16 12:23:23.250
!MESSAGE Preference scala.compiler.sourceLevel was uninitialized for finapp-web, setting default to 2.11.

!ENTRY org.scala-ide.sdt.core 2 0 2017-03-16 12:23:23.265
!MESSAGE Preference scala.compiler.installation was uninitialized for finapp-web, setting default to 2.11.

!ENTRY org.eclipse.ui 4 0 2017-03-16 12:25:05.313
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.NullPointerException
	at org.eclipse.jface.text.DefaultPositionUpdater.update(DefaultPositionUpdater.java:209)
	at org.eclipse.jface.text.AbstractDocument.updatePositions(AbstractDocument.java:1157)
	at org.eclipse.jface.text.AbstractDocument.updateDocumentStructures(AbstractDocument.java:682)
	at org.eclipse.jface.text.projection.ProjectionDocument.updateDocumentStructures(ProjectionDocument.java:775)
	at org.eclipse.jface.text.AbstractDocument.fireDocumentChanged(AbstractDocument.java:767)
	at org.eclipse.jface.text.projection.ProjectionDocument.fireDocumentChanged(ProjectionDocument.java:770)
	at org.eclipse.jface.text.AbstractDocument.replace(AbstractDocument.java:1101)
	at org.eclipse.jface.text.AbstractDocument.replace(AbstractDocument.java:1119)
	at org.eclipse.jface.text.projection.ProjectionDocument.replace(ProjectionDocument.java:625)
	at org.eclipse.jface.text.DefaultDocumentAdapter.replaceTextRange(DefaultDocumentAdapter.java:233)
	at org.eclipse.swt.custom.StyledText.modifyContent(StyledText.java:7374)
	at org.eclipse.swt.custom.StyledText.sendKeyEvent(StyledText.java:8225)
	at org.eclipse.swt.custom.StyledText.doContent(StyledText.java:2530)
	at org.eclipse.swt.custom.StyledText.handleKey(StyledText.java:6018)
	at org.eclipse.swt.custom.StyledText.handleKeyDown(StyledText.java:6049)
	at org.eclipse.swt.custom.StyledText$7.handleEvent(StyledText.java:5733)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4256)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1501)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1524)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1509)
	at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1538)
	at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1534)
	at org.eclipse.swt.widgets.Canvas.sendKeyEvent(Canvas.java:515)
	at org.eclipse.swt.widgets.Control.doCommandBySelector(Control.java:1090)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5825)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
	at org.eclipse.swt.internal.cocoa.NSResponder.interpretKeyEvents(NSResponder.java:68)
	at org.eclipse.swt.widgets.Composite.keyDown(Composite.java:610)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5735)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
	at org.eclipse.swt.widgets.Widget.callSuper(Widget.java:227)
	at org.eclipse.swt.widgets.Widget.windowSendEvent(Widget.java:2140)
	at org.eclipse.swt.widgets.Shell.windowSendEvent(Shell.java:2402)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5797)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
	at org.eclipse.swt.widgets.Display.applicationSendEvent(Display.java:5226)
	at org.eclipse.swt.widgets.Display.applicationProc(Display.java:5375)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
	at org.eclipse.swt.internal.cocoa.NSApplication.sendEvent(NSApplication.java:128)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3703)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138)
	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:388)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
	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:673)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1519)

@lagerspetz
Copy link

Hi, I have the same issue with Scala IDE 4.5.0 with all of my Play projects. This has been reported by other users also in Scala IDE: https://groups.google.com/forum/#!searchin/scala-ide-user/template$20editor%7Csort:relevance/scala-ide-user/q9zkW2lA2e4/TgrEsY-pDwAJ

The funny thing is that the "Template Editor" works fine for me, but "New Template Editor" (currently the default) does not work.

@karateboy
Copy link

I also have the same issue with 4.5. I thought this is due to the template contains utf-8 Chinese character. This issue has been there for a while. In the mean time, I still stick to IDE 4.4

@wpopielarski
Copy link
Member

wpopielarski commented Apr 25, 2017 via email

@eximius313
Copy link
Author

well, since 2.4 is two years old now (May 26 2015) it would be great if you support 2.5 and 2.6
I think we're all eagerly waiting for that

@karateboy
Copy link

Thank for the information. I can manually open play template by "Template Editor" without any problem. Does you have any plan to fix it? Or how can I set the default editor back to "Template Editor"?

@lagerspetz
Copy link

lagerspetz commented May 2, 2017

@wpopielarski I experienced this problem with out of the box http://scala-ide.org/ 4.5.0 with Play 2.5.14. I have not tried with 4.6.0 yet. Other than this, Play 2.5.x works fine.

@wpopielarski
Copy link
Member

wpopielarski commented May 2, 2017 via email

@karateboy
Copy link

@wpopielarski How can I upgrade the editor?

@wpopielarski
Copy link
Member

wpopielarski commented May 2, 2017 via email

@eximius313
Copy link
Author

Fabulous! Are you testing it also against Eclipse Oxygen (4.7)?

@lagerspetz
Copy link

@eximius313 Looks like plugin-profiles will need to be updated with e47 before this is possible...

@lagerspetz
Copy link

I'm getting the same issue with "new template editor" with a Play 2.6.0-M5 project using the new 0.10.0 version.
I built it from https://github.com/wpopielarski/scala-ide-play2/tree/0.10.0 using the build args:
mvn -Peclipse-neon -Pscala-ide-dev -Pscala-2.12.x clean verify.
I then installed from the local update site that the build creates on a clean Scala-IDE 4.6.0 release. I also had to modify plugin-profiles to set the scala-version to 2.12.0 for the 2.12.x profile for it to build properly.

@wpopielarski
Copy link
Member

wpopielarski commented May 23, 2017 via email

@eximius313
Copy link
Author

eximius313 commented May 24, 2017

Great!
For the record: Play 2.6 with Injectable templates is in RC1 now, so it's quite stable

@wpopielarski
Copy link
Member

wpopielarski commented May 24, 2017 via email

@lagerspetz
Copy link

lagerspetz commented Jun 8, 2017

Hi, I can confirm that the problem does not present on Scala IDE 4.6.1-RC1 with my Play 2.5.14 project. I downloaded a new copy of RC1, opened it with a new workspace, imported my project (created with activator eclipse), and opened scala.html template files, and everything worked fine.

This is on my desktop machine; originally I noticed the problem on my laptop, so I will have to verify that as well. This desktop (which is fine) uses Linux Mint 18.1 with Mate, while the laptop uses Ubuntu GNOME 17.04.

@lagerspetz
Copy link

New Template Editor verified to work well also on the laptop. THANK YOU!

@wpopielarski
Copy link
Member

wpopielarski commented Jun 9, 2017 via email

@eximius313
Copy link
Author

Has anybody tested it with Eclipse Oxygen and Play 2.6 yet?

@lagerspetz
Copy link

lagerspetz commented Jun 12, 2017

@eximius313 :
EDIT: The main download link here: https://www.eclipse.org/downloads/ gives an Installer, and in its settings one can choose Advanced Mode and get Eclipse Oxygen for Java. I'm trying the update sites of Scala-IDE with it soon.

Also, is this issue solved for you for Scala-IDE 4.6.1? Maybe you can open a new Issue if it doesn't work with Eclipse Oxygen.

@lagerspetz
Copy link

lagerspetz commented Jun 12, 2017

With the Oxygen version from the Installer, combined with this update site: http://download.scala-ide.org/sdk/lithium/e46/scala212/dev/site , the ( new ) template editor works well for me with a Play 2.5.14 project. I do get an indexing error when starting eclipse / adding the project, but it doesn't seem to affect the template editor. I will try 2.6 later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants