Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-4361

Orm Diagram breaks when there are no project associated with a console configuration

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 3.1.0.M1
    • None
    • hibernate
    • None

    Description

      EXECUTE: Create a console configuration that does not point to a project
      EXECUTE: Right click an entity in Console View and choose show mapping diagram
      ASSERT: No Exceptions and diagram shown

      Now you get:
      java.lang.NullPointerException
      at org.jboss.tools.hibernate.ui.veditor.editors.model.OrmDiagram.getStoreFolderPath(OrmDiagram.java:107)
      at org.jboss.tools.hibernate.ui.veditor.editors.model.OrmDiagram.getStoreFilePath(OrmDiagram.java:111)
      at org.jboss.tools.hibernate.ui.veditor.editors.model.OrmDiagram.load(OrmDiagram.java:717)
      at org.jboss.tools.hibernate.ui.veditor.editors.model.OrmDiagram.<init>(OrmDiagram.java:102)
      at org.jboss.tools.hibernate.ui.veditor.editors.VisualEditor.setInput(VisualEditor.java:158)
      at org.eclipse.gef.ui.parts.GraphicalEditor.init(GraphicalEditor.java:318)

      Because the diagram assumes there is a project associated with the launch configuration. This is a wrong assumption
      plus it potentially mixes up settings for multiple console configurations. If something needs to be saved it should be done
      in context of the launchconfiguration location/name.

      i.e. a workspace preference keyed by launch config name or by saving settings where the launch configuration is stored.

      Attachments

        Activity

          People

            anis_jira Aliaksey Nis (Inactive)
            manderse@redhat.com Max Andersen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: