Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 86061 Details for
Bug 214195
task repository linking for Eclipse.org projects via Bundle-Vendor or provider specification
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
repository link provider prototype
clipboard.txt (text/plain), 4.72 KB, created by
Eugene Kuleshov
on 2008-01-03 01:18:45 EST
(
hide
)
Description:
repository link provider prototype
Filename:
MIME Type:
Creator:
Eugene Kuleshov
Created:
2008-01-03 01:18:45 EST
Size:
4.72 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.mylyn.pde.ui >Index: META-INF/MANIFEST.MF >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.pde.ui/META-INF/MANIFEST.MF,v >retrieving revision 1.55 >diff -u -r1.55 MANIFEST.MF >--- META-INF/MANIFEST.MF 6 Dec 2007 02:04:36 -0000 1.55 >+++ META-INF/MANIFEST.MF 3 Jan 2008 06:15:34 -0000 >@@ -22,6 +22,7 @@ > org.eclipse.jdt.launching, > org.eclipse.jdt.junit, > org.eclipse.mylyn.tasks.core, >+ org.eclipse.mylyn.tasks.ui, > org.eclipse.mylyn.context.ui, > org.eclipse.mylyn.ide.ui, > org.eclipse.mylyn.java.ui, >Index: plugin.xml >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.pde.ui/plugin.xml,v >retrieving revision 1.5 >diff -u -r1.5 plugin.xml >--- plugin.xml 27 Aug 2007 06:55:41 -0000 1.5 >+++ plugin.xml 3 Jan 2008 06:15:34 -0000 >@@ -57,6 +57,14 @@ > mode="run"> > </launchMode> > </launchConfigurationTabGroup> >- </extension> >+ </extension> >+ >+ <extension point="org.eclipse.mylyn.tasks.ui.projectLinkProviders"> >+ <linkProvider >+ id="org.eclipse.mylyn.pde.ui.eclipsePluginRepositoryLinkProvider" >+ class="org.eclipse.mylyn.internal.pde.ui.EclipsePluginTaskRepositoryLinkProvider" >+ name="Eclipse.org Plugin Link" >+ order="1010"/> >+ </extension> > >-</plugin> >\ No newline at end of file >+</plugin> >Index: src/org/eclipse/mylyn/internal/pde/ui/EclipsePluginTaskRepositoryLinkProvider.java >=================================================================== >RCS file: src/org/eclipse/mylyn/internal/pde/ui/EclipsePluginTaskRepositoryLinkProvider.java >diff -N src/org/eclipse/mylyn/internal/pde/ui/EclipsePluginTaskRepositoryLinkProvider.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/mylyn/internal/pde/ui/EclipsePluginTaskRepositoryLinkProvider.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,64 @@ >+/******************************************************************************* >+ * Copyright (c) 2004, 2007 Mylyn project committers 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 >+ * http://www.eclipse.org/legal/epl-v10.html >+ *******************************************************************************/ >+ >+package org.eclipse.mylyn.internal.pde.ui; >+ >+import org.eclipse.core.resources.IProject; >+import org.eclipse.core.resources.IResource; >+import org.eclipse.mylyn.tasks.core.TaskRepository; >+import org.eclipse.mylyn.tasks.core.TaskRepositoryManager; >+import org.eclipse.mylyn.tasks.ui.AbstractTaskRepositoryLinkProvider; >+import org.eclipse.pde.core.IModel; >+import org.eclipse.pde.core.plugin.IPluginModelBase; >+import org.eclipse.pde.core.plugin.PluginRegistry; >+import org.eclipse.pde.internal.core.PDECore; >+import org.eclipse.pde.internal.core.ifeature.IFeatureModel; >+import org.eclipse.pde.internal.core.natures.PDE; >+ >+/** >+ * Task repository link provider for Eclipse.org PDE projects >+ * >+ * @author Eugene Kuleshov >+ * >+ * TODO could use extension point to declare mapping for 3rd party plugin providers >+ */ >+public class EclipsePluginTaskRepositoryLinkProvider extends AbstractTaskRepositoryLinkProvider { >+ >+ public TaskRepository getTaskRepository(IResource resource, TaskRepositoryManager repositoryManager) { >+ IProject project = resource.getProject(); >+ if (PDE.hasPluginNature(project)) { >+ IPluginModelBase pluginModel = PluginRegistry.findModel(project); >+ if (pluginModel != null) { >+ String providerName = pluginModel.getPluginBase().getProviderName(); >+ return getTaskRepository(providerName, pluginModel, repositoryManager); >+ } >+ } else if (PDE.hasFeatureNature(project)) { >+ IFeatureModel featureModel = PDECore.getDefault().getFeatureModelManager().getFeatureModel(project); >+ if (featureModel != null) { >+ String providerName = featureModel.getFeature().getProviderName(); >+ return getTaskRepository(providerName, featureModel, repositoryManager); >+ } >+ } else if (PDE.hasUpdateSiteNature(project)) { >+ // TODO could use referenced features to lookup task repository >+ } >+ >+ // ignore >+ return null; >+ } >+ >+ private TaskRepository getTaskRepository(String providerName, IModel model, TaskRepositoryManager repositoryManager) { >+ if (providerName.startsWith("%")) { >+ providerName = model.getResourceString(providerName); >+ } >+ if ("Eclipse.org".equals(providerName)) { >+ return repositoryManager.getRepository("https://bugs.eclipse.org/bugs"); >+ } >+ return null; >+ } >+ >+}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 214195
: 86061 |
86062
|
87597
|
87598
|
116385
|
116386