Bug 517222 - org.eclipse.ui.views.properties.tabbed the major version
should be incremented

Change-Id: Ib7b399cbf10e1b5e38ce620a4104db499498c345
Signed-off-by: Vikas Chandra <Vikas.Chandra@in.ibm.com>
diff --git a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/AbstractApiTypeContainer.java b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/AbstractApiTypeContainer.java
index a6b7869..498bfd5 100644
--- a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/AbstractApiTypeContainer.java
+++ b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/AbstractApiTypeContainer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2013 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -118,6 +118,19 @@
 			comp = (IApiComponent) container.getAncestor(IApiElement.COMPONENT);
 			if (comp != null) {
 				origin = comp.getSymbolicName();
+				// comp is the fragment - get the origin of root host
+				if (origin != null && !origin.equals(id)) {
+					if (comp.isFragment()) {
+						IApiComponent rootComp = comp;
+						while (rootComp != null && rootComp.isFragment()) {
+							rootComp = rootComp.getHost();
+						}
+						if (rootComp != null) {
+							origin = rootComp.getSymbolicName();
+						}
+					}
+
+				}
 			}
 			if (origin == null) {
 				IApiTypeRoot file = container.findTypeRoot(qualifiedName);