From 30c05ef5ff5401112834bdf9bb8277110e7c00ab Mon Sep 17 00:00:00 2001 From: vlorenzo Date: Thu, 30 Jan 2014 11:21:50 +0100 Subject: Fix 2 infinite recursive loops (found with finds bugs). --- .../contentprovider/simple/SimpleSashWindowsContentProvider.java | 4 ++-- .../contentprovider/singlefolder/SingleFolderContentProvider.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleSashWindowsContentProvider.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleSashWindowsContentProvider.java index c9f6057210c..48690ff6ae3 100644 --- a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleSashWindowsContentProvider.java +++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleSashWindowsContentProvider.java @@ -121,7 +121,7 @@ public class SimpleSashWindowsContentProvider implements ISashWindowsContentProv * * {@inheritDoc} */ - public void addPage(int index, IPageModel newModel) { + public void addPage(IPageModel newModel, int index) { currentTabFolder.doAddItem(index, newModel); firePropertyChanged(new ContentEvent(ContentEvent.ADDED, this, newModel)); } @@ -130,7 +130,7 @@ public class SimpleSashWindowsContentProvider implements ISashWindowsContentProv * * {@inheritDoc} */ - public void addPage(ITabFolderModel toFolderModel, int index, IPageModel newModel) { + public void addPage(ITabFolderModel toFolderModel, IPageModel newModel, int index) { TabFolderModel srcFolder = (TabFolderModel)toFolderModel; srcFolder.doAddItem(index, newModel); firePropertyChanged(new ContentEvent(ContentEvent.ADDED, this, newModel)); diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/singlefolder/SingleFolderContentProvider.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/singlefolder/SingleFolderContentProvider.java index d92a78f5e68..9fab42698f2 100644 --- a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/singlefolder/SingleFolderContentProvider.java +++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/singlefolder/SingleFolderContentProvider.java @@ -102,7 +102,7 @@ public class SingleFolderContentProvider implements ISashWindowsContentProvider, * * {@inheritDoc} */ - public void addPage(int index, IPageModel newModel) { + public void addPage(IPageModel newModel, int index) { currentTabFolder.addItem(index, newModel); } @@ -110,7 +110,7 @@ public class SingleFolderContentProvider implements ISashWindowsContentProvider, * Do nothing because this implementation doesn't allows folders. {@inheritDoc} */ public void createFolder(ITabFolderModel tabFolder, int tabIndex, ITabFolderModel targetFolder, int side) { - // TODO Auto-generated method stub + } /** -- cgit v1.2.3