summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetya Sabeva2012-10-09 09:21:25 (EDT)
committer Petya Sabeva2012-10-09 09:21:25 (EDT)
commit475a42a6abd9ed7532369481d48219f82f70e2b9 (patch)
treecd3ef0d1cd0260131e5399abbea3aac5f2de30a8
parent894e55c8ddaca974bf705dfcdf457f74f73349ea (diff)
downloadwebtools.dali-475a42a6abd9ed7532369481d48219f82f70e2b9.zip
webtools.dali-475a42a6abd9ed7532369481d48219f82f70e2b9.tar.gz
webtools.dali-475a42a6abd9ed7532369481d48219f82f70e2b9.tar.bz2
Fix NPE in test.
-rw-r--r--jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.swtbot.tests/src/org/eclipse/jpt/jpadiagrameditor/swtbot/tests/ui/editor/EditorProxy.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.swtbot.tests/src/org/eclipse/jpt/jpadiagrameditor/swtbot/tests/ui/editor/EditorProxy.java b/jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.swtbot.tests/src/org/eclipse/jpt/jpadiagrameditor/swtbot/tests/ui/editor/EditorProxy.java
index e21b6e4..a5cfcaf 100644
--- a/jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.swtbot.tests/src/org/eclipse/jpt/jpadiagrameditor/swtbot/tests/ui/editor/EditorProxy.java
+++ b/jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.swtbot.tests/src/org/eclipse/jpt/jpadiagrameditor/swtbot/tests/ui/editor/EditorProxy.java
@@ -189,6 +189,8 @@ public class EditorProxy {
*/
public boolean isSectionVisible(SWTBotGefEditor diagramEditor, String sectionTitle){
SWTBotGefEditPart section = diagramEditor.getEditPart(sectionTitle);
+ if(section == null)
+ return false;
((PictogramElement)section.part().getModel()).isVisible();
IFigure figure = ((GraphicalEditPart) section.part()).getFigure();
return figure.isVisible();