diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ICoreConstants.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ICoreConstants.java
index d37f982c0ab..585d907d677 100644
--- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ICoreConstants.java
+++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ICoreConstants.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2021 IBM Corporation and others.
+ * Copyright (c) 2000, 2021, 2026 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -312,6 +312,9 @@ public interface ICoreConstants {
String OSGI_INF_FOLDER_NAME = "OSGI-INF/"; //$NON-NLS-1$
String FEATURE_FOLDER_NAME = "features"; //$NON-NLS-1$
+ String P2_INF_FILENAME = "p2.inf"; //$NON-NLS-1$
+ String P2_INF_BUNDLE_DESCRIPTOR = "META-INF/p2.inf"; //$NON-NLS-1$
+
// Common paths
IPath MANIFEST_PATH = IPath.fromOSString(BUNDLE_FILENAME_DESCRIPTOR);
IPath PLUGIN_PATH = IPath.fromOSString(PLUGIN_FILENAME_DESCRIPTOR);
@@ -319,6 +322,8 @@ public interface ICoreConstants {
IPath FEATURE_PATH = IPath.fromOSString(FEATURE_FILENAME_DESCRIPTOR);
IPath BUILD_PROPERTIES_PATH = IPath.fromOSString(BUILD_FILENAME_DESCRIPTOR);
IPath OSGI_INF_PATH = IPath.fromOSString(OSGI_INF_FOLDER_NAME);
+ IPath P2_INF_BUNDLE_PATH = IPath.fromOSString(P2_INF_BUNDLE_DESCRIPTOR);
+ IPath P2_INF_FEATURE_PATH = IPath.fromOSString(P2_INF_FILENAME);
// Extension point identifiers
String EXTENSION_POINT_SOURCE = PDECore.PLUGIN_ID + ".source"; //$NON-NLS-1$
diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/project/PDEProject.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/project/PDEProject.java
index 851d95dadcc..6e729ef19d6 100644
--- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/project/PDEProject.java
+++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/project/PDEProject.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2024 IBM Corporation and others.
+ * Copyright (c) 2010, 2024, 2026 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -260,6 +260,30 @@ public static IFolder getMetaInf(IProject project) {
return getBundleRelativeFolder(project, IPath.fromOSString(ICoreConstants.MANIFEST_FOLDER_NAME));
}
+ /**
+ * Returns the resource in the specified project corresponding to its
+ * META-INF/p2.inf file (for bundle/plugin projects).
+ *
+ * @param project project
+ * @return META-INF/p2.inf file that may or may not exist
+ */
+ public static IFile getBundleP2Inf(IProject project) {
+ return getBundleRelativeFile(project, ICoreConstants.P2_INF_BUNDLE_PATH);
+ }
+
+ /**
+ * Returns the resource in the specified project corresponding to its
+ * p2.inf file (for feature projects). Feature projects have
+ * the p2.inf file in the project root, not in META-INF.
+ *
+ * @param project
+ * project
+ * @return p2.inf file that may or may not exist
+ */
+ public static IFile getFeatureP2Inf(IProject project) {
+ return getBundleRelativeFile(project, ICoreConstants.P2_INF_FEATURE_PATH);
+ }
+
/**
* Returns a file relative to the bundle root of the specified project.
*
diff --git a/ui/org.eclipse.pde.ui/.settings/.api_filters b/ui/org.eclipse.pde.ui/.settings/.api_filters
index bb8bb419723..1b77af493e2 100644
--- a/ui/org.eclipse.pde.ui/.settings/.api_filters
+++ b/ui/org.eclipse.pde.ui/.settings/.api_filters
@@ -63,6 +63,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ui/org.eclipse.pde.ui/META-INF/MANIFEST.MF b/ui/org.eclipse.pde.ui/META-INF/MANIFEST.MF
index 87bb6898ee2..ddaa9c6ccc9 100644
--- a/ui/org.eclipse.pde.ui/META-INF/MANIFEST.MF
+++ b/ui/org.eclipse.pde.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %name
Bundle-SymbolicName: org.eclipse.pde.ui; singleton:=true
-Bundle-Version: 3.16.400.qualifier
+Bundle-Version: 3.16.500.qualifier
Bundle-Activator: org.eclipse.pde.internal.ui.PDEPlugin
Bundle-Vendor: %provider-name
Bundle-Localization: plugin
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/FeatureEditor.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/FeatureEditor.java
index ec22ea53b06..80c322e28d2 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/FeatureEditor.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/FeatureEditor.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2021 IBM Corporation and others.
+ * Copyright (c) 2000, 2021, 2026 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -52,6 +52,8 @@
import org.eclipse.pde.internal.ui.editor.build.BuildSourcePage;
import org.eclipse.pde.internal.ui.editor.context.InputContext;
import org.eclipse.pde.internal.ui.editor.context.InputContextManager;
+import org.eclipse.pde.internal.ui.editor.p2inf.P2InfInputContext;
+import org.eclipse.pde.internal.ui.editor.p2inf.P2InfSourcePage;
import org.eclipse.swt.SWTError;
import org.eclipse.swt.dnd.RTFTransfer;
import org.eclipse.swt.dnd.TextTransfer;
@@ -172,8 +174,14 @@ protected void createResourceContexts(InputContextManager manager, IFileEditorIn
FileEditorInput in = new FileEditorInput(buildFile);
manager.putContext(in, new BuildInputContext(this, in, file == buildFile));
}
+ IFile p2InfFile = PDEProject.getFeatureP2Inf(project);
+ if (p2InfFile != null && p2InfFile.exists()) {
+ FileEditorInput in = new FileEditorInput(p2InfFile);
+ manager.putContext(in, new P2InfInputContext(this, in, false));
+ }
manager.monitorFile(featureFile);
manager.monitorFile(buildFile);
+ manager.monitorFile(p2InfFile);
}
@Override
@@ -200,6 +208,11 @@ public void monitoredFileAdded(IFile file) {
IEditorInput in = new FileEditorInput(file);
fInputContextManager.putContext(in, new BuildInputContext(this, in, false));
}
+ } else if (name.equalsIgnoreCase(ICoreConstants.P2_INF_FILENAME)) {
+ if (!fInputContextManager.hasContext(P2InfInputContext.CONTEXT_ID)) {
+ IEditorInput in = new FileEditorInput(file);
+ fInputContextManager.putContext(in, new P2InfInputContext(this, in, false));
+ }
}
}
@@ -254,6 +267,12 @@ protected void createSystemFileContexts(InputContextManager manager, FileStoreEd
IEditorInput in = new FileStoreEditorInput(store);
manager.putContext(in, new BuildInputContext(this, in, file == buildFile));
}
+ File p2InfFile = new File(file.getParentFile(), ICoreConstants.P2_INF_FILENAME);
+ if (p2InfFile.exists()) {
+ IFileStore store = EFS.getStore(p2InfFile.toURI());
+ IEditorInput in = new FileStoreEditorInput(store);
+ manager.putContext(in, new P2InfInputContext(this, in, false));
+ }
} catch (CoreException e) {
PDEPlugin.logException(e);
}
@@ -298,6 +317,7 @@ protected void addEditorPages() {
}
addSourcePage(FeatureInputContext.CONTEXT_ID);
addSourcePage(BuildInputContext.CONTEXT_ID);
+ addSourcePage(P2InfInputContext.CONTEXT_ID);
}
@Override
@@ -323,6 +343,9 @@ protected IEditorPart createSourcePage(PDEFormEditor editor, String title, Strin
if (contextId.equals(BuildInputContext.CONTEXT_ID)) {
return new BuildSourcePage(editor, title, name);
}
+ if (contextId.equals(P2InfInputContext.CONTEXT_ID)) {
+ return new P2InfSourcePage(editor, contextId, title);
+ }
return super.createSourcePage(editor, title, name, contextId);
}
@@ -426,9 +449,18 @@ protected boolean isPatchEditor() {
public void showEditorInput(IEditorInput editorInput) {
String name = editorInput.getName();
if (name.equals(ICoreConstants.FEATURE_FILENAME_DESCRIPTOR)) {
- setActivePage(0);
- } else {
- setActivePage(getPageCount() - 3);
+ setActivePage(FeatureFormPage.PAGE_ID);
+ } else if (name.equalsIgnoreCase(ICoreConstants.BUILD_FILENAME_DESCRIPTOR)) {
+ IFormPage uiPage = findPage(BuildPage.PAGE_ID);
+ if (uiPage != null) {
+ setActivePage(uiPage.getId());
+ }
+
+ } else if (name.equalsIgnoreCase(ICoreConstants.P2_INF_FILENAME)) {
+ IFormPage page = findPage(P2InfInputContext.CONTEXT_ID);
+ if (page != null) {
+ setActivePage(page.getId());
+ }
}
}
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/FeatureEditorMatchingStrategy.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/FeatureEditorMatchingStrategy.java
index abddd0ad3ae..4fa2d5045f0 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/FeatureEditorMatchingStrategy.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/FeatureEditorMatchingStrategy.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2015 IBM Corporation and others.
+ * Copyright (c) 2005, 2015, 2026 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -45,11 +45,18 @@ public boolean matches(IEditorReference editorRef, IEditorInput input) {
// build.properties matches with editors that have a feature.xml file
// as their input and that feature.xml is at the root
if (inputFile.getName().equals(ICoreConstants.FEATURE_FILENAME_DESCRIPTOR)) {
- if (currInputFile.getName().equals(ICoreConstants.BUILD_FILENAME_DESCRIPTOR)) {
+ if (currInputFile.getName().equals(ICoreConstants.BUILD_FILENAME_DESCRIPTOR)
+ || currInputFile.getName().equals(ICoreConstants.P2_INF_FILENAME)) {
return inputFile.getProjectRelativePath().toString().equals(ICoreConstants.FEATURE_FILENAME_DESCRIPTOR);
}
return inputFile.equals(currInputFile);
} else if (inputFile.getName().equals(ICoreConstants.BUILD_FILENAME_DESCRIPTOR)) {
+ if (currInputFile.getName().equals(ICoreConstants.FEATURE_FILENAME_DESCRIPTOR))
+ return currInputFile.getProjectRelativePath().toString().equals(ICoreConstants.FEATURE_FILENAME_DESCRIPTOR);
+ return inputFile.equals(currInputFile);
+ } else if (inputFile.getName().equals(ICoreConstants.P2_INF_FILENAME)) {
+ // p2.inf should match the feature editor when the current editor
+ // input is the feature.xml at the project root
if (currInputFile.getName().equals(ICoreConstants.FEATURE_FILENAME_DESCRIPTOR)) {
return currInputFile.getProjectRelativePath().toString().equals(ICoreConstants.FEATURE_FILENAME_DESCRIPTOR);
}
@@ -60,5 +67,4 @@ public boolean matches(IEditorReference editorRef, IEditorInput input) {
return false;
}
}
-
-}
+}
\ No newline at end of file
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/p2inf/P2InfInputContext.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/p2inf/P2InfInputContext.java
new file mode 100644
index 00000000000..600a9942c5b
--- /dev/null
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/p2inf/P2InfInputContext.java
@@ -0,0 +1,80 @@
+/*******************************************************************************
+ * Copyright (c) 2026 IBM Corporation and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.ui.editor.p2inf;
+
+import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.pde.core.IBaseModel;
+import org.eclipse.pde.core.IModelChangedEvent;
+import org.eclipse.pde.internal.ui.editor.PDEFormEditor;
+import org.eclipse.pde.internal.ui.editor.context.InputContext;
+import org.eclipse.text.edits.TextEdit;
+import org.eclipse.ui.IEditorInput;
+
+public class P2InfInputContext extends InputContext {
+ public static final String P2_INF_PARTITION = "___p2_inf_partition"; //$NON-NLS-1$
+
+ public static final String CONTEXT_ID = "p2inf-context"; //$NON-NLS-1$
+
+ public P2InfInputContext(PDEFormEditor editor, IEditorInput input, boolean primary) {
+ super(editor, input, primary);
+ create();
+ }
+
+ @Override
+ protected Charset getDefaultCharset() {
+ return StandardCharsets.UTF_8;
+ }
+
+ @Override
+ protected IBaseModel createModel(IEditorInput input) throws CoreException {
+ IDocument document = getDocumentProvider().getDocument(input);
+ P2InfModel model = new P2InfModel(document);
+ model.load();
+ return model;
+ }
+
+ @Override
+ public P2InfModel getModel() {
+ return (P2InfModel) super.getModel();
+ }
+
+ @Override
+ public String getId() {
+ return CONTEXT_ID;
+ }
+
+ @Override
+ protected void addTextEditOperation(ArrayList ops, IModelChangedEvent event) {
+
+ }
+
+ @Override
+ public void doRevert() {
+ // Revert to the saved version by reloading the model from the document
+ P2InfModel model = getModel();
+ if (model != null) {
+ model.load();
+ }
+ }
+
+ @Override
+ protected String getPartitionName() {
+ return P2_INF_PARTITION;
+ }
+}
\ No newline at end of file
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/p2inf/P2InfModel.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/p2inf/P2InfModel.java
new file mode 100644
index 00000000000..1e00cc36eda
--- /dev/null
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/p2inf/P2InfModel.java
@@ -0,0 +1,83 @@
+/*******************************************************************************
+ * Copyright (c) 2026 IBM Corporation and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.ui.editor.p2inf;
+
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.pde.core.IBaseModel;
+import org.eclipse.pde.core.IModelChangeProvider;
+import org.eclipse.pde.core.IModelChangedEvent;
+import org.eclipse.pde.core.IModelChangedListener;
+
+public class P2InfModel implements IBaseModel, IModelChangeProvider {
+
+ private final IDocument document;
+ private volatile boolean valid;
+ private volatile boolean disposed;
+
+ public P2InfModel(IDocument document) {
+ this.document = document;
+ }
+
+ public void load() {
+ valid = document != null;
+ }
+
+ public IDocument getDocument() {
+ return document;
+ }
+
+ @Override
+ public boolean isEditable() {
+ return true;
+ }
+
+ @Override
+ public boolean isValid() {
+ return valid;
+ }
+
+ @Override
+ public boolean isDisposed() {
+ return disposed;
+ }
+
+ @Override
+ public void dispose() {
+ disposed = true;
+ }
+
+ @Override
+ public T getAdapter(Class adapter) {
+ if (adapter == IDocument.class) {
+ return adapter.cast(document);
+ }
+ return null;
+ }
+
+ @Override
+ public void addModelChangedListener(IModelChangedListener listener) {
+ }
+
+ @Override
+ public void fireModelChanged(IModelChangedEvent event) {
+ }
+
+ @Override
+ public void fireModelObjectChanged(Object object, String property, Object oldValue, Object newValue) {
+ }
+
+ @Override
+ public void removeModelChangedListener(IModelChangedListener listener) {
+ }
+}
\ No newline at end of file
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/p2inf/P2InfSourcePage.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/p2inf/P2InfSourcePage.java
new file mode 100644
index 00000000000..afbc111948c
--- /dev/null
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/p2inf/P2InfSourcePage.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2026 IBM Corporation and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.ui.editor.p2inf;
+
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.pde.internal.ui.editor.KeyValueSourcePage;
+import org.eclipse.pde.internal.ui.editor.PDEFormEditor;
+
+public class P2InfSourcePage extends KeyValueSourcePage {
+
+ public P2InfSourcePage(PDEFormEditor editor, String id, String title) {
+ super(editor, id, title);
+ }
+
+ @Override
+ public ILabelProvider createOutlineLabelProvider() {
+ return null;
+ }
+
+ @Override
+ public ITreeContentProvider createOutlineContentProvider() {
+ return null;
+ }
+
+ @Override
+ public void updateSelection(Object object) {
+ }
+
+}
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ManifestEditor.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ManifestEditor.java
index fcbfc80bc5b..796d69d4951 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ManifestEditor.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ManifestEditor.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2024 IBM Corporation and others.
+ * Copyright (c) 2000, 2024, 2026 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -82,6 +82,8 @@
import org.eclipse.pde.internal.ui.editor.build.BuildSourcePage;
import org.eclipse.pde.internal.ui.editor.context.InputContext;
import org.eclipse.pde.internal.ui.editor.context.InputContextManager;
+import org.eclipse.pde.internal.ui.editor.p2inf.P2InfInputContext;
+import org.eclipse.pde.internal.ui.editor.p2inf.P2InfSourcePage;
import org.eclipse.pde.internal.ui.wizards.tools.OrganizeManifestsAction;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IEditorInput;
@@ -274,6 +276,12 @@ protected void createResourceContexts(InputContextManager manager, IFileEditorIn
manager.putContext(in, new BuildInputContext(this, in, false));
}
manager.monitorFile(buildFile);
+ IFile p2InfFile = container.getFile(ICoreConstants.P2_INF_BUNDLE_PATH);
+ if (p2InfFile != null && p2InfFile.exists()) {
+ FileEditorInput in = new FileEditorInput(p2InfFile);
+ manager.putContext(in, new P2InfInputContext(this, in, false));
+ }
+ manager.monitorFile(p2InfFile);
fPrefs = new ProjectScope(container.getProject()).getNode(PDECore.PLUGIN_ID);
if (fPrefs != null) {
@@ -325,6 +333,16 @@ public void monitoredFileAdded(IFile file) {
IEditorInput in = new FileEditorInput(file);
fInputContextManager.putContext(in, new BndInputContext(this, in, false));
}
+ } else if (name.equalsIgnoreCase(ICoreConstants.P2_INF_FILENAME)) {
+ // check if p2.inf is in META-INF folder (for bundles)
+ if (!fInputContextManager.hasContext(P2InfInputContext.CONTEXT_ID)) {
+ IContainer parent = file.getParent();
+ // compare with folder name "META-INF/"
+ if (parent != null && "META-INF".equals(parent.getName())) { //$NON-NLS-1$
+ IEditorInput in = new FileEditorInput(file);
+ fInputContextManager.putContext(in, new P2InfInputContext(this, in, false));
+ }
+ }
}
}
@@ -561,6 +579,7 @@ protected void addEditorPages() {
addSourcePage(PluginInputContext.CONTEXT_ID);
addSourcePage(BuildInputContext.CONTEXT_ID);
addSourcePage(BndInputContext.CONTEXT_ID);
+ addSourcePage(P2InfInputContext.CONTEXT_ID);
}
private boolean isSourcePageID(String pageID) {
@@ -574,6 +593,7 @@ private boolean isSourcePageID(String pageID) {
case PluginInputContext.CONTEXT_ID: // plugin.xml
case BundleInputContext.CONTEXT_ID: // MANIFEST.MF
case BndInputContext.CONTEXT_ID: // bnd instruction
+ case P2InfInputContext.CONTEXT_ID: // p2.inf
return true;
default:
break;
@@ -688,6 +708,9 @@ protected IEditorPart createSourcePage(PDEFormEditor editor, String title, Strin
if (contextId.equals(BndInputContext.CONTEXT_ID)) {
return new BndSourcePage(editor, contextId, title);
}
+ if (contextId.equals(P2InfInputContext.CONTEXT_ID)) {
+ return new P2InfSourcePage(editor, contextId, title);
+ }
return super.createSourcePage(editor, title, name, contextId);
}
@@ -785,6 +808,10 @@ public void showEditorInput(IEditorInput editorInput) {
setActivePage(OverviewPage.PAGE_ID);
}
}
+ } else if (name.equals(ICoreConstants.P2_INF_FILENAME)) {
+ if (!P2InfInputContext.CONTEXT_ID.equals(id)) {
+ setActivePage(P2InfInputContext.CONTEXT_ID);
+ }
} else if (!BundleInputContext.CONTEXT_ID.equals(id)) {
setActivePage(SHOW_SOURCE ? BundleInputContext.CONTEXT_ID : OverviewPage.PAGE_ID);
}
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ManifestEditorMatchingStrategy.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ManifestEditorMatchingStrategy.java
index 997eb03dc3c..5de75dd3ee8 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ManifestEditorMatchingStrategy.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ManifestEditorMatchingStrategy.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2015 IBM Corporation and others.
+ * Copyright (c) 2005, 2015, 2026 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -71,6 +71,12 @@ public boolean matches(IEditorReference editorRef, IEditorInput input) {
IFile file = parent.getFile(ICoreConstants.MANIFEST_PATH);
return file.exists() && editorFile.equals(file);
}
+ if (inputFile.getName().equals(ICoreConstants.P2_INF_FILENAME)) {
+ IContainer parent = inputFile.getParent().getParent();
+ IFile file = parent.getFile(ICoreConstants.MANIFEST_PATH);
+ return file.exists() && editorFile.equals(file);
+
+ }
} catch (PartInitException e) {
return false;
}