Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Dali/Indigo/DaliQuickFixes"

< Dali‎ | Indigo
(Quick Assists)
 
(4 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
=Quick Fixes=
 
=Quick Fixes=
Can you turn off quick assists/quick fixes?
+
*Can you turn off quick assists/quick fixes?
 +
*Quick fixes for changing the preference error level for all of our problems? Or maybe just important ones? Maybe the quick fix just opens our error/warning preferences
 +
*Will need to extend both o.e.jdt.ui.quickFixProcessors and o.e.wst.sse.ui.quickFixProcessor
 +
*Need integer ids on all of our problems for the jdt quick fix processor framework to work properly. Have to set this attribute on the org.eclipse.wst.validation.internal.provisional.core.IMessage: message.setAttribute(IJavaModelMarker.ID, id);
  
  
Line 7: Line 10:
 
*Connect to DB (Connection is not active)
 
*Connect to DB (Connection is not active)
 
*Create a persistence.xml (no persistence.xml file found in project)
 
*Create a persistence.xml (no persistence.xml file found in project)
 +
*Upgrade orm.xml and persistence.xml document
  
 
==Types==
 
==Types==
Line 19: Line 23:
 
*Create the corresponding relationship mapping (mappedBy has invalid mapping type for this relationship)
 
*Create the corresponding relationship mapping (mappedBy has invalid mapping type for this relationship)
 
*Insert @Column for unresolved default column a basic mapping
 
*Insert @Column for unresolved default column a basic mapping
 
+
** private int foo;
 
+
***Error appears on foo
=Quick Assists=
+
***Quick fix options:
*Make a Java class an Entity/Embeddable/MappedSuperclass by adding @Entity or adding it to an existing orm.xml file or creating a new one.
+
****Insert '@Column(name="BAR")'
*Create the other side of a bi-directional relationship, attribute included
+
****Insert '@Column(name="OTHER")'
 +
** @Column private int foo;
 +
***Error appears on @Column
 +
***Quick fix options:
 +
****Insert 'name="BAR"'
 +
****Insert 'name="OTHER"'
 +
** @Column(name="foo") private int foo;
 +
***Error appears on "foo"
 +
***Quick fix options:
 +
****Change to 'BAR'
 +
****Change to 'OTHER'

Latest revision as of 12:59, 14 October 2010

Quick Fixes

  • Can you turn off quick assists/quick fixes?
  • Quick fixes for changing the preference error level for all of our problems? Or maybe just important ones? Maybe the quick fix just opens our error/warning preferences
  • Will need to extend both o.e.jdt.ui.quickFixProcessors and o.e.wst.sse.ui.quickFixProcessor
  • Need integer ids on all of our problems for the jdt quick fix processor framework to work properly. Have to set this attribute on the org.eclipse.wst.validation.internal.provisional.core.IMessage: message.setAttribute(IJavaModelMarker.ID, id);


Project

  • Create or specify connection
  • Connect to DB (Connection is not active)
  • Create a persistence.xml (no persistence.xml file found in project)
  • Upgrade orm.xml and persistence.xml document

Types

  • Validation - Class is mapped but is not included in any persistence unit - applies to java
    • Add class to persistence.xml
    • Unmap class - remove all JPA annotations from the type and all attributes.
  • Create new Entity (Use New Entity wizard) for targetEntity references which cannot be resolved - apply to both java and orm.xml
  • Insert @Table for unresolved default table on an Entity

Attributes

  • Create the corresponding relationship attribute and mapping (mappedBy that does not resolve)
  • Create the corresponding relationship mapping (mappedBy has invalid mapping type for this relationship)
  • Insert @Column for unresolved default column a basic mapping
    • private int foo;
      • Error appears on foo
      • Quick fix options:
        • Insert '@Column(name="BAR")'
        • Insert '@Column(name="OTHER")'
    • @Column private int foo;
      • Error appears on @Column
      • Quick fix options:
        • Insert 'name="BAR"'
        • Insert 'name="OTHER"'
    • @Column(name="foo") private int foo;
      • Error appears on "foo"
      • Quick fix options:
        • Change to 'BAR'
        • Change to 'OTHER'

Back to the top