Search in sources :

Example 61 with ProjectController

use of org.apache.cayenne.modeler.ProjectController in project cayenne by apache.

the class MergerOptions method notifyProjectModified.

private void notifyProjectModified(boolean modelChanged) {
    if (!modelChanged) {
        return;
    }
    // mark the model as unsaved
    Project project = getApplication().getProject();
    project.setModified(true);
    ProjectController projectController = getProjectController();
    projectController.setDirty(true);
    projectController.fireDataMapEvent(new DataMapEvent(Application.getFrame(), dataMap, MapEvent.REMOVE));
    projectController.fireDataMapEvent(new DataMapEvent(Application.getFrame(), dataMap, MapEvent.ADD));
}
Also used : Project(org.apache.cayenne.project.Project) ProjectController(org.apache.cayenne.modeler.ProjectController) DataMapEvent(org.apache.cayenne.configuration.event.DataMapEvent)

Aggregations

ProjectController (org.apache.cayenne.modeler.ProjectController)61 DataChannelDescriptor (org.apache.cayenne.configuration.DataChannelDescriptor)12 ObjEntity (org.apache.cayenne.map.ObjEntity)10 DataMap (org.apache.cayenne.map.DataMap)8 DbEntity (org.apache.cayenne.map.DbEntity)8 DataNodeDescriptor (org.apache.cayenne.configuration.DataNodeDescriptor)6 EntityEvent (org.apache.cayenne.map.event.EntityEvent)6 DataNodeEvent (org.apache.cayenne.configuration.event.DataNodeEvent)5 DbAttribute (org.apache.cayenne.map.DbAttribute)5 ObjAttribute (org.apache.cayenne.map.ObjAttribute)5 ProcedureParameter (org.apache.cayenne.map.ProcedureParameter)5 ArrayList (java.util.ArrayList)4 Embeddable (org.apache.cayenne.map.Embeddable)4 EmbeddableAttribute (org.apache.cayenne.map.EmbeddableAttribute)4 ObjRelationship (org.apache.cayenne.map.ObjRelationship)4 RelationshipEvent (org.apache.cayenne.map.event.RelationshipEvent)4 ComponentAdapter (java.awt.event.ComponentAdapter)3 ComponentEvent (java.awt.event.ComponentEvent)3 EntityMergeSupport (org.apache.cayenne.dbsync.merge.context.EntityMergeSupport)3 DbRelationship (org.apache.cayenne.map.DbRelationship)3