You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Andrus Adamchik (JIRA)" <ji...@apache.org> on 2013/07/05 13:29:48 UTC
[jira] [Commented] (CAY-1842) Remove Listeners support from the
Modeler
[ https://issues.apache.org/jira/browse/CAY-1842?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13700610#comment-13700610 ]
Andrus Adamchik commented on CAY-1842:
--------------------------------------
Ilya, thanks for the patch. A few notes:
1. Don't be afraid to remove unused code. Don't just comment it out, remove it :) We have version control. If needed we can always restore it.
2. A question - do we need to make any changes to ObjEntityCallbackListenersTab so that it does not contain unneeded code?
3. Wonder about the piece below - it seems to be related to something else (Artiom's earlier work?). If we need it, let's attach it to an appropriate Jira.
@@ -162,12 +160,13 @@
System.arraycopy(rels, 0, objRels, 0, rels.length);
- if (getSelectedComponent() != relationshipsPanel && objRels.length > 0) {
- setSelectedComponent(relationshipsPanel);
- relationshipsPanel.setVisible(true);
+ if (getSelectedComponent() != ((ObjEntityRelationshipPanel)attrRelationshipTab.getSplitPane().getComponent(1)) && objRels.length > 0) {
+ setSelectedComponent(attrRelationshipTab);
+ ((ObjEntityRelationshipPanel)attrRelationshipTab.getSplitPane().getComponent(1)).setVisible(true);
}
- relationshipsPanel.selectRelationships(objRels);
+ ((ObjEntityRelationshipPanel)attrRelationshipTab.getSplitPane().getComponent(1)).selectRelationships(objRels);
+ attrRelationshipTab.updateActionsRelationships(objRels);
}
public void currentObjAttributeChanged(AttributeDisplayEvent e) {
@@ -180,11 +179,17 @@
System.arraycopy(attrs, 0, objAttrs, 0, attrs.length);
- if (getSelectedComponent() != attributesPanel && objAttrs.length > 0) {
- setSelectedComponent(attributesPanel);
- attributesPanel.setVisible(true);
+ if (getSelectedComponent() != ((ObjEntityAttributePanel)attrRelationshipTab.getSplitPane().getComponent(0)) && objAttrs.length > 0) {
+ setSelectedComponent(attrRelationshipTab);
+ ((ObjEntityAttributePanel)attrRelationshipTab.getSplitPane().getComponent(0)).setVisible(true);
}
- attributesPanel.selectAttributes(objAttrs);
+ ((ObjEntityAttributePanel)attrRelationshipTab.getSplitPane().getComponent(0)).selectAttributes(objAttrs);
+ attrRelationshipTab.updateActionsAttributes(objAttrs);
+
}
+
+ public ObjEntityAttrRelationshipTab getAttrRelationshipTab() {
+ return attrRelationshipTab;
+ }
> Remove Listeners support from the Modeler
> -----------------------------------------
>
> Key: CAY-1842
> URL: https://issues.apache.org/jira/browse/CAY-1842
> Project: Cayenne
> Issue Type: Task
> Components: Modeler
> Affects Versions: 3.1M2
> Reporter: Ilya Vasiuk
> Priority: Minor
> Labels: patch
> Attachments: After.png, Before.png, patch.txt
>
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> In this patch removed tab "Listeners" from ObjEntity edit window. You can see it on attached screenshots.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira