Uploaded image for project: 'PUBLIC - Liferay IDE'
  1. PUBLIC - Liferay IDE
  2. IDE-1813

Can't get template source after clear class name

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2.0
    • Fix Version/s: 2.2.1
    • Labels:
      None
    • Environment:
      Liferay IDE 2.2.0.201411051306-ga1

      Description

      • Create a liferay layout project.
      • Double click .tpl file, then click on Design. Add row or layout templates.
      • Clear the Class name, then click on Source.
        You will see no template code in Source.

      In Error Log
      Message: Error getting template source.

      Expression root.getClassName().content() is undefined on line 33, column 31 in layouttpl_bootstrap.ftl.
      The problematic instruction:
      ----------
      ==> ${root.getClassName().content()} [on line 33, column 29 in layouttpl_bootstrap.ftl]
      ----------

      Java backtrace for programmers:
      ----------
      freemarker.core.InvalidReferenceException: Expression root.getClassName().content() is undefined on line 33, column 31 in layouttpl_bootstrap.ftl.
      at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:125)
      at freemarker.core.Expression.getStringValue(Expression.java:118)
      at freemarker.core.Expression.getStringValue(Expression.java:93)
      at freemarker.core.DollarVariable.accept(DollarVariable.java:76)
      at freemarker.core.Environment.visit(Environment.java:221)
      at freemarker.core.MixedContent.accept(MixedContent.java:92)
      at freemarker.core.Environment.visit(Environment.java:221)
      at freemarker.core.Environment.process(Environment.java:199)
      at freemarker.template.Template.process(Template.java:237)
      at com.liferay.ide.templates.core.TemplateOperation.execute(TemplateOperation.java:96)
      at com.liferay.ide.layouttpl.core.util.LayoutTplUtil.getTemplateSource(LayoutTplUtil.java:156)
      at com.liferay.ide.layouttpl.ui.editor.LayoutTplEditor.refreshSourceModel(LayoutTplEditor.java:383)
      at com.liferay.ide.layouttpl.ui.editor.LayoutTplEditor.refreshSourceModel(LayoutTplEditor.java:376)
      at com.liferay.ide.layouttpl.ui.editor.LayoutTplEditor.pageChange(LayoutTplEditor.java:337)
      at org.eclipse.ui.part.MultiPageEditorPart$2.widgetSelected(MultiPageEditorPart.java:294)
      at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
      at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:104)
      at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5940)
      at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1073)
      at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1098)
      at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1083)
      at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:794)
      at org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:3110)
      at org.eclipse.swt.custom.CTabFolder.onMouse(CTabFolder.java:1794)
      at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:283)
      at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:104)
      at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5940)
      at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1073)
      at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:5710)
      at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:5285)
      at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
      at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
      at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
      at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
      at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
      at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
      at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
      at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
      at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:135)
      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:382)
      at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:236)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
      at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
      at org.eclipse.equinox.launcher.Main.run(Main.java:1465)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              kuo.zhang Kuo Zhang (Inactive)
              Reporter:
              vicky.wang Vicky Wang (Inactive)
              Participants of an Issue:
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                6 years, 2 weeks, 4 days ago

                  Packages

                  Version Package
                  2.2.1