Community
Participate
Working Groups
Build Identifier: 20110916-0149 The addIfPossible method of AbstractFeatureProvider always returns null. It looks like this commit http://git.eclipse.org/c/gmp/org.eclipse.gmp.graphiti.git/commit/plugins/org.eclipse.graphiti/src/org/eclipse/graphiti/features/impl/AbstractFeatureProvider.java?id=17f492ad5b4c29d17d08c2f0a5b865c866e47c29, removed the conditional block that performed an assignment to the local ret variable. In the current code, the only assignment to the ret variable is the initialization to null. Previously, the method returned the newly added PictogramElement. Reproducible: Always
I fixed this by adding a return value to the method executeFeature in IDiagramEditor. The implementation in DiagramEditor returns the added PE in case of an add feature being executed, in all other cases it continues to return null. The method addIfPossible grabs that return value and itself returns it. Also added a test case for this in GFOtherTests (testAddReturnsAddedPictogramElement). Checked in and pushed to Eclipse: commit 70c4695586a0f149d4f618bc797f60296c29c7d7 Author: mwenz <michael.wenz@sap.com> 2011-12-29 16:23:26 Committer: mwenz <michael.wenz@sap.com> 2011-12-29 16:23:38 Parent: ace4106947b31ad291bf068ca0c260c7a79ee2ce (.) Branches: origin/master, master
Bookkeeping: Set target release
Part of Graphiti 0.9.0 (Eclipse Juno)